Search Unity

Bug Error CS0234: The type or namespace name 'AudioModule' does not exist in 'UnityEngine'

Discussion in 'Editor & General Support' started by Richard_Roth, Jul 15, 2020.

  1. Richard_Roth

    Richard_Roth

    Joined:
    Dec 29, 2014
    Posts:
    64
    Build: Unity 2019.4.3f1
    Platform: Windows
    Coder: Visual Studio

    Ran into this issue today and I've tried multiple things to no avail. Things I have tried:
    Restarting Unity
    Restarting Visual Studio
    Reimporting project

    When I open the code in visual studio code it doesn't give me auto-complete for things that should be in UnityEngine like AudioClip.

    Full Error: error CS0234: The type or namespace name 'AudioModule' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
     
  2. Richard_Roth

    Richard_Roth

    Joined:
    Dec 29, 2014
    Posts:
    64
    Fixed it by linking visual studio editor to Unity.

    AudioModule is also not a thing anymore, its just UnityEngine.Audio
     
  3. koenjansen

    koenjansen

    Joined:
    Dec 10, 2020
    Posts:
    1
    Thanks Richard! <3 Saved me a headache.