Пример #1
0
        public static AnimationElementObject CreateFrom(GameObject o, AnimationElement ae, GameObject root)
        {
            AnimationElementObject aeo = new GameObject().AddComponent <AnimationElementObject>();

            aeo.transform.parent        = ae.transform;
            aeo.name                    = o.name + ".aeo";
            aeo.transform.localPosition = Vector3.zero;
            aeo.transform.localScale    = Vector3.one;
            aeo.obj = AnimationObject.CreateFromLocal(o, root);
            return(aeo);
        }
Пример #2
0
 public void SetupStaticObjects()
 {
     staticAnimationObjectsAR = new List <AnimationObject>();
     foreach (Transform t in holder.animationObjectsParentAR.transform)
     {
         staticAnimationObjectsAR.Add(AnimationObject.CreateFromLocal(t.gameObject, holder.animationObjectsParentAR));
     }
     staticAnimationObjectsNonAR = new List <AnimationObject>();
     foreach (Transform t in holder.animationObjectsParentNonAR.transform)
     {
         staticAnimationObjectsNonAR.Add(AnimationObject.CreateFromLocal(t.gameObject, holder.animationObjectsParentNonAR));
     }
 }