Gerardo Marset
9 years ago
2 changed files with 27 additions and 28 deletions
@ -1,22 +1,21 @@
|
||||
using System; |
||||
using UnityEngine; |
||||
using UnityEngine; |
||||
using UnityEngine.UI; |
||||
|
||||
namespace Fungus |
||||
{ |
||||
[RequireComponent(typeof(Selectable))] |
||||
public class SelectOnEnable : MonoBehaviour |
||||
{ |
||||
private Selectable selectable; |
||||
public class SelectOnEnable : MonoBehaviour |
||||
{ |
||||
private Selectable selectable; |
||||
|
||||
private void Awake() |
||||
{ |
||||
selectable = GetComponent<Selectable>(); |
||||
} |
||||
private void Awake() |
||||
{ |
||||
selectable = GetComponent<Selectable>(); |
||||
} |
||||
|
||||
private void OnEnable() |
||||
{ |
||||
selectable.Select(); |
||||
} |
||||
} |
||||
} |
||||
private void OnEnable() |
||||
{ |
||||
selectable.Select(); |
||||
} |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue