private static void PrepareHierarchy(EditorCurveBinding curveBinding)
 {
   GameObject orGetGameObject = CurveBindingUtility.CreateOrGetGameObject(curveBinding.path);
   if (!((UnityEngine.Object) orGetGameObject.GetComponent(curveBinding.type) == (UnityEngine.Object) null))
     return;
   orGetGameObject.AddComponent(curveBinding.type);
 }
 private static void PrepareHierarchy(AnimationClip clip)
 {
   foreach (EditorCurveBinding curveBinding in AnimationUtility.GetCurveBindings(clip))
   {
     GameObject orGetGameObject = CurveBindingUtility.CreateOrGetGameObject(curveBinding.path);
     if ((UnityEngine.Object) orGetGameObject.GetComponent(curveBinding.type) == (UnityEngine.Object) null)
       orGetGameObject.AddComponent(curveBinding.type);
   }
 }
예제 #3
0
        private static void PrepareHierarchy(EditorCurveBinding curveBinding)
        {
            GameObject gameObject = CurveBindingUtility.CreateOrGetGameObject(curveBinding.path);

            if (gameObject.GetComponent(curveBinding.type) == null)
            {
                gameObject.AddComponent(curveBinding.type);
            }
        }
예제 #4
0
        private static void PrepareHierarchy(EditorCurveBinding curveBinding)
        {
            GameObject gameObject = CurveBindingUtility.CreateOrGetGameObject(curveBinding.path);

            if (gameObject.GetComponent(curveBinding.type) == null)
            {
                Component component = gameObject.AddComponent(curveBinding.type);
                Behaviour behaviour = component as Behaviour;
                if (behaviour != null)
                {
                    behaviour.enabled = false;
                }
            }
        }
예제 #5
0
 private static void PrepareHierarchy(AnimationClip clip)
 {
     EditorCurveBinding[] curveBindings = AnimationUtility.GetCurveBindings(clip);
     EditorCurveBinding[] array         = curveBindings;
     for (int i = 0; i < array.Length; i++)
     {
         EditorCurveBinding editorCurveBinding = array[i];
         GameObject         gameObject         = CurveBindingUtility.CreateOrGetGameObject(editorCurveBinding.path);
         if (gameObject.GetComponent(editorCurveBinding.type) == null)
         {
             gameObject.AddComponent(editorCurveBinding.type);
         }
     }
 }
예제 #6
0
 private static void PrepareHierarchy(AnimationClip clip)
 {
     EditorCurveBinding[] curveBindings = AnimationUtility.GetCurveBindings(clip);
     EditorCurveBinding[] array         = curveBindings;
     for (int i = 0; i < array.Length; i++)
     {
         EditorCurveBinding editorCurveBinding = array[i];
         GameObject         gameObject         = CurveBindingUtility.CreateOrGetGameObject(editorCurveBinding.path);
         if (gameObject.GetComponent(editorCurveBinding.type) == null)
         {
             Component component = gameObject.AddComponent(editorCurveBinding.type);
             Behaviour behaviour = component as Behaviour;
             if (behaviour != null)
             {
                 behaviour.enabled = false;
             }
         }
     }
 }