コード例 #1
0
    // Use this for initialization
    void Awake()
    {
        audio = GetComponent <AudioSource>();

        if (audio)
        {
            if (Instance != null && Instance != audio)
            {
                Destroy(gameObject);
            }

            else
            {
                InstanceObject = this;
                Instance       = audio;
            }
        }

        transform.parent = null;
        DontDestroyOnLoad(gameObject);
    }
コード例 #2
0
 private void Start()
 {
     OpeningSongSingleton.FadeThenDestroy();
     EventSystem.current.SetSelectedGameObject(_continue);
     Toolbox.Instance.DisablePlayerMovementAndFlip();
 }