Ejemplo n.º 1
0
 void Awake()
 {
     //renderers = GetComponentsInChildren<Renderer>();
     xyzSectionPanel = GameObject.Find("xyzSectionPanel");
     if (xyzSectionPanel)
     {
         slider            = xyzSectionPanel.GetComponentInChildren <Slider>();
         topSliderLabel    = xyzSectionPanel.transform.Find("sliderPanel/MaxText").GetComponent <Text>();
         middleSliderLabel = xyzSectionPanel.transform.Find("sliderPanel/Slider").GetComponentInChildren <Text>();
         bottomSliderLabel = xyzSectionPanel.transform.Find("sliderPanel/MinText").GetComponent <Text>();
         if (xyzSectionPanel.transform.Find("axisOptions"))
         {
             xtoggle      = xyzSectionPanel.transform.Find("axisOptions/Panel/X_Toggle").GetComponent <Toggle>();
             ytoggle      = xyzSectionPanel.transform.Find("axisOptions/Panel/Y_Toggle").GetComponent <Toggle>();
             ztoggle      = xyzSectionPanel.transform.Find("axisOptions/Panel/Z_Toggle").GetComponent <Toggle>();
             xtoggle.isOn = selectedAxis == ConstrainedAxis.X;
             ytoggle.isOn = selectedAxis == ConstrainedAxis.Y;
             ztoggle.isOn = selectedAxis == ConstrainedAxis.Z;
         }
         if (xyzSectionPanel.transform.Find("gizmoToggle"))
         {
             gizmotoggle      = xyzSectionPanel.transform.Find("gizmoToggle").GetComponent <Toggle>();
             gizmotoggle.isOn = gizmoOn;
         }
     }
     if (ZeroAlignment)
     {
         zeroAlignmentVector = ZeroAlignment.position;
     }
     cs_setup = gameObject.GetComponent <CrossSectionObjectSetup>();
 }
Ejemplo n.º 2
0
 void Awake()
 {
     cs_setup = gameObject.GetComponent <CrossSectionObjectSetup>();
 }