Error CS0234: The type or namespace name 'RunTimeManager' does not exist in the namespace 'FMODUnity'


I’m following this tutorial:

Around minute 10 we call a OneShot event using this line of code: FMODUnity.RunTimeManager.PlaySoundOneShot(path, GetComponent().position)

In the video everything works fine after that but I’m getting this: Assets/_CompletedAssets/Scripts/Enemy/EnemyMovement.cs(25,13): error CS0234: The type or namespace name ‘RunTimeManager’ does not exist in the namespace ‘FMODUnity’ (are you missing an assembly reference?)

Any ideas will be appreciated!

Edit: by the way, I should mention that I’m using Unity 2018.4.17f for this.

Hi there!

You have some typos - lowercase “t” in RuntimeManager. Also there’s no “Sound” in the PlayOneShot method

Should look like FMODUnity.RuntimeManager.PlayOneShot(path, transform.position).

Are you using an IDE with Intellisense and code completion to write your code? I’d recommend Visual Studio, or Visual Studio Code with Unity extensions. They can help in catching these kinds of errors.

1 Like

Thanks so much for helping a newby out! I’m learning so much, it’s fun. I just fixed it like you mentioned but I still had a problem… took me 5 mins to realize every statement needs a ;

It’s easier now that I understand that the red underline in Visual Studio is pointing at the problem… Completely missed that one.

By the way, is there something like a database with common FMOD C# lines to double check in case I run into other issues?

Thanks again, the sound is playing now :)!!!

1 Like

no problem!

I’d recommend bookmarking the scripting examples page, for whichever version of FMOD you’re using:

Really helped me when I was learning.

When you’re ready to go a bit further, I’ve highly recommend Alessandro Fama’s tutorials for intermediate topics and technical sound design:

Thanks a lot for those resources!