Example #1
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            ControllerSize = reader.ReadUInt32();
            Controller.Read(reader);
            m_TOS.Clear();
            m_TOS.Read(reader);
            m_animationClips = reader.ReadAssetArray <PPtr <AnimationClip> >();

            if (IsReadStateMachineBehaviourVectorDescription(reader.Version))
            {
                StateMachineBehaviourVectorDescription.Read(reader);
                m_stateMachineBehaviours = reader.ReadAssetArray <PPtr <MonoBehaviour> >();
            }

            if (!IsAlignMultiThreadedStateMachine(reader.Version))
            {
                reader.AlignStream(AlignType.Align4);
            }
            if (IsReadMultiThreadedStateMachine(reader.Version))
            {
                MultiThreadedStateMachine = reader.ReadBoolean();
            }
            if (IsAlignMultiThreadedStateMachine(reader.Version))
            {
                reader.AlignStream(AlignType.Align4);
            }
        }
Example #2
0
        public override void Read(EndianStream stream)
        {
            base.Read(stream);

            ControllerSize = stream.ReadUInt32();
            Controller.Read(stream);
            TOS.Read(stream);
            m_animationClips = stream.ReadArray(() => new PPtr <AnimationClip>(AssetsFile));
            StateMachineBehaviourVectorDescription.Read(stream);
            m_stateMachineBehaviours = stream.ReadArray(() => new PPtr <MonoBehaviour>(AssetsFile));
            if (IsReadMultiThreadedStateMachine)
            {
                MultiThreadedStateMachine = stream.ReadBoolean();
            }
            stream.AlignStream(AlignType.Align4);
        }