public static T Get <T>() where T : class { if (sceneSingleton == null) { return(null); } return(sceneSingleton.GetComponentInChildren <T>()); }
public static T Get <T>() where T : MonoBehaviour { var onSelf = instance?.GetComponent <T>(); if (onSelf) { return(onSelf); } return(instance?.GetComponentInChildren <T>()); }