Esempio n. 1
0
 public Animator(AssetInfo assetInfo) :
     base(assetInfo)
 {
     Avatar     = new PPtr <Avatar>(AssetsFile);
     Controller = new PPtr <RuntimeAnimatorController>(AssetsFile);
 }
Esempio n. 2
0
 protected EditorExtension(AssetInfo assetInfo) :
     base(assetInfo)
 {
     PrefabParentObject = new PPtr <EditorExtension>(AssetsFile);
     PrefabInternal     = new PPtr <Prefab>(AssetsFile);
 }
Esempio n. 3
0
 public MeshFilter(AssetInfo assetInfo) :
     base(assetInfo)
 {
     Mesh = new PPtr <Mesh>(AssetsFile);
 }
Esempio n. 4
0
 public Animation(AssetInfo assetInfo) :
     base(assetInfo)
 {
     DefaultAnimation = new PPtr <AnimationClip>(AssetsFile);
 }
Esempio n. 5
0
 protected Component(AssetInfo assetInfo) :
     base(assetInfo)
 {
     GameObject = new PPtr <GameObject>(AssetsFile);
 }
Esempio n. 6
0
 public MeshRenderer(AssetInfo assetInfo) :
     base(assetInfo)
 {
     AdditionalVertexStreams = new PPtr <Mesh>(AssetsFile);
 }
Esempio n. 7
0
 public Transform(AssetInfo assetInfo) :
     base(assetInfo)
 {
     Father = new PPtr <Transform>(AssetsFile);
 }
Esempio n. 8
0
        public override void Read(EndianStream stream)
        {
            base.Read(stream);

            Quality             = stream.ReadInt32();
            UpdateWhenOffscreen = stream.ReadBoolean();

            if (IsReadSkinNormals)
            {
                SkinNormals = stream.ReadBoolean();
            }
            if (IsReadSkinMotionVector)
            {
                SkinnedMotionVectors = stream.ReadBoolean();
            }
            stream.AlignStream(AlignType.Align4);

            if (IsReadOffscreen)
            {
                DisableAnimationWhenOffscreen.Read(stream);
            }

            Mesh.Read(stream);

            int bonesCount = stream.ReadInt32();

            m_bones = new PPtr <Transform> [bonesCount];
            for (int i = 0; i < bonesCount; i++)
            {
                PPtr <Transform> bone = new PPtr <Transform>(AssetsFile);
                bone.Read(stream);
                m_bones[i] = bone;
            }
            stream.AlignStream(AlignType.Align4);

            if (IsReadBindPose)
            {
                BindPose.Read(stream);
            }

            if (IsReadAABB)
            {
                if (IsReadWeights)
                {
                    int weightCount = stream.ReadInt32();
                    m_blendShapeWeights = new float[weightCount];
                    for (int i = 0; i < weightCount; i++)
                    {
                        float weight = stream.ReadSingle();
                        m_blendShapeWeights[i] = weight;
                    }
                }

                if (IsReadRootBone)
                {
                    RootBone.Read(stream);
                }

                AABB.Read(stream);
                DirtyAABB = stream.ReadBoolean();
                stream.AlignStream(AlignType.Align4);
            }
        }
 public AnimatorOverrideController(AssetInfo assetInfo) :
     base(assetInfo)
 {
     Controller = new PPtr <RuntimeAnimatorController>(AssetsFile);
 }