# Error during build

**URL:** https://qa.fmod.com/t/error-during-build/20288
**Category:** Unity
**Tags:** unity
**Created:** [June 6, 2023, 11:41am UTC](https://qa.fmod.com/t/error-during-build/20288 "2023-06-06T11:41:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![saynizesis](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@saynizesis](https://qa.fmod.com/u/saynizesis)
#### Post date: [June 6, 2023, 11:41am UTC](https://qa.fmod.com/t/error-during-build/20288/1 "2023-06-06T11:41:01Z")

</div>

I’m getting FMOD script errors during webgl build but everything works fine in editor  
`Assets\Scripts\Audio\FMODEventInstanceManager.cs(24,45): error CS1061: 'EventReference' does not contain a definition for 'Path' and no accessible extension method 'Path' accepting a first argument of type 'EventReference' could be found (are you missing a using directive or an assembly reference?)`

Here is my script

```auto
// Constructors can now delegate to the private method
        public FMODEventInstanceManager(EventReference soundEvent, int eventMaxCount)
        {
            CreateEventInstances(soundEvent.Path, eventMaxCount);
        }

        public FMODEventInstanceManager(string soundEventPath, int eventMaxCount)
        {
            CreateEventInstances(soundEventPath, eventMaxCount);
        }

```

---

<div class="post-metadata">

### Author: ![saynizesis](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@saynizesis](https://qa.fmod.com/u/saynizesis)
#### Post date: [June 6, 2023, 12:06pm UTC](https://qa.fmod.com/t/error-during-build/20288/2 "2023-06-06T12:06:11Z")

</div>

The problem with the code is that `Path` is only used within Editor, to fix this we need to do `soundEvent.ToString()`
