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

error CS0246: ... 'AKThreadProperties' could not be found. Are you missing a using directive..

Discussion in 'Editor & General Support' started by Kbung, Jun 9, 2015.

  1. Kbung

    Kbung

    Joined:
    Jun 8, 2015
    Posts:
    2
    I'm on a PC Windows 8.1. When I try to make a Mac build (x86), I get the following errors.

    Error building Player because scripts had compiler errors

    assets/Wwise/Deployment/API/Generated/Common/AkDeviceSettings.cs(102,10); error cs0246: The type or namespace name 'AkThreadPropertires' could not be found. Are you missing a using directive or an assembly reference?

    assets/Wwise/Deployment/API/Generated/Common/AkInitSettings.cs(179,10); error cs0246: The type or namespace name 'AkAudioAPI' could not be found. Are you missing a using directive or an assembly reference?


    I have attached a few photos where it shows the script location of those files in MonoDevelop. I am completely new to scripting, and I really don't know anything about it, or what to do.. I've been researching for hours, but can't seem to figure it out. Can someone point me in the right direction??

    AKThreadProperties.png AKAudioAPI.png Compiler Errors.png AKAudioAPI.png AKThreadProperties.png Compiler Errors.png
     
  2. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    I've not used WWise, but the error is saying that the AKThreadProperties class (which is used on line 102) isn't recognised. The error then asks whether the script file has a #using line near the top of the file to reference a script file that declares that class. Ditto with the AkInitSettings.cs.
     
  3. Kbung

    Kbung

    Joined:
    Jun 8, 2015
    Posts:
    2
    Thank you so much for your response! Again, with my extremely limited (but learning) knowledge of scripting.. Can you tell me how I might be able to resolve this?

    I've attached my script of AkThreadProperties, and also, AKinisettings

    Also, if it matters, I should mention building to Windows x86 gets completed without errors, but when trying to play the game in standalone, it is just a gray screen as it is when I try to play within Unity. So when the build settings are set to Windows x86, playing the game in Unity shows up just grey and nothing else

    When the build settings are set to Mac OS X x86, playing the game in Unity shows up the message, "All compiler errors have to be fixed before you can enter playmode"
     

    Attached Files:

  4. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    As I said, I am not an expert on this. Maybe contact whoever created the AkInitSettings.cs and AkDeviceSettings.cs files and see if they have seen this before.