BaseSingleMono

    科技2026-04-22  4

    public class BaseSingleMono<T> :MonoBehaviour where T:MonoBehaviour

    {

    private static T instance;

    public  static GetInstance(){

     return instance;

    }

     

    protect virtual void Awake(){

    instance = this as T

    }

    }

     

    public class GameManager :BaseSingle<GameManager>{

    }

    Processed: 0.009, SQL: 9