MenuSceneLoader.cs 239 B

1234567891011121314151617
  1. using System;
  2. using UnityEngine;
  3. public class MenuSceneLoader : MonoBehaviour
  4. {
  5. public GameObject menuUI;
  6. private GameObject m_Go;
  7. void Awake ()
  8. {
  9. if (m_Go == null)
  10. {
  11. m_Go = Instantiate(menuUI);
  12. }
  13. }
  14. }