# Error using attribute FMODUnity.EventRef to pick event in inspector

**URL:** <https://qa.fmod.com/t/error-using-attribute-fmodunity-eventref-to-pick-event-in-inspector/16699>\
**Category:** Unity\
**Tags:** unity\
**Created:** [January 29, 2021, 7:13am UTC](https://qa.fmod.com/t/error-using-attribute-fmodunity-eventref-to-pick-event-in-inspector/16699 "2021-01-29T07:13:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bluegoogames](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/bluegoogames/32/1882_2.png) [@bluegoogames](https://qa.fmod.com/u/bluegoogames)\
**Post date:** [January 29, 2021, 7:13am UTC](https://qa.fmod.com/t/error-using-attribute-fmodunity-eventref-to-pick-event-in-inspector/16699/1 "2021-01-29T07:13:42Z")

</div>

I made a scriptable object, and want a FMOD event selector, using this code.  
Is there a bug in EventRefDrawer? Is something wrong with my fmod setup? It plays events from code like it should if I call it using a string. I can see the events when i click the magnifying glass, but nothing gets selected. See the image and gif below.

Unity 2020.1.4 and FMOD fmodstudio20107.unitypackage

```
using FMODUnity;
using UnityEngine;

namespace _Game.Scripts.BlueGoo.Creatures {
	[CreateAssetMenu(fileName = "CreatureSetting", menuName = "BlueGoo/Creature Setting", order = 0)]
	public class NpcSetting : ScriptableObject {
		
		public float territoryRadius = 10;
		
		[FMODUnity.EventRef]
		public FMODEventPlayable fleeSound;

		[FMODUnity.EventRef]
		public FMODEventPlayable hurtSound;

	}
}

```

Error in console:

```
type is not a supported string value
UnityEditor.SerializedProperty:get_stringValue()
FMODUnity.EventRefDrawer:OnGUI(Rect, SerializedProperty, GUIContent) (at Assets/Plugins/FMOD/src/Editor/EventRefDrawer.cs:93)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

```

 ![event1](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/4/4b34442251024e3123006cf0e59f0c7215c32961.gif)

---

<div class="post-metadata">

**Author:** ![bluegoogames](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/bluegoogames/32/1882_2.png) [@bluegoogames](https://qa.fmod.com/u/bluegoogames)\
**Post date:** [January 29, 2021, 7:31am UTC](https://qa.fmod.com/t/error-using-attribute-fmodunity-eventref-to-pick-event-in-inspector/16699/2 "2021-01-29T07:31:54Z")

</div>

Ok, the issue was I should use a string, not FMODEventPlayable

```
[FMODUnity.EventRef]
public string fleeSound;
```
