static public InstantGuiButton CreateButton() { InstantGuiButton element = (InstantGuiButton)InstantGuiElement.Create("Button", typeof(InstantGuiButton), GetSelectedElement()); InstantGui.ForceUpdate(); Selection.activeGameObject = element.gameObject; return(element); }
public override void OnInspectorGUI() { InstantGuiButton script = (InstantGuiButton)target; base.OnInspectorGUI(); if (!script) { return; } //EditorGUILayout.Space(); InstantGuiInspector.DrawActivator("On Pressed:", script.onPressed); }
void swapTextures(ref InstantGuiButton a, ref InstantGuiButton b) { Texture tmpTexture = a.style.main.texture; a.style.main.texture = b.style.main.texture; b.style.main.texture = tmpTexture; }
public void SelectGalaxy(int buttonId) { InstantGuiButton button = (InstantGuiButton)GameManager.GetGuiComponentWithName("sistema" + buttonId); _labelServerSelected.text = button.text; }