Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

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:
    61
    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:
    61
    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.