Feat : Wwise Integration

This commit is contained in:
Alex
2026-03-23 14:28:21 +01:00
parent 627d787695
commit 004bc328ed
1149 changed files with 226567 additions and 19 deletions
@@ -0,0 +1,79 @@
/*******************************************************************************
The content of this file includes portions of the proprietary AUDIOKINETIC Wwise
Technology released in source code form as part of the game integration package.
The content of this file may not be used without valid licenses to the
AUDIOKINETIC Wwise Technology.
Note that the use of the game engine is subject to the Unity(R) Terms of
Service at https://unity3d.com/legal/terms-of-service
License Usage
Licensees holding valid licenses to the AUDIOKINETIC Wwise Technology may use
this file in accordance with the end user license agreement provided with the
software or, alternatively, in accordance with the terms contained
in a written agreement between you and Audiokinetic Inc.
Copyright (c) 2026 Audiokinetic Inc.
*******************************************************************************/
#if UNITY_EDITOR
using UnityEditor;
using AK.Wwise.Unity.Logging;
[UnityEditor.InitializeOnLoad]
public class AkWindowsPluginActivator : AkPlatformPluginActivator
{
public override string WwisePlatformName => "Windows";
public override string PluginDirectoryName => "Windows";
static AkWindowsPluginActivator()
{
if (UnityEditor.AssetDatabase.IsAssetImportWorkerProcess())
{
return;
}
AkPluginActivator.RegisterPlatformPluginActivator(BuildTarget.StandaloneWindows, new AkWindowsPluginActivator());
AkPluginActivator.RegisterPlatformPluginActivator(BuildTarget.StandaloneWindows64, new AkWindowsPluginActivator());
}
private const int ARCH_INDEX = 1;
private const int CONFIG_INDEX = 2;
private const int EDITOR_CPU_INDEX = 1;
public override AkPluginActivator.PluginImporterInformation GetPluginImporterInformation(PluginImporter pluginImporter)
{
var parts = GetPluginPathParts(pluginImporter.assetPath);
return new AkPluginActivator.PluginImporterInformation
{
PluginConfig = parts[CONFIG_INDEX],
PluginArch = parts[ARCH_INDEX],
EditorOS = "Windows",
EditorCPU = parts[EDITOR_CPU_INDEX]
};
}
internal override bool ConfigurePlugin(PluginImporter pluginImporter, AkPluginActivator.PluginImporterInformation pluginImporterInformation)
{
if (pluginImporterInformation.PluginArch != "x86" && pluginImporterInformation.PluginArch != "x86_64")
{
WwiseLogger.Log("Architecture not found: " + pluginImporterInformation.PluginArch);
return false;
}
pluginImporter.SetPlatformData(BuildTarget.StandaloneLinux64, "CPU", "None");
pluginImporter.SetPlatformData(BuildTarget.StandaloneWindows, "CPU", pluginImporterInformation.IsX86 ? "AnyCPU" : "None");
pluginImporter.SetPlatformData(BuildTarget.StandaloneWindows64, "CPU", pluginImporterInformation.IsX64 ? "AnyCPU" : "None");
pluginImporter.SetPlatformData(BuildTarget.StandaloneOSX, "CPU", "None");
return true;
}
public override void FilterOutPlatformIfNeeded(BuildTarget target, PluginImporter pluginImporter,
string pluginPlatform)
{
pluginImporter.SetCompatibleWithPlatform(target, false);
}
}
#endif
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: d07a21f4872187e4ca59da771dc15ca8