I’m having a ton of trouble getting Wwise up and running within my Unity environment.
The problem is that I’m getting this error:
Assets/Wwise/Deployment/API/Generated/Common/ErrorCode.cs(11,13): error CS0101: The namespace global::' already contains a definition for ErrorCode’
To get around this, I go into the ErrorCode.cs and replace all of ErrorCode with ErrorCodeWwise, and then convert all the lines when it prompts me.
The problem is that when I do this, I get the following two errors:
Assets/Wwise/Deployment/API/Generated/Common/AkDeviceSettings.cs(102,10): error CS0246: The type or namespace name `AkThreadProperties’ could not be found. Are you missing a using directive or an assembly reference?
and
Assets/Wwise/Deployment/API/Generated/Common/AkInitSettings.cs(167,10): error CS0246: The type or namespace name `AkSinkType’ could not be found. Are you missing a using directive or an assembly reference?
Any tips?
Thanks!
Edit: SOLVED
Thanks to the AK forums, this is now solved. The problem is that my build was set to a Mac (made a build to run on my laptop to bring to show people) and I hadn’t realized that using the Windows build of Wwise was the target. Switching the build settings back to Windows solved the issue, and it works fine now =)
Sorry to be posting so often in my own thread, I k now that’s likely frowned upon here; but I wanted to give another update
This is the current state of things. I’m really quite stumped =/
Could anyone help plz? (I know the ‘!’ I added likely wasn’t the correct solution, but it was something I came up with. Regardless, anything I do results in that net result of 100s of errors)
It looks kinda like you’ve not imported the entire WWise integration package - types like AkThreadProperties should be in the package, there shouldn’t be anything special you have to do.
I’d try re-downloading and re-importing the entire integration package, see if that helps.
Thanks for the advice. I did that, and actually created a new project with the Wwise test scene - which worked flawlessly. I took the folders from that (minus the example scenes) and brought it over to my project, but the exact same errors are occurring. I truly have no idea what’s going on with this one.
The problem here is that both the Wwise and Photon devs have implemented types in the root namespace, which is a general no-no - one reason being type collisions as described in this post. Their types need to be contained in unique namespaces, for example: Audiokinetic.Wwise. I’m guessing they know about the problem but may be reluctant to change and may cite ‘we don’t want to break existing customers’. I’ll follow-up with both companies.
bassman2112, for now, you can wrap the appropriate Photon types in namespaces like the following. Note that Photon is a tad inconsistent with their namespaces. Look at the base class on the derived types for hints, and resolve references with ‘using’ statements, etc. Most of the changes are going to be in their demo code anyway…
namespace ExitGames.Client.Photon
{
}
namespace Photon
{
}
Unity folks (superpig), reinstallation of packages will only be a fix for this class of problem, if the cause is resolved in a more current packages. It’s a tad naïve to suggest that it will ‘upgrade away’. It is my opinion that you should assume that 3rd party code is faulty, given the lax quality gauntlet (IMHO) of the Unity Asset Store submission process. My (friendly and supportive) 2 cents: Please consider that feedback and an action-item for your Store team - Task: Disallow root namespace types in Store submission (source or reflected) code.