Esempio n. 1
0
 public LayerConstant(EndianBinaryReader reader, int[] version)
 {
     m_StateMachineIndex          = reader.ReadUInt32();
     m_StateMachineMotionSetIndex = reader.ReadUInt32();
     m_BodyMask                 = new HumanPoseMask(reader, version);
     m_SkeletonMask             = new SkeletonMask(reader);
     m_Binding                  = reader.ReadUInt32();
     m_LayerBlendingMode        = reader.ReadInt32();
     m_DefaultWeight            = reader.ReadSingle();
     m_IKPass                   = reader.ReadBoolean();
     m_SyncedLayerAffectsTiming = reader.ReadBoolean();
     reader.AlignStream(4);
 }
Esempio n. 2
0
        public LayerConstant(ObjectReader reader)
        {
            var version = reader.version;

            m_StateMachineIndex          = reader.ReadUInt32();
            m_StateMachineMotionSetIndex = reader.ReadUInt32();
            m_BodyMask          = new HumanPoseMask(reader);
            m_SkeletonMask      = new SkeletonMask(reader);
            m_Binding           = reader.ReadUInt32();
            m_LayerBlendingMode = reader.ReadInt32();
            if (version[0] > 4 || (version[0] == 4 && version[1] >= 2)) //4.2 and up
            {
                m_DefaultWeight = reader.ReadSingle();
            }
            m_IKPass = reader.ReadBoolean();
            if (version[0] > 4 || (version[0] == 4 && version[1] >= 2)) //4.2 and up
            {
                m_SyncedLayerAffectsTiming = reader.ReadBoolean();
            }
            reader.AlignStream();
        }