// find a game object in the active scene | |
using System.Linq; | |
GameObject worldGameObject = | |
GameObject.FindGameObjectsWithTag("World").ToList().Find(o => o.scene == activeScene); | |
if (worldGameObject != null) | |
{ | |
Debug.Log("SetTrigger: SceneExit" + worldGameObject.name); | |
worldGameObject.GetComponent<Animator>().SetTrigger("SceneExit"); | |
} | |
else | |
{ | |
Debug.Log("Did not find a world game object in active scene." + activeScene.name); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment