Пример #1
0
    void PreInit()
    {
        if (targ == null)
        {

          targ = target as EditorAdditionalGUI;
          targ.RepeatButton = false;
          targ.levels = GameObject.Find("Creator").GetComponent<Creator>().levels;

          m_activeLevelSize = targ.levels[(targ.ActiveLevel)].NumAreas;

          OnChangedActiveLevel();
        }
    }
Пример #2
0
    void Start()
    {
        m_editor = this;
        Object[] customObjects = Resources.FindObjectsOfTypeAll(typeof(CustomObject));
        foreach (Object x in customObjects)
        {
          if (!x.name.Contains("Prefab")&&(x as EmptyObject==null))
            {
        Objects.Add((x as CustomObject));
            }
        }

        levels = GameObject.Find("Creator").GetComponent<Creator>().levels;
        //GraphNode.creator=GameObject.Find("Creator").GetComponent<Creator>();
        SetFlags();
        selected = 0;
        ShowInstrument = true;

        InstrumentRadius = 5;
    }
Пример #3
0
 void OnEnable()
 {
     targ = target as EditorAdditionalGUI;
     GameObject x = GameObject.Find("Creator") as GameObject;
     m_ShowBackground= Camera.main.GetComponent<CameraControls>().Background.activeSelf;
     if(x!=null)
       creator=x.GetComponent<Creator>();
     Creator.prefabs=targ.prefabs;
 }