Example #1
0
        public override void Parse(AssetsReader reader)
        {
            base.ParseBase(reader);
            IsEnabled            = reader.ReadBoolean();
            CastShadows          = reader.ReadByte();
            ReceiveShadows       = reader.ReadByte();
            DynamicOcclude       = reader.ReadByte();
            MotionVectors        = reader.ReadByte();
            LightProbeUsage      = reader.ReadByte();
            ReflectionProbeUsage = reader.ReadByte();
            reader.AlignTo(4);
            RenderingLayerMask = reader.ReadUInt32();
            if (ObjectInfo.ParentFile.Metadata.VersionGte("2018.3"))
            {
                RendererPriority = reader.ReadInt32();
            }
            LightmapIndex               = reader.ReadUInt16();
            LightmapIndexDynamic        = reader.ReadUInt16();
            LightmapTilingOffset        = new Vector4F(reader);
            LightmapTilingOffsetDynamic = new Vector4F(reader);
            Materials       = reader.ReadArrayOf(r => (ISmartPtr <MaterialObject>)SmartPtr <MaterialObject> .Read(ObjectInfo.ParentFile, this, r));
            StaticBatchInfo = new StaticBatchInfo(reader);
            StaticBatchRoot = SmartPtr <Transform> .Read(ObjectInfo.ParentFile, this, reader);

            ProbeAnchor = SmartPtr <Transform> .Read(ObjectInfo.ParentFile, this, reader);

            LightProbeVolumeOverride = SmartPtr <GameObject> .Read(ObjectInfo.ParentFile, this, reader);

            SortingLayerID          = reader.ReadInt32();
            SortingLayer            = reader.ReadInt16();
            SortingOrder            = reader.ReadInt16();
            AdditionalVertexStreams = SmartPtr <MeshObject> .Read(ObjectInfo.ParentFile, this, reader);
        }
Example #2
0
        public void Parse(AssetsFile file, AssetsObject owner, AssetsReader reader)
        {
            Texture = SmartPtr <Texture2DObject> .Read(file, owner, reader);

            Scale  = new Vector2F(reader);
            Offset = new Vector2F(reader);
        }
Example #3
0
        protected override void Parse(AssetsReader reader)
        {
            base.Parse(reader);
            Enabled           = reader.ReadInt32();
            MonoscriptTypePtr = SmartPtr <MonoScriptObject> .Read(ObjectInfo.ParentFile, this, reader);

            Name = reader.ReadString();
        }
Example #4
0
 protected override void Parse(AssetsReader reader)
 {
     base.Parse(reader);
     LocalRotation = new QuaternionF(reader);
     LocalPosition = new Vector3F(reader);
     LocalScale    = new Vector3F(reader);
     Children      = reader.ReadArrayOf(x => (ISmartPtr <Transform>)SmartPtr <Transform> .Read(ObjectInfo.ParentFile, this, reader));
     Father        = SmartPtr <AssetsObject> .Read(ObjectInfo.ParentFile, this, reader);
 }
Example #5
0
        protected void ParseDetails(AssetsReader reader)
        {
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                Components.Add(SmartPtr <AssetsObject> .Read(ObjectInfo.ParentFile, this, reader));
            }
            Layer    = reader.ReadUInt32();
            Name     = reader.ReadString();
            Tag      = reader.ReadUInt16();
            IsActive = reader.ReadBoolean();
        }
Example #6
0
        //public SpriteObject(IObjectInfo<AssetsObject> objectInfo) : base(objectInfo)
        //{ }

        protected override void Parse(AssetsReader reader)
        {
            base.Parse(reader);
            int startPosition = reader.Position;

            Name          = reader.ReadString();
            UnparsedData1 = reader.ReadBytes(100);
            Texture       = SmartPtr <Texture2DObject> .Read(ObjectInfo.ParentFile, this, reader);

            int readLen = ObjectInfo.DataSize - (reader.Position - startPosition);

            UnparsedData2 = reader.ReadBytes(readLen);
        }
Example #7
0
 protected override void Parse(AssetsReader reader)
 {
     base.Parse(reader);
     try
     {
         GameObject = SmartPtr <GameObject> .Read(ObjectInfo.ParentFile, this, reader);
     }
     catch (Exception ex)
     {
         Log.LogErr("Component failed to load its GameObject... allowing it to continue because this happens with bundles?");
         GameObject = null;
     }
 }
Example #8
0
        public override void Parse(AssetsReader reader)
        {
            base.ParseBase(reader);
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                Components.Add(SmartPtr <AssetsObject> .Read(ObjectInfo.ParentFile, this, reader));
            }
            Layer    = reader.ReadUInt32();
            Name     = reader.ReadString();
            Tag      = reader.ReadUInt16();
            IsActive = reader.ReadBoolean();
        }
