static int SetAllTogglesOff(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { UnityEngine.UI.ToggleGroup obj = (UnityEngine.UI.ToggleGroup)ToLua.CheckObject <UnityEngine.UI.ToggleGroup>(L, 1); obj.SetAllTogglesOff(); return(0); } else if (count == 2) { UnityEngine.UI.ToggleGroup obj = (UnityEngine.UI.ToggleGroup)ToLua.CheckObject <UnityEngine.UI.ToggleGroup>(L, 1); bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.SetAllTogglesOff(arg0); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.UI.ToggleGroup.SetAllTogglesOff")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static public int RegisterToggle(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif UnityEngine.UI.ToggleGroup self = (UnityEngine.UI.ToggleGroup)checkSelf(l); UnityEngine.UI.Toggle a1; checkType(l, 2, out a1); self.RegisterToggle(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
static int SetAllTogglesOff(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 1); UnityEngine.UI.ToggleGroup obj = (UnityEngine.UI.ToggleGroup)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.UI.ToggleGroup"); obj.SetAllTogglesOff(); return(0); }
/// <summary> /// Initializes the menu /// </summary> protected virtual void Initialize() { // Initializes fields levelFileOptions = new List<Toggle>(); toggleGroup = GetComponent<ToggleGroup>(); clickSound = Resources.Load<AudioClip>(Constants.SND_FOLDER + Constants.CLICK_SND); }
static int NotifyToggleOn(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2) { UnityEngine.UI.ToggleGroup obj = (UnityEngine.UI.ToggleGroup)ToLua.CheckObject <UnityEngine.UI.ToggleGroup>(L, 1); UnityEngine.UI.Toggle arg0 = (UnityEngine.UI.Toggle)ToLua.CheckObject <UnityEngine.UI.Toggle>(L, 2); obj.NotifyToggleOn(arg0); return(0); } else if (count == 3) { UnityEngine.UI.ToggleGroup obj = (UnityEngine.UI.ToggleGroup)ToLua.CheckObject <UnityEngine.UI.ToggleGroup>(L, 1); UnityEngine.UI.Toggle arg0 = (UnityEngine.UI.Toggle)ToLua.CheckObject <UnityEngine.UI.Toggle>(L, 2); bool arg1 = LuaDLL.luaL_checkboolean(L, 3); obj.NotifyToggleOn(arg0, arg1); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.UI.ToggleGroup.NotifyToggleOn")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
// Use this for initialization void Start () { rs = GetComponent<ReadScript> (); answers = GameObject.Find ("Answers"); tg =answers.GetComponent<ToggleGroup>(); tgg = tg.GetComponentsInChildren<Toggle>(); }
public override void Load() { if (toggle_group == null) toggle_group = GetComponent<ToggleGroup>(); FillList(); FillCharInfo(); }
public void Initialize(string header, bool value, Action<bool> onValueChanged, ToggleGroup toggleGroup = null) { name = header; headerText.text = header; toggle.isOn = value; toggle.onValueChanged.AddListener(newValue => onValueChanged(newValue)); toggle.group = toggleGroup; }
static int NotifyToggleOn(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 2); UnityEngine.UI.ToggleGroup obj = (UnityEngine.UI.ToggleGroup)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.UI.ToggleGroup"); UnityEngine.UI.Toggle arg0 = (UnityEngine.UI.Toggle)LuaScriptMgr.GetUnityObject(L, 2, typeof(UnityEngine.UI.Toggle)); obj.NotifyToggleOn(arg0); return(0); }
// Use this for initialization void Start() { GM=GameObject.FindGameObjectWithTag ("Player").GetComponent<gameManager> (); mainPlayer = GameObject.FindGameObjectWithTag ("Player").GetComponent<Player> (); thisHero = new hero (); thisToggleGroup = GameObject.FindGameObjectWithTag ("heroUIToggle").GetComponent<ToggleGroup>(); thisToggle.group = thisToggleGroup; heroNumber = 0; }
static public int set_allowSwitchOff(IntPtr l) { UnityEngine.UI.ToggleGroup o = (UnityEngine.UI.ToggleGroup)checkSelf(l); bool v; checkType(l, 2, out v); o.allowSwitchOff = v; return(0); }
// Use this for initialization void Start() { //WeaponList = Resources.LoadAll<GameObject>("ShipPrefabs/Weapons").ToList<GameObject>(); WeaponToggleGroup = GetComponent<ToggleGroup>(); //CreateWeaponListButtons(); EventManager.AddEventListener( "RefreshCustomizeWeps", DisplayInventory ); DisplayInventory (); }
static int ActiveToggles(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 1); UnityEngine.UI.ToggleGroup obj = (UnityEngine.UI.ToggleGroup)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.UI.ToggleGroup"); IEnumerable <UnityEngine.UI.Toggle> o = obj.ActiveToggles(); LuaScriptMgr.PushObject(L, o); return(1); }
static int AnyTogglesOn(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 1); UnityEngine.UI.ToggleGroup obj = (UnityEngine.UI.ToggleGroup)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.UI.ToggleGroup"); bool o = obj.AnyTogglesOn(); LuaScriptMgr.Push(L, o); return(1); }
public void OnEnable () { // Set references toggle = gameObject.GetComponent<Toggle>(); toggleGroup = gameObject.GetComponent<Transform>().parent.parent.GetComponent<ToggleGroup>(); dotRectTransform = dotImage.GetComponent<RectTransform>(); checkBoxToggler = text.GetComponent<CheckBoxToggler>(); rippleConfig = gameObject.GetComponent<RippleConfig>(); toggle.group = toggleGroup; }
static public int SetAllTogglesOff(IntPtr l) { try { UnityEngine.UI.ToggleGroup self = (UnityEngine.UI.ToggleGroup)checkSelf(l); self.SetAllTogglesOff(); return(0); } catch (Exception e) { return(error(l, e)); } }
static public int get_allowSwitchOff(IntPtr l) { try { UnityEngine.UI.ToggleGroup self = (UnityEngine.UI.ToggleGroup)checkSelf(l); pushValue(l, self.allowSwitchOff); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int ActiveToggles(IntPtr l) { try { UnityEngine.UI.ToggleGroup self = (UnityEngine.UI.ToggleGroup)checkSelf(l); var ret = self.ActiveToggles(); pushValue(l, ret); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int AnyTogglesOn(IntPtr l) { try{ UnityEngine.UI.ToggleGroup self = (UnityEngine.UI.ToggleGroup)checkSelf(l); System.Boolean ret = self.AnyTogglesOn(); pushValue(l, ret); return(1); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
static public int set_allowSwitchOff(IntPtr l) { try { UnityEngine.UI.ToggleGroup self = (UnityEngine.UI.ToggleGroup)checkSelf(l); bool v; checkType(l, 2, out v); self.allowSwitchOff = v; return(0); } catch (Exception e) { return(error(l, e)); } }
static int QPYX_SetAllTogglesOff_YXQP(IntPtr L_YXQP) { try { ToLua.CheckArgsCount(L_YXQP, 1); UnityEngine.UI.ToggleGroup QPYX_obj_YXQP = (UnityEngine.UI.ToggleGroup)ToLua.CheckObject <UnityEngine.UI.ToggleGroup>(L_YXQP, 1); QPYX_obj_YXQP.SetAllTogglesOff(); return(0); } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
static public int NotifyToggleOn(IntPtr l) { try { UnityEngine.UI.ToggleGroup self = (UnityEngine.UI.ToggleGroup)checkSelf(l); UnityEngine.UI.Toggle a1; checkType(l, 2, out a1); self.NotifyToggleOn(a1); return(0); } catch (Exception e) { return(error(l, e)); } }
static public int ActiveToggles(IntPtr l) { try{ UnityEngine.UI.ToggleGroup self = (UnityEngine.UI.ToggleGroup)checkSelf(l); IEnumerable <UnityEngine.UI.Toggle> ret = self.ActiveToggles(); pushValue(l, ret); return(1); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
static int QPYX_AnyTogglesOn_YXQP(IntPtr L_YXQP) { try { ToLua.CheckArgsCount(L_YXQP, 1); UnityEngine.UI.ToggleGroup QPYX_obj_YXQP = (UnityEngine.UI.ToggleGroup)ToLua.CheckObject <UnityEngine.UI.ToggleGroup>(L_YXQP, 1); bool QPYX_o_YXQP = QPYX_obj_YXQP.AnyTogglesOn(); LuaDLL.lua_pushboolean(L_YXQP, QPYX_o_YXQP); return(1); } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
static int SetAllTogglesOff(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UnityEngine.UI.ToggleGroup obj = (UnityEngine.UI.ToggleGroup)ToLua.CheckObject(L, 1, typeof(UnityEngine.UI.ToggleGroup)); obj.SetAllTogglesOff(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static public int RegisterToggle(IntPtr l) { try{ UnityEngine.UI.ToggleGroup self = (UnityEngine.UI.ToggleGroup)checkSelf(l); UnityEngine.UI.Toggle a1; checkType(l, 2, out a1); self.RegisterToggle(a1); return(0); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
static public int NotifyEnabled(IntPtr l) { try { UnityEngine.UI.ToggleGroup self = (UnityEngine.UI.ToggleGroup)checkSelf(l); UnityEngine.UI.Toggle a1; checkType(l, 2, out a1); self.NotifyEnabled(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static int QPYX_RegisterToggle_YXQP(IntPtr L_YXQP) { try { ToLua.CheckArgsCount(L_YXQP, 2); UnityEngine.UI.ToggleGroup QPYX_obj_YXQP = (UnityEngine.UI.ToggleGroup)ToLua.CheckObject <UnityEngine.UI.ToggleGroup>(L_YXQP, 1); UnityEngine.UI.Toggle QPYX_arg0_YXQP = (UnityEngine.UI.Toggle)ToLua.CheckObject <UnityEngine.UI.Toggle>(L_YXQP, 2); QPYX_obj_YXQP.RegisterToggle(QPYX_arg0_YXQP); return(0); } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
// Use this for initialization void Start() { isOpen = 0; openCode = new List<string> (); code = transform.name; gread = int.Parse (transform.parent.name); GM=GameObject.FindGameObjectWithTag ("Player").GetComponent<gameManager> (); thisToggleGroup = GameObject.FindGameObjectWithTag ("levelToggle").GetComponent<ToggleGroup>();; thisEnemy = new List<enemyHero> (); thisToggle=transform.GetComponent<Toggle>(); getOpenCode (); getThisEnemy (); thisToggle.group=thisToggleGroup; }
static int QPYX_ActiveToggles_YXQP(IntPtr L_YXQP) { try { ToLua.CheckArgsCount(L_YXQP, 1); UnityEngine.UI.ToggleGroup QPYX_obj_YXQP = (UnityEngine.UI.ToggleGroup)ToLua.CheckObject <UnityEngine.UI.ToggleGroup>(L_YXQP, 1); System.Collections.Generic.IEnumerable <UnityEngine.UI.Toggle> QPYX_o_YXQP = QPYX_obj_YXQP.ActiveToggles(); ToLua.PushObject(L_YXQP, QPYX_o_YXQP); return(1); } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
static int EnsureValidState(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UnityEngine.UI.ToggleGroup obj = (UnityEngine.UI.ToggleGroup)ToLua.CheckObject <UnityEngine.UI.ToggleGroup>(L, 1); obj.EnsureValidState(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public void Initialize(SaveUI saveUI, SavedGameMetadata savedGameMetadata, ToggleGroup toggleGroup) { this.saveUI = saveUI; SavedGameMetadata = savedGameMetadata; toggleText.text = string.Format( "Slot {0}: {1}", savedGameMetadata.slot, savedGameMetadata.timeStamp.ToString() ); toggle.onValueChanged.AddListener(ToggleChanged); toggle.group = toggleGroup; }
void Awake () { numpadPosition = new Toggle[6]; soundMute = gameObject.transform.GetChild(2).gameObject.GetComponent<Toggle>(); invertNumpad = gameObject.transform.GetChild(3).gameObject.GetComponent<Toggle>(); numpadPosGroup = gameObject.transform.GetChild(4).gameObject.GetComponent<ToggleGroup>(); for (int i = 4; i < 10; ++i) { numpadPosition[i - 4] = gameObject.transform.GetChild(i).gameObject.GetComponent<Toggle>(); numpadPosition[i - 4].group = numpadPosGroup; numpadPosition[i - 4].isOn = false; } }
static int QPYX_set_group_YXQP(IntPtr L_YXQP) { object QPYX_o_YXQP = null; try { QPYX_o_YXQP = ToLua.ToObject(L_YXQP, 1); UnityEngine.UI.Toggle QPYX_obj_YXQP = (UnityEngine.UI.Toggle)QPYX_o_YXQP; UnityEngine.UI.ToggleGroup QPYX_arg0_YXQP = (UnityEngine.UI.ToggleGroup)ToLua.CheckObject <UnityEngine.UI.ToggleGroup>(L_YXQP, 2); QPYX_obj_YXQP.group = QPYX_arg0_YXQP; return(0); } catch (Exception QPYX_e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, QPYX_e_YXQP, QPYX_o_YXQP, "attempt to index group on a nil value")); } }
static int QPYX_get_group_YXQP(IntPtr L_YXQP) { object QPYX_o_YXQP = null; try { QPYX_o_YXQP = ToLua.ToObject(L_YXQP, 1); UnityEngine.UI.Toggle QPYX_obj_YXQP = (UnityEngine.UI.Toggle)QPYX_o_YXQP; UnityEngine.UI.ToggleGroup QPYX_ret_YXQP = QPYX_obj_YXQP.group; ToLua.Push(L_YXQP, QPYX_ret_YXQP); return(1); } catch (Exception QPYX_e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, QPYX_e_YXQP, QPYX_o_YXQP, "attempt to index group on a nil value")); } }
static int QPYX_set_value_YXQP(IntPtr L_YXQP) { object QPYX_o_YXQP = null; try { QPYX_o_YXQP = ToLua.ToObject(L_YXQP, 1); ComponentCache.Injection <UnityEngine.UI.ToggleGroup> QPYX_obj_YXQP = (ComponentCache.Injection <UnityEngine.UI.ToggleGroup>)QPYX_o_YXQP; UnityEngine.UI.ToggleGroup QPYX_arg0_YXQP = (UnityEngine.UI.ToggleGroup)ToLua.CheckObject <UnityEngine.UI.ToggleGroup>(L_YXQP, 2); QPYX_obj_YXQP.value = QPYX_arg0_YXQP; return(0); } catch (Exception QPYX_e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, QPYX_e_YXQP, QPYX_o_YXQP, "attempt to index value on a nil value")); } }
static int ActiveToggles(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UnityEngine.UI.ToggleGroup obj = (UnityEngine.UI.ToggleGroup)ToLua.CheckObject <UnityEngine.UI.ToggleGroup>(L, 1); System.Collections.Generic.IEnumerable <UnityEngine.UI.Toggle> o = obj.ActiveToggles(); ToLua.PushObject(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int NotifyToggleOn(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.UI.ToggleGroup obj = (UnityEngine.UI.ToggleGroup)ToLua.CheckObject(L, 1, typeof(UnityEngine.UI.ToggleGroup)); UnityEngine.UI.Toggle arg0 = (UnityEngine.UI.Toggle)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.UI.Toggle)); obj.NotifyToggleOn(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int RegisterToggle(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.UI.ToggleGroup obj = (UnityEngine.UI.ToggleGroup)ToLua.CheckObject <UnityEngine.UI.ToggleGroup>(L, 1); UnityEngine.UI.Toggle arg0 = (UnityEngine.UI.Toggle)ToLua.CheckObject <UnityEngine.UI.Toggle>(L, 2); obj.RegisterToggle(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int AnyTogglesOn(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UnityEngine.UI.ToggleGroup obj = (UnityEngine.UI.ToggleGroup)ToLua.CheckObject <UnityEngine.UI.ToggleGroup>(L, 1); bool o = obj.AnyTogglesOn(); LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public void Start() { bool flag = (this.presetSelection == null) || (this.categoryContentParent == null) || (this.equationField == null); if (flag) { Debug.LogError("Something is missing or is null. Please check."); } this.presetOptionGroup = this.GetComponent<ToggleGroup>(); if (this.presetOptionGroup == null) { Debug.Log("Something is wrong. Please check."); } this.defaultMode.isOn = true; this.customMode.isOn = false; SetPresetUIEnabledFlag(false); }
// Use this for initialization void Start() { if (this.difficultyModeGroup == null) { GameObject[] menu = GameObject.FindGameObjectsWithTag("Menu"); if (menu != null && menu.Length > 0) { foreach (GameObject obj in menu) { if (obj.GetComponent<DifficultyGroup>() != null) { this.difficultyModeGroup = obj.GetComponent<ToggleGroup>(); break; } } } if (this.difficultyModeGroup == null) { Debug.LogError("Toggle group isn't set. Please check."); } } }
void Start () { PlayerProfile.profile.load(); if (!src) { src = MainMenuUI.mainMenuSource; } itemCountTxt = GameObject.FindGameObjectWithTag("itemCountText").GetComponent<Text>(); bagEmpty = GameObject.FindGameObjectWithTag ("empty text").GetComponent<Text>(); itemCountTxt.text = "Total Items: " + itemCount + "/" + MAX_ITEMS; parkBtn = GameObject.FindGameObjectWithTag("parkbtn").GetComponent<Button>(); toggles = GameObject.FindGameObjectWithTag ("toggles_inventory").GetComponent<ToggleGroup>(); toggles_b = GameObject.FindGameObjectWithTag ("toggles_bag").GetComponent<ToggleGroup>(); toggles_inventory = toggles.GetComponentsInChildren<Toggle>(); toggles_bag = toggles_b.GetComponentsInChildren<Toggle>(); MAX_ITEMS = PlayerProfile.profile.bagSize; int numItems = PlayerProfile.profile.lenses.Count + PlayerProfile.profile.filters.Count; for (int j = 0; j < toggles_bag.Length; j++) { toggles_bag[j].gameObject.SetActive (false); toggles_bag[j].GetComponentInChildren<Text>().fontSize = 12; } //make it easier to initalize everything for (int k = 0; k < toggles_inventory.Length; k++) { toggles_inventory [k].interactable = false; toggles_inventory [k].isOn = false; toggles_inventory [k].gameObject.SetActive (false); } for (int ii = 0; ii < numItems; ii++) { toggles_inventory [ii].gameObject.SetActive (true); toggles_inventory [ii].isOn = false; toggles_inventory [ii].interactable = true; toggles_inventory [ii].GetComponentInChildren<Text> ().fontSize = 12; } PlayerProfile.profile.lensesInBag.Clear (); PlayerProfile.profile.filtersInBag.Clear (); initItemNames (); }
// Use this for initialization void Start() { toggleGroup = gameObject.GetComponent<ToggleGroup>(); toggles = gameObject.GetComponentsInChildren<Toggle>(); // detect all Toggles set as children of this object // Register all toggles in the group foreach (Toggle toggle in toggles) { Toggle captured = toggle; // capture the current toggle in serparate variable, as just capturing the toggle will capture the iterator and all listeners will refer to the last item toggle.onValueChanged.AddListener((value) => ToggleStateChanged(captured, value)); // Assign group to the toggle to enable group logic toggle.group = toggleGroup; } // Set a toggle with the specific value as selected // This can be based on some state so selections persist Toggle first = toggles.FirstOrDefault((t) => t.GetComponent<ToggleValue>().Value == ToggleValue.ToggleValues.value_1); if (first != null) { first.isOn = true; } }
protected void Awake() { if (this.toggleGroup == null) this.toggleGroup = this.gameObject.GetComponent<ToggleGroup>(); }
void Awake() { BrowserItemPrototype.gameObject.SetActive(false); toggleGroup = gameObject.GetOrAddComponent<ToggleGroup>(); browserItems = new List<UiBrowserItem>(); }
private void Awake() { if (Instance == null) { Instance = this; } else { Debug.LogError("Two QuestGUIS!"); return; } QuestManager.Instance.OnQuestAdded += OnQuestAdded; _toggleGroup = GetComponent<ToggleGroup>(); _questItems = new List<QuestItemGUI>(); _lineRend = GetComponent<LineRenderer>(); _path = new NavMeshPath(); }
public Toggle GetActive(ToggleGroup group) { return group.ActiveToggles ().FirstOrDefault (); }
//TODO: F**K THIS SHIT void Start() { WeaponToggles = UI_Manager.instance.weaponToggles.GetComponent<ToggleGroup>(); WeaponToggles.gameObject.SetActive(false); }
/// <summary> /// Constructor /// </summary> void Start( ) { toggleGrp = GetComponent<ToggleGroup>( ); RefreshPanels( ); RefreshToggle( ); }
//=========================================================== // 関数定義 //=========================================================== //--------------------------------------------------- // コンストラクタ //--------------------------------------------------- void Awake() { m_TabList = new List<CZTab>(); m_TglGroup = GetComponent<ToggleGroup>(); }
// Use this for initialization void Start() { WeaponList = Resources.LoadAll<GameObject>("ShipPrefabs/Weapons").ToList<GameObject>(); WeaponToggleGroup = GetComponent<ToggleGroup>(); CreateWeaponListButtons(); }
void Awake() { manager = GameObject.Find("MainObject").GetComponent<ClashGameManager>(); toggleGroup = unitList.gameObject.GetComponent<ToggleGroup> (); }
void Awake() { toggleGroup = GetComponent<ToggleGroup>(); }