Object reference not set if the trigger is disabled
Hello!
I've been using it for even more complex stuff now that it's compatible with the Unity UI and I've found that if you try calling a disabled trigger, you get an Object reference not set exception. As the current behaviour in VRChat is to simply not do anything if the trigger is disabled, this behaviour shouldn't be too hard to replicate.
Thank you very much!
Error log:
NullReferenceException: Object reference not set to an instance of an object Iwsd.Emu_Trigger.SearchTrigger_Named (TriggerType triggerType, System.String name) (at Assets/iwsd_vrc/Tools/OnEditorEmu/Scripts/Emu_Trigger.cs:390)
Note: Hearing from Jordo. This happens, for example, if object A calls inactive object B's custom trigger.
NullReferenceException occurs because at that time B's VRC_Trigger emulation is not initialized. Initialization is depend on Awake method.