Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// 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" +;
Debug.Log("Did not find a world game object in active scene." +;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment