Пример #1
0
 public void Setup(GlobalSwitch globalSwitch)
 {
     globalSwtichInstance = globalSwitch;
     if (!globalSwitch)
     {
         return;
     }
     serialObject = new SerializedObject(globalSwitch);
     serialObject.Update();
     switchlist = MakeReordList();
 }
Пример #2
0
        private void DrawContent()
        {
            // Draw Object Field
            GlobalSwitch newGlobals = globalSwtichInstance;

            newGlobals = (GlobalSwitch)EditorGUILayout.ObjectField(EEUtils.labels["GlobalSwitch"], newGlobals, typeof(GlobalSwitch), true);
            if (newGlobals != globalSwtichInstance)
            {
                Setup(newGlobals);
            }

            // Draw Local Switches
            scrollPosition = GUILayout.BeginScrollView(scrollPosition);
            if (globalSwtichInstance != null)
            {
                switchlist.DoLayoutList();
            }
            else
            {
                GUILayout.Space(15f);
                GUILayout.Label(EEUtils.labels["SelectGlobalSwitch"]);
            }
            GUILayout.EndScrollView();
        }