コード例 #1
0
    public void Start()
    {
        DontDestroyOnLoad(gameObject);
        if (_instanceLevelManager == null)
            _instanceLevelManager = this;
        else if (_instanceLevelManager != this)
            DestroyImmediate(gameObject);

        _currentLevel = _levelNames.ToList().IndexOf(Application.loadedLevelName);
    }
コード例 #2
0
    public void Start()
    {
        DontDestroyOnLoad(gameObject);
        if (_instanceLevelManager == null)
        {
            _instanceLevelManager = this;
        }
        else if (_instanceLevelManager != this)
        {
            DestroyImmediate(gameObject);
        }

        _currentLevel = _levelNames.ToList().IndexOf(Application.loadedLevelName);
    }