diff --git a/Assets/ButtonTriggerViewTransition.cs b/Assets/ButtonTriggerViewTransition.cs index 3d5344d..f5baa7e 100644 --- a/Assets/ButtonTriggerViewTransition.cs +++ b/Assets/ButtonTriggerViewTransition.cs @@ -6,8 +6,10 @@ using Raindrop; using Raindrop.ServiceLocator; using Raindrop.Services; using UnityEngine; +using UnityEngine.UI; using Logger = OpenMetaverse.Logger; +// This component allows you to bring up the scene that the button is supposed to lead to. public class ButtonTriggerViewTransition : MonoBehaviour { public CanvasType canvasTypeToPush; @@ -16,7 +18,14 @@ public class ButtonTriggerViewTransition : MonoBehaviour { try { - this.GetComponent().OnClick.AddListener(OnClick); + if (this.GetComponent()) + { + this.GetComponent().OnClick.AddListener(OnClick); + } + if (this.GetComponent