Пример #1
0
 public void ShowHideChildIcons(bool ShowIcons)
 {
     Transform[] trans = GetTransforms();
     foreach (Transform Child in trans)
     {
         RacingLineItem RLItem = Child.GetComponent(typeof(RacingLineItem)) as RacingLineItem;
         if (RLItem != null)
         {
             RLItem.ShowIconGizmo = ShowIcons;
         }
     }
 }
Пример #2
0
        public void CopyWaypointItemsAsNode()
        {
            if (WaypointContainer == null)
            {
                return;
            }

            Transform[] Transforms = GetTransforms();

            foreach (Transform childTrans in Transforms)
            {
                GameObject NewRLItemObject = new GameObject(childTrans.name);
                //WayPointItem NewWPItemComponent = NewWPItemObject.AddComponent<WayPointItem>();
                NewRLItemObject.transform.position = childTrans.position;
                NewRLItemObject.transform.rotation = childTrans.rotation;
                NewRLItemObject.transform.parent   = this.transform;
                RacingLineItem NewRLItemComponent = NewRLItemObject.AddComponent <RacingLineItem>();
            }
            enableCopyMode    = false;
            WaypointContainer = null;
        }