void Awake() { try { if (hSelector == null) { hSelector = gameObject.GetComponent <HorizontalSelector>(); } if (UIManagerAsset == null) { UIManagerAsset = Resources.Load <UIManager>("MUIP Manager"); } this.enabled = true; if (UIManagerAsset.enableDynamicUpdate == false) { UpdateSelector(); this.enabled = false; } } catch { Debug.Log("<b>[Modern UI Pack]</b> No UI Manager found, assign it manually.", this); } }
void OnEnable() { try { hSelector = gameObject.GetComponent <HorizontalSelector>(); } catch { } if (UIManagerAsset == null) { try { UIManagerAsset = Resources.Load <UIManager>("MUIP Manager"); } catch { Debug.LogWarning("No UI Manager found. Assign it manually, otherwise you'll get errors about it.", this); } } }
private void OnEnable() { // Set target hsTarget = (HorizontalSelector)target; }