# 'Object reference not set to an instance of an object' using 'trigger Enter' Play event

**URL:** <https://qa.fmod.com/t/object-reference-not-set-to-an-instance-of-an-object-using-trigger-enter-play-event/12960>\
**Category:** FMOD Studio\
**Created:** [February 3, 2017, 9:57pm UTC](https://qa.fmod.com/t/object-reference-not-set-to-an-instance-of-an-object-using-trigger-enter-play-event/12960 "2017-02-03T21:57:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bassdrummer](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@Bassdrummer](https://qa.fmod.com/u/Bassdrummer)\
**Post date:** [February 3, 2017, 9:57pm UTC](https://qa.fmod.com/t/object-reference-not-set-to-an-instance-of-an-object-using-trigger-enter-play-event/12960/1 "2017-02-03T21:57:09Z")

</div>

Hey all!

Using Unity for the first time to implement some work i’ve been doing in FMOD.

Following tutorials has been great, BUT, i cannot use the studio event emitter to trigger sounds and every time I try to attach a sound from my Event browser i get this message;

NullReferenceException: Object reference not set to an instance of an object  
UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at /Users/builduser/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs:263)  
UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at /Users/builduser/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs:282)  
UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at /Users/builduser/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs:273)  
UnityEditor.Editor.DrawHeaderGUI (UnityEditor.Editor editor, System.String header, Single leftMargin) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:477)  
UnityEditor.MaterialEditor.OnHeaderGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/MaterialEditor.cs:290)  
UnityEditor.Editor.DrawHeader () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:355)  
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1108)  
UnityEditor.InspectorWindow.DrawEditors (UnityEditor.Editor[] editors) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1022)  
UnityEditor.InspectorWindow.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:352)  
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

I assume that this is why (its a red exclamation mark error) the triggers aren’t working.

If anyone has a solution to this I would be very grateful. Been wondering wtf I’ve been doing wrong for the last week and getting nowhere.

V happy to give more info if needed.

Yours

very gratefully

Ed!

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [February 6, 2017, 6:02am UTC](https://qa.fmod.com/t/object-reference-not-set-to-an-instance-of-an-object-using-trigger-enter-play-event/12960/2 "2017-02-06T06:02:40Z")

</div>

Answered in another post:  
[https://www.fmod.org/questions/question/studio-event-emitter-not-working-in-unity-roller-ball-tutorial/](https://www.fmod.org/questions/question/studio-event-emitter-not-working-in-unity-roller-ball-tutorial/)
