Exemplo n.º 1
0
        //public MonoScriptObject(IObjectInfo<AssetsObject> objectInfo) : base(objectInfo)
        //{ }

        protected override void Parse(AssetsReader reader)
        {
            base.Parse(reader);
            Name           = reader.ReadString();
            ExecutionOrder = reader.ReadInt32();
            PropertiesHash = reader.ReadGuid();
            ClassName      = reader.ReadString();
            Namespace      = reader.ReadString();
            AssemblyName   = reader.ReadString();
        }
Exemplo n.º 2
0
        public override void Parse(AssetsReader reader)
        {
            base.ParseBase(reader);
            int startPosition = reader.Position;

            Name = reader.ReadString();
            //int readLen = ObjectInfo.DataSize - (reader.Position - startPosition);
            //MeshData = reader.ReadBytes(readLen);
            SubMeshes        = reader.ReadArrayOf(r => new Submesh(r));
            BlendShapeData   = new BlendShapeData(reader);
            BindPose         = reader.ReadArrayOf(r => reader.ReadSingle());
            BoneNameHashes   = reader.ReadArrayOf(r => r.ReadUInt32());
            RootBoneNameHash = reader.ReadUInt32();
            MeshCompression  = reader.ReadByte();
            IsReadable       = reader.ReadBoolean();
            KeepVerticies    = reader.ReadBoolean();
            KeepIndicies     = reader.ReadBoolean();
            reader.AlignTo(4);
            IndexFormat = reader.ReadInt32();
            IndexBuffer = reader.ReadArray();
            reader.AlignTo(4);
            VertexData               = new VertexData(reader);
            CompressedMesh           = new CompressedMesh(reader);
            LocalAABB                = new AABB(reader);
            MeshUsageFlags           = reader.ReadInt32();
            BakedConvexCollisionMesh = reader.ReadArray();
            reader.AlignTo(4);
            BakedTriangleCollisionMesh = reader.ReadArray();
            reader.AlignTo(4);
            MeshMetrics1 = reader.ReadSingle();
            MeshMetrics2 = reader.ReadSingle();
            StreamData   = new StreamingInfo(reader);
        }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
0
 public void Parse(AssetsReader reader)
 {
     Name       = reader.ReadString();
     NameHash   = reader.ReadUInt32();
     FrameIndex = reader.ReadInt32();
     FrameCount = reader.ReadInt32();
 }
Exemplo n.º 5
0
        protected override void Parse(AssetsReader reader)
        {
            base.Parse(reader);
            Name = reader.ReadString();
            ForcedFallbackFormat = reader.ReadInt32();
            DownscaleFallback    = reader.ReadBoolean();
            reader.AlignTo(4);
            Width             = reader.ReadInt32();
            Height            = reader.ReadInt32();
            CompleteImageSize = reader.ReadInt32();
            TextureFormat     = (TextureFormatType)reader.ReadInt32();
            MipCount          = reader.ReadInt32();
            IsReadable        = reader.ReadBoolean();
            StreamingMipmaps  = reader.ReadBoolean();
            reader.AlignTo(4);
            StreamingMipmapsPriority = reader.ReadInt32();
            ImageCount       = reader.ReadInt32();
            TextureDimension = reader.ReadInt32();
            TextureSettings  = new GLTextureSettings(reader);
            LightmapFormat   = reader.ReadInt32();
            ColorSpace       = reader.ReadInt32();
            int imageDataSize = reader.ReadInt32();

            ImageData = reader.ReadBytes(imageDataSize);
            reader.AlignTo(4);
            StreamData = new StreamingInfo(reader);
        }
Exemplo n.º 6
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));
 }
Exemplo n.º 7
0
        protected override void Parse(AssetsReader reader)
        {
            base.Parse(reader);
            Enabled           = reader.ReadInt32();
            MonoscriptTypePtr = SmartPtr <MonoScriptObject> .Read(ObjectInfo.ParentFile, this, reader);

            Name = reader.ReadString();
        }
Exemplo n.º 8
0
        protected override void Parse(AssetsReader reader)
        {
            base.Parse(reader);
            int startPosition = reader.Position;

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

            MeshData = reader.ReadBytes(readLen);
        }
Exemplo n.º 9
0
        public void Parse(AssetsFile file, AssetsObject owner, AssetsReader reader)
        {
            var count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                TexEnvs.Add(new Map <string, TexEnv>(reader.ReadString(), new TexEnv(file, owner, reader)));
            }
            count = reader.ReadInt32();
            for (int i = 0; i < count; i++)
            {
                Floats.Add(new Map <string, Single>(reader.ReadString(), reader.ReadSingle()));
            }

            count = reader.ReadInt32();
            for (int i = 0; i < count; i++)
            {
                Colors.Add(new Map <string, Color>(reader.ReadString(), new Color(reader)));
            }
        }
Exemplo n.º 10
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);
        }
Exemplo n.º 11
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();
        }
Exemplo n.º 12
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();
        }
Exemplo n.º 13
0
 public override void Parse(AssetsReader reader)
 {
     base.ParseBase(reader);
     Name            = reader.ReadString();
     LoadType        = reader.ReadInt32();
     Channels        = reader.ReadInt32();
     Frequency       = reader.ReadInt32();
     BitsPerSample   = reader.ReadInt32();
     Length          = reader.ReadSingle();
     IsTrackerFormat = reader.ReadBoolean();
     Ambisonic       = reader.ReadBoolean();
     reader.AlignTo(4);
     SubsoundIndex    = reader.ReadInt32();
     PreloadAudioData = reader.ReadBoolean();
     LoadInBackground = reader.ReadBoolean();
     Legacy3D         = reader.ReadBoolean();
     reader.AlignTo(4);
     Resource          = new StreamedResource(reader);
     CompressionFormat = reader.ReadInt32();
 }
Exemplo n.º 14
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));
        }
Exemplo n.º 15
0
 private void Parse(AssetsFile assetsFile, AssetsObject owner, AssetsReader reader)
 {
     First  = reader.ReadString();
     Second = new AssetInfo(assetsFile, owner, reader);
 }
Exemplo n.º 16
0
 public override void Parse(AssetsReader reader)
 {
     base.ParseBase(reader);
     Name   = reader.ReadString();
     Script = reader.ReadString();
 }
Exemplo n.º 17
0
 private void Parse(AssetsReader reader)
 {
     offset = reader.ReadUInt32();
     size   = reader.ReadUInt32();
     path   = reader.ReadString();
 }
Exemplo n.º 18
0
 private void Parse(AssetsReader reader)
 {
     Source = reader.ReadString();
     Offset = reader.ReadUInt64();
     Size   = reader.ReadUInt64();
 }
Exemplo n.º 19
0
 protected void ParseDetails(AssetsReader reader)
 {
     Name   = reader.ReadString();
     Script = reader.ReadString();
 }