public void Add(GuiComponent GUIComponent) { if (components.Contains(GUIComponent)) { Debug.LogError(this + ": GUI Component: " + GUIComponent + " allready added"); return; } RegisterComponent(GUIComponent); skipRenderThisFrame = true; Debug.Log(this + ": GUI Component: " + GUIComponent + " added"); }
public void Add(GuiComponent GUIComponent) { if(components.Contains(GUIComponent)) { Debug.LogError (this + ": GUI Component: " + GUIComponent + " allready added"); return; } RegisterComponent(GUIComponent); skipRenderThisFrame = true; Debug.Log (this + ": GUI Component: " + GUIComponent + " added"); }
public void Remove(GuiComponent GUIComponent) { if (!components.Contains(GUIComponent)) { Debug.LogError(this + ": GUI Component: " + GUIComponent + " was not a part of the gui controller"); return; } UnregisterComponent(GUIComponent); skipRenderThisFrame = true; //Destroy((MonoBehaviour)GUIComponent); Debug.Log(this + ": GUI Component: " + GUIComponent + " removed"); }
private void UnregisterComponent(GuiComponent GUIComponent) { int componentIndex = components.IndexOf(GUIComponent); if (componentIndex == -1) { Debug.LogError("Invalid GUI component reference, the supplied component is not a registered GUI component."); Debug.Log(this + ": GUI Component: " + GUIComponent + " not found"); return; } else { components.RemoveAt(componentIndex); Debug.Log(this + ": GUI Component: " + GUIComponent + " unregistered"); } }
private void RegisterComponent(GuiComponent GUIComponent) { components.Add(GUIComponent); Debug.Log(this + ": GUI Component: " + GUIComponent + " registered"); }
public void Remove(GuiComponent GUIComponent) { if(!components.Contains(GUIComponent)) { Debug.LogError (this + ": GUI Component: " + GUIComponent + " was not a part of the gui controller"); return; } UnregisterComponent(GUIComponent); skipRenderThisFrame = true; //Destroy((MonoBehaviour)GUIComponent); Debug.Log (this + ": GUI Component: " + GUIComponent + " removed"); }
private void UnregisterComponent(GuiComponent GUIComponent) { int componentIndex = components.IndexOf(GUIComponent); if(componentIndex==-1) { Debug.LogError("Invalid GUI component reference, the supplied component is not a registered GUI component."); Debug.Log (this + ": GUI Component: " + GUIComponent + " not found"); return; } else { components.RemoveAt(componentIndex); Debug.Log (this + ": GUI Component: " + GUIComponent + " unregistered"); } }