Example #9
0
        public override void Parse(AssetsReader reader)
        {
            base.ParseBase(reader);
            Name   = reader.ReadString();
            Shader = SmartPtr <AssetsObject> .Read(this.ObjectInfo.ParentFile, this, reader);

            ShaderKeywords           = reader.ReadString();
            LightmapFlags            = reader.ReadUInt32();
            EnableInstancingVariants = reader.ReadBoolean();
            DoubleSidedGI            = reader.ReadBoolean();
            reader.AlignTo(4);
            CustomRenderQueue    = reader.ReadInt32();
            StringTagMap         = reader.ReadArrayOf(r => new Map <string, string>(reader.ReadString(), reader.ReadString()));
            DisabledShaderPasses = reader.ReadArrayOf(r => r.ReadString());
            SavedProperties      = new PropertySheet(this.ObjectInfo.ParentFile, this, reader);
        }
Example #10
0
            public void Parse(AssetsFile assetsFile, AssetsObject owner, AssetsReader reader)
            {
                Texture = SmartPtr <Texture2DObject> .Read(assetsFile, owner, reader);

                AlphaTexture = SmartPtr <Texture2DObject> .Read(assetsFile, owner, reader);

                SubMeshes   = reader.ReadArrayOf(r => new Submesh(reader));
                IndexBuffer = reader.ReadArray();
                reader.AlignTo(4);
                VertexData          = new VertexData(reader);
                BindPose            = reader.ReadArrayOf(r => r.ReadSingle());
                TextureRect         = new RectF(reader);
                TextureRectOffset   = new Vector2F(reader);
                AtlasRectOffset     = new Vector2F(reader);
                SettingsRaw         = reader.ReadUInt32();
                UVTransform         = new Vector4F(reader);
                DownscaleMultiplier = reader.ReadSingle();
            }
Example #11
0
        public override void Parse(AssetsReader reader)
        {
            base.ParseBase(reader);
            Name          = reader.ReadString();
            Rect          = new RectF(reader);
            Offset        = new Vector2F(reader);
            Border        = new Vector4F(reader);
            PixelsToUnits = reader.ReadSingle();
            Pivot         = new Vector2F(reader);
            Extrude       = reader.ReadUInt32();
            IsPolygon     = reader.ReadBoolean();
            reader.AlignTo(4);
            RenderDataKey = new Map <Guid, long>(reader.ReadGuid(), reader.ReadInt64());
            AtlasTags     = reader.ReadArrayOf(r => r.ReadString());
            SpriteAtlas   = SmartPtr <AssetsObject> .Read(ObjectInfo.ParentFile, this, reader);

            RenderData   = new SpriteRenderData(ObjectInfo.ParentFile, this, reader);
            PhysicsShape = reader.ReadArrayOf(r => r.ReadArrayOf(r2 => new Vector2F(r2)));
            Bones        = reader.ReadArrayOf(r => (ISmartPtr <Transform>)SmartPtr <Transform> .Read(ObjectInfo.ParentFile, this, reader));
        }
Example #12
0
 protected override void Parse(AssetsReader reader)
 {
     base.Parse(reader);
     Name                       = reader.ReadString();
     PreloadTable               = reader.ReadArrayOf <ISmartPtr <AssetsObject> >(x => SmartPtr <AssetsObject> .Read(ObjectInfo.ParentFile, this, x));
     Container                  = reader.ReadArrayOf(x => new Map(ObjectInfo.ParentFile, this, x));
     MainAsset                  = new AssetInfo(ObjectInfo.ParentFile, this, reader);
     RuntimeCompatibility       = reader.ReadUInt32();
     AssetBundleName            = reader.ReadString();
     Dependencies               = reader.ReadArrayOf <ISmartPtr <AssetsObject> >(x => SmartPtr <AssetsObject> .Read(ObjectInfo.ParentFile, this, x));
     IsStreamedSceneAssetBundle = reader.ReadBoolean();
     reader.AlignTo(4);
     ExplicitDataLayout = reader.ReadInt32();
     PathFlags          = reader.ReadInt32();
     SceneHashes        = reader.ReadArrayOf(x => new Map(ObjectInfo.ParentFile, this, x));
 }
Example #13
0
 protected override void Parse(AssetsReader reader)
 {
     base.Parse(reader);
     Mesh = SmartPtr <MeshObject> .Read(ObjectInfo.ParentFile, this, reader);
 }
Example #14
0
 private void Parse(AssetsFile assetsFile, AssetsObject owner, AssetsReader reader)
 {
     PreloadIndex = reader.ReadInt32();
     PreloadSize  = reader.ReadInt32();
     Asset        = SmartPtr <AssetsObject> .Read(assetsFile, owner, reader);
 }