示例#1
0
 void AddPropertiesFromClip(GameObject go, AnimationClip clip)
 {
     if (go != null && clip != null)
     {
         AnimationMode.InitializePropertyModificationForGameObject(go, clip);
     }
 }
 private static void AddPropertiesFromClip(GameObject go, AnimationClip clip)
 {
     if (go != null && clip != null)
     {
         AnimationMode.InitializePropertyModificationForGameObject(go, clip);
         if (clip.get_hasRootMotion())
         {
             PropertyCollector.AddPropertyModification(go.get_transform(), "m_LocalPosition.x");
             PropertyCollector.AddPropertyModification(go.get_transform(), "m_LocalPosition.y");
             PropertyCollector.AddPropertyModification(go.get_transform(), "m_LocalPosition.z");
             PropertyCollector.AddPropertyModification(go.get_transform(), "m_LocalRotation.x");
             PropertyCollector.AddPropertyModification(go.get_transform(), "m_LocalRotation.y");
             PropertyCollector.AddPropertyModification(go.get_transform(), "m_LocalRotation.w");
             PropertyCollector.AddPropertyModification(go.get_transform(), "m_LocalRotation.z");
         }
     }
 }