public static void SwitchTo(string triggerName) { if (triggerName == null) { return; } var trigger = GameObjectExtension.FindObjectByTypeAndName <AreaTitleTrigger>(triggerName); if (trigger == null) { throw new Exception("Area Title Trigger with name '" + triggerName + "' not found"); } SwitchTo(trigger); }