示例#1
0
    private static EventTriggerGameTriggerInfo GetInstance()
    {
        GameObject gameObject = GameObject.Find(typeof(EventTriggerGameTriggerInfo).Name);

        if (gameObject == null)
        {
            gameObject = new GameObject(typeof(EventTriggerGameTriggerInfo).Name, new Type[]
            {
                typeof(EventTriggerGameTriggerInfo)
            });
        }
        EventTriggerGameTriggerInfo component = gameObject.GetComponent <EventTriggerGameTriggerInfo>();

        UnityEngine.Object.DontDestroyOnLoad(gameObject);
        UnityEngine.Object.DontDestroyOnLoad(component);
        return(component);
    }
示例#2
0
 public void Reset()
 {
     EventTriggerGameTriggerInfo._Instance = EventTriggerGameTriggerInfo.GetInstance();
 }
示例#3
0
 public void Start()
 {
     EventTriggerGameTriggerInfo.GetInstance();
 }