Exemple #1
0
 public Animator(AssetInfo assetInfo) :
     base(assetInfo)
 {
     Avatar     = new PPtr <Avatar>(AssetsFile);
     Controller = new PPtr <RuntimeAnimatorController>(AssetsFile);
 }
Exemple #2
0
 protected EditorExtension(AssetInfo assetInfo) :
     base(assetInfo)
 {
     PrefabParentObject = new PPtr <EditorExtension>(AssetsFile);
     PrefabInternal     = new PPtr <Prefab>(AssetsFile);
 }
Exemple #3
0
 public MeshFilter(AssetInfo assetInfo) :
     base(assetInfo)
 {
     Mesh = new PPtr <Mesh>(AssetsFile);
 }
Exemple #4
0
 public Animation(AssetInfo assetInfo) :
     base(assetInfo)
 {
     DefaultAnimation = new PPtr <AnimationClip>(AssetsFile);
 }
Exemple #5
0
 protected Component(AssetInfo assetInfo) :
     base(assetInfo)
 {
     GameObject = new PPtr <GameObject>(AssetsFile);
 }
Exemple #6
0
 public MeshRenderer(AssetInfo assetInfo) :
     base(assetInfo)
 {
     AdditionalVertexStreams = new PPtr <Mesh>(AssetsFile);
 }
Exemple #7
0
 public Transform(AssetInfo assetInfo) :
     base(assetInfo)
 {
     Father = new PPtr <Transform>(AssetsFile);
 }
Exemple #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);
 }