# Exception when playing game while an object with Event Emitter is selected in Inspector

**URL:** <https://qa.fmod.com/t/exception-when-playing-game-while-an-object-with-event-emitter-is-selected-in-inspector/17732>\
**Category:** Unity\
**Tags:** unity\
**Created:** [September 28, 2021, 2:04pm UTC](https://qa.fmod.com/t/exception-when-playing-game-while-an-object-with-event-emitter-is-selected-in-inspector/17732 "2021-09-28T14:04:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonsanchezart](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/simonsanchezart/32/2682_2.png) [@simonsanchezart](https://qa.fmod.com/u/simonsanchezart)\
**Post date:** [September 28, 2021, 2:04pm UTC](https://qa.fmod.com/t/exception-when-playing-game-while-an-object-with-event-emitter-is-selected-in-inspector/17732/1 "2021-09-28T14:04:57Z")

</div>

Found this ‘bug’ right now, don’t know what’s going on, and doesn’t seem to affect anything.  
 ![ezgif.com-gif-maker](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/6/6fc30a3424058a3b4e2357717891c951dc88d98c.gif)

This is the exception:

```auto
The targets array should not be used inside OnSceneGUI or OnPreviewGUI. Use the single target property instead.
UnityEditor.AssetDatabase:StopAssetEditing()
FMODUnity.EventManager:UpdateCache() (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:317)
FMODUnity.EventManager:AffirmEventCache() (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:57)
FMODUnity.EventManager:EventFromString(String) (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:1004)
FMODUnity.EventManager:EventFromPath(String) (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:997)
FMODUnity.StudioEventEmitterEditor:OnSceneGUI() (at Assets/Plugins/FMOD/src/Editor/StudioEventEmitterEditor.cs:24)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

```

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [September 29, 2021, 5:52am UTC](https://qa.fmod.com/t/exception-when-playing-game-while-an-object-with-event-emitter-is-selected-in-inspector/17732/2 "2021-09-29T05:52:10Z")

</div>

What version of the Unity FMOD Integration are you using? I think this was a known issue in 2.01.11 that should be fixed in the latest release.

---

<div class="post-metadata">

**Author:** ![William445](https://avatars.discourse-cdn.com/v4/letter/w/96bed5/32.png) [@William445](https://qa.fmod.com/u/William445)\
**Post date:** [October 9, 2021, 9:29am UTC](https://qa.fmod.com/t/exception-when-playing-game-while-an-object-with-event-emitter-is-selected-in-inspector/17732/3 "2021-10-09T09:29:36Z")

</div>

The run-time will tell you that you are trying to access an object , when the variable is null by issuing a Null Reference Exception [.](https://www.paycheckrecords.win/)
