예제 #1
0
 public static void RenameEvent(string eventName, string newEventName)
 {
     if (FabricManager.IsInitialised())
     {
         EventListener[] componentsInChildren = FabricManager.Instance.gameObject.GetComponentsInChildren <EventListener>();
         for (int i = 0; i < componentsInChildren.Length; i++)
         {
             if (componentsInChildren[i]._eventName == eventName)
             {
                 componentsInChildren[i]._eventName = newEventName;
             }
         }
     }
     new List <GameObject>();
     Object[] array = Object.FindObjectsOfType(typeof(GameObject));
     for (int j = 0; j < array.Length; j++)
     {
         GameObject gameObject = (GameObject)array[j];
         if (gameObject.transform.parent == null)
         {
             EventTrigger[] componentsInChildren2 = gameObject.GetComponentsInChildren <EventTrigger>();
             for (int k = 0; k < componentsInChildren2.Length; k++)
             {
                 if (componentsInChildren2[k]._eventName == eventName)
                 {
                     componentsInChildren2[k]._eventName = newEventName;
                 }
             }
         }
     }
 }
예제 #2
0
 private void ClearAll()
 {
     if (FabricManager.IsInitialised())
     {
         EventListener[] componentsInChildren = FabricManager.Instance.gameObject.GetComponentsInChildren <EventListener>();
         for (int i = 0; i < componentsInChildren.Length; i++)
         {
             componentsInChildren[i]._eventName = "_UnSet_";
         }
     }
     new List <GameObject>();
     Object[] array = Object.FindObjectsOfType(typeof(GameObject));
     for (int j = 0; j < array.Length; j++)
     {
         GameObject gameObject = (GameObject)array[j];
         if (gameObject.transform.parent == null)
         {
             EventTrigger[] componentsInChildren2 = gameObject.GetComponentsInChildren <EventTrigger>();
             for (int k = 0; k < componentsInChildren2.Length; k++)
             {
                 componentsInChildren2[k]._eventName = "_UnSet_";
             }
         }
     }
     this.ClearEventList();
 }
예제 #3
0
    private void DrawComponents()
    {
        if (!FabricManager.IsInitialised())
        {
            return;
        }
        float value = slotHeight + 500f;

        scrollPosition = GUI.BeginScrollView(new Rect(0f, 0f, 700f, GetActualSize(value) + 20f), scrollPosition, new Rect(0f, 0f, width, GetActualSize(value)));
        Fabric.Component[] componentsInChildren = FabricManager.Instance.gameObject.GetComponentsInChildren <GroupComponent>();
        float y = 20f;
        float x = 20f;

        foreach (Fabric.Component component in componentsInChildren)
        {
            if (component != null)
            {
                DrawComponent(component, ref x, y);
            }
        }
        width = x;
        GUI.EndScrollView();
    }