Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

change scene unity


void Die()
    {
        Destroy(gameObject);
        if (gameManager != null)
        {
            if (gameManager.GetEnemies - 1 == 0)
            {
                gameManager.Invoke("WinLevel", 1f);
            }
        }
    }

Source by w3programmers.org #
 
PREVIOUS NEXT
Tagged: #change #scene #unity
ADD COMMENT
Topic
Name
6+7 =