ANGST
This commit is contained in:
parent
08c9a2350f
commit
9144907a10
8
blueberryPeak/Assets/Wwise/API.meta
Normal file
8
blueberryPeak/Assets/Wwise/API.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9471daccbab05cc42ba92f8b95430b4c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
0
blueberryPeak/Assets/Wwise/API/CHANGELOG.md
Normal file
0
blueberryPeak/Assets/Wwise/API/CHANGELOG.md
Normal file
7
blueberryPeak/Assets/Wwise/API/CHANGELOG.md.meta
Normal file
7
blueberryPeak/Assets/Wwise/API/CHANGELOG.md.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1371b52db9429d245bd36377dc622f13
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
blueberryPeak/Assets/Wwise/API/Editor.meta
Normal file
8
blueberryPeak/Assets/Wwise/API/Editor.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 74d21d8454f1807488522fa3bddecb4e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "AK.Wwise.Unity.API.Editor",
|
||||
"references": [
|
||||
"AK.Wwise.Unity.API",
|
||||
"AK.Wwise.Unity.API.WwiseTypes",
|
||||
"AK.Wwise.Unity.MonoBehaviour",
|
||||
"Ak.Wwise.Api.WAAPI",
|
||||
"AK.Wwise.Unity.ProjectDatabase"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [ "!UNITY_SERVER" ],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98897d1ac68099144841035bb82dc516
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,121 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace Wwise.API.Editor.SoundBankDirectoryWatcher.Common
|
||||
{
|
||||
[UnityEditor.InitializeOnLoad]
|
||||
public class AkSoundBankDirectoryWatcher
|
||||
{
|
||||
private static readonly AkSoundBankDirectoryWatcher instance;
|
||||
public static AkSoundBankDirectoryWatcher Instance { get { return instance; } }
|
||||
|
||||
private bool emptyPathErrorWasLogged = false;
|
||||
private string soundBankDirectoryPath;
|
||||
private string platformName;
|
||||
private string languageName;
|
||||
private bool forceUpdate = false;
|
||||
private bool initCallbackRequired = false;
|
||||
|
||||
private const int SecondsBetweenChecks = 3;
|
||||
private static System.DateTime s_lastFileCheck = System.DateTime.Now.AddSeconds(-SecondsBetweenChecks);
|
||||
private static System.DateTime s_lastSoundBankDirectoryUpdate = System.DateTime.MinValue;
|
||||
|
||||
private AkSoundBankDirectoryWatcher()
|
||||
{
|
||||
platformName = AkBasePathGetter.GetPlatformName();
|
||||
UnityEditor.EditorApplication.update += OnEditorUpdate;
|
||||
WwiseProjectDatabase.SoundBankDirectoryUpdated += AkPlatformPluginList.ExecuteParse;
|
||||
forceUpdate = true;
|
||||
Execute();
|
||||
}
|
||||
|
||||
static AkSoundBankDirectoryWatcher()
|
||||
{
|
||||
instance = new AkSoundBankDirectoryWatcher();
|
||||
}
|
||||
|
||||
~AkSoundBankDirectoryWatcher()
|
||||
{
|
||||
UnityEditor.EditorApplication.update -= OnEditorUpdate;
|
||||
WwiseProjectDatabase.SoundBankDirectoryUpdated -= AkPlatformPluginList.ExecuteParse;
|
||||
}
|
||||
|
||||
private void Execute()
|
||||
{
|
||||
if (initCallbackRequired)
|
||||
{
|
||||
initCallbackRequired = false;
|
||||
WwiseProjectDatabase.PostInitCallback();
|
||||
}
|
||||
if (AkWwiseEditorSettings.Instance.WwiseProjectPath == "")
|
||||
{
|
||||
if (!emptyPathErrorWasLogged)
|
||||
{
|
||||
Debug.LogWarning("WwiseProjectPath is empty in the Wwise integration settings. Set it in order to enable the project database.");
|
||||
emptyPathErrorWasLogged = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (System.DateTime.Now.Subtract(s_lastFileCheck).Seconds >= SecondsBetweenChecks &&
|
||||
!UnityEditor.EditorApplication.isCompiling && !UnityEditor.EditorApplication.isPlayingOrWillChangePlaymode && !AkUtilities.GeneratingSoundBanks)
|
||||
{
|
||||
var filename = System.IO.Path.Combine(AkBasePathGetter.GetWwiseRootOutputPath());
|
||||
var wProjPath = System.IO.Path.Combine(AkBasePathGetter.GetWwiseProjectPath());
|
||||
var time = System.IO.File.GetLastWriteTime(filename);
|
||||
Task.Run(() => InitProjectDB(filename, wProjPath, time));
|
||||
s_lastFileCheck = System.DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEditorUpdate()
|
||||
{
|
||||
Execute();
|
||||
}
|
||||
|
||||
private async Task InitProjectDB(string filename, string wProjPath, DateTime time)
|
||||
{
|
||||
if (time > s_lastSoundBankDirectoryUpdate || forceUpdate)
|
||||
{
|
||||
if (!await WwiseProjectDatabase.InitAsync(filename, platformName))
|
||||
{
|
||||
var userWarning = "";
|
||||
if (!AkUtilities.IsSettingEnabled(wProjPath,"GenerateSoundBankJSON"))
|
||||
{
|
||||
userWarning = "Ensure that the Generate JSON Metadata option is enabled in the Wwise Project Settings on the SoundBanks tab, then regenerate the SoundBanks.";
|
||||
}
|
||||
else
|
||||
{
|
||||
userWarning = "Ensure that the SoundBanks Path in the Integration Settings matches the Root Output Path in the Wwise Project Settings on the SoundBanks tab, then regenerate the SoundBanks.";
|
||||
}
|
||||
|
||||
UnityEngine.Debug.LogError("WwiseUnity: Cannot find ProjectInfo.json at " + filename + ". " + userWarning);
|
||||
}
|
||||
s_lastSoundBankDirectoryUpdate = time;
|
||||
forceUpdate = false;
|
||||
|
||||
initCallbackRequired = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b096639186b0c8e4eae3ffcbfe7ff259
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9febbbf636223404a8c49dcb5a7dcfcd
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 80ed8cc17593bbb4eb707a6f2eacf2b1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,63 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEditor.VersionControl;
|
||||
|
||||
[UnityEditor.InitializeOnLoad]
|
||||
public abstract class AkPlatformPluginActivator
|
||||
{
|
||||
public abstract string WwisePlatformName { get; }
|
||||
public abstract string PluginDirectoryName { get; }
|
||||
public virtual ISet<string> Architectures => null;
|
||||
|
||||
public virtual string DSPDirectoryPath => string.Empty;
|
||||
|
||||
public virtual string StaticPluginRegistrationName => null;
|
||||
public virtual string StaticPluginDefine => null;
|
||||
|
||||
public virtual bool RequiresStaticPluginRegistration => false;
|
||||
|
||||
public virtual void FilterOutPlatformIfNeeded(BuildTarget target, PluginImporter pluginImporter,
|
||||
string pluginPlatform)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual bool IsPluginSDKVersionCompatible(string pluginSDKVersion)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
internal virtual bool IsBuildEnvironmentValid()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
internal string[] GetPluginPathParts(string pluginPath)
|
||||
{
|
||||
var indexOfPluginFolder = pluginPath.IndexOf(AkPluginActivatorConstants.WwisePluginFolder, StringComparison.OrdinalIgnoreCase);
|
||||
return pluginPath.Substring(indexOfPluginFolder + AkPluginActivatorConstants.WwisePluginFolder.Length + 1).Split('/');
|
||||
}
|
||||
|
||||
public abstract AkPluginActivator.PluginImporterInformation GetPluginImporterInformation(PluginImporter pluginImporter);
|
||||
internal abstract bool ConfigurePlugin(PluginImporter pluginImporter, AkPluginActivator.PluginImporterInformation pluginImporterInformation);
|
||||
|
||||
}
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 21328126a8414b64d97fa11e6f9cf439
|
@ -0,0 +1,282 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
|
||||
internal class AkPlatformPluginList
|
||||
{
|
||||
private static readonly Dictionary<string, System.DateTime> s_LastParsed = new Dictionary<string, System.DateTime>();
|
||||
|
||||
private static readonly Dictionary<string, HashSet<AkPluginInfo>> s_PerPlatformPlugins = new Dictionary<string, HashSet<AkPluginInfo>>();
|
||||
|
||||
internal static void GetPluginsUsedForPlatform(string deploymentTargetName, out HashSet<AkPluginInfo> UsedPlugins)
|
||||
{
|
||||
s_PerPlatformPlugins.TryGetValue(deploymentTargetName, out UsedPlugins);
|
||||
}
|
||||
|
||||
internal static bool ContainsPlatform(string platform)
|
||||
{
|
||||
return s_PerPlatformPlugins.ContainsKey(platform);
|
||||
}
|
||||
|
||||
public static bool IsPluginUsed(AkPlatformPluginActivator in_config, string in_UnityPlatform, string in_PluginName)
|
||||
{
|
||||
var pluginDSPPlatform = in_config.WwisePlatformName;
|
||||
|
||||
if (!s_PerPlatformPlugins.ContainsKey(pluginDSPPlatform))
|
||||
{
|
||||
return false; //XML not parsed, don't touch anything.
|
||||
}
|
||||
|
||||
if (in_PluginName.Contains("AkUnitySoundEngine"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
var pluginName = in_PluginName;
|
||||
if (in_PluginName.StartsWith("lib"))
|
||||
{
|
||||
pluginName = in_PluginName.Substring(3);
|
||||
}
|
||||
|
||||
const string factory = "Factory";
|
||||
int indexOfFactory = in_PluginName.IndexOf(factory);
|
||||
// Ensure the plugin name ends with "Factory.h"
|
||||
if (indexOfFactory != -1 && indexOfFactory + factory.Length == in_PluginName.Length)
|
||||
{
|
||||
pluginName = in_PluginName.Substring(0, indexOfFactory);
|
||||
}
|
||||
|
||||
System.Collections.Generic.HashSet<AkPluginInfo> plugins;
|
||||
if (s_PerPlatformPlugins.TryGetValue(pluginDSPPlatform, out plugins))
|
||||
{
|
||||
if (!in_config.RequiresStaticPluginRegistration)
|
||||
{
|
||||
foreach (var pluginInfo in plugins)
|
||||
{
|
||||
if (pluginInfo.DllName == pluginName ||
|
||||
(pluginInfo.StaticLibName == "AkMeterFX" && pluginName.Contains("AkSoundEngine")))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Exceptions
|
||||
if (!string.IsNullOrEmpty(in_config.StaticPluginRegistrationName) && pluginName.Contains(in_config.StaticPluginRegistrationName))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//WebGL, iOS, tvOS, visionOS, and Switch deal with the static libs directly, unlike all other platforms.
|
||||
//Luckily the DLL name is always a subset of the lib name.
|
||||
foreach (var pluginInfo in plugins)
|
||||
{
|
||||
if (pluginInfo.StaticLibName == pluginName)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void ExecuteParse()
|
||||
{
|
||||
Update();
|
||||
}
|
||||
public static void Update(bool forceUpdate = false)
|
||||
{
|
||||
//Gather all GeneratedSoundBanks folder from the project
|
||||
var allPaths = AkUtilities.GetAllBankPaths();
|
||||
var bNeedRefresh = false;
|
||||
var projectDir = AkBasePathGetter.GetWwiseProjectDirectory();
|
||||
var baseSoundBankPath = AkBasePathGetter.GetFullSoundBankPathEditor();
|
||||
|
||||
AkWwiseInitializationSettings.UpdatePlatforms();
|
||||
|
||||
//make a copy of the platform map and handle "special" custom platforms
|
||||
var platformMap = new Dictionary<string, List<string>>();
|
||||
foreach (var key in AkUtilities.PlatformMapping.Keys)
|
||||
{
|
||||
platformMap.Add(key, new List<string>(AkUtilities.PlatformMapping[key]));
|
||||
foreach (var customPF in AkUtilities.PlatformMapping[key])
|
||||
{
|
||||
if (customPF != key && (AkWwiseInitializationSettings.PlatformSettings.IsDistinctPlatform(customPF)))
|
||||
{
|
||||
platformMap.Add(customPF, new List<string> { customPF });
|
||||
platformMap[key].Remove(customPF);
|
||||
}
|
||||
}
|
||||
if (platformMap[key].Count==0)
|
||||
{
|
||||
platformMap.Remove(key);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Go through all BasePlatforms
|
||||
foreach (var pairPF in platformMap)
|
||||
{
|
||||
//Go through all custom platforms related to that base platform and check if any of the bank files were updated.
|
||||
var bParse = forceUpdate;
|
||||
var fullPaths = new System.Collections.Generic.List<string>();
|
||||
foreach (var customPF in pairPF.Value)
|
||||
{
|
||||
string bankPath;
|
||||
if (!allPaths.TryGetValue(customPF, out bankPath))
|
||||
continue;
|
||||
|
||||
var pluginFile = "";
|
||||
try
|
||||
{
|
||||
pluginFile = System.IO.Path.Combine(projectDir, System.IO.Path.Combine(bankPath, "PluginInfo.xml"));
|
||||
pluginFile = pluginFile.Replace('/', System.IO.Path.DirectorySeparatorChar);
|
||||
if (!System.IO.File.Exists(pluginFile))
|
||||
{
|
||||
//Try in StreamingAssets too.
|
||||
pluginFile = System.IO.Path.Combine(System.IO.Path.Combine(baseSoundBankPath, customPF), "PluginInfo.xml");
|
||||
if (!System.IO.File.Exists(pluginFile))
|
||||
continue;
|
||||
}
|
||||
|
||||
fullPaths.Add(pluginFile);
|
||||
|
||||
var t = System.IO.File.GetLastWriteTime(pluginFile);
|
||||
var lastTime = System.DateTime.MinValue;
|
||||
bool bParsedBefore = s_LastParsed.TryGetValue(customPF, out lastTime);
|
||||
if (!bParsedBefore || lastTime < t)
|
||||
{
|
||||
bParse = true;
|
||||
s_LastParsed[customPF] = t;
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
UnityEngine.Debug.LogError("WwiseUnity: " + pluginFile + " could not be parsed. " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
if (bParse)
|
||||
{
|
||||
var platform = pairPF.Key;
|
||||
|
||||
var newDlls = ParsePlugins(platform);
|
||||
System.Collections.Generic.HashSet<AkPluginInfo> oldDlls = null;
|
||||
|
||||
s_PerPlatformPlugins.TryGetValue(platform, out oldDlls);
|
||||
s_PerPlatformPlugins[platform] = newDlls;
|
||||
|
||||
//Check if there was any change.
|
||||
if (!bNeedRefresh && oldDlls != null)
|
||||
{
|
||||
if (oldDlls.Count == newDlls.Count)
|
||||
{
|
||||
oldDlls.IntersectWith(newDlls);
|
||||
}
|
||||
|
||||
bNeedRefresh |= oldDlls.Count != newDlls.Count;
|
||||
}
|
||||
else
|
||||
{
|
||||
bNeedRefresh |= newDlls.Count > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bNeedRefresh)
|
||||
{
|
||||
AkPluginActivator.ActivatePluginsForEditor();
|
||||
}
|
||||
}
|
||||
|
||||
private static bool PlatformUsesStaticLibs(string platform)
|
||||
{
|
||||
var pair = AkPluginActivator.BuildTargetToPlatformPluginActivator.FirstOrDefault(x => x.Value.WwisePlatformName == platform);
|
||||
|
||||
if (pair.Equals(default(KeyValuePair<BuildTarget, AkPlatformPluginActivator>)))
|
||||
{
|
||||
// Platform not found
|
||||
return false;
|
||||
}
|
||||
return pair.Value.RequiresStaticPluginRegistration;
|
||||
}
|
||||
|
||||
private static HashSet<AkPluginInfo> ParsePlugins(string platform)
|
||||
{
|
||||
var newPlugins = new System.Collections.Generic.HashSet<AkPluginInfo>();
|
||||
var usesStaticLibs = PlatformUsesStaticLibs(platform);
|
||||
|
||||
try
|
||||
{
|
||||
WwisePluginRefArray pluginRefArray = new WwisePluginRefArray();
|
||||
for (var i = 0; i < WwiseProjectDatabase.GetPluginCount(); i++)
|
||||
{
|
||||
var pluginRef = pluginRefArray[i];
|
||||
var rawPluginID = pluginRef.Id;
|
||||
if (rawPluginID == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
AkPluginActivatorConstants.PluginID pluginID = (AkPluginActivatorConstants.PluginID)rawPluginID;
|
||||
|
||||
if (AkPluginActivatorConstants.alwaysSkipPluginsIDs.Contains(pluginID))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var dll = string.Empty;
|
||||
|
||||
if (!usesStaticLibs && AkPluginActivatorConstants.builtInPluginIDs.Contains(pluginID))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(dll))
|
||||
{
|
||||
dll = pluginRef.DLL;
|
||||
}
|
||||
|
||||
var staticLibName = pluginRef.StaticLib;
|
||||
|
||||
AkPluginInfo newPluginInfo = new AkPluginInfo();
|
||||
newPluginInfo.PluginID = rawPluginID;
|
||||
newPluginInfo.DllName = dll;
|
||||
newPluginInfo.StaticLibName = staticLibName;
|
||||
|
||||
if (string.IsNullOrEmpty(newPluginInfo.StaticLibName) && !AkPluginActivatorConstants.PluginIDToStaticLibName.TryGetValue(pluginID, out newPluginInfo.StaticLibName))
|
||||
{
|
||||
newPluginInfo.StaticLibName = dll;
|
||||
}
|
||||
|
||||
newPlugins.Add(newPluginInfo);
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
UnityEngine.Debug.LogError("WwiseUnity: plugins could not be parsed. " + ex.Message);
|
||||
}
|
||||
|
||||
return newPlugins;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e30c7857cb5d04344bd98747ff621ec8
|
@ -0,0 +1,316 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
[InitializeOnLoad]
|
||||
public class AkPluginActivator : UnityEditor.AssetPostprocessor
|
||||
{
|
||||
private const string EditorConfiguration = AkPluginActivatorConstants.CONFIG_PROFILE;
|
||||
private static bool bIsAlreadyActivating = false;
|
||||
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths, bool didDomainReload)
|
||||
{
|
||||
if (UnityEditor.AssetDatabase.IsAssetImportWorkerProcess() || bIsAlreadyActivating)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Array.IndexOf(Environment.GetCommandLineArgs(), "-verboseAkPluginActivator") != -1)
|
||||
{
|
||||
UnityEngine.Debug.Log("Enabling verbose logging!");
|
||||
IsVerboseLogging = true;
|
||||
}
|
||||
|
||||
if (didDomainReload)
|
||||
{
|
||||
ActivatePluginsForEditor();
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetCurrentConfig()
|
||||
{
|
||||
var CurrentConfig = AkWwiseProjectInfo.GetData().CurrentPluginConfig;
|
||||
if (string.IsNullOrEmpty(CurrentConfig))
|
||||
{
|
||||
CurrentConfig = AkPluginActivatorConstants.CONFIG_PROFILE;
|
||||
}
|
||||
|
||||
return CurrentConfig;
|
||||
}
|
||||
|
||||
public static Dictionary<BuildTarget, AkPlatformPluginActivator> BuildTargetToPlatformPluginActivator = new Dictionary<BuildTarget, AkPlatformPluginActivator>();
|
||||
|
||||
public static void RegisterPlatformPluginActivator(BuildTarget target, AkPlatformPluginActivator platformPluginActivator)
|
||||
{
|
||||
LogVerbose("Adding platform " + target.ToString() + " to PluginActivator");
|
||||
BuildTargetToPlatformPluginActivator.Add(target, platformPluginActivator);
|
||||
}
|
||||
|
||||
internal static string GetPluginInfoPlatform(string path)
|
||||
{
|
||||
var indexOfPluginFolder = path.IndexOf(AkPluginActivatorConstants.WwisePluginFolder, StringComparison.OrdinalIgnoreCase);
|
||||
if (indexOfPluginFolder == -1)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return path.Substring(indexOfPluginFolder + AkPluginActivatorConstants.WwisePluginFolder.Length + 1).Split('/')[0];
|
||||
}
|
||||
|
||||
internal static List<PluginImporter> GetWwisePluginImporters(string platformFilter = "")
|
||||
{
|
||||
PluginImporter[] pluginImporters = PluginImporter.GetAllImporters();
|
||||
List<PluginImporter> wwisePlugins = new List<PluginImporter>();
|
||||
foreach (var pluginImporter in pluginImporters)
|
||||
{
|
||||
if (pluginImporter.assetPath.Contains("Wwise/API/"))
|
||||
{
|
||||
if (string.IsNullOrEmpty(platformFilter) || platformFilter == GetPluginInfoPlatform(pluginImporter.assetPath))
|
||||
{
|
||||
wwisePlugins.Add(pluginImporter);
|
||||
}
|
||||
}
|
||||
}
|
||||
return wwisePlugins;
|
||||
}
|
||||
|
||||
public class PluginImporterInformation
|
||||
{
|
||||
public string PluginName;
|
||||
public string PluginArch;
|
||||
public string PluginSDKVersion;
|
||||
public string PluginConfig;
|
||||
|
||||
public string EditorOS;
|
||||
public string EditorCPU;
|
||||
|
||||
public bool IsX86 => PluginArch == "x86";
|
||||
public bool IsX64 => PluginArch == "x86_64";
|
||||
|
||||
public bool IsSupportLibrary => AkPluginActivatorConstants.SupportLibraries.Contains(PluginName);
|
||||
}
|
||||
|
||||
public static void ActivatePluginsForDeployment(BuildTarget target, bool Activate)
|
||||
{
|
||||
if (!BuildTargetToPlatformPluginActivator.TryGetValue(target, out var platformPluginActivator))
|
||||
{
|
||||
Debug.LogError("WwiseUnity: Unable to find Plugin Activator for Build Target " + target + ". Check that platform " + target + " has been installed as part of your Wwise Integration.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!platformPluginActivator.IsBuildEnvironmentValid())
|
||||
{
|
||||
Debug.LogError("Build Environment for platform " + platformPluginActivator.WwisePlatformName + " is not valid. Current BuildTarget is " + EditorUserBuildSettings.activeBuildTarget);
|
||||
return;
|
||||
}
|
||||
|
||||
bIsAlreadyActivating = true;
|
||||
|
||||
if (Activate)
|
||||
{
|
||||
StaticPluginRegistration.Setup(target, platformPluginActivator);
|
||||
}
|
||||
|
||||
var importers = GetWwisePluginImporters();
|
||||
var assetChanged = false;
|
||||
foreach (var pluginImporter in importers)
|
||||
{
|
||||
var pluginPlatform = GetPluginInfoPlatform(pluginImporter.assetPath);
|
||||
if (pluginPlatform != platformPluginActivator.PluginDirectoryName)
|
||||
{
|
||||
if (Activate)
|
||||
{
|
||||
platformPluginActivator.FilterOutPlatformIfNeeded(target, pluginImporter, pluginPlatform);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
var pluginInfo = platformPluginActivator.GetPluginImporterInformation(pluginImporter);
|
||||
var bShouldActivatePlugin = platformPluginActivator.ConfigurePlugin(pluginImporter, pluginInfo);
|
||||
|
||||
if (pluginImporter.GetCompatibleWithAnyPlatform())
|
||||
{
|
||||
LogVerbose("Plugin" + pluginImporter.assetPath + " was compatible with the \"any\" platform, deactivating.");
|
||||
pluginImporter.SetCompatibleWithAnyPlatform(false);
|
||||
assetChanged = true;
|
||||
}
|
||||
|
||||
if (pluginInfo.PluginConfig == "DSP")
|
||||
{
|
||||
if (!pluginInfo.IsSupportLibrary && !AkPlatformPluginList.IsPluginUsed(platformPluginActivator, pluginPlatform, Path.GetFileNameWithoutExtension(pluginImporter.assetPath)))
|
||||
{
|
||||
LogVerbose("Plugin" + pluginImporter.assetPath + " is not used, skipping.");
|
||||
bShouldActivatePlugin = false;
|
||||
}
|
||||
}
|
||||
else if (pluginInfo.PluginConfig != GetCurrentConfig())
|
||||
{
|
||||
LogVerbose("Plugin" + pluginImporter.assetPath + " does not match current config (" + GetCurrentConfig() + "). Skipping.");
|
||||
bShouldActivatePlugin = false;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(pluginInfo.PluginSDKVersion))
|
||||
{
|
||||
var sdkCompatible = platformPluginActivator.IsPluginSDKVersionCompatible(pluginInfo.PluginSDKVersion);
|
||||
LogVerbose("Plugin " + pluginImporter.assetPath + " is " + (sdkCompatible ? "" : "NOT ") + "compatible with current platform SDK");
|
||||
bShouldActivatePlugin &= sdkCompatible;
|
||||
}
|
||||
|
||||
bool isCompatibleWithPlatform = bShouldActivatePlugin && Activate;
|
||||
LogVerbose("Will set plugin " + pluginImporter.assetPath + " as " + (isCompatibleWithPlatform ? "" : "NOT ") + "compatible with platform.");
|
||||
assetChanged |= pluginImporter.GetCompatibleWithPlatform(target) != isCompatibleWithPlatform;
|
||||
|
||||
pluginImporter.SetCompatibleWithPlatform(target, isCompatibleWithPlatform);
|
||||
|
||||
if (assetChanged)
|
||||
{
|
||||
LogVerbose("Changed plugin " + pluginImporter.assetPath + ", saving and reimporting.");
|
||||
pluginImporter.SaveAndReimport();
|
||||
}
|
||||
}
|
||||
|
||||
bIsAlreadyActivating = false;
|
||||
}
|
||||
|
||||
public static void ActivatePluginsForEditor()
|
||||
{
|
||||
var importers = GetWwisePluginImporters();
|
||||
var changedSomeAssets = false;
|
||||
|
||||
bIsAlreadyActivating = true;
|
||||
AssetDatabase.StartAssetEditing();
|
||||
foreach (var pluginImporter in importers)
|
||||
{
|
||||
var pluginPlatform = GetPluginInfoPlatform(pluginImporter.assetPath);
|
||||
if (string.IsNullOrEmpty(pluginPlatform) || (pluginPlatform != "Mac" && pluginPlatform != "Windows"))
|
||||
{
|
||||
pluginImporter.SetCompatibleWithEditor(false);
|
||||
changedSomeAssets = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
BuildTarget pluginBuildTarget = pluginPlatform == "Mac" ? BuildTarget.StandaloneOSX : BuildTarget.StandaloneWindows64;
|
||||
|
||||
if (!BuildTargetToPlatformPluginActivator.TryGetValue(pluginBuildTarget, out var platformPluginActivator))
|
||||
{
|
||||
Debug.Log("WwiseUnity: Build Target " + pluginBuildTarget + " not supported.");
|
||||
bIsAlreadyActivating = false;
|
||||
return;
|
||||
}
|
||||
|
||||
var pluginInfo = platformPluginActivator.GetPluginImporterInformation(pluginImporter);
|
||||
|
||||
var assetChanged = false;
|
||||
if (pluginImporter.GetCompatibleWithAnyPlatform())
|
||||
{
|
||||
LogVerbose("ActivatePluginsForEditor: Plugin" + pluginImporter.assetPath + " was compatible with the \"any\" platform, deactivating.");
|
||||
pluginImporter.SetCompatibleWithAnyPlatform(false);
|
||||
assetChanged = true;
|
||||
}
|
||||
|
||||
var bActivate = false;
|
||||
if (!string.IsNullOrEmpty(pluginInfo.EditorOS))
|
||||
{
|
||||
if (pluginInfo.PluginConfig == "DSP")
|
||||
{
|
||||
if (!AkPlatformPluginList.ContainsPlatform(platformPluginActivator.WwisePlatformName))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
bActivate = AkPlatformPluginList.IsPluginUsed(platformPluginActivator, pluginPlatform,
|
||||
Path.GetFileNameWithoutExtension(pluginImporter.assetPath));
|
||||
}
|
||||
else
|
||||
{
|
||||
bActivate = pluginInfo.PluginConfig == EditorConfiguration;
|
||||
}
|
||||
|
||||
if (bActivate)
|
||||
{
|
||||
LogVerbose("ActivatePluginsForEditor: Activating " + pluginImporter.assetPath);
|
||||
pluginImporter.SetEditorData("CPU", pluginInfo.EditorCPU);
|
||||
pluginImporter.SetEditorData("OS", pluginInfo.EditorOS);
|
||||
}
|
||||
|
||||
assetChanged |= pluginImporter.GetCompatibleWithEditor() != bActivate;
|
||||
pluginImporter.SetCompatibleWithEditor(bActivate);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogVerbose("ActivatePluginsForEditor: Could not determine EditorOS for " + pluginImporter.assetPath);
|
||||
}
|
||||
|
||||
if (assetChanged)
|
||||
{
|
||||
changedSomeAssets = true;
|
||||
LogVerbose("ActivatePluginsForEditor: Changed plugin " + pluginImporter.assetPath + ", saving and reimporting.");
|
||||
}
|
||||
}
|
||||
|
||||
AssetDatabase.StopAssetEditing();
|
||||
if (changedSomeAssets)
|
||||
{
|
||||
Debug.Log("WwiseUnity: Plugins successfully activated for " + EditorConfiguration + " in Editor.");
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
bIsAlreadyActivating = false;
|
||||
}
|
||||
|
||||
public static void DeactivateAllPlugins()
|
||||
{
|
||||
var importers = GetWwisePluginImporters();
|
||||
foreach (var pluginImporter in importers)
|
||||
{
|
||||
if (pluginImporter.assetPath.IndexOf(AkPluginActivatorConstants.WwisePluginFolder, StringComparison.OrdinalIgnoreCase) == -1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
pluginImporter.SetCompatibleWithAnyPlatform(false);
|
||||
pluginImporter.SaveAndReimport();
|
||||
}
|
||||
}
|
||||
|
||||
public static void ForceUpdate()
|
||||
{
|
||||
AkPlatformPluginList.Update(true);
|
||||
Update();
|
||||
}
|
||||
|
||||
public static void Update()
|
||||
{
|
||||
AkPluginActivatorMenus.CheckMenuItems(GetCurrentConfig());
|
||||
}
|
||||
|
||||
public static bool IsVerboseLogging = false;
|
||||
public static void LogVerbose(string msg)
|
||||
{
|
||||
if (IsVerboseLogging)
|
||||
{
|
||||
Debug.Log("wwiseunity: AkPluginActivator VERBOSE: " + msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5db252510a903954bacd43a55c060ea8
|
@ -0,0 +1,193 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public class AkPluginActivatorConstants
|
||||
{
|
||||
internal const string WwisePluginFolder = "Runtime/Plugins";
|
||||
|
||||
public const string CONFIG_DEBUG = "Debug";
|
||||
public const string CONFIG_PROFILE = "Profile";
|
||||
public const string CONFIG_RELEASE = "Release";
|
||||
|
||||
internal static readonly System.Collections.Generic.HashSet<PluginID> builtInPluginIDs =
|
||||
new System.Collections.Generic.HashSet<PluginID>
|
||||
{
|
||||
PluginID.AkCompressor,
|
||||
PluginID.AkDelay,
|
||||
PluginID.AkExpander,
|
||||
PluginID.AkGain,
|
||||
PluginID.AkMatrixReverb,
|
||||
PluginID.AkMeter,
|
||||
PluginID.AkParametricEQ,
|
||||
PluginID.AkPeakLimiter,
|
||||
PluginID.AkRoomVerb,
|
||||
PluginID.AkReflect,
|
||||
#if !UNITY_2018_3_OR_NEWER
|
||||
PluginID.VitaReverb,
|
||||
PluginID.VitaCompressor,
|
||||
PluginID.VitaDelay,
|
||||
PluginID.VitaDistortion,
|
||||
PluginID.VitaEQ,
|
||||
#endif
|
||||
};
|
||||
|
||||
internal static readonly System.Collections.Generic.HashSet<PluginID> alwaysSkipPluginsIDs =
|
||||
new System.Collections.Generic.HashSet<PluginID>
|
||||
{
|
||||
PluginID.SineGenerator,
|
||||
PluginID.SinkAuxiliary,
|
||||
PluginID.SinkCommunication,
|
||||
PluginID.SinkControllerHeadphones,
|
||||
PluginID.SinkControllerSpeaker,
|
||||
PluginID.SinkDVRByPass,
|
||||
PluginID.SinkNoOutput,
|
||||
PluginID.SinkSystem,
|
||||
PluginID.ToneGenerator,
|
||||
PluginID.WwiseSilence,
|
||||
PluginID.AkAudioInput,
|
||||
};
|
||||
|
||||
internal static readonly System.Collections.Generic.Dictionary<PluginID, string> PluginIDToStaticLibName =
|
||||
new System.Collections.Generic.Dictionary<PluginID, string>
|
||||
{
|
||||
{ PluginID.Ak3DAudioBedMixer, "Ak3DAudioBedMixerFX" },
|
||||
{ PluginID.AkAudioInput, "AkAudioInputSource" },
|
||||
{ PluginID.AkCompressor, "AkCompressorFX" },
|
||||
{ PluginID.AkRouterMixer, "AkRouterMixerFX" },
|
||||
{ PluginID.AkChannelRouter, "AkChannelRouterFX" },
|
||||
{ PluginID.AkConvolutionReverb, "AkConvolutionReverbFX" },
|
||||
{ PluginID.AkDelay, "AkDelayFX" },
|
||||
{ PluginID.AkExpander, "AkExpanderFX" },
|
||||
{ PluginID.AkFlanger, "AkFlangerFX" },
|
||||
{ PluginID.AkGain, "AkGainFX" },
|
||||
{ PluginID.AkGuitarDistortion, "AkGuitarDistortionFX" },
|
||||
{ PluginID.AkHarmonizer, "AkHarmonizerFX" },
|
||||
{ PluginID.AkMatrixReverb, "AkMatrixReverbFX" },
|
||||
{ PluginID.AkMeter, "AkMeterFX" },
|
||||
{ PluginID.AkMotionSink, "AkMotionSink" },
|
||||
{ PluginID.AkMotionSource, "AkMotionSourceSource" },
|
||||
{ PluginID.AkParametricEQ, "AkParametricEQFX" },
|
||||
{ PluginID.AkPeakLimiter, "AkPeakLimiterFX" },
|
||||
{ PluginID.AkPitchShifter, "AkPitchShifterFX" },
|
||||
{ PluginID.AkRecorder, "AkRecorderFX" },
|
||||
{ PluginID.AkReflect, "AkReflectFX" },
|
||||
{ PluginID.AkRoomVerb, "AkRoomVerbFX" },
|
||||
{ PluginID.AkSoundSeedGrain, "AkSoundSeedGrainSource" },
|
||||
{ PluginID.AkSoundSeedWind, "AkSoundSeedWindSource" },
|
||||
{ PluginID.AkSoundSeedWoosh, "AkSoundSeedWooshSource" },
|
||||
{ PluginID.AkStereoDelay, "AkStereoDelayFX" },
|
||||
{ PluginID.AkSynthOne, "AkSynthOneSource" },
|
||||
{ PluginID.AkTimeStretch, "AkTimeStretchFX" },
|
||||
{ PluginID.AkTremolo, "AkTremoloFX" },
|
||||
{ PluginID.AuroHeadphone, "AuroHeadphoneFX" },
|
||||
{ PluginID.CrankcaseAudioREVModelPlayer, "CrankcaseAudioREVModelPlayerSource" },
|
||||
{ PluginID.iZHybridReverb, "iZHybridReverbFX" },
|
||||
{ PluginID.iZTrashBoxModeler, "iZTrashBoxModelerFX" },
|
||||
{ PluginID.iZTrashDelay, "iZTrashDelayFX" },
|
||||
{ PluginID.iZTrashDistortion, "iZTrashDistortionFX" },
|
||||
{ PluginID.iZTrashDynamics, "iZTrashDynamicsFX" },
|
||||
{ PluginID.iZTrashFilters, "iZTrashFiltersFX" },
|
||||
{ PluginID.iZTrashMultibandDistortion, "iZTrashMultibandDistortionFX" },
|
||||
{ PluginID.MasteringSuite, "MasteringSuiteFX" },
|
||||
{ PluginID.AkImpacterSource, "AkImpacterSource" },
|
||||
{ PluginID.McDSPFutzBox, "McDSPFutzBoxFX" },
|
||||
{ PluginID.McDSPLimiter, "McDSPLimiterFX" },
|
||||
{ PluginID.ResonanceAudioRenderer, "ResonanceAudioFX" },
|
||||
{ PluginID.ResonanceAudioRoomEffect, "ResonanceAudioFX" },
|
||||
{ PluginID.IgniterLive, "IgniterLiveSource" },
|
||||
{ PluginID.IgniterLiveSynth, "IgniterLiveSource" }
|
||||
};
|
||||
|
||||
// Support libraries are DLLs that do not have an associated Wwise plug-in ID; they are meant to be loaded manually by the application
|
||||
internal static readonly System.Collections.Generic.List<string> SupportLibraries =
|
||||
new System.Collections.Generic.List<string>
|
||||
{
|
||||
"AkVorbisHwAccelerator"
|
||||
};
|
||||
|
||||
internal enum PluginID
|
||||
{
|
||||
// Built-in plugins
|
||||
Ak3DAudioBedMixer = 0x00BE0003, // Wwise 3D Audio Bed Mixer
|
||||
AkCompressor = 0x006C0003, //Wwise Compressor
|
||||
AkRouterMixer = 0x00AC0006, //Wwise RouterMixer
|
||||
AkChannelRouter = 0x00BF0003, // Wwise Channel Router
|
||||
AkDelay = 0x006A0003, //Delay
|
||||
AkExpander = 0x006D0003, //Wwise Expander
|
||||
AkGain = 0x008B0003, //Gain
|
||||
AkMatrixReverb = 0x00730003, //Matrix Reverb
|
||||
AkMeter = 0x00810003, //Wwise Meter
|
||||
AkParametricEQ = 0x00690003, //Wwise Parametric EQ
|
||||
AkPeakLimiter = 0x006E0003, //Wwise Peak Limiter
|
||||
AkRoomVerb = 0x00760003, //Wwise RoomVerb
|
||||
SineGenerator = 0x00640002, //Sine
|
||||
SinkAuxiliary = 0xB40007,
|
||||
SinkCommunication = 0xB00007,
|
||||
SinkControllerHeadphones = 0xB10007,
|
||||
SinkControllerSpeaker = 0xB30007,
|
||||
SinkDVRByPass = 0xAF0007,
|
||||
SinkNoOutput = 0xB50007,
|
||||
SinkSystem = 0xAE0007,
|
||||
ToneGenerator = 0x00660002, //Tone Generator
|
||||
WwiseSilence = 0x00650002, //Wwise Silence
|
||||
#if !UNITY_2018_3_OR_NEWER
|
||||
VitaReverb = 0x008C0003, //Vita Reverb
|
||||
VitaCompressor = 0x008D0003, //Vita Compressor
|
||||
VitaDelay = 0x008E0003, //Vita Delay
|
||||
VitaDistortion = 0x008F0003, //Vita Distortion
|
||||
VitaEQ = 0x00900003, //Vita EQ
|
||||
#endif
|
||||
|
||||
// Static or DLL plugins
|
||||
AkAudioInput = 0xC80002,
|
||||
AkConvolutionReverb = 0x7F0003,
|
||||
AkFlanger = 0x7D0003,
|
||||
AkGuitarDistortion = 0x7E0003,
|
||||
AkHarmonizer = 0x8A0003,
|
||||
AkMotionSink = 0x1FB0007,
|
||||
AkMotionSource = 0x1990002,
|
||||
AkPitchShifter = 0x880003,
|
||||
AkRecorder = 0x840003,
|
||||
AkReflect = 0xAB0003,
|
||||
AkSoundSeedGrain = 0xB70002,
|
||||
AkSoundSeedWind = 0x770002,
|
||||
AkSoundSeedWoosh = 0x780002,
|
||||
AkStereoDelay = 0x870003,
|
||||
AkSynthOne = 0x940002,
|
||||
AkTimeStretch = 0x820003,
|
||||
AkTremolo = 0x830003,
|
||||
AuroHeadphone = 0x44C1073,
|
||||
CrankcaseAudioREVModelPlayer = 0x1A01052,
|
||||
iZHybridReverb = 0x21033,
|
||||
iZTrashBoxModeler = 0x71033,
|
||||
iZTrashDelay = 0x41033,
|
||||
iZTrashDistortion = 0x31033,
|
||||
iZTrashDynamics = 0x51033,
|
||||
iZTrashFilters = 0x61033,
|
||||
iZTrashMultibandDistortion = 0x91033,
|
||||
MasteringSuite = 0xBA0003,
|
||||
AkImpacterSource = 0xB80002,
|
||||
McDSPFutzBox = 0x6E1003,
|
||||
McDSPLimiter = 0x671003,
|
||||
ResonanceAudioRenderer = 0x641103,
|
||||
ResonanceAudioRoomEffect = 0xC81106,
|
||||
IgniterLive = 0x5110D2,
|
||||
IgniterLiveSynth = 0x5210D2
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f9929fba59b92884bbe4ed1505320ef5
|
@ -0,0 +1,61 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public class AkPluginActivatorMenus
|
||||
{
|
||||
private const string MENU_PATH = "Assets/Wwise/Activate Plugins/";
|
||||
|
||||
[UnityEditor.MenuItem(MENU_PATH + AkPluginActivatorConstants.CONFIG_DEBUG)]
|
||||
public static void ActivateDebug()
|
||||
{
|
||||
ActivateConfig(AkPluginActivatorConstants.CONFIG_DEBUG);
|
||||
}
|
||||
|
||||
[UnityEditor.MenuItem(MENU_PATH + AkPluginActivatorConstants.CONFIG_PROFILE)]
|
||||
public static void ActivateProfile()
|
||||
{
|
||||
ActivateConfig(AkPluginActivatorConstants.CONFIG_PROFILE);
|
||||
}
|
||||
|
||||
[UnityEditor.MenuItem(MENU_PATH + AkPluginActivatorConstants.CONFIG_RELEASE)]
|
||||
public static void ActivateRelease()
|
||||
{
|
||||
ActivateConfig(AkPluginActivatorConstants.CONFIG_RELEASE);
|
||||
}
|
||||
|
||||
public static void CheckMenuItems(string config)
|
||||
{
|
||||
UnityEditor.Menu.SetChecked(MENU_PATH + AkPluginActivatorConstants.CONFIG_DEBUG, config == AkPluginActivatorConstants.CONFIG_DEBUG);
|
||||
UnityEditor.Menu.SetChecked(MENU_PATH + AkPluginActivatorConstants.CONFIG_PROFILE, config == AkPluginActivatorConstants.CONFIG_PROFILE);
|
||||
UnityEditor.Menu.SetChecked(MENU_PATH + AkPluginActivatorConstants.CONFIG_RELEASE, config == AkPluginActivatorConstants.CONFIG_RELEASE);
|
||||
}
|
||||
private static void SetCurrentConfig(string config)
|
||||
{
|
||||
var data = AkWwiseProjectInfo.GetData();
|
||||
data.CurrentPluginConfig = config;
|
||||
UnityEditor.EditorUtility.SetDirty(data);
|
||||
}
|
||||
|
||||
private static void ActivateConfig(string config)
|
||||
{
|
||||
SetCurrentConfig(config);
|
||||
AkPluginActivatorMenus.CheckMenuItems(config);
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd73e5564a78cc44e83fe4fc48b86157
|
@ -0,0 +1,35 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
#if UNITY_EDITOR
|
||||
internal class AkPluginInfo
|
||||
{
|
||||
public uint PluginID;
|
||||
public string DllName;
|
||||
public string StaticLibName;
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return PluginID.GetHashCode();
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return PluginID.Equals(obj);
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b82cac07a468c3f44934e2dd2544d0dd
|
@ -0,0 +1,194 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using System.IO;
|
||||
|
||||
internal class StaticPluginRegistration
|
||||
{
|
||||
private readonly System.Collections.Generic.HashSet<string> FactoriesHeaderFilenames =
|
||||
new System.Collections.Generic.HashSet<string>();
|
||||
|
||||
private readonly UnityEditor.BuildTarget Target;
|
||||
|
||||
public static void Setup(UnityEditor.BuildTarget target, AkPlatformPluginActivator platformPluginActivator)
|
||||
{
|
||||
if (!platformPluginActivator.RequiresStaticPluginRegistration)
|
||||
return;
|
||||
|
||||
string deploymentTargetName = platformPluginActivator.WwisePlatformName;
|
||||
|
||||
var staticPluginRegistration = new StaticPluginRegistration(target);
|
||||
var importers = AkPluginActivator.GetWwisePluginImporters(platformPluginActivator.PluginDirectoryName);
|
||||
foreach (var pluginImporter in importers)
|
||||
{
|
||||
var pluginInfo = platformPluginActivator.GetPluginImporterInformation(pluginImporter);
|
||||
var pluginPlatform = AkPluginActivator.GetPluginInfoPlatform(pluginImporter.assetPath);
|
||||
if (pluginPlatform != platformPluginActivator.PluginDirectoryName)
|
||||
continue;
|
||||
|
||||
if (platformPluginActivator.Architectures != null && platformPluginActivator.Architectures.Count != 0)
|
||||
{
|
||||
if (!platformPluginActivator.Architectures.Contains(pluginInfo.PluginArch))
|
||||
{
|
||||
UnityEngine.Debug.Log("WwiseUnity: Architecture not found: " + pluginInfo.PluginArch);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (pluginInfo.PluginConfig != "DSP")
|
||||
continue;
|
||||
|
||||
if (!AkPlatformPluginList.IsPluginUsed(platformPluginActivator, pluginPlatform, Path.GetFileNameWithoutExtension(pluginImporter.assetPath)))
|
||||
continue;
|
||||
|
||||
staticPluginRegistration.TryAddLibrary(platformPluginActivator, pluginImporter.assetPath);
|
||||
}
|
||||
|
||||
System.Collections.Generic.HashSet<AkPluginInfo> plugins;
|
||||
AkPlatformPluginList.GetPluginsUsedForPlatform(deploymentTargetName, out plugins);
|
||||
var missingPlugins = staticPluginRegistration.GetMissingPlugins(plugins);
|
||||
if (missingPlugins.Count == 0)
|
||||
{
|
||||
if (plugins == null)
|
||||
UnityEngine.Debug.LogWarningFormat("WwiseUnity: The activated Wwise plug-ins may not be correct. Could not read PluginInfo.xml for platform: {0}", deploymentTargetName);
|
||||
|
||||
staticPluginRegistration.TryWriteToFile(platformPluginActivator);
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityEngine.Debug.LogErrorFormat(
|
||||
"WwiseUnity: These plugins used by the Wwise project are missing from the Unity project: {0}. Please check folder Assets/Wwise/API/Runtime/Plugin/{1}.",
|
||||
string.Join(", ", missingPlugins.ToArray()), deploymentTargetName);
|
||||
}
|
||||
}
|
||||
|
||||
private StaticPluginRegistration(UnityEditor.BuildTarget target)
|
||||
{
|
||||
Target = target;
|
||||
}
|
||||
|
||||
private void TryAddLibrary(AkPlatformPluginActivator config, string AssetPath)
|
||||
{
|
||||
if (AssetPath.EndsWith(".a"))
|
||||
{
|
||||
//Extract the lib name, generate the registration code.
|
||||
var begin = AssetPath.LastIndexOf('/') + 4;
|
||||
var end = AssetPath.LastIndexOf('.') - begin;
|
||||
var LibName = AssetPath.Substring(begin, end); //Remove the lib prefix and the .a extension
|
||||
|
||||
if (!LibName.Contains("AkUnitySoundEngine"))
|
||||
{
|
||||
string headerFilename = LibName + "Factory.h";
|
||||
|
||||
string fullPath = Path.GetFullPath(AkUtilities.GetPathInPackage(Path.Combine(AkPluginActivatorConstants.WwisePluginFolder, config.DSPDirectoryPath, headerFilename)));
|
||||
|
||||
if (File.Exists(fullPath))
|
||||
{
|
||||
FactoriesHeaderFilenames.Add(headerFilename);
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityEngine.Debug.LogErrorFormat("WwiseUnity: Could not find '{0}', required for building plugin.", fullPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (AssetPath.EndsWith("Factory.h"))
|
||||
{
|
||||
FactoriesHeaderFilenames.Add(Path.GetFileName(AssetPath));
|
||||
}
|
||||
}
|
||||
|
||||
private void TryWriteToFile(AkPlatformPluginActivator config)
|
||||
{
|
||||
System.Text.StringBuilder CppText = new System.Text.StringBuilder(2000);
|
||||
|
||||
string RelativePath = Path.Combine(config.DSPDirectoryPath, config.StaticPluginRegistrationName + ".cpp");
|
||||
CppText.AppendLine("#define " + config.StaticPluginDefine);
|
||||
|
||||
// The purpose of this cpp file is to force the linker to recognize the usage of AK::PluginRegistration global objects
|
||||
// so that the static constructors for these objects are executed when the binary is being loaded in.
|
||||
// However, some platforms (e.g. WebGL) have a really aggressive LTO (link-time optimization) pass that will strip these
|
||||
// symbols even when they are defined as extern here.
|
||||
// To avoid any stripping, we call from C# a native function (AkVerifyPluginRegistration)
|
||||
// that looks at these symbols, forcing the linker to recognize that these symbols are required for proper program execution.
|
||||
|
||||
CppText.AppendLine(@"namespace AK { class PluginRegistration; };");
|
||||
CppText.AppendLine(@"class AkUnityStaticPlugin;");
|
||||
CppText.AppendLine(@"AkUnityStaticPlugin * g_pAkUnityStaticPluginList = nullptr;");
|
||||
CppText.AppendLine(@"class AkUnityStaticPlugin {");
|
||||
CppText.AppendLine("\tpublic:");
|
||||
CppText.AppendLine("\tAkUnityStaticPlugin(AK::PluginRegistration* pReg) : m_pNext(g_pAkUnityStaticPluginList), m_pReg(pReg) { g_pAkUnityStaticPluginList = this; }");
|
||||
CppText.AppendLine("\tAkUnityStaticPlugin *m_pNext;");
|
||||
CppText.AppendLine("\tAK::PluginRegistration * m_pReg;");
|
||||
CppText.AppendLine(@"};");
|
||||
|
||||
CppText.AppendLine(@"#define AK_STATIC_LINK_PLUGIN(_pluginName_) \");
|
||||
CppText.AppendLine(@"extern AK::PluginRegistration _pluginName_##Registration; \");
|
||||
CppText.AppendLine(@"AkUnityStaticPlugin _pluginName_##UnityStaticPlugin(&_pluginName_##Registration);");
|
||||
|
||||
foreach (var filename in FactoriesHeaderFilenames)
|
||||
{
|
||||
CppText.AppendLine("#include \"" + filename + "\"");
|
||||
}
|
||||
CppText.AppendLine("extern \"C\" {");
|
||||
CppText.AppendLine("\t__attribute__ ((visibility(\"default\"))) bool AkVerifyPluginRegistration() {");
|
||||
CppText.AppendLine("\t\tbool bReg = true;");
|
||||
CppText.AppendLine("\t\tAkUnityStaticPlugin * pNext = g_pAkUnityStaticPluginList;");
|
||||
CppText.AppendLine("\t\twhile (pNext != nullptr) { bReg = bReg && pNext->m_pReg != nullptr; pNext = pNext->m_pNext; }");
|
||||
CppText.AppendLine("\t\treturn bReg;");
|
||||
CppText.AppendLine("\t}");
|
||||
CppText.AppendLine("}");
|
||||
|
||||
try
|
||||
{
|
||||
var FullPath = Path.GetFullPath(AkUtilities.GetPathInPackage(Path.Combine(AkPluginActivatorConstants.WwisePluginFolder, RelativePath)));
|
||||
File.WriteAllText(FullPath, CppText.ToString());
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
UnityEngine.Debug.LogError("WwiseUnity: Could not write <" + RelativePath + ">. Exception: " + e.Message);
|
||||
return;
|
||||
}
|
||||
|
||||
UnityEditor.AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
private System.Collections.Generic.List<string> GetMissingPlugins(System.Collections.Generic.HashSet<AkPluginInfo> usedPlugins)
|
||||
{
|
||||
var pluginList = new System.Collections.Generic.List<string>();
|
||||
if (usedPlugins == null)
|
||||
return pluginList;
|
||||
|
||||
foreach (var plugin in usedPlugins)
|
||||
{
|
||||
if (string.IsNullOrEmpty(plugin.StaticLibName))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
string includeFilename = plugin.StaticLibName + "Factory.h";
|
||||
if (!FactoriesHeaderFilenames.Contains(includeFilename))
|
||||
{
|
||||
pluginList.Add(plugin.StaticLibName);
|
||||
}
|
||||
}
|
||||
|
||||
return pluginList;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3b33d9af0ce9d2499e4953cb95ffb8b
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c08341a32ec8b884d8103e4672151d80
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,58 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
|
||||
[UnityEditor.InitializeOnLoad]
|
||||
public class AkMacPluginActivator : AkPlatformPluginActivator
|
||||
{
|
||||
public override string WwisePlatformName => "Mac";
|
||||
public override string PluginDirectoryName => "Mac";
|
||||
|
||||
static AkMacPluginActivator()
|
||||
{
|
||||
if (UnityEditor.AssetDatabase.IsAssetImportWorkerProcess())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AkPluginActivator.RegisterPlatformPluginActivator(BuildTarget.StandaloneOSX, new AkMacPluginActivator());
|
||||
}
|
||||
|
||||
private const int CONFIG_INDEX = 1;
|
||||
public override AkPluginActivator.PluginImporterInformation GetPluginImporterInformation(PluginImporter pluginImporter)
|
||||
{
|
||||
return new AkPluginActivator.PluginImporterInformation
|
||||
{
|
||||
PluginConfig = GetPluginPathParts(pluginImporter.assetPath)[CONFIG_INDEX],
|
||||
|
||||
EditorOS = "OSX",
|
||||
EditorCPU = "AnyCPU"
|
||||
};
|
||||
}
|
||||
|
||||
internal override bool ConfigurePlugin(PluginImporter pluginImporter, AkPluginActivator.PluginImporterInformation pluginImporterInformation)
|
||||
{
|
||||
pluginImporter.SetPlatformData(BuildTarget.StandaloneLinux64, "CPU", "None");
|
||||
pluginImporter.SetPlatformData(BuildTarget.StandaloneWindows, "CPU", "None");
|
||||
pluginImporter.SetPlatformData(BuildTarget.StandaloneWindows64, "CPU", "None");
|
||||
pluginImporter.SetPlatformData(BuildTarget.StandaloneOSX, "CPU", "AnyCPU");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f5d4393483f6c541b0a40c5affcdf10
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89759db542964994e8e7a7233081ea36
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,72 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
|
||||
[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")
|
||||
{
|
||||
UnityEngine.Debug.Log("WwiseUnity: 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;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 645f82fe998a7744ebaf993e86a6fff8
|
8
blueberryPeak/Assets/Wwise/API/Editor/WwiseMenu.meta
Normal file
8
blueberryPeak/Assets/Wwise/API/Editor/WwiseMenu.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8a3cccc549ac48a40875724e7a9eba9e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a35f25ba992fd3242bf12837d045f84f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,145 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
#if UNITY_EDITOR
|
||||
|
||||
public class AkUnityIntegrationBuilderBase
|
||||
{
|
||||
private readonly string m_progTitle = "WwiseUnity: Rebuilding Unity Integration Progress";
|
||||
protected string m_assetsDir = "Undefined";
|
||||
protected string m_assetsPluginsDir = "Undefined";
|
||||
protected string m_buildScriptDir = "Undefined";
|
||||
protected string m_buildScriptFile = "Undefined";
|
||||
protected string m_platform = "Undefined";
|
||||
protected string m_shell = "python";
|
||||
protected string m_wwiseSdkDir = "";
|
||||
|
||||
public AkUnityIntegrationBuilderBase()
|
||||
{
|
||||
var unityProjectRoot = System.IO.Directory.GetCurrentDirectory();
|
||||
m_assetsDir = System.IO.Path.Combine(unityProjectRoot, "Assets");
|
||||
m_assetsPluginsDir = System.IO.Path.Combine(m_assetsDir, "Plugins");
|
||||
m_buildScriptDir =
|
||||
System.IO.Path.Combine(System.IO.Path.Combine(System.IO.Path.Combine(m_assetsDir, "Wwise"), "AkUnitySoundEngine"),
|
||||
"Common");
|
||||
m_buildScriptFile = "BuildWwiseUnityIntegration.py";
|
||||
}
|
||||
|
||||
public void BuildByConfig(string config, string arch)
|
||||
{
|
||||
if (UnityEditor.EditorApplication.isPlaying)
|
||||
{
|
||||
UnityEngine.Debug.LogWarning("WwiseUnity: Editor is in play mode. Stop playing any scenes and retry. Aborted.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Try to parse config to get Wwise location.
|
||||
var configPath = System.IO.Path.Combine(m_buildScriptDir, "BuildWwiseUnityIntegration.json");
|
||||
var fi = new System.IO.FileInfo(configPath);
|
||||
if (fi.Exists)
|
||||
{
|
||||
var msg = string.Format("WwiseUnity: Found preference file: {0}. Use build variables defined in it.", configPath);
|
||||
UnityEngine.Debug.Log(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
var msg = string.Format("WwiseUnity: Preference file: {0} is unavailable. Need user input.", configPath);
|
||||
UnityEngine.Debug.Log(msg);
|
||||
|
||||
m_wwiseSdkDir = UnityEditor.EditorUtility.OpenFolderPanel("Choose Wwise SDK folder", ".", "");
|
||||
|
||||
var isUserCancelledBuild = m_wwiseSdkDir == "";
|
||||
if (isUserCancelledBuild)
|
||||
{
|
||||
UnityEngine.Debug.Log("WwiseUnity: User cancelled the build.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!PreBuild())
|
||||
return;
|
||||
|
||||
// On Windows, separate shell console window will open. When building is done, close the Window yourself if it stays active. Usually at the end you will see the last line says "Build succeeded" or "Build failed".
|
||||
var progMsg = string.Format("WwiseUnity: Rebuilding Wwise Unity Integration for {0} ({1}) ...", m_platform, config);
|
||||
UnityEngine.Debug.Log(progMsg);
|
||||
|
||||
var start = new System.Diagnostics.ProcessStartInfo();
|
||||
start.FileName = m_shell;
|
||||
|
||||
start.Arguments = GetProcessArgs(config, arch);
|
||||
if (start.Arguments == "")
|
||||
return;
|
||||
start.UseShellExecute = false;
|
||||
start.RedirectStandardOutput = true;
|
||||
|
||||
UnityEditor.EditorUtility.DisplayProgressBar(m_progTitle, progMsg, 0.5f);
|
||||
|
||||
using (var process = System.Diagnostics.Process.Start(start))
|
||||
{
|
||||
using (var reader = process.StandardOutput)
|
||||
{
|
||||
process.WaitForExit();
|
||||
|
||||
try
|
||||
{
|
||||
//ExitCode throws InvalidOperationException if the process is hanging
|
||||
|
||||
var isBuildSucceeded = process.ExitCode == 0;
|
||||
if (isBuildSucceeded)
|
||||
{
|
||||
UnityEditor.EditorUtility.DisplayProgressBar(m_progTitle, progMsg, 1.0f);
|
||||
UnityEngine.Debug.Log("WwiseUnity: Build succeeded. Check detailed logs under the Logs folder.");
|
||||
}
|
||||
else
|
||||
UnityEngine.Debug.LogError("WwiseUnity: Build failed. Check detailed logs under the Logs folder.");
|
||||
|
||||
UnityEditor.AssetDatabase.Refresh();
|
||||
|
||||
UnityEditor.EditorUtility.ClearProgressBar();
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
UnityEditor.AssetDatabase.Refresh();
|
||||
|
||||
UnityEngine.Debug.LogError(string.Format(
|
||||
"WwiseUnity: Build process failed with exception: {}. Check detailed logs under the Logs folder.", ex));
|
||||
UnityEditor.EditorUtility.ClearProgressBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual string GetProcessArgs(string config, string arch)
|
||||
{
|
||||
var scriptPath = System.IO.Path.Combine(m_buildScriptDir, m_buildScriptFile);
|
||||
var args = string.Format("\"{0}\" -p {1} -c {2}", scriptPath, m_platform, config);
|
||||
if (arch != null)
|
||||
args += string.Format(" -a {0}", arch);
|
||||
|
||||
if (m_wwiseSdkDir != "")
|
||||
args += string.Format(" -w \"{0}\" -u", m_wwiseSdkDir);
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
protected virtual bool PreBuild()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // #if UNITY_EDITOR
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e368d65ed67d084fa74c77a8f268628
|
@ -0,0 +1,402 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public class AkUnityAssetsInstaller
|
||||
{
|
||||
public string[] m_arches = { };
|
||||
protected string m_assetsDir = UnityEngine.Application.dataPath;
|
||||
protected System.Collections.Generic.List<string> m_excludes = new System.Collections.Generic.List<string> { ".meta" };
|
||||
protected string m_platform = "Undefined";
|
||||
protected string m_pluginDir = System.IO.Path.Combine(UnityEngine.Application.dataPath, "Plugins");
|
||||
|
||||
// Copy file to destination directory and create the directory when none exists.
|
||||
public static bool CopyFileToDirectory(string srcFilePath, string destDir)
|
||||
{
|
||||
var fi = new System.IO.FileInfo(srcFilePath);
|
||||
if (!fi.Exists)
|
||||
{
|
||||
UnityEngine.Debug.LogError(string.Format("WwiseUnity: Failed to copy. Source is missing: {0}.", srcFilePath));
|
||||
return false;
|
||||
}
|
||||
|
||||
var di = new System.IO.DirectoryInfo(destDir);
|
||||
|
||||
if (!di.Exists)
|
||||
di.Create();
|
||||
|
||||
const bool IsToOverwrite = true;
|
||||
try
|
||||
{
|
||||
fi.CopyTo(System.IO.Path.Combine(di.FullName, fi.Name), IsToOverwrite);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
UnityEngine.Debug.LogError(string.Format("WwiseUnity: Error during installation: {0}.", ex.Message));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Copy or overwrite destination file with source file.
|
||||
public static bool OverwriteFile(string srcFilePath, string destFilePath)
|
||||
{
|
||||
var fi = new System.IO.FileInfo(srcFilePath);
|
||||
if (!fi.Exists)
|
||||
{
|
||||
UnityEngine.Debug.LogError(string.Format("WwiseUnity: Failed to overwrite. Source is missing: {0}.", srcFilePath));
|
||||
return false;
|
||||
}
|
||||
|
||||
var di = new System.IO.DirectoryInfo(System.IO.Path.GetDirectoryName(destFilePath));
|
||||
|
||||
if (!di.Exists)
|
||||
di.Create();
|
||||
|
||||
const bool IsToOverwrite = true;
|
||||
try
|
||||
{
|
||||
fi.CopyTo(destFilePath, IsToOverwrite);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
UnityEngine.Debug.LogError(string.Format("WwiseUnity: Error during installation: {0}.", ex.Message));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Move file to destination directory and create the directory when none exists.
|
||||
public static void MoveFileToDirectory(string srcFilePath, string destDir)
|
||||
{
|
||||
var fi = new System.IO.FileInfo(srcFilePath);
|
||||
if (!fi.Exists)
|
||||
{
|
||||
UnityEngine.Debug.LogError(string.Format("WwiseUnity: Failed to move. Source is missing: {0}.", srcFilePath));
|
||||
return;
|
||||
}
|
||||
|
||||
var di = new System.IO.DirectoryInfo(destDir);
|
||||
|
||||
if (!di.Exists)
|
||||
di.Create();
|
||||
|
||||
var destFilePath = System.IO.Path.Combine(di.FullName, fi.Name);
|
||||
try
|
||||
{
|
||||
fi.MoveTo(destFilePath);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
UnityEngine.Debug.LogError(string.Format("WwiseUnity: Error during installation: {0}.", ex.Message));
|
||||
}
|
||||
}
|
||||
|
||||
// Recursively copy a directory to its destination.
|
||||
public static bool RecursiveCopyDirectory(System.IO.DirectoryInfo srcDir, System.IO.DirectoryInfo destDir,
|
||||
System.Collections.Generic.List<string> excludeExtensions = null)
|
||||
{
|
||||
if (!srcDir.Exists)
|
||||
{
|
||||
UnityEngine.Debug.LogError(string.Format("WwiseUnity: Failed to copy. Source is missing: {0}.", srcDir));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!destDir.Exists)
|
||||
destDir.Create();
|
||||
|
||||
// Copy all files.
|
||||
var files = srcDir.GetFiles();
|
||||
foreach (var file in files)
|
||||
{
|
||||
if (excludeExtensions != null)
|
||||
{
|
||||
var fileExt = System.IO.Path.GetExtension(file.Name);
|
||||
var isFileExcluded = false;
|
||||
foreach (var ext in excludeExtensions)
|
||||
{
|
||||
if (fileExt.ToLower() == ext)
|
||||
{
|
||||
isFileExcluded = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isFileExcluded)
|
||||
continue;
|
||||
}
|
||||
|
||||
const bool IsToOverwrite = true;
|
||||
try
|
||||
{
|
||||
file.CopyTo(System.IO.Path.Combine(destDir.FullName, file.Name), IsToOverwrite);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
UnityEngine.Debug.LogError(string.Format("WwiseUnity: Error during installation: {0}.", ex.Message));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Process subdirectories.
|
||||
var dirs = srcDir.GetDirectories();
|
||||
foreach (var dir in dirs)
|
||||
{
|
||||
// Get destination directory.
|
||||
var destFullPath = System.IO.Path.Combine(destDir.FullName, dir.Name);
|
||||
|
||||
// Recurse
|
||||
var isSuccess = RecursiveCopyDirectory(dir, new System.IO.DirectoryInfo(destFullPath), excludeExtensions);
|
||||
if (!isSuccess)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class AkUnityPluginInstallerBase : AkUnityAssetsInstaller
|
||||
{
|
||||
private readonly string m_progTitle = "WwiseUnity: Plugin Installation Progress";
|
||||
|
||||
public bool InstallPluginByConfig(string config)
|
||||
{
|
||||
var pluginSrc = GetPluginSrcPathByConfig(config);
|
||||
var pluginDest = GetPluginDestPath("");
|
||||
|
||||
var progMsg = string.Format("Installing plugin for {0} ({1}) from {2} to {3}.", m_platform, config, pluginSrc,
|
||||
pluginDest);
|
||||
UnityEditor.EditorUtility.DisplayProgressBar(m_progTitle, progMsg, 0.5f);
|
||||
|
||||
var isSuccess = RecursiveCopyDirectory(new System.IO.DirectoryInfo(pluginSrc),
|
||||
new System.IO.DirectoryInfo(pluginDest), m_excludes);
|
||||
if (!isSuccess)
|
||||
{
|
||||
UnityEngine.Debug.LogError(string.Format("WwiseUnity: Failed to install plugin for {0} ({1}) from {2} to {3}.",
|
||||
m_platform, config, pluginSrc, pluginDest));
|
||||
UnityEditor.EditorUtility.ClearProgressBar();
|
||||
return false;
|
||||
}
|
||||
|
||||
UnityEditor.EditorUtility.DisplayProgressBar(m_progTitle, progMsg, 1.0f);
|
||||
UnityEditor.AssetDatabase.Refresh();
|
||||
|
||||
UnityEditor.EditorUtility.ClearProgressBar();
|
||||
UnityEngine.Debug.Log(string.Format("WwiseUnity: Plugin for {0} {1} installed from {2} to {3}.", m_platform, config,
|
||||
pluginSrc, pluginDest));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual bool InstallPluginByArchConfig(string arch, string config)
|
||||
{
|
||||
var pluginSrc = GetPluginSrcPathByArchConfig(arch, config);
|
||||
var pluginDest = GetPluginDestPath(arch);
|
||||
|
||||
var progMsg = string.Format("Installing plugin for {0} ({1}, {2}) from {3} to {4}.", m_platform, arch, config,
|
||||
pluginSrc, pluginDest);
|
||||
UnityEditor.EditorUtility.DisplayProgressBar(m_progTitle, progMsg, 0.5f);
|
||||
|
||||
var isSuccess = RecursiveCopyDirectory(new System.IO.DirectoryInfo(pluginSrc),
|
||||
new System.IO.DirectoryInfo(pluginDest), m_excludes);
|
||||
if (!isSuccess)
|
||||
{
|
||||
UnityEngine.Debug.LogError(string.Format("WwiseUnity: Failed to install plugin for {0} ({1}, {2}) from {3} to {4}.",
|
||||
m_platform, arch, config, pluginSrc, pluginDest));
|
||||
UnityEditor.EditorUtility.ClearProgressBar();
|
||||
return false;
|
||||
}
|
||||
|
||||
UnityEditor.EditorUtility.DisplayProgressBar(m_progTitle, progMsg, 1.0f);
|
||||
UnityEditor.AssetDatabase.Refresh();
|
||||
|
||||
UnityEditor.EditorUtility.ClearProgressBar();
|
||||
UnityEngine.Debug.Log(string.Format("WwiseUnity: Plugin for {0} {1} {2} installed from {3} to {4}.", m_platform, arch,
|
||||
config, pluginSrc, pluginDest));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected string GetPluginSrcPathByConfig(string config)
|
||||
{
|
||||
return System.IO.Path.Combine(
|
||||
System.IO.Path.Combine(
|
||||
System.IO.Path.Combine(System.IO.Path.Combine(System.IO.Path.Combine(m_assetsDir, "Wwise"), "API", "Runtime"),
|
||||
"Plugins"), m_platform), config);
|
||||
}
|
||||
|
||||
protected string GetPluginSrcPathByArchConfig(string arch, string config)
|
||||
{
|
||||
return System.IO.Path.Combine(
|
||||
System.IO.Path.Combine(
|
||||
System.IO.Path.Combine(
|
||||
System.IO.Path.Combine(System.IO.Path.Combine(System.IO.Path.Combine(m_assetsDir, "Wwise"), "API", "Runtime"),
|
||||
"Plugins"), m_platform), arch), config);
|
||||
}
|
||||
|
||||
protected virtual string GetPluginDestPath(string arch)
|
||||
{
|
||||
return m_pluginDir;
|
||||
}
|
||||
}
|
||||
|
||||
public class AkUnityPluginInstallerMultiArchBase : AkUnityPluginInstallerBase
|
||||
{
|
||||
protected override string GetPluginDestPath(string arch)
|
||||
{
|
||||
return System.IO.Path.Combine(System.IO.Path.Combine(m_pluginDir, m_platform), arch);
|
||||
}
|
||||
}
|
||||
|
||||
public class AkDocHelper
|
||||
{
|
||||
private static string m_WwiseVersionString = string.Empty;
|
||||
|
||||
public static void OpenDoc(string platform)
|
||||
{
|
||||
if (m_WwiseVersionString == string.Empty)
|
||||
{
|
||||
var temp = AkUnitySoundEngine.GetMajorMinorVersion();
|
||||
var temp2 = AkUnitySoundEngine.GetSubminorBuildVersion();
|
||||
m_WwiseVersionString = (temp >> 16) + "." + (temp & 0xFFFF);
|
||||
if (temp2 >> 16 != 0)
|
||||
m_WwiseVersionString += "." + (temp2 >> 16);
|
||||
|
||||
m_WwiseVersionString += "_" + (temp2 & 0xFFFF);
|
||||
}
|
||||
|
||||
var docUrl = "http://www.audiokinetic.com/library/" + m_WwiseVersionString + "/?source=Unity&id=index.html";
|
||||
var isConnected = false;
|
||||
try
|
||||
{
|
||||
var request = (System.Net.HttpWebRequest) System.Net.WebRequest.Create("http://www.audiokinetic.com/robots.txt");
|
||||
request.Timeout = 1000;
|
||||
request.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
|
||||
var response = (System.Net.HttpWebResponse) request.GetResponse();
|
||||
|
||||
isConnected = response.StatusCode == System.Net.HttpStatusCode.OK;
|
||||
}
|
||||
catch (System.Exception)
|
||||
{
|
||||
isConnected = false;
|
||||
}
|
||||
|
||||
if (!isConnected)
|
||||
{
|
||||
// Can't access audiokinetic.com, open local doc.
|
||||
docUrl = GetLocalDocUrl(platform);
|
||||
if (string.IsNullOrEmpty(docUrl))
|
||||
return;
|
||||
}
|
||||
|
||||
UnityEngine.Application.OpenURL(docUrl);
|
||||
}
|
||||
|
||||
private static string GetLocalDocUrl(string platform)
|
||||
{
|
||||
var docUrl = string.Empty;
|
||||
var docPath = string.Empty;
|
||||
var dataPath = UnityEngine.Application.dataPath;
|
||||
|
||||
#if UNITY_EDITOR_WIN
|
||||
var format = (platform == "Windows")
|
||||
? "{0}/Wwise/Documentation/{1}/en/WwiseUnityIntegrationHelp_en.chm"
|
||||
: "{0}/Wwise/Documentation/{1}/en/WwiseUnityIntegrationHelp_{1}_en.chm";
|
||||
|
||||
docPath = string.Format(format, dataPath, platform);
|
||||
#else
|
||||
string DestPath = AkUtilities.GetFullPath(dataPath, "../WwiseUnityIntegrationHelp_en");
|
||||
docPath = string.Format ("{0}/html/index.html", DestPath);
|
||||
if (!System.IO.File.Exists(docPath))
|
||||
UnzipHelp(DestPath);
|
||||
|
||||
if (!System.IO.File.Exists(docPath))
|
||||
{
|
||||
UnityEngine.Debug.Log("WwiseUnity: Unable to show documentation. Please unzip WwiseUnityIntegrationHelp_AppleCommon_en.zip manually.");
|
||||
return string.Empty;
|
||||
}
|
||||
#endif
|
||||
|
||||
var fi = new System.IO.FileInfo(docPath);
|
||||
if (!fi.Exists)
|
||||
{
|
||||
UnityEngine.Debug.LogError(string.Format("WwiseUnity: Failed to find documentation: {0}. Aborted.", docPath));
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
docUrl = string.Format("file:///{0}", docPath.Replace(" ", "%20"));
|
||||
|
||||
return docUrl;
|
||||
}
|
||||
|
||||
public static void UnzipHelp(string DestPath)
|
||||
{
|
||||
// Start by extracting the zip, if it exists
|
||||
var ZipPath = System.IO.Path.Combine(
|
||||
System.IO.Path.Combine(
|
||||
System.IO.Path.Combine(
|
||||
System.IO.Path.Combine(System.IO.Path.Combine(UnityEngine.Application.dataPath, "Wwise"), "Documentation"),
|
||||
"AppleCommon"), "en"), "WwiseUnityIntegrationHelp_en.zip");
|
||||
|
||||
if (System.IO.File.Exists(ZipPath))
|
||||
{
|
||||
var start = new System.Diagnostics.ProcessStartInfo();
|
||||
start.FileName = "unzip";
|
||||
|
||||
start.Arguments = "\"" + ZipPath + "\" -d \"" + DestPath + "\"";
|
||||
|
||||
start.UseShellExecute = true;
|
||||
start.RedirectStandardOutput = false;
|
||||
|
||||
var progMsg = "WwiseUnity: Unzipping documentation...";
|
||||
var progTitle = "Unzipping Wwise documentation";
|
||||
UnityEditor.EditorUtility.DisplayProgressBar(progTitle, progMsg, 0.5f);
|
||||
|
||||
using (var process = System.Diagnostics.Process.Start(start))
|
||||
{
|
||||
while (!process.WaitForExit(1000))
|
||||
System.Threading.Thread.Sleep(100);
|
||||
try
|
||||
{
|
||||
//ExitCode throws InvalidOperationException if the process is hanging
|
||||
var returnCode = process.ExitCode;
|
||||
|
||||
var isBuildSucceeded = returnCode == 0;
|
||||
if (isBuildSucceeded)
|
||||
{
|
||||
UnityEditor.EditorUtility.DisplayProgressBar(progTitle, progMsg, 1.0f);
|
||||
UnityEngine.Debug.Log("WwiseUnity: Documentation extraction succeeded. ");
|
||||
}
|
||||
else
|
||||
UnityEngine.Debug.LogError("WwiseUnity: Extraction failed.");
|
||||
|
||||
UnityEditor.EditorUtility.ClearProgressBar();
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
UnityEditor.EditorUtility.ClearProgressBar();
|
||||
UnityEngine.Debug.LogError(ex.ToString());
|
||||
UnityEditor.EditorUtility.ClearProgressBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // #if UNITY_EDITOR
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15ef5eecd26fe6146b722aaeaaa71802
|
@ -0,0 +1,80 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
#if UNITY_EDITOR
|
||||
internal static class AkWwiseIDConverter
|
||||
{
|
||||
private static readonly string s_bankDir = UnityEngine.Application.dataPath;
|
||||
|
||||
private static readonly string s_converterScript = System.IO.Path.Combine(
|
||||
System.IO.Path.Combine(System.IO.Path.Combine(UnityEngine.Application.dataPath, "Wwise"), "Tools"),
|
||||
"WwiseIDConverter.py");
|
||||
|
||||
private static readonly string s_progTitle = "WwiseUnity: Converting SoundBank IDs";
|
||||
|
||||
[UnityEditor.MenuItem("Assets/Wwise/Convert Wwise SoundBank IDs", false, (int) AkWwiseMenuOrder.ConvertIDs)]
|
||||
public static void ConvertWwiseSoundBankIDs()
|
||||
{
|
||||
var bankIdHeaderPath =
|
||||
UnityEditor.EditorUtility.OpenFilePanel("Choose Wwise SoundBank ID C++ header", s_bankDir, "h");
|
||||
if (string.IsNullOrEmpty(bankIdHeaderPath))
|
||||
{
|
||||
UnityEngine.Debug.Log("WwiseUnity: User canceled the action.");
|
||||
return;
|
||||
}
|
||||
|
||||
var start = new System.Diagnostics.ProcessStartInfo();
|
||||
start.FileName = "python";
|
||||
start.Arguments = string.Format("\"{0}\" \"{1}\"", s_converterScript, bankIdHeaderPath);
|
||||
start.UseShellExecute = false;
|
||||
start.RedirectStandardOutput = true;
|
||||
|
||||
var progMsg = "WwiseUnity: Converting C++ SoundBank IDs into C# ...";
|
||||
UnityEditor.EditorUtility.DisplayProgressBar(s_progTitle, progMsg, 0.5f);
|
||||
|
||||
using (var process = System.Diagnostics.Process.Start(start))
|
||||
{
|
||||
process.WaitForExit();
|
||||
try
|
||||
{
|
||||
//ExitCode throws InvalidOperationException if the process is hanging
|
||||
if (process.ExitCode == 0)
|
||||
{
|
||||
UnityEditor.EditorUtility.DisplayProgressBar(s_progTitle, progMsg, 1.0f);
|
||||
UnityEngine.Debug.Log(string.Format(
|
||||
"WwiseUnity: SoundBank ID conversion succeeded. Find generated Unity script under {0}.", s_bankDir));
|
||||
}
|
||||
else
|
||||
UnityEngine.Debug.LogError("WwiseUnity: Conversion failed.");
|
||||
|
||||
UnityEditor.AssetDatabase.Refresh();
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
UnityEditor.AssetDatabase.Refresh();
|
||||
|
||||
UnityEditor.EditorUtility.ClearProgressBar();
|
||||
UnityEngine.Debug.LogError(string.Format(
|
||||
"WwiseUnity: SoundBank ID conversion process failed with exception: {}. Check detailed logs under the folder: Assets/Wwise/Logs.",
|
||||
ex));
|
||||
}
|
||||
|
||||
UnityEditor.EditorUtility.ClearProgressBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // #if UNITY_EDITOR
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bde7747312fd6224799b9cd78aee5de6
|
8
blueberryPeak/Assets/Wwise/API/Editor/WwiseMenu/Mac.meta
Normal file
8
blueberryPeak/Assets/Wwise/API/Editor/WwiseMenu/Mac.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 12d194bd70245be47b8c0022e968293a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,30 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public class AkWwiseMenu_Mac
|
||||
{
|
||||
private const string MENU_PATH = "Help/Wwise Help/";
|
||||
private const string Platform = "Mac";
|
||||
|
||||
[UnityEditor.MenuItem(MENU_PATH + Platform, false, (int) AkWwiseHelpOrder.WwiseHelpOrder)]
|
||||
public static void OpenDoc()
|
||||
{
|
||||
AkDocHelper.OpenDoc(Platform);
|
||||
}
|
||||
}
|
||||
#endif // #if UNITY_EDITOR
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 63c37ebda62dbd346ab3ac5552529755
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 93be6545bbe07cc479143071f3bf8d7e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,30 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public class AkWwiseMenu_Windows
|
||||
{
|
||||
private const string MENU_PATH = "Help/Wwise Help/";
|
||||
private const string Platform = "Windows";
|
||||
|
||||
[UnityEditor.MenuItem(MENU_PATH + Platform, false, (int) AkWwiseHelpOrder.WwiseHelpOrder)]
|
||||
public static void OpenDoc()
|
||||
{
|
||||
AkDocHelper.OpenDoc(Platform);
|
||||
}
|
||||
}
|
||||
#endif // #if UNITY_EDITOR
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 39ba0bd65bc9c8640bd7e6dfa72f57db
|
8
blueberryPeak/Assets/Wwise/API/Editor/WwiseTypes.meta
Normal file
8
blueberryPeak/Assets/Wwise/API/Editor/WwiseTypes.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c2be086ff067bfe458dee407b33ba1f5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,31 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
namespace AK.Wwise.Editor
|
||||
{
|
||||
[UnityEditor.CustomPropertyDrawer(typeof(AcousticTexture))]
|
||||
public class AcousticTextureDrawer : BaseTypeDrawer
|
||||
{
|
||||
protected override string GetComponentName(UnityEditor.SerializedProperty wwiseObjectReference)
|
||||
{
|
||||
var componentName = base.GetComponentName(wwiseObjectReference);
|
||||
return string.IsNullOrEmpty(componentName) ? "None" : componentName;
|
||||
}
|
||||
|
||||
protected override WwiseObjectType WwiseObjectType { get { return WwiseObjectType.AcousticTexture; } }
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 277049f9e5fc8c246b844cc0925fe084
|
@ -0,0 +1,25 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
namespace AK.Wwise.Editor
|
||||
{
|
||||
[UnityEditor.CustomPropertyDrawer(typeof(AuxBus))]
|
||||
public class AuxBusDrawer : BaseTypeDrawer
|
||||
{
|
||||
protected override WwiseObjectType WwiseObjectType { get { return WwiseObjectType.AuxBus; } }
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f32dd5678e38fa468b5c6956c0b6def
|
@ -0,0 +1,25 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
namespace AK.Wwise.Editor
|
||||
{
|
||||
[UnityEditor.CustomPropertyDrawer(typeof(Bank))]
|
||||
public class BankDrawer : BaseTypeDrawer
|
||||
{
|
||||
protected override WwiseObjectType WwiseObjectType { get { return WwiseObjectType.Soundbank; } }
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c10f51a84b7574f469fa186f52403ecc
|
@ -0,0 +1,133 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
namespace AK.Wwise.Editor
|
||||
{
|
||||
public abstract class BaseTypeDrawer : UnityEditor.PropertyDrawer
|
||||
{
|
||||
public override void OnGUI(UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label)
|
||||
{
|
||||
// Get unique control Id
|
||||
int controlId = UnityEngine.GUIUtility.GetControlID(label, UnityEngine.FocusType.Passive);
|
||||
UnityEditor.EditorGUI.BeginProperty(position, label, property);
|
||||
|
||||
var wwiseObjectReference = property.FindPropertyRelative("WwiseObjectReference");
|
||||
HandleDragAndDrop(wwiseObjectReference, position);
|
||||
|
||||
position = UnityEditor.EditorGUI.PrefixLabel(position, controlId, label);
|
||||
|
||||
var style = new UnityEngine.GUIStyle(UnityEngine.GUI.skin.button);
|
||||
style.alignment = UnityEngine.TextAnchor.MiddleLeft;
|
||||
style.fontStyle = UnityEngine.FontStyle.Normal;
|
||||
|
||||
var componentName = GetComponentName(wwiseObjectReference);
|
||||
if (string.IsNullOrEmpty(componentName))
|
||||
{
|
||||
componentName = "No " + WwiseObjectType + " is currently selected";
|
||||
style.normal.textColor = UnityEngine.Color.red;
|
||||
}
|
||||
|
||||
if (UnityEngine.GUI.Button(position, componentName, style))
|
||||
{
|
||||
new AkWwiseComponentPicker.PickerCreator
|
||||
{
|
||||
objectType = WwiseObjectType,
|
||||
wwiseObjectReference = wwiseObjectReference,
|
||||
serializedObject = property.serializedObject,
|
||||
//Current selected object
|
||||
currentWwiseObjectReference = GetWwiseObjectReference(wwiseObjectReference),
|
||||
//We're currently clicking focus windows must be the right
|
||||
pickedSourceEditorWindow = UnityEditor.EditorWindow.focusedWindow,
|
||||
//Useful to control event source
|
||||
pickedSourceControlId = controlId,
|
||||
pickerPosition = UnityEditor.EditorGUIUtility.GUIToScreenRect(position),
|
||||
};
|
||||
}
|
||||
|
||||
// Check picker window close event and we're in the right drawer instance using control ID
|
||||
if (UnityEngine.Event.current.commandName == AkWwiseComponentPicker.PickerClosedEventName &&
|
||||
controlId == AkWwiseComponentPicker.GetObjectPickerControlID())
|
||||
{
|
||||
var oldValue = GetWwiseObjectReference(wwiseObjectReference);
|
||||
var newValue = AkWwiseComponentPicker.GetObjectPickerObjectReference();
|
||||
|
||||
if (oldValue != newValue)
|
||||
{
|
||||
// Serialized object updating
|
||||
wwiseObjectReference.serializedObject.Update();
|
||||
SetSerializedObject(wwiseObjectReference, newValue);
|
||||
wwiseObjectReference.serializedObject.ApplyModifiedProperties();
|
||||
|
||||
// Force GUI modification, to send back to the base component drawer
|
||||
UnityEngine.GUI.changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
UnityEditor.EditorGUI.EndProperty();
|
||||
}
|
||||
|
||||
protected abstract WwiseObjectType WwiseObjectType { get; }
|
||||
|
||||
protected virtual string GetComponentName(UnityEditor.SerializedProperty wwiseObjectReference)
|
||||
{
|
||||
var reference = wwiseObjectReference.objectReferenceValue as WwiseObjectReference;
|
||||
return reference ? reference.DisplayName : string.Empty;
|
||||
}
|
||||
|
||||
// These are to be able use other type instead of WwiseObjectReference
|
||||
protected virtual WwiseObjectReference GetWwiseObjectReference(UnityEditor.SerializedProperty serializedProperty)
|
||||
{
|
||||
return serializedProperty.objectReferenceValue as WwiseObjectReference;
|
||||
}
|
||||
|
||||
protected virtual void SetSerializedObject(UnityEditor.SerializedProperty serializedProperty, WwiseObjectReference wwiseObjectReference)
|
||||
{
|
||||
serializedProperty.objectReferenceValue = wwiseObjectReference;
|
||||
AkWwiseTypes.DragAndDropObjectReference = null;
|
||||
}
|
||||
|
||||
private void HandleDragAndDrop(UnityEditor.SerializedProperty wwiseObjectReference, UnityEngine.Rect dropArea)
|
||||
{
|
||||
var currentEvent = UnityEngine.Event.current;
|
||||
if (!dropArea.Contains(currentEvent.mousePosition))
|
||||
return;
|
||||
|
||||
if (currentEvent.type != UnityEngine.EventType.DragUpdated && currentEvent.type != UnityEngine.EventType.DragPerform)
|
||||
return;
|
||||
|
||||
var reference = AkWwiseTypes.DragAndDropObjectReference;
|
||||
if (reference != null && reference.WwiseObjectType != WwiseObjectType)
|
||||
reference = null;
|
||||
|
||||
UnityEditor.DragAndDrop.visualMode = reference != null ? UnityEditor.DragAndDropVisualMode.Link : UnityEditor.DragAndDropVisualMode.Rejected;
|
||||
|
||||
if (currentEvent.type == UnityEngine.EventType.DragPerform)
|
||||
{
|
||||
UnityEditor.DragAndDrop.AcceptDrag();
|
||||
|
||||
if (reference != null)
|
||||
{
|
||||
SetSerializedObject(wwiseObjectReference, reference);
|
||||
}
|
||||
|
||||
UnityEngine.GUIUtility.hotControl = 0;
|
||||
}
|
||||
|
||||
currentEvent.Use();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d981c884ef44694c9a642252804d543
|
@ -0,0 +1,73 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AK.Wwise.Editor
|
||||
{
|
||||
[UnityEditor.CustomPropertyDrawer(typeof(Event))]
|
||||
public class EventDrawer : BaseTypeDrawer
|
||||
{
|
||||
protected override WwiseObjectType WwiseObjectType { get { return WwiseObjectType.Event; } }
|
||||
|
||||
public override void OnGUI(UnityEngine.Rect position, UnityEditor.SerializedProperty property,
|
||||
UnityEngine.GUIContent label)
|
||||
{
|
||||
position.height = UnityEditor.EditorGUI.GetPropertyHeight(property, label, true);
|
||||
base.OnGUI(position, property, label);
|
||||
position.y += UnityEditor.EditorGUIUtility.standardVerticalSpacing + position.height;
|
||||
|
||||
var wwiseObjectReferenceProperty = property.FindPropertyRelative("WwiseObjectReference");
|
||||
|
||||
var wwiseProjectFullPath = AkWwiseEditorSettings.WwiseProjectAbsolutePath;
|
||||
if (wwiseObjectReferenceProperty.objectReferenceValue)
|
||||
{
|
||||
var assetObject = new UnityEditor.SerializedObject(wwiseObjectReferenceProperty.objectReferenceValue);
|
||||
var userBankProperty = assetObject.FindProperty("IsInUserDefinedSoundBank");
|
||||
if (userBankProperty != null)
|
||||
{
|
||||
bool shouldGreyOut = !AkUtilities.IsAutoBankEnabled();
|
||||
EditorGUI.BeginDisabledGroup(shouldGreyOut);
|
||||
UnityEditor.EditorGUI.PropertyField(position, userBankProperty, new GUIContent("Is In User-Defined SoundBank:"));
|
||||
EditorGUI.EndDisabledGroup();
|
||||
assetObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(UnityEditor.SerializedProperty property, UnityEngine.GUIContent label)
|
||||
{
|
||||
float totalHeight = UnityEditor.EditorGUI.GetPropertyHeight(property, label, true) + UnityEditor.EditorGUIUtility.standardVerticalSpacing;
|
||||
var wwiseObjectReferenceProperty = property.FindPropertyRelative("WwiseObjectReference");
|
||||
if (wwiseObjectReferenceProperty.objectReferenceValue)
|
||||
{
|
||||
var assetObject = new UnityEditor.SerializedObject(wwiseObjectReferenceProperty.objectReferenceValue);
|
||||
var userBankProperty = assetObject.FindProperty("IsInUserDefinedSoundBank");
|
||||
if (userBankProperty != null)
|
||||
{
|
||||
totalHeight += UnityEditor.EditorGUI.GetPropertyHeight(userBankProperty) +
|
||||
UnityEditor.EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
}
|
||||
|
||||
return totalHeight;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 848ecfc289e88c84e8c502f9a0657a07
|
@ -0,0 +1,25 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
namespace AK.Wwise.Editor
|
||||
{
|
||||
[UnityEditor.CustomPropertyDrawer(typeof(RTPC))]
|
||||
public class RTPCDrawer : BaseTypeDrawer
|
||||
{
|
||||
protected override WwiseObjectType WwiseObjectType { get { return WwiseObjectType.GameParameter; } }
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab4589f670616db4b892d9221b2e7759
|
@ -0,0 +1,25 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
namespace AK.Wwise.Editor
|
||||
{
|
||||
[UnityEditor.CustomPropertyDrawer(typeof(State))]
|
||||
public class StateDrawer : BaseTypeDrawer
|
||||
{
|
||||
protected override WwiseObjectType WwiseObjectType { get { return WwiseObjectType.State; } }
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e886ef30dc2cdae48925c6cc8a02f74b
|
@ -0,0 +1,25 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
namespace AK.Wwise.Editor
|
||||
{
|
||||
[UnityEditor.CustomPropertyDrawer(typeof(Switch))]
|
||||
public class SwitchDrawer : BaseTypeDrawer
|
||||
{
|
||||
protected override WwiseObjectType WwiseObjectType { get { return WwiseObjectType.Switch; } }
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8aab2986d6a6134d9b39aa8b8f06501
|
@ -0,0 +1,25 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
namespace AK.Wwise.Editor
|
||||
{
|
||||
[UnityEditor.CustomPropertyDrawer(typeof(Trigger))]
|
||||
public class TriggerDrawer : BaseTypeDrawer
|
||||
{
|
||||
protected override WwiseObjectType WwiseObjectType { get { return WwiseObjectType.Trigger; } }
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 424a2f6d067962b4d9e111969a851c2a
|
8
blueberryPeak/Assets/Wwise/API/Editor/WwiseWindows.meta
Normal file
8
blueberryPeak/Assets/Wwise/API/Editor/WwiseWindows.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fb301041103578049b273f577f091d49
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,210 @@
|
||||
#if UNITY_EDITOR
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
public class AkWwiseComponentPicker : UnityEditor.EditorWindow
|
||||
{
|
||||
/// <summary>
|
||||
/// Return the last picked object
|
||||
/// </summary>
|
||||
public static WwiseObjectReference GetObjectPickerObjectReference()
|
||||
{
|
||||
return s_componentPicker != null ? s_componentPicker.m_CurrentObjectReference : default;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return last control Id which opened the window
|
||||
/// </summary>
|
||||
public static int GetObjectPickerControlID()
|
||||
{
|
||||
return s_componentPicker != null ? s_componentPicker.m_ObjectSelectorId : default;
|
||||
}
|
||||
|
||||
public const string PickerClosedEventName = "AkWwiseComponentPickerClosed";
|
||||
|
||||
public static AkWwiseComponentPicker s_componentPicker;
|
||||
|
||||
private AkWwiseTreeView m_treeView;
|
||||
|
||||
private bool m_close;
|
||||
private UnityEditor.SerializedProperty m_WwiseObjectReference;
|
||||
private UnityEditor.SerializedObject m_serializedObject;
|
||||
private WwiseObjectType m_type;
|
||||
UnityEditor.IMGUI.Controls.SearchField m_SearchField;
|
||||
|
||||
private WwiseObjectReference m_CurrentObjectReference;
|
||||
private UnityEditor.EditorWindow m_PickedSourceEditorWindow;
|
||||
private int m_ObjectSelectorId = 0;
|
||||
|
||||
/// <summary>
|
||||
/// The window to repaint after closing the picker
|
||||
/// </summary>
|
||||
public static UnityEditor.EditorWindow LastFocusedWindow = null;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
//Unity sometimes generates an error when the window is closed from the OnGUI function.
|
||||
//So We close it here
|
||||
if (m_close)
|
||||
{
|
||||
Close();
|
||||
|
||||
if (LastFocusedWindow)
|
||||
{
|
||||
UnityEditor.EditorApplication.delayCall += LastFocusedWindow.Repaint;
|
||||
LastFocusedWindow = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
using (new UnityEngine.GUILayout.VerticalScope())
|
||||
{
|
||||
UnityEngine.GUILayout.Space(10);
|
||||
m_treeView.StoredSearchString = m_SearchField.OnGUI(UnityEngine.GUILayoutUtility.GetRect(position.width - 60, 20), m_treeView.StoredSearchString);
|
||||
UnityEngine.GUILayout.FlexibleSpace();
|
||||
UnityEngine.Rect lastRect = UnityEngine.GUILayoutUtility.GetLastRect();
|
||||
|
||||
m_treeView.OnGUI(new UnityEngine.Rect(lastRect.x, lastRect.y, position.width, lastRect.height));
|
||||
|
||||
using (new UnityEngine.GUILayout.HorizontalScope("box"))
|
||||
{
|
||||
if (UnityEngine.GUILayout.Button("Ok"))
|
||||
{
|
||||
//Get the selected item
|
||||
var selectedItem = m_treeView.dataSource.FindById(m_treeView.state.lastClickedID);
|
||||
|
||||
SetGuid(selectedItem);
|
||||
}
|
||||
else if (UnityEngine.GUILayout.Button("Cancel"))
|
||||
m_close = true;
|
||||
else if (UnityEngine.GUILayout.Button("Reset"))
|
||||
{
|
||||
ResetGuid();
|
||||
m_close = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SetGuid(AkWwiseTreeViewItem in_element)
|
||||
{
|
||||
if (in_element == null || m_type != in_element.objectType) return;
|
||||
|
||||
m_serializedObject.Update();
|
||||
var reference = WwiseObjectReference.FindOrCreateWwiseObject(m_type, in_element.name, in_element.objectGuid);
|
||||
var groupReference = reference as WwiseGroupValueObjectReference;
|
||||
if (groupReference)
|
||||
{
|
||||
var parent = in_element.parent as AkWwiseTreeViewItem;
|
||||
groupReference.SetupGroupObjectReference(parent.name, parent.objectGuid);
|
||||
}
|
||||
|
||||
m_CurrentObjectReference = reference;
|
||||
if (m_PickedSourceEditorWindow)
|
||||
{
|
||||
m_PickedSourceEditorWindow.SendEvent(UnityEditor.EditorGUIUtility.CommandEvent(PickerClosedEventName));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_serializedObject.Update();
|
||||
m_WwiseObjectReference.objectReferenceValue = reference;
|
||||
m_serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
m_close = true;
|
||||
}
|
||||
|
||||
private void ResetGuid()
|
||||
{
|
||||
m_CurrentObjectReference = null;
|
||||
if (m_PickedSourceEditorWindow)
|
||||
{
|
||||
m_PickedSourceEditorWindow.SendEvent(UnityEditor.EditorGUIUtility.CommandEvent(PickerClosedEventName));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_serializedObject.Update();
|
||||
m_WwiseObjectReference.objectReferenceValue = null;
|
||||
m_serializedObject.ApplyModifiedProperties();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PickerCreator
|
||||
{
|
||||
public UnityEditor.SerializedProperty wwiseObjectReference;
|
||||
public WwiseObjectType objectType;
|
||||
public UnityEngine.Rect pickerPosition;
|
||||
public UnityEditor.SerializedObject serializedObject;
|
||||
|
||||
public WwiseObjectReference currentWwiseObjectReference;
|
||||
public UnityEditor.EditorWindow pickedSourceEditorWindow;
|
||||
public int pickedSourceControlId = 0;
|
||||
private int minPickerWidth = 300;
|
||||
|
||||
internal PickerCreator()
|
||||
{
|
||||
UnityEditor.EditorApplication.delayCall += DelayCall;
|
||||
}
|
||||
|
||||
private void DelayCall()
|
||||
{
|
||||
if (s_componentPicker != null)
|
||||
return;
|
||||
|
||||
s_componentPicker = CreateInstance<AkWwiseComponentPicker>();
|
||||
|
||||
//position the window below the button
|
||||
var pos = new UnityEngine.Rect(pickerPosition.x, pickerPosition.yMax, 0, 0);
|
||||
|
||||
//If the window gets out of the screen, we place it on top of the button instead
|
||||
if (pickerPosition.yMax > UnityEngine.Screen.currentResolution.height / 2)
|
||||
pos.y = pickerPosition.y - UnityEngine.Screen.currentResolution.height / 2;
|
||||
|
||||
//We show a drop down window which is automatically destroyed when focus is lost
|
||||
s_componentPicker.ShowAsDropDown(pos,
|
||||
new UnityEngine.Vector2(pickerPosition.width >= minPickerWidth ? pickerPosition.width : minPickerWidth,
|
||||
UnityEngine.Screen.currentResolution.height / 2));
|
||||
|
||||
s_componentPicker.m_WwiseObjectReference = wwiseObjectReference;
|
||||
s_componentPicker.m_serializedObject = serializedObject;
|
||||
s_componentPicker.m_type = objectType;
|
||||
s_componentPicker.m_CurrentObjectReference = currentWwiseObjectReference;
|
||||
s_componentPicker.m_PickedSourceEditorWindow = pickedSourceEditorWindow;
|
||||
s_componentPicker.m_ObjectSelectorId = pickedSourceControlId;
|
||||
|
||||
UnityEditor.IMGUI.Controls.TreeViewState treeViewState = new UnityEditor.IMGUI.Controls.TreeViewState();
|
||||
s_componentPicker.m_treeView = new AkWwiseTreeView(treeViewState, AkWwiseProjectInfo.GetTreeData(), objectType);
|
||||
s_componentPicker.m_treeView.DragDropEnabled = false;
|
||||
s_componentPicker.m_treeView.SetDoubleClickFunction(s_componentPicker.SetGuid);
|
||||
|
||||
s_componentPicker.m_SearchField = new UnityEditor.IMGUI.Controls.SearchField();
|
||||
s_componentPicker.m_SearchField.downOrUpArrowKeyPressed += s_componentPicker.m_treeView.SetFocusAndEnsureSelectedItem;
|
||||
s_componentPicker.m_SearchField.SetFocus();
|
||||
|
||||
var reference = currentWwiseObjectReference;
|
||||
if (reference)
|
||||
{
|
||||
s_componentPicker.m_treeView.dataSource.SelectItem(reference.Guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09674a483ceea2d43ae45bcdbda8b5e1
|
@ -0,0 +1,159 @@
|
||||
using UnityEngine;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
[UnityEditor.InitializeOnLoad]
|
||||
public class AkWwiseJSONBuilder : UnityEditor.AssetPostprocessor
|
||||
{
|
||||
private static bool isSubscribedToInvokePopulate = false;
|
||||
private static readonly System.DateTime s_LastParsed = System.DateTime.MinValue;
|
||||
|
||||
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths, bool didDomainReload)
|
||||
{
|
||||
if (UnityEditor.AssetDatabase.IsAssetImportWorkerProcess())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isSubscribedToInvokePopulate)
|
||||
{
|
||||
WwiseProjectDatabase.SoundBankDirectoryUpdated += InvokePopulate;
|
||||
isSubscribedToInvokePopulate = true;
|
||||
}
|
||||
if (didDomainReload)
|
||||
{
|
||||
UnityEditor.EditorApplication.playModeStateChanged += PlayModeChanged;
|
||||
}
|
||||
}
|
||||
|
||||
private static void PlayModeChanged(UnityEditor.PlayModeStateChange mode)
|
||||
{
|
||||
if (mode == UnityEditor.PlayModeStateChange.EnteredEditMode)
|
||||
{
|
||||
AkWwiseProjectInfo.Populate();
|
||||
}
|
||||
}
|
||||
|
||||
public static void InvokePopulate()
|
||||
{
|
||||
Populate();
|
||||
WwiseProjectDatabase.SoundBankDirectoryUpdated -= InvokePopulate;
|
||||
isSubscribedToInvokePopulate = false;
|
||||
}
|
||||
|
||||
public static bool Populate()
|
||||
{
|
||||
|
||||
if (UnityEditor.EditorApplication.isPlayingOrWillChangePlaymode || UnityEditor.EditorApplication.isCompiling)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var bChanged = false;
|
||||
WwiseSoundBankRefArray soundBankRefArray = new WwiseSoundBankRefArray();
|
||||
for (var i = 0; i < WwiseProjectDatabase.GetSoundBankCount(); i++)
|
||||
{
|
||||
var soundBankRef = soundBankRefArray[i];
|
||||
bChanged = SerialiseSoundBank(soundBankRef) || bChanged;
|
||||
}
|
||||
|
||||
return bChanged;
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
UnityEngine.Debug.Log("WwiseUnity: Exception occured while parsing SoundbanksInfo.xml: " + e.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool SerialiseSoundBank(WwiseSoundBankRef soundBankRef)
|
||||
{
|
||||
var bChanged = false;
|
||||
var eventCount = soundBankRef.EventsCount;
|
||||
for (var i = 0; i < eventCount; i++)
|
||||
{
|
||||
var events = soundBankRef.Events[i];
|
||||
bChanged = SerialiseEventData(events) || bChanged;
|
||||
}
|
||||
|
||||
return bChanged;
|
||||
}
|
||||
|
||||
private static float GetFloatFromString(string s)
|
||||
{
|
||||
if (string.Compare(s, "Infinite") == 0)
|
||||
{
|
||||
return UnityEngine.Mathf.Infinity;
|
||||
}
|
||||
else
|
||||
{
|
||||
System.Globalization.CultureInfo CultInfo = System.Globalization.CultureInfo.CurrentCulture.Clone() as System.Globalization.CultureInfo;
|
||||
CultInfo.NumberFormat.NumberDecimalSeparator = ".";
|
||||
CultInfo.NumberFormat.CurrencyDecimalSeparator = ".";
|
||||
float Result;
|
||||
if(float.TryParse(s, System.Globalization.NumberStyles.Float, CultInfo, out Result))
|
||||
{
|
||||
return Result;
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityEngine.Debug.Log("WwiseUnity: Could not parse float number " + s);
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static bool SerialiseEventData(WwiseEventRef eventRef)
|
||||
{
|
||||
float maxAttenuation = eventRef.MaxAttenuation;
|
||||
var minDuration = eventRef.MinDuration;
|
||||
var maxDuration = eventRef.MaxDuration;
|
||||
var name = eventRef.Name;
|
||||
|
||||
var bChanged = false;
|
||||
foreach (var wwu in AkWwiseProjectInfo.GetData().EventWwu)
|
||||
{
|
||||
var eventData = wwu.Find(name);
|
||||
if (eventData == null)
|
||||
continue;
|
||||
|
||||
if (eventData.maxAttenuation != maxAttenuation)
|
||||
{
|
||||
eventData.maxAttenuation = maxAttenuation;
|
||||
bChanged = true;
|
||||
}
|
||||
|
||||
if (eventData.minDuration != minDuration)
|
||||
{
|
||||
eventData.minDuration = minDuration;
|
||||
bChanged = true;
|
||||
}
|
||||
|
||||
if (eventData.maxDuration != maxDuration)
|
||||
{
|
||||
eventData.maxDuration = maxDuration;
|
||||
bChanged = true;
|
||||
}
|
||||
}
|
||||
return bChanged;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a8989d84ad7fec140a202b5bf4281a73
|
@ -0,0 +1,266 @@
|
||||
#if UNITY_EDITOR
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
public class AkWwisePicker : UnityEditor.EditorWindow
|
||||
{
|
||||
[UnityEngine.SerializeField] UnityEditor.IMGUI.Controls.TreeViewState m_treeViewState;
|
||||
|
||||
public static AkWwiseTreeView m_treeView;
|
||||
UnityEditor.IMGUI.Controls.SearchField m_SearchField;
|
||||
|
||||
[UnityEditor.MenuItem("Window/Wwise Picker", false, (int)AkWwiseWindowOrder.WwisePicker)]
|
||||
public static void InitPickerWindow()
|
||||
{
|
||||
GetWindow<AkWwisePicker>("Wwise Picker", true,
|
||||
typeof(UnityEditor.EditorWindow).Assembly.GetType("UnityEditor.ConsoleWindow"));
|
||||
}
|
||||
|
||||
public void OnEnable()
|
||||
{
|
||||
if (m_treeViewState == null)
|
||||
{
|
||||
m_treeViewState = new UnityEditor.IMGUI.Controls.TreeViewState();
|
||||
}
|
||||
|
||||
var multiColumnHeaderState = AkWwiseTreeView.CreateDefaultMultiColumnHeaderState();
|
||||
var multiColumnHeader = new UnityEditor.IMGUI.Controls.MultiColumnHeader(multiColumnHeaderState);
|
||||
m_treeView = new AkWwiseTreeView(m_treeViewState, multiColumnHeader, AkWwiseProjectInfo.GetTreeData());
|
||||
m_treeView.SetDoubleClickFunction(PlayPauseItem);
|
||||
|
||||
m_treeView.dirtyDelegate = RequestRepaint;
|
||||
|
||||
if (m_treeView.dataSource.Data.ItemDict.Count == 0)
|
||||
{
|
||||
Refresh();
|
||||
RequestRepaint();
|
||||
}
|
||||
|
||||
m_SearchField = new UnityEditor.IMGUI.Controls.SearchField();
|
||||
m_SearchField.downOrUpArrowKeyPressed += m_treeView.SetFocusAndEnsureSelectedItem;
|
||||
m_SearchField.SetFocus();
|
||||
}
|
||||
|
||||
public void OnDisable()
|
||||
{
|
||||
m_treeView.SaveExpansionStatus();
|
||||
}
|
||||
|
||||
public static void Refresh(bool ignoreIfWaapi = false)
|
||||
{
|
||||
if (AkWwiseProjectInfo.GetData().currentDataSource == AkWwiseProjectInfo.DataSourceType.WwiseAuthoring && ignoreIfWaapi)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_treeView != null)
|
||||
{
|
||||
m_treeView.dataSource.FetchData();
|
||||
};
|
||||
}
|
||||
|
||||
private void PlayPauseItem(AkWwiseTreeViewItem item)
|
||||
{
|
||||
if (m_treeView != null && m_treeView.CheckWaapi())
|
||||
{
|
||||
AkWaapiUtilities.TogglePlayEvent(item.objectType, item.objectGuid);
|
||||
}
|
||||
}
|
||||
|
||||
private bool isDirty;
|
||||
public void RequestRepaint()
|
||||
{
|
||||
isDirty = true;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (isDirty)
|
||||
{
|
||||
Repaint();
|
||||
m_treeView.Reload();
|
||||
isDirty = false;
|
||||
}
|
||||
|
||||
if (AkWwiseEditorSettings.Instance.UseWaapi)
|
||||
{
|
||||
AkWwiseProjectInfo.WaapiPickerData.Update();
|
||||
}
|
||||
}
|
||||
|
||||
public void OnGUI()
|
||||
{
|
||||
AkWwiseProjectInfo.DataSourceType ds;
|
||||
var buttonWidth = 150;
|
||||
using (new UnityEngine.GUILayout.HorizontalScope("box"))
|
||||
{
|
||||
ds = (AkWwiseProjectInfo.DataSourceType)UnityEditor.EditorGUILayout.EnumPopup(
|
||||
AkWwiseProjectInfo.GetData().currentDataSource, UnityEngine.GUILayout.Width(buttonWidth));
|
||||
UnityEngine.GUILayout.Space(5);
|
||||
|
||||
var projectData = AkWwiseProjectInfo.GetData();
|
||||
|
||||
if (ds != projectData.currentDataSource)
|
||||
{
|
||||
projectData.currentDataSource = ds;
|
||||
m_treeView.SetDataSource(AkWwiseProjectInfo.GetTreeData());
|
||||
}
|
||||
|
||||
if (ds == AkWwiseProjectInfo.DataSourceType.FileSystem)
|
||||
{
|
||||
projectData.autoPopulateEnabled =
|
||||
UnityEngine.GUILayout.Toggle(projectData.autoPopulateEnabled, "Auto populate");
|
||||
}
|
||||
else
|
||||
{
|
||||
projectData.AutoSyncSelection =
|
||||
UnityEngine.GUILayout.Toggle(projectData.AutoSyncSelection, "Autosync selection");
|
||||
AkWwiseProjectInfo.WaapiPickerData.AutoSyncSelection = projectData.AutoSyncSelection;
|
||||
}
|
||||
|
||||
UnityEngine.GUILayout.FlexibleSpace();
|
||||
|
||||
if (UnityEngine.GUILayout.Button("Refresh Project", UnityEngine.GUILayout.Width(buttonWidth)))
|
||||
{
|
||||
if (ds == AkWwiseProjectInfo.DataSourceType.FileSystem)
|
||||
{
|
||||
AkWwiseProjectInfo.Populate();
|
||||
}
|
||||
Refresh();
|
||||
}
|
||||
|
||||
|
||||
if (UnityEngine.GUILayout.Button("Generate SoundBanks", UnityEngine.GUILayout.Width(buttonWidth)))
|
||||
{
|
||||
if (AkUtilities.IsSoundbankGenerationAvailable())
|
||||
{
|
||||
AkUtilities.GenerateSoundbanks();
|
||||
}
|
||||
else if(!AkUtilities.GeneratingSoundBanks)
|
||||
{
|
||||
UnityEngine.Debug.LogError("Access to Wwise is required to generate the SoundBanks. Please go to Edit > Project Settings... and set the Wwise Application Path found in the Wwise Integration view.");
|
||||
}
|
||||
}
|
||||
|
||||
if (projectData.autoPopulateEnabled && AkUtilities.IsWwiseProjectAvailable)
|
||||
{
|
||||
AkWwiseWWUBuilder.StartWWUWatcher();
|
||||
}
|
||||
else
|
||||
{
|
||||
AkWwiseWWUBuilder.StopWWUWatcher();
|
||||
}
|
||||
}
|
||||
|
||||
using (new UnityEngine.GUILayout.HorizontalScope("box"))
|
||||
{
|
||||
var search_width = System.Math.Max(position.width / 3, buttonWidth * 2);
|
||||
|
||||
if (ds == AkWwiseProjectInfo.DataSourceType.FileSystem)
|
||||
{
|
||||
m_treeView.StoredSearchString = m_SearchField.OnGUI(UnityEngine.GUILayoutUtility.GetRect(search_width, 20), m_treeView.StoredSearchString);
|
||||
UnityEngine.GUILayout.FlexibleSpace();
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
m_treeView.StoredSearchString = m_SearchField.OnGUI(UnityEngine.GUILayoutUtility.GetRect(search_width, 20), m_treeView.StoredSearchString);
|
||||
UnityEngine.GUILayout.FlexibleSpace();
|
||||
|
||||
var labelStyle = new UnityEngine.GUIStyle();
|
||||
labelStyle.richText = true;
|
||||
UnityEngine.GUILayout.Label(AkWaapiUtilities.GetStatusString(), labelStyle);
|
||||
}
|
||||
}
|
||||
|
||||
UnityEngine.GUILayout.Space(UnityEditor.EditorGUIUtility.standardVerticalSpacing);
|
||||
|
||||
|
||||
UnityEngine.GUILayout.FlexibleSpace();
|
||||
UnityEngine.Rect lastRect = UnityEngine.GUILayoutUtility.GetLastRect();
|
||||
m_treeView.OnGUI(new UnityEngine.Rect(lastRect.x, lastRect.y, position.width, lastRect.height));
|
||||
|
||||
if (UnityEngine.GUI.changed && AkUtilities.IsWwiseProjectAvailable)
|
||||
{
|
||||
UnityEditor.EditorUtility.SetDirty(AkWwiseProjectInfo.GetData());
|
||||
}
|
||||
}
|
||||
|
||||
static void SelectInWwisePicker(System.Guid guid)
|
||||
{
|
||||
InitPickerWindow();
|
||||
m_treeView.SelectItem(guid);
|
||||
}
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/AkBank/Select in Wwise Picker")]
|
||||
[UnityEditor.MenuItem("CONTEXT/AkAmbient/Select in Wwise Picker")]
|
||||
[UnityEditor.MenuItem("CONTEXT/AkEvent/Select in Wwise Picker")]
|
||||
[UnityEditor.MenuItem("CONTEXT/AkState/Select in Wwise Picker")]
|
||||
[UnityEditor.MenuItem("CONTEXT/AkSwitch/Select in Wwise Picker")]
|
||||
[UnityEditor.MenuItem("CONTEXT/AkWwiseTrigger/Select in Wwise Picker")]
|
||||
static void SelectItemInWwisePicker(UnityEditor.MenuCommand command)
|
||||
{
|
||||
AkTriggerHandler component = (AkTriggerHandler)command.context;
|
||||
try
|
||||
{
|
||||
var data = component.GetType().GetField("data");
|
||||
var guid = (data.GetValue(component) as AK.Wwise.BaseType).ObjectReference.Guid;
|
||||
SelectInWwisePicker(guid);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/AkRoom/Select Aux Bus in Wwise Picker")]
|
||||
static void SelectAkRoomAuxBusInWwisePicker(UnityEditor.MenuCommand command)
|
||||
{
|
||||
AkRoom component = (AkRoom)command.context;
|
||||
SelectInWwisePicker(component.reverbAuxBus.ObjectReference.Guid);
|
||||
}
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/AkRoom/Select Event in Wwise Picker")]
|
||||
static void SelectAkRoomEventInWwisePicker(UnityEditor.MenuCommand command)
|
||||
{
|
||||
AkRoom component = (AkRoom)command.context;
|
||||
SelectInWwisePicker(component.roomToneEvent.ObjectReference.Guid);
|
||||
}
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/AkSurfaceReflector/Select in Wwise Picker")]
|
||||
static void SelectReflectorTextureItemInWwisePicker(UnityEditor.MenuCommand command)
|
||||
{
|
||||
AkSurfaceReflector component = (AkSurfaceReflector)command.context;
|
||||
if (component.AcousticTextures.Length >0 && component.AcousticTextures[0].ObjectReference !=null)
|
||||
{
|
||||
SelectInWwisePicker(component.AcousticTextures[0].ObjectReference.Guid);
|
||||
}
|
||||
}
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/AkEnvironment/Select in Wwise Picker")]
|
||||
static void SelectEnvironmentItemInWwisePicker(UnityEditor.MenuCommand command)
|
||||
{
|
||||
AkEnvironment component = (AkEnvironment)command.context;
|
||||
SelectInWwisePicker(component.data.ObjectReference.Guid);
|
||||
}
|
||||
|
||||
[UnityEditor.MenuItem("CONTEXT/AkEarlyReflections/Select in Wwise Picker")]
|
||||
static void SelectReflectionsItemInWwisePicker(UnityEditor.MenuCommand command)
|
||||
{
|
||||
AkEarlyReflections component = (AkEarlyReflections)command.context;
|
||||
SelectInWwisePicker(component.reflectionsAuxBus.ObjectReference.Guid);
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bc94d1bda99bae048b806e78dad62bde
|
@ -0,0 +1,424 @@
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
public class AkWwiseProjectData : UnityEngine.ScriptableObject
|
||||
{
|
||||
public System.Collections.Generic.List<AkInfoWorkUnit> AcousticTextureWwu =
|
||||
new System.Collections.Generic.List<AkInfoWorkUnit>();
|
||||
|
||||
public System.Collections.Generic.List<AkInfoWorkUnit> AuxBusWwu =
|
||||
new System.Collections.Generic.List<AkInfoWorkUnit>();
|
||||
|
||||
public System.Collections.Generic.List<AkInfoWorkUnit> BankWwu =
|
||||
new System.Collections.Generic.List<AkInfoWorkUnit>();
|
||||
|
||||
public System.Collections.Generic.List<EventWorkUnit> EventWwu =
|
||||
new System.Collections.Generic.List<EventWorkUnit>();
|
||||
|
||||
public System.Collections.Generic.List<AkInfoWorkUnit> RtpcWwu =
|
||||
new System.Collections.Generic.List<AkInfoWorkUnit>();
|
||||
|
||||
public System.Collections.Generic.List<GroupValWorkUnit> StateWwu =
|
||||
new System.Collections.Generic.List<GroupValWorkUnit>();
|
||||
|
||||
public System.Collections.Generic.List<GroupValWorkUnit> SwitchWwu =
|
||||
new System.Collections.Generic.List<GroupValWorkUnit>();
|
||||
|
||||
public System.Collections.Generic.List<AkInfoWorkUnit> TriggerWwu =
|
||||
new System.Collections.Generic.List<AkInfoWorkUnit>();
|
||||
|
||||
////Contains the int id of all items that are expanded in the Wwise picker
|
||||
public System.Collections.Generic.List<int> ExpandedFileSystemItemIds = new System.Collections.Generic.List<int>();
|
||||
public System.Collections.Generic.List<int> ExpandedWaapiItemIds = new System.Collections.Generic.List<int>();
|
||||
|
||||
public bool AutoSyncSelection;
|
||||
public bool autoPopulateEnabled = true;
|
||||
public AkWwiseProjectInfo.DataSourceType currentDataSource;
|
||||
|
||||
public string CurrentPluginConfig;
|
||||
|
||||
public System.Collections.ArrayList GetWwuListByString(string in_wwuType)
|
||||
{
|
||||
if (string.Equals(in_wwuType, "Events", System.StringComparison.OrdinalIgnoreCase))
|
||||
return System.Collections.ArrayList.Adapter(EventWwu);
|
||||
if (string.Equals(in_wwuType, "States", System.StringComparison.OrdinalIgnoreCase))
|
||||
return System.Collections.ArrayList.Adapter(StateWwu);
|
||||
if (string.Equals(in_wwuType, "Switches", System.StringComparison.OrdinalIgnoreCase))
|
||||
return System.Collections.ArrayList.Adapter(SwitchWwu);
|
||||
if (string.Equals(in_wwuType, "Master-Mixer Hierarchy", System.StringComparison.OrdinalIgnoreCase))
|
||||
return System.Collections.ArrayList.Adapter(AuxBusWwu);
|
||||
if (string.Equals(in_wwuType, "SoundBanks", System.StringComparison.OrdinalIgnoreCase))
|
||||
return System.Collections.ArrayList.Adapter(BankWwu);
|
||||
if (string.Equals(in_wwuType, "Game Parameters", System.StringComparison.OrdinalIgnoreCase))
|
||||
return System.Collections.ArrayList.Adapter(RtpcWwu);
|
||||
if (string.Equals(in_wwuType, "Triggers", System.StringComparison.OrdinalIgnoreCase))
|
||||
return System.Collections.ArrayList.Adapter(TriggerWwu);
|
||||
if (string.Equals(in_wwuType, "Virtual Acoustics", System.StringComparison.OrdinalIgnoreCase))
|
||||
return System.Collections.ArrayList.Adapter(AcousticTextureWwu);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public float GetEventMaxAttenuation(uint eventID)
|
||||
{
|
||||
var Event = GetEventInfo(eventID);
|
||||
return Event != null ? Event.maxAttenuation : 0.0f;
|
||||
}
|
||||
|
||||
public Event GetEventInfo(uint eventID)
|
||||
{
|
||||
foreach (var wwu in EventWwu)
|
||||
{
|
||||
foreach (var entry in wwu.List)
|
||||
{
|
||||
if (entry.Id == eventID)
|
||||
{
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
EventWwu = new System.Collections.Generic.List<EventWorkUnit>();
|
||||
StateWwu = new System.Collections.Generic.List<GroupValWorkUnit>();
|
||||
SwitchWwu = new System.Collections.Generic.List<GroupValWorkUnit>();
|
||||
BankWwu = new System.Collections.Generic.List<AkInfoWorkUnit>();
|
||||
AuxBusWwu = new System.Collections.Generic.List<AkInfoWorkUnit>();
|
||||
RtpcWwu = new System.Collections.Generic.List<AkInfoWorkUnit>();
|
||||
TriggerWwu = new System.Collections.Generic.List<AkInfoWorkUnit>();
|
||||
AcousticTextureWwu = new System.Collections.Generic.List<AkInfoWorkUnit>();
|
||||
}
|
||||
|
||||
public void Migrate()
|
||||
{
|
||||
foreach (var wwu in EventWwu)
|
||||
wwu.Migrate();
|
||||
|
||||
foreach (var wwu in StateWwu)
|
||||
wwu.Migrate();
|
||||
|
||||
foreach (var wwu in SwitchWwu)
|
||||
wwu.Migrate();
|
||||
|
||||
foreach (var wwu in BankWwu)
|
||||
wwu.Migrate();
|
||||
|
||||
foreach (var wwu in AuxBusWwu)
|
||||
wwu.Migrate();
|
||||
|
||||
foreach (var wwu in RtpcWwu)
|
||||
wwu.Migrate();
|
||||
|
||||
foreach (var wwu in TriggerWwu)
|
||||
wwu.Migrate();
|
||||
|
||||
foreach (var wwu in AcousticTextureWwu)
|
||||
wwu.Migrate();
|
||||
|
||||
UnityEditor.EditorUtility.SetDirty(this);
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class ByteArrayWrapper
|
||||
{
|
||||
public byte[] bytes;
|
||||
|
||||
public ByteArrayWrapper(byte[] byteArray)
|
||||
{
|
||||
|
||||
bytes = byteArray;
|
||||
}
|
||||
|
||||
public static implicit operator ByteArrayWrapper(System.Guid guid) => new ByteArrayWrapper(guid.ToByteArray());
|
||||
|
||||
public static implicit operator System.Guid(ByteArrayWrapper bytes) => new System.Guid(bytes.bytes);
|
||||
}
|
||||
|
||||
private static System.Guid GetGuid(byte[] bytes)
|
||||
{
|
||||
try
|
||||
{
|
||||
return new System.Guid(bytes);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return System.Guid.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class AkBaseInformation : System.IComparable
|
||||
{
|
||||
[UnityEngine.SerializeField]
|
||||
[UnityEngine.Serialization.FormerlySerializedAs("Name")]
|
||||
private string name;
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return name; }
|
||||
|
||||
set
|
||||
{
|
||||
name = value;
|
||||
id = AkUtilities.ShortIDGenerator.Compute(value);
|
||||
}
|
||||
}
|
||||
|
||||
[UnityEngine.HideInInspector]
|
||||
[UnityEngine.SerializeField]
|
||||
[UnityEngine.Serialization.FormerlySerializedAs("Guid")]
|
||||
private byte[] guid = null;
|
||||
|
||||
public System.Guid Guid
|
||||
{
|
||||
get { return GetGuid(guid); }
|
||||
set { guid = value.ToByteArray(); }
|
||||
}
|
||||
|
||||
[UnityEngine.SerializeField]
|
||||
[UnityEngine.Serialization.FormerlySerializedAs("ID")]
|
||||
private uint id;
|
||||
|
||||
public uint Id
|
||||
{
|
||||
get { return id; }
|
||||
}
|
||||
|
||||
[UnityEngine.HideInInspector]
|
||||
public System.Collections.Generic.List<PathElement> PathAndIcons = new System.Collections.Generic.List<PathElement>();
|
||||
|
||||
int System.IComparable.CompareTo(object other)
|
||||
{
|
||||
if (other == null)
|
||||
return 1;
|
||||
|
||||
var otherAkInformation = other as AkBaseInformation;
|
||||
if (otherAkInformation == null)
|
||||
throw new System.ArgumentException("Object is not of type AkBaseInformation");
|
||||
|
||||
return Name.CompareTo(otherAkInformation.Name);
|
||||
}
|
||||
|
||||
private class _CompareByGuid : System.Collections.Generic.IComparer<AkBaseInformation>
|
||||
{
|
||||
int System.Collections.Generic.IComparer<AkBaseInformation>.Compare(AkBaseInformation a, AkBaseInformation b)
|
||||
{
|
||||
if (a == null)
|
||||
return b == null ? 0 : -1;
|
||||
|
||||
return a.Guid.CompareTo(b.Guid);
|
||||
}
|
||||
}
|
||||
|
||||
public static System.Collections.Generic.IComparer<AkBaseInformation> CompareByGuid = new _CompareByGuid();
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class AkInformation : AkBaseInformation
|
||||
{
|
||||
public string Path;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class GroupValue : AkInformation
|
||||
{
|
||||
public System.Collections.Generic.List<AkBaseInformation> values =
|
||||
new System.Collections.Generic.List<AkBaseInformation>();
|
||||
|
||||
[UnityEngine.HideInInspector]
|
||||
[UnityEngine.SerializeField]
|
||||
private System.Collections.Generic.List<ByteArrayWrapper> ValueGuids =
|
||||
new System.Collections.Generic.List<ByteArrayWrapper>();
|
||||
[UnityEngine.HideInInspector]
|
||||
[UnityEngine.SerializeField]
|
||||
private System.Collections.Generic.List<PathElement> ValueIcons = new System.Collections.Generic.List<PathElement>();
|
||||
[UnityEngine.HideInInspector]
|
||||
[UnityEngine.SerializeField]
|
||||
[UnityEngine.Serialization.FormerlySerializedAs("values")]
|
||||
private System.Collections.Generic.List<string> valuesInternal = new System.Collections.Generic.List<string>();
|
||||
|
||||
public void Migrate()
|
||||
{
|
||||
var count = ValueGuids.Count;
|
||||
if (count < 1 || count != ValueIcons.Count || count != valuesInternal.Count)
|
||||
return;
|
||||
|
||||
values.Clear();
|
||||
for (var i = 0; i < count; ++i)
|
||||
{
|
||||
var value = new AkBaseInformation
|
||||
{
|
||||
Name = valuesInternal[i],
|
||||
Guid = GetGuid(ValueGuids[i].bytes)
|
||||
};
|
||||
value.PathAndIcons.Add(ValueIcons[i]);
|
||||
values.Add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class Event : AkInformation
|
||||
{
|
||||
public float maxAttenuation;
|
||||
public float maxDuration = -1;
|
||||
public float minDuration = -1;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class WorkUnit : System.IComparable
|
||||
{
|
||||
public string PhysicalPath;
|
||||
|
||||
[UnityEngine.HideInInspector]
|
||||
public System.Collections.Generic.List<PathElement> PathAndIcons = new System.Collections.Generic.List<PathElement>();
|
||||
|
||||
[UnityEngine.Serialization.FormerlySerializedAs("ParentPhysicalPath")]
|
||||
public string ParentPath;
|
||||
|
||||
[UnityEngine.HideInInspector]
|
||||
[UnityEngine.SerializeField]
|
||||
private byte[] guid = null;
|
||||
|
||||
[UnityEngine.HideInInspector]
|
||||
[UnityEngine.SerializeField]
|
||||
[UnityEngine.Serialization.FormerlySerializedAs("Guid")]
|
||||
private string GuidInternal = string.Empty;
|
||||
|
||||
public System.Guid Guid
|
||||
{
|
||||
get { return GetGuid(guid); }
|
||||
set { guid = value.ToByteArray(); }
|
||||
}
|
||||
|
||||
[UnityEngine.HideInInspector]
|
||||
[UnityEngine.SerializeField]
|
||||
private long m_lastTime;
|
||||
|
||||
public System.DateTime LastTime
|
||||
{
|
||||
get { return m_lastTime == 0 ? System.DateTime.MinValue : System.DateTime.FromBinary(m_lastTime); }
|
||||
set { m_lastTime = value.ToBinary(); }
|
||||
}
|
||||
|
||||
public virtual void Migrate()
|
||||
{
|
||||
try
|
||||
{
|
||||
Guid = new System.Guid(GuidInternal);
|
||||
}
|
||||
catch
|
||||
{
|
||||
Guid = System.Guid.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
int System.IComparable.CompareTo(object other)
|
||||
{
|
||||
if (other == null)
|
||||
return 1;
|
||||
|
||||
var otherWwu = other as WorkUnit;
|
||||
if (otherWwu == null)
|
||||
throw new System.ArgumentException("Object is not a WorkUnit");
|
||||
|
||||
return PhysicalPath.CompareTo(otherWwu.PhysicalPath);
|
||||
}
|
||||
|
||||
|
||||
public virtual System.Collections.ArrayList GetChildrenArrayList() { return null; }
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class GenericWorkUnit<T> : WorkUnit where T : AkInformation
|
||||
{
|
||||
public System.Collections.Generic.List<T> List = new System.Collections.Generic.List<T>();
|
||||
|
||||
public T Find(string name)
|
||||
{
|
||||
foreach (var item in List)
|
||||
if (item.Name == name)
|
||||
return item;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public override System.Collections.ArrayList GetChildrenArrayList()
|
||||
{
|
||||
return System.Collections.ArrayList.Adapter(List);
|
||||
}
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class AkInfoWorkUnit : GenericWorkUnit<AkInformation> { }
|
||||
|
||||
[System.Serializable]
|
||||
public class EventWorkUnit : GenericWorkUnit<Event> { }
|
||||
|
||||
[System.Serializable]
|
||||
public class GroupValWorkUnit : GenericWorkUnit<GroupValue>
|
||||
{
|
||||
public override void Migrate()
|
||||
{
|
||||
base.Migrate();
|
||||
|
||||
foreach (var item in List)
|
||||
item.Migrate();
|
||||
}
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class PathElement
|
||||
{
|
||||
public string ElementName;
|
||||
public WwiseObjectType ObjectType;
|
||||
|
||||
[UnityEngine.SerializeField]
|
||||
[UnityEngine.HideInInspector]
|
||||
private byte[] guid = null;
|
||||
|
||||
public System.Guid ObjectGuid
|
||||
{
|
||||
get { return GetGuid(guid); }
|
||||
set { guid = value.ToByteArray(); }
|
||||
}
|
||||
|
||||
public PathElement(string Name, WwiseObjectType objType, System.Guid guid)
|
||||
{
|
||||
ElementName = Name;
|
||||
ObjectType = objType;
|
||||
ObjectGuid = guid;
|
||||
}
|
||||
|
||||
public static string GetProjectPathString(System.Collections.Generic.List<PathElement> pathElements, int index)
|
||||
{
|
||||
string path = "";
|
||||
for (int i = 0; i<=index && i < pathElements.Count; i++)
|
||||
{
|
||||
path += $"/{pathElements[i].ElementName}";
|
||||
|
||||
}
|
||||
return path;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c83f5e8f00045594f975747892795e45
|
@ -0,0 +1,149 @@
|
||||
#if UNITY_EDITOR
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
using UnityEngine;
|
||||
using UnityEngine.Assertions;
|
||||
using UnityEditor;
|
||||
|
||||
public static class AkWwiseProjectInfo
|
||||
{
|
||||
private const string _dataFileName = "AkWwiseProjectData.asset";
|
||||
private static string s_wwiseEditorDirectory = System.IO.Path.Combine("Wwise", "Editor").Replace('\\','/');
|
||||
private static string s_dataRelativeDirectory = System.IO.Path.Combine(s_wwiseEditorDirectory, "ProjectData").Replace('\\','/');
|
||||
private static string s_dataRelativePath = System.IO.Path.Combine(s_dataRelativeDirectory, _dataFileName).Replace('\\','/');
|
||||
private static string s_dataAssetPath = System.IO.Path.Combine("Assets", s_dataRelativePath).Replace('\\','/');
|
||||
|
||||
public static AkWwiseProjectData ProjectData;
|
||||
private static AkWwiseTreeWAAPIDataSource _waapiPickerData = new AkWwiseTreeWAAPIDataSource();
|
||||
private static AkWwiseTreeProjectDataSource _projectPickerData = new AkWwiseTreeProjectDataSource();
|
||||
|
||||
public enum DataSourceType
|
||||
{
|
||||
WwiseAuthoring,
|
||||
FileSystem
|
||||
}
|
||||
|
||||
public static AkWwiseTreeWAAPIDataSource WaapiPickerData
|
||||
{
|
||||
get
|
||||
{
|
||||
return _waapiPickerData;
|
||||
}
|
||||
}
|
||||
|
||||
public static AkWwiseTreeProjectDataSource ProjectPickerData
|
||||
{
|
||||
get
|
||||
{
|
||||
return _projectPickerData;
|
||||
}
|
||||
}
|
||||
|
||||
public static AkWwiseTreeDataSource GetTreeData()
|
||||
{
|
||||
AkWwiseTreeDataSource treeData;
|
||||
if (GetData().currentDataSource == DataSourceType.WwiseAuthoring)
|
||||
{
|
||||
treeData = WaapiPickerData;
|
||||
}
|
||||
else
|
||||
{
|
||||
treeData = ProjectPickerData;
|
||||
}
|
||||
return treeData;
|
||||
}
|
||||
|
||||
private static bool WwiseFolderExists()
|
||||
{
|
||||
return System.IO.Directory.Exists(System.IO.Path.Combine(UnityEngine.Application.dataPath, "Wwise"));
|
||||
}
|
||||
|
||||
public static AkWwiseProjectData GetData()
|
||||
{
|
||||
if (ProjectData == null && WwiseFolderExists())
|
||||
{
|
||||
try
|
||||
{
|
||||
ProjectData = UnityEditor.AssetDatabase.LoadAssetAtPath<AkWwiseProjectData>(s_dataAssetPath);
|
||||
|
||||
if (ProjectData == null)
|
||||
{
|
||||
var dataAbsolutePath = System.IO.Path.Combine(UnityEngine.Application.dataPath, s_dataRelativePath);
|
||||
var dataExists = System.IO.File.Exists(dataAbsolutePath);
|
||||
|
||||
if (dataExists)
|
||||
{
|
||||
UnityEngine.Debug.LogWarning("WwiseUnity: Unable to load asset at <" + dataAbsolutePath + ">.");
|
||||
}
|
||||
else
|
||||
{
|
||||
var dataAbsoluteDirectory = System.IO.Path.Combine(UnityEngine.Application.dataPath, s_dataRelativeDirectory);
|
||||
if (!System.IO.Directory.Exists(dataAbsoluteDirectory))
|
||||
System.IO.Directory.CreateDirectory(dataAbsoluteDirectory);
|
||||
}
|
||||
|
||||
CreateWwiseProjectData();
|
||||
}
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
UnityEngine.Debug.LogError("WwiseUnity: Unable to load Wwise Data: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
return ProjectData;
|
||||
}
|
||||
|
||||
private static void CreateWwiseProjectData()
|
||||
{
|
||||
ProjectData = UnityEngine.ScriptableObject.CreateInstance<AkWwiseProjectData>();
|
||||
//ProjectData is null when CreateInstance is called too early during editor initialization
|
||||
if (ProjectData != null)
|
||||
{
|
||||
//Handle edge cases where we might queue up multiple calls to CreateWwiseProjectData
|
||||
//This happens on editor open if the asset is deleted while Unity is closed
|
||||
if (!UnityEditor.AssetDatabase.Contains(ProjectData))
|
||||
{
|
||||
Debug.Log("WwiseUnity : Created new AkWwiseProjectData asset");
|
||||
UnityEditor.AssetDatabase.CreateAsset(ProjectData, s_dataAssetPath);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("WwiseUnity : Can't create AkWwiseProjectData asset because it is null");
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Populate()
|
||||
{
|
||||
var bDirty = false;
|
||||
if (AkUtilities.IsWwiseProjectAvailable)
|
||||
{
|
||||
bDirty = AkWwiseWWUBuilder.Populate();
|
||||
bDirty |= AkWwiseJSONBuilder.Populate();
|
||||
if (bDirty)
|
||||
{
|
||||
UnityEditor.EditorUtility.SetDirty(GetData());
|
||||
UnityEditor.AssetDatabase.SaveAssets();
|
||||
UnityEditor.AssetDatabase.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
return bDirty;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa3e0ccbbff4b444994af79dab7067d6
|
@ -0,0 +1,289 @@
|
||||
#if UNITY_EDITOR
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor.IMGUI.Controls;
|
||||
|
||||
public abstract class AkWwiseTreeDataSource
|
||||
{
|
||||
public class TreeItems
|
||||
{
|
||||
public Dictionary<System.Guid, AkWwiseTreeViewItem> ItemDict;
|
||||
|
||||
|
||||
public TreeItems()
|
||||
{
|
||||
ItemDict = new Dictionary<System.Guid, AkWwiseTreeViewItem>();
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
ItemDict.Clear();
|
||||
}
|
||||
public void Add(AkWwiseTreeViewItem item)
|
||||
{
|
||||
try
|
||||
{
|
||||
ItemDict[item.objectGuid] = item;
|
||||
}
|
||||
catch (System.ArgumentException e)
|
||||
{
|
||||
UnityEngine.Debug.LogError(e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public TreeItems Data;
|
||||
|
||||
public AkWwiseTreeViewItem ProjectRoot { get; protected set; }
|
||||
public Dictionary<WwiseObjectType, AkWwiseTreeViewItem> wwiseObjectFolders;
|
||||
|
||||
public AkWwiseTreeViewItem SearchRoot { get; protected set; }
|
||||
|
||||
public TreeItems SearchData;
|
||||
|
||||
public AkWwiseTreeView TreeView { protected get; set; }
|
||||
|
||||
public event System.Action modelChanged;
|
||||
|
||||
public AkWwiseTreeViewItem CreateProjectRootItem()
|
||||
{
|
||||
return new AkWwiseTreeViewItem(System.IO.Path.GetFileNameWithoutExtension(AkWwiseEditorSettings.Instance.WwiseProjectPath),
|
||||
-1, GenerateUniqueID(), System.Guid.Empty, WwiseObjectType.Project);
|
||||
}
|
||||
|
||||
protected int m_MaxID;
|
||||
public int GenerateUniqueID()
|
||||
{
|
||||
return ++m_MaxID;
|
||||
}
|
||||
|
||||
public AkWwiseTreeDataSource()
|
||||
{
|
||||
Data = new TreeItems();
|
||||
wwiseObjectFolders = new Dictionary<WwiseObjectType, AkWwiseTreeViewItem>();
|
||||
ProjectRoot = CreateProjectRootItem();
|
||||
}
|
||||
|
||||
public AkWwiseTreeViewItem FindById(int id)
|
||||
{
|
||||
if (m_MaxID < id)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return Data.ItemDict.Values.FirstOrDefault(element => element.id == id);
|
||||
}
|
||||
|
||||
public AkWwiseTreeViewItem FindByGuid(System.Guid guid)
|
||||
{
|
||||
return TreeUtility.FindByGuid(Data, guid);
|
||||
}
|
||||
|
||||
public AkWwiseTreeViewItem FindInSearchResults(System.Guid guid)
|
||||
{
|
||||
return TreeUtility.FindByGuid(SearchData, guid);
|
||||
}
|
||||
|
||||
public IEnumerable<System.Guid> GetGuidsFromIds(IEnumerable<int> ids)
|
||||
{
|
||||
if (Data.ItemDict.Count == 0) return new List<System.Guid>();
|
||||
return Data.ItemDict.Values.Where(el => ids.Contains(el.id)).Select(el => el.objectGuid);
|
||||
}
|
||||
|
||||
public IEnumerable<int> GetIdsFromGuids(IEnumerable<System.Guid> guids)
|
||||
{
|
||||
if (Data.ItemDict.Count == 0) return new List<int>();
|
||||
return Data.ItemDict.Values.Where(el => guids.Contains(el.objectGuid)).Select(el => el.id);
|
||||
}
|
||||
|
||||
public IList<int> GetAncestors(int id)
|
||||
{
|
||||
var parents = new List<int>();
|
||||
TreeViewItem el = FindById(id);
|
||||
if (el != null)
|
||||
{
|
||||
while (el.parent != null)
|
||||
{
|
||||
parents.Add(el.parent.id);
|
||||
el = el.parent;
|
||||
}
|
||||
}
|
||||
return parents;
|
||||
}
|
||||
|
||||
public IList<int> GetDescendantsThatHaveChildren(int id)
|
||||
{
|
||||
AkWwiseTreeViewItem searchFromThis = FindById(id);
|
||||
if (searchFromThis != null)
|
||||
{
|
||||
return GetParentsBelowStackBased(searchFromThis);
|
||||
}
|
||||
return new List<int>();
|
||||
}
|
||||
|
||||
IList<int> GetParentsBelowStackBased(AkWwiseTreeViewItem searchFromThis)
|
||||
{
|
||||
Stack<AkWwiseTreeViewItem> stack = new Stack<AkWwiseTreeViewItem>();
|
||||
stack.Push(searchFromThis);
|
||||
|
||||
var parentsBelow = new List<int>();
|
||||
while (stack.Count > 0)
|
||||
{
|
||||
AkWwiseTreeViewItem current = stack.Pop();
|
||||
if (current.hasChildren)
|
||||
{
|
||||
parentsBelow.Add(current.id);
|
||||
foreach (AkWwiseTreeViewItem el in current.children)
|
||||
{
|
||||
stack.Push(el);
|
||||
}
|
||||
}
|
||||
}
|
||||
return parentsBelow;
|
||||
}
|
||||
|
||||
abstract public AkWwiseTreeViewItem GetComponentDataRoot(WwiseObjectType objectType);
|
||||
|
||||
protected void Changed()
|
||||
{
|
||||
if (modelChanged != null)
|
||||
modelChanged();
|
||||
}
|
||||
|
||||
public bool IsExpanded(TreeViewState state, int id)
|
||||
{
|
||||
if (ProjectRoot != null && id == ProjectRoot.id)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return state.expandedIDs.BinarySearch(id) >= 0;
|
||||
}
|
||||
|
||||
public abstract void FetchData();
|
||||
|
||||
public static int GetDepthFromPath(string path)
|
||||
{
|
||||
return path.Split('\\').Length - 1;
|
||||
}
|
||||
|
||||
public virtual void ScheduleRebuild()
|
||||
{
|
||||
}
|
||||
|
||||
public abstract void SaveExpansionStatus(List<int> itemIds);
|
||||
public abstract List<int> LoadExpansionSatus();
|
||||
|
||||
public string currentSearchString;
|
||||
public bool isSearching = false;
|
||||
public abstract AkWwiseTreeViewItem GetSearchResults();
|
||||
public abstract void UpdateSearchResults(string searchString, WwiseObjectType objectType);
|
||||
public virtual void SelectItem(System.Guid itemGuid)
|
||||
{
|
||||
bool success = TreeView.ExpandItem(itemGuid, true);
|
||||
if (!success)
|
||||
{
|
||||
UnityEditor.EditorApplication.delayCall += () => { SelectItem(itemGuid); };
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public virtual void LoadComponentData(WwiseObjectType objectType) { }
|
||||
public virtual void ItemSelected(AkWwiseTreeViewItem itemID) { }
|
||||
public virtual void SelectObjectInAuthoring(System.Guid objectGuid) { }
|
||||
public abstract void SetExpanded(IEnumerable<System.Guid> ids);
|
||||
}
|
||||
|
||||
#region Utility Functions
|
||||
public static class TreeUtility
|
||||
{
|
||||
public static void CopyTree(AkWwiseTreeViewItem sourceRoot, AkWwiseTreeViewItem destRoot)
|
||||
{
|
||||
for (int i = 0; i < sourceRoot.children.Count(); i++)
|
||||
{
|
||||
var currItem = sourceRoot.children[i];
|
||||
var newItem = new AkWwiseTreeViewItem(currItem as AkWwiseTreeViewItem);
|
||||
CopyTree(currItem as AkWwiseTreeViewItem, newItem);
|
||||
destRoot.AddWwiseItemChild(newItem);
|
||||
}
|
||||
}
|
||||
|
||||
public static void TreeToList(AkWwiseTreeViewItem root, ref AkWwiseTreeDataSource.TreeItems result)
|
||||
{
|
||||
if (root == null)
|
||||
return;
|
||||
|
||||
if (result == null)
|
||||
return;
|
||||
|
||||
result.Clear();
|
||||
|
||||
Stack<AkWwiseTreeViewItem> stack = new Stack<AkWwiseTreeViewItem>();
|
||||
stack.Push(root);
|
||||
|
||||
while (stack.Count > 0)
|
||||
{
|
||||
AkWwiseTreeViewItem current = stack.Pop();
|
||||
result.Add(current);
|
||||
|
||||
if (current.children != null && current.children.Count > 0)
|
||||
{
|
||||
for (int i = current.children.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (current.children[i] != null)
|
||||
{
|
||||
stack.Push((AkWwiseTreeViewItem)current.children[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void SortTreeIfNecessary(AkWwiseTreeViewItem rootElement)
|
||||
{
|
||||
if (rootElement.hasChildren)
|
||||
{
|
||||
if (!rootElement.isSorted)
|
||||
{
|
||||
rootElement.SortChildren();
|
||||
}
|
||||
foreach (AkWwiseTreeViewItem child in rootElement.children)
|
||||
{
|
||||
SortTreeIfNecessary(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static AkWwiseTreeViewItem FindByGuid(IEnumerable<AkWwiseTreeViewItem> data, System.Guid guid)
|
||||
{
|
||||
return data.FirstOrDefault(element => element.objectGuid == guid);
|
||||
}
|
||||
|
||||
|
||||
public static AkWwiseTreeViewItem FindByGuid(AkWwiseTreeDataSource.TreeItems data, System.Guid guid)
|
||||
{
|
||||
if (!data.ItemDict.ContainsKey(guid))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return data.ItemDict[guid];
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5617791cdaa5b4c48ad498f6d85bd870
|
@ -0,0 +1,303 @@
|
||||
#if UNITY_EDITOR
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class AkWwiseTreeProjectDataSource : AkWwiseTreeDataSource
|
||||
{
|
||||
|
||||
public AkWwiseTreeProjectDataSource() : base()
|
||||
{
|
||||
}
|
||||
|
||||
public override void FetchData()
|
||||
{
|
||||
Data.Clear();
|
||||
m_MaxID = 0;
|
||||
InitializeMinimal();
|
||||
Changed();
|
||||
}
|
||||
|
||||
protected void InitializeMinimal()
|
||||
{
|
||||
ProjectRoot = CreateProjectRootItem();
|
||||
|
||||
ProjectRoot.AddWwiseItemChild(BuildObjectTypeTree(WwiseObjectType.Event));
|
||||
ProjectRoot.AddWwiseItemChild(BuildObjectTypeTree(WwiseObjectType.Switch));
|
||||
ProjectRoot.AddWwiseItemChild(BuildObjectTypeTree(WwiseObjectType.State));
|
||||
ProjectRoot.AddWwiseItemChild(BuildObjectTypeTree(WwiseObjectType.Soundbank));
|
||||
ProjectRoot.AddWwiseItemChild(BuildObjectTypeTree(WwiseObjectType.AuxBus));
|
||||
ProjectRoot.AddWwiseItemChild(BuildObjectTypeTree(WwiseObjectType.AcousticTexture));
|
||||
|
||||
TreeUtility.TreeToList(ProjectRoot, ref Data);
|
||||
}
|
||||
|
||||
public override AkWwiseTreeViewItem GetComponentDataRoot(WwiseObjectType objectType)
|
||||
{
|
||||
if (!wwiseObjectFolders.ContainsKey(objectType))
|
||||
ProjectRoot.AddWwiseItemChild(BuildObjectTypeTree(objectType));
|
||||
|
||||
var tempProjectRoot = new AkWwiseTreeViewItem(ProjectRoot);
|
||||
tempProjectRoot.AddWwiseItemChild(wwiseObjectFolders[objectType]);
|
||||
return tempProjectRoot;
|
||||
}
|
||||
|
||||
protected AkWwiseTreeViewItem BuildObjectTypeTree(WwiseObjectType objectType)
|
||||
{
|
||||
var rootElement = new AkWwiseTreeViewItem();
|
||||
switch (objectType)
|
||||
{
|
||||
case WwiseObjectType.AuxBus:
|
||||
rootElement = BuildTree("Master-Mixer Hierarchy", AkWwiseProjectInfo.GetData().AuxBusWwu);
|
||||
break;
|
||||
|
||||
case WwiseObjectType.Event:
|
||||
rootElement = BuildTree("Events", AkWwiseProjectInfo.GetData().EventWwu);
|
||||
break;
|
||||
|
||||
case WwiseObjectType.Soundbank:
|
||||
rootElement = BuildTree("SoundBanks", AkWwiseProjectInfo.GetData().BankWwu);
|
||||
break;
|
||||
|
||||
case WwiseObjectType.State:
|
||||
rootElement = BuildTree("States", AkWwiseProjectInfo.GetData().StateWwu);
|
||||
break;
|
||||
|
||||
case WwiseObjectType.Switch:
|
||||
case WwiseObjectType.SwitchGroup:
|
||||
rootElement = BuildTree("Switches", AkWwiseProjectInfo.GetData().SwitchWwu);
|
||||
break;
|
||||
|
||||
case WwiseObjectType.GameParameter:
|
||||
rootElement = BuildTree("Game Parameters", AkWwiseProjectInfo.GetData().RtpcWwu);
|
||||
break;
|
||||
|
||||
case WwiseObjectType.Trigger:
|
||||
rootElement = BuildTree("Triggers", AkWwiseProjectInfo.GetData().TriggerWwu);
|
||||
break;
|
||||
|
||||
case WwiseObjectType.AcousticTexture:
|
||||
rootElement = BuildTree("Virtual Acoustics", AkWwiseProjectInfo.GetData().AcousticTextureWwu);
|
||||
break;
|
||||
}
|
||||
wwiseObjectFolders[objectType] = rootElement;
|
||||
return rootElement;
|
||||
}
|
||||
|
||||
public AkWwiseTreeViewItem BuildTree(string name,
|
||||
List<AkWwiseProjectData.EventWorkUnit> Events)
|
||||
{
|
||||
var akInfoWwu = new List<AkWwiseProjectData.AkInfoWorkUnit>(Events.Count);
|
||||
for (var i = 0; i < Events.Count; i++)
|
||||
{
|
||||
akInfoWwu.Add(new AkWwiseProjectData.AkInfoWorkUnit());
|
||||
akInfoWwu[i].PhysicalPath = Events[i].PhysicalPath;
|
||||
akInfoWwu[i].ParentPath = Events[i].ParentPath;
|
||||
akInfoWwu[i].PathAndIcons = Events[i].PathAndIcons;
|
||||
akInfoWwu[i].Guid = Events[i].Guid;
|
||||
akInfoWwu[i].List = Events[i].List.ConvertAll(x => (AkWwiseProjectData.AkInformation)x);
|
||||
}
|
||||
return BuildTree(name, akInfoWwu);
|
||||
}
|
||||
|
||||
public AkWwiseTreeViewItem BuildTree(string name, List<AkWwiseProjectData.GroupValWorkUnit> workUnits)
|
||||
{
|
||||
var rootFolder = new AkWwiseTreeViewItem(name, 1, GenerateUniqueID(), System.Guid.NewGuid(), WwiseObjectType.PhysicalFolder);
|
||||
foreach (var wwu in workUnits)
|
||||
{
|
||||
var wwuItem = AddTreeItem(rootFolder, wwu.PathAndIcons);
|
||||
|
||||
foreach (var group in wwu.List)
|
||||
{
|
||||
var groupElement = AddTreeItem(wwuItem, group.PathAndIcons);
|
||||
|
||||
foreach (var child in group.values)
|
||||
{
|
||||
AddTreeItem(groupElement, child.PathAndIcons);
|
||||
}
|
||||
}
|
||||
}
|
||||
return rootFolder;
|
||||
}
|
||||
|
||||
private AkWwiseTreeViewItem BuildTree(string name, List<AkWwiseProjectData.AkInfoWorkUnit> workUnits)
|
||||
{
|
||||
var rootFolder = new AkWwiseTreeViewItem(name, 1, GenerateUniqueID(), System.Guid.NewGuid(), WwiseObjectType.PhysicalFolder);
|
||||
|
||||
foreach (var wwu in workUnits)
|
||||
{
|
||||
var wwuElement = AddTreeItem(rootFolder, wwu.PathAndIcons);
|
||||
if (wwu.List.Count > 0)
|
||||
{
|
||||
foreach (var akInfo in wwu.List)
|
||||
{
|
||||
AddTreeItem(wwuElement, akInfo.PathAndIcons);
|
||||
}
|
||||
}
|
||||
}
|
||||
return rootFolder;
|
||||
}
|
||||
|
||||
private AkWwiseTreeViewItem AddTreeItem(AkWwiseTreeViewItem parentWorkUnit, List<AkWwiseProjectData.PathElement> pathAndIcons)
|
||||
{
|
||||
var pathDepth = pathAndIcons.Count;
|
||||
var treeDepth = pathDepth + 1;
|
||||
AkWwiseTreeViewItem newItem;
|
||||
AkWwiseProjectData.PathElement pathElem;
|
||||
var parent = parentWorkUnit;
|
||||
|
||||
if (pathDepth > parentWorkUnit.depth)
|
||||
{
|
||||
var unaccountedDepth = pathDepth - parentWorkUnit.depth;
|
||||
for (; unaccountedDepth > 0; unaccountedDepth--)
|
||||
{
|
||||
var pathIndex = pathAndIcons.Count - unaccountedDepth;
|
||||
pathElem = pathAndIcons[pathIndex];
|
||||
if (pathElem.ObjectGuid == System.Guid.Empty)
|
||||
{
|
||||
var path = AkWwiseProjectData.PathElement.GetProjectPathString(pathAndIcons, pathIndex);
|
||||
newItem = Find(pathElem.ObjectGuid, pathElem.ElementName, path);
|
||||
}
|
||||
else
|
||||
{
|
||||
newItem = FindByGuid(pathElem.ObjectGuid);
|
||||
}
|
||||
|
||||
if (newItem == null)
|
||||
{
|
||||
newItem = new AkWwiseTreeViewItem(pathElem.ElementName, treeDepth - unaccountedDepth, GenerateUniqueID(), pathElem.ObjectGuid, pathElem.ObjectType);
|
||||
parent.AddWwiseItemChild(newItem);
|
||||
Data.Add(newItem);
|
||||
|
||||
}
|
||||
parent = newItem;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
pathElem = pathAndIcons.Last();
|
||||
newItem = FindByGuid(pathElem.ObjectGuid);
|
||||
|
||||
if (newItem == null)
|
||||
{
|
||||
newItem = new AkWwiseTreeViewItem(pathElem.ElementName, treeDepth, GenerateUniqueID(), pathElem.ObjectGuid, pathElem.ObjectType);
|
||||
parent.AddWwiseItemChild(newItem);
|
||||
Data.Add(newItem);
|
||||
}
|
||||
return newItem;
|
||||
}
|
||||
|
||||
public AkWwiseTreeViewItem Find(System.Guid guid, string name, string path)
|
||||
{
|
||||
if (guid.Equals(System.Guid.Empty))
|
||||
{
|
||||
var results = Data.ItemDict.Values.ToList().FindAll(element => element.objectGuid == guid && element.name == name);
|
||||
|
||||
foreach (var r in results)
|
||||
{
|
||||
var itemPath = GetProjectPath(r, "");
|
||||
if (itemPath == path)
|
||||
{
|
||||
return r;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return Data.ItemDict[guid];
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public string GetProjectPath(AkWwiseTreeViewItem item, string currentpath)
|
||||
{
|
||||
currentpath = $"/{item.name}{currentpath}";
|
||||
if (item.parent == null || item.parent == ProjectRoot)
|
||||
{
|
||||
return currentpath;
|
||||
}
|
||||
|
||||
return GetProjectPath(item.parent as AkWwiseTreeViewItem, currentpath);
|
||||
}
|
||||
|
||||
|
||||
public override AkWwiseTreeViewItem GetSearchResults()
|
||||
{
|
||||
return SearchRoot;
|
||||
}
|
||||
|
||||
public override void UpdateSearchResults(string searchString, WwiseObjectType objectType)
|
||||
{
|
||||
SearchRoot = new AkWwiseTreeViewItem(ProjectRoot);
|
||||
if (objectType != WwiseObjectType.None)
|
||||
{
|
||||
SearchRoot = new AkWwiseTreeViewItem(ProjectRoot);
|
||||
var objectRoot = new AkWwiseTreeViewItem(wwiseObjectFolders[objectType]);
|
||||
TreeUtility.CopyTree(wwiseObjectFolders[objectType], objectRoot);
|
||||
SearchRoot.AddWwiseItemChild(objectRoot);
|
||||
}
|
||||
else
|
||||
{
|
||||
TreeUtility.CopyTree(ProjectRoot, SearchRoot);
|
||||
}
|
||||
FilterTree(SearchRoot, searchString);
|
||||
}
|
||||
|
||||
void FilterTree(AkWwiseTreeViewItem treeElement, string searchFilter)
|
||||
{
|
||||
var ItemsToRemove = new List<AkWwiseTreeViewItem>();
|
||||
for (int i = 0; i < treeElement.children.Count(); i++)
|
||||
{
|
||||
var current = treeElement.children[i] as AkWwiseTreeViewItem;
|
||||
FilterTree(current, searchFilter);
|
||||
|
||||
if (current.name.IndexOf(searchFilter, System.StringComparison.OrdinalIgnoreCase) == -1 && current.children.Count == 0)
|
||||
{
|
||||
ItemsToRemove.Add(current);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < ItemsToRemove.Count(); i++)
|
||||
{
|
||||
treeElement.children.Remove(ItemsToRemove[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetExpanded(IEnumerable<System.Guid> ids)
|
||||
{
|
||||
if (TreeView != null)
|
||||
{
|
||||
TreeView.state.expandedIDs = GetIdsFromGuids(ids).ToList();
|
||||
}
|
||||
Changed();
|
||||
}
|
||||
|
||||
public override void SaveExpansionStatus(List<int> expandedItems )
|
||||
{
|
||||
AkWwiseProjectInfo.GetData().ExpandedFileSystemItemIds = expandedItems;
|
||||
}
|
||||
|
||||
public override List<int> LoadExpansionSatus()
|
||||
{
|
||||
return AkWwiseProjectInfo.GetData().ExpandedFileSystemItemIds;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 96ddcf8461d10d74fa80ef8027b7e5d0
|
@ -0,0 +1,972 @@
|
||||
#if UNITY_EDITOR
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor.IMGUI.Controls;
|
||||
public class AkWwiseTreeView : TreeView
|
||||
{
|
||||
|
||||
public enum PickerMode
|
||||
{
|
||||
FullPicker,
|
||||
ComponentPicker
|
||||
}
|
||||
|
||||
private PickerMode m_pickerMode;
|
||||
private WwiseObjectType componentObjectType;
|
||||
|
||||
AkWwisePickerIcons icons;
|
||||
protected AkWwiseTreeDataSource m_dataSource;
|
||||
public AkWwiseTreeDataSource dataSource { get { return m_dataSource; } }
|
||||
readonly IList<AkWwiseTreeViewItem> m_Rows = new List<AkWwiseTreeViewItem>(100);
|
||||
|
||||
public event System.Action treeChanged;
|
||||
|
||||
private static Dictionary<WwiseObjectType, UnityEditor.MonoScript> DragDropMonoScriptMap;
|
||||
private static Dictionary<System.Type, WwiseObjectType> ScriptTypeMap
|
||||
= new Dictionary<System.Type, WwiseObjectType>{
|
||||
{ typeof(AkAmbient), WwiseObjectType.Event },
|
||||
{ typeof(AkBank), WwiseObjectType.Soundbank },
|
||||
{ typeof(AkEnvironment), WwiseObjectType.AuxBus },
|
||||
{ typeof(AkState), WwiseObjectType.State },
|
||||
{ typeof(AkSurfaceReflector), WwiseObjectType.AcousticTexture },
|
||||
{ typeof(AkWwiseTrigger), WwiseObjectType.Trigger },
|
||||
{ typeof(AkSwitch), WwiseObjectType.Switch },
|
||||
};
|
||||
|
||||
|
||||
public AkWwiseTreeView(TreeViewState treeViewState,
|
||||
MultiColumnHeader multiColumnHeader, AkWwiseTreeDataSource data)
|
||||
: base(treeViewState, multiColumnHeader)
|
||||
{
|
||||
m_pickerMode = PickerMode.FullPicker;
|
||||
Initialize(data);
|
||||
Reload();
|
||||
}
|
||||
|
||||
public AkWwiseTreeView(TreeViewState treeViewState,
|
||||
AkWwiseTreeDataSource data, WwiseObjectType componentType)
|
||||
: base(treeViewState)
|
||||
|
||||
{
|
||||
m_pickerMode = PickerMode.ComponentPicker;
|
||||
componentObjectType = componentType;
|
||||
Initialize(data);
|
||||
data.LoadComponentData(componentObjectType);
|
||||
Reload();
|
||||
}
|
||||
|
||||
private void Initialize(AkWwiseTreeDataSource data)
|
||||
{
|
||||
|
||||
m_dataSource = data;
|
||||
m_dataSource.TreeView = this;
|
||||
m_dataSource.modelChanged += ModelChanged;
|
||||
this.LoadExpansionStatus();
|
||||
|
||||
icons = new AkWwisePickerIcons();
|
||||
icons.LoadIcons();
|
||||
|
||||
DragDropEnabled = true;
|
||||
extraSpaceBeforeIconAndLabel = AkWwisePickerIcons.kIconWidth;
|
||||
StoredSearchString = "";
|
||||
|
||||
if (DragDropMonoScriptMap == null)
|
||||
{
|
||||
DragDropMonoScriptMap = new Dictionary<WwiseObjectType, UnityEditor.MonoScript>();
|
||||
|
||||
var scripts = UnityEngine.Resources.FindObjectsOfTypeAll<UnityEditor.MonoScript>();
|
||||
foreach (var script in scripts)
|
||||
{
|
||||
WwiseObjectType wwiseObjectType;
|
||||
var type = script.GetClass();
|
||||
if (type != null && ScriptTypeMap.TryGetValue(type, out wwiseObjectType))
|
||||
DragDropMonoScriptMap[wwiseObjectType] = script;
|
||||
}
|
||||
}
|
||||
|
||||
UnityEditor.EditorApplication.playModeStateChanged += (UnityEditor.PlayModeStateChange playMode) =>
|
||||
{
|
||||
if (playMode == UnityEditor.PlayModeStateChange.ExitingEditMode)
|
||||
SaveExpansionStatus();
|
||||
};
|
||||
UnityEditor.EditorApplication.quitting += SaveExpansionStatus;
|
||||
}
|
||||
|
||||
private bool bSearchStringChanged;
|
||||
public string m_storedSearchString;
|
||||
public string StoredSearchString
|
||||
{
|
||||
get { return m_storedSearchString; }
|
||||
set
|
||||
{
|
||||
if (m_storedSearchString != value)
|
||||
{
|
||||
if (value != string.Empty)
|
||||
{
|
||||
bSearchStringChanged = true;
|
||||
SaveExpansionStatus();
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadExpansionStatus();
|
||||
}
|
||||
}
|
||||
m_storedSearchString = value;
|
||||
searchString = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveExpansionStatus()
|
||||
{
|
||||
//Don't save exansion state when searching
|
||||
if (m_storedSearchString != string.Empty) return;
|
||||
dataSource.SaveExpansionStatus(new List<int>(state.expandedIDs));
|
||||
}
|
||||
|
||||
public void LoadExpansionStatus()
|
||||
{
|
||||
state.expandedIDs = dataSource.LoadExpansionSatus();
|
||||
}
|
||||
|
||||
protected override void ExpandedStateChanged()
|
||||
{
|
||||
if (this.m_storedSearchString == string.Empty)
|
||||
{
|
||||
this.m_dataSource.ScheduleRebuild();
|
||||
}
|
||||
}
|
||||
|
||||
void ModelChanged()
|
||||
{
|
||||
if (treeChanged != null)
|
||||
treeChanged();
|
||||
|
||||
SetDirty();
|
||||
}
|
||||
|
||||
public delegate void DirtyDelegate();
|
||||
public DirtyDelegate dirtyDelegate;
|
||||
public void SetDirty()
|
||||
{
|
||||
dirtyDelegate?.Invoke();
|
||||
}
|
||||
|
||||
public override void OnGUI(UnityEngine.Rect rect)
|
||||
{
|
||||
if (bSearchStringChanged)
|
||||
{
|
||||
if (!m_dataSource.isSearching)
|
||||
{
|
||||
m_dataSource.UpdateSearchResults(searchString, componentObjectType);
|
||||
bSearchStringChanged = false;
|
||||
}
|
||||
}
|
||||
|
||||
base.OnGUI(rect);
|
||||
}
|
||||
|
||||
protected override TreeViewItem BuildRoot()
|
||||
{
|
||||
return m_dataSource.CreateProjectRootItem();
|
||||
}
|
||||
|
||||
public void RebuildRows()
|
||||
{
|
||||
BuildRows(new AkWwiseTreeViewItem());
|
||||
}
|
||||
|
||||
protected override IList<TreeViewItem> BuildRows(
|
||||
TreeViewItem root)
|
||||
{
|
||||
m_Rows.Clear();
|
||||
|
||||
var dataRoot = m_dataSource.ProjectRoot;
|
||||
|
||||
if (m_pickerMode == PickerMode.ComponentPicker)
|
||||
{
|
||||
dataRoot = m_dataSource.GetComponentDataRoot(componentObjectType);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(searchString))
|
||||
{
|
||||
dataRoot = m_dataSource.GetSearchResults();
|
||||
}
|
||||
TreeUtility.SortTreeIfNecessary(dataRoot);
|
||||
AddChildrenRecursive(dataRoot, m_Rows);
|
||||
searchString = "";
|
||||
return m_Rows.Cast<TreeViewItem>().ToList();
|
||||
}
|
||||
|
||||
|
||||
private bool TestExpanded(AkWwiseTreeViewItem node)
|
||||
{
|
||||
if (node.children.Count > 0)
|
||||
{
|
||||
if (node.depth ==-1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return IsExpanded(node.id);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void AddChildrenRecursive(AkWwiseTreeViewItem parent, IList<AkWwiseTreeViewItem> newRows)
|
||||
{
|
||||
if (parent == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (AkWwiseTreeViewItem child in parent.children)
|
||||
{
|
||||
newRows.Add(child);
|
||||
|
||||
if (child.children.Count > 0)
|
||||
{
|
||||
if (TestExpanded(child))
|
||||
{
|
||||
AddChildrenRecursive(child, newRows);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override IList<int> GetAncestors(int id)
|
||||
{
|
||||
return m_dataSource.GetAncestors(id);
|
||||
}
|
||||
|
||||
protected override IList<int> GetDescendantsThatHaveChildren(int id)
|
||||
{
|
||||
return m_dataSource.GetDescendantsThatHaveChildren(id);
|
||||
}
|
||||
|
||||
public AkWwiseTreeViewItem GetItemByGuid(System.Guid guid)
|
||||
{
|
||||
return TreeUtility.FindByGuid(m_Rows, guid);
|
||||
}
|
||||
|
||||
public void SelectItem(System.Guid guid)
|
||||
{
|
||||
var item = m_dataSource.FindByGuid(guid);
|
||||
if (item == null && AkWwiseProjectInfo.GetData().currentDataSource == AkWwiseProjectInfo.DataSourceType.WwiseAuthoring)
|
||||
{
|
||||
m_dataSource.SelectItem(guid);
|
||||
}
|
||||
else
|
||||
{
|
||||
HighlightItem(item, true);
|
||||
}
|
||||
}
|
||||
|
||||
public bool ExpandItem(System.Guid guid, bool select)
|
||||
{
|
||||
var item = GetItemByGuid(guid);
|
||||
if (item != null)
|
||||
{
|
||||
HighlightItem(item, select);
|
||||
return true;
|
||||
}
|
||||
|
||||
item = m_dataSource.FindByGuid(guid);
|
||||
if (item != null)
|
||||
{
|
||||
AkWwiseTreeViewItem parent = item;
|
||||
while (parent.parent != null && GetItemByGuid(parent.objectGuid) == null)
|
||||
{
|
||||
parent = parent.parent as AkWwiseTreeViewItem;
|
||||
}
|
||||
if (parent != null)
|
||||
{
|
||||
SetExpandedRecursive(parent.id, true);
|
||||
if (select)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public void HighlightItem(AkWwiseTreeViewItem item, bool select)
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
FrameItem(item.id);
|
||||
if (select)
|
||||
{
|
||||
SetSelection(new List<int>() { item.id });
|
||||
}
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
|
||||
#region Mulicolumn
|
||||
enum ObjectColumns
|
||||
{
|
||||
Name,
|
||||
Guid,
|
||||
Depth,
|
||||
}
|
||||
|
||||
public static MultiColumnHeaderState CreateDefaultMultiColumnHeaderState()
|
||||
{
|
||||
var columns = new[]
|
||||
{
|
||||
new MultiColumnHeaderState.Column
|
||||
{
|
||||
headerContent = new UnityEngine.GUIContent("Name"),
|
||||
headerTextAlignment = UnityEngine.TextAlignment.Left,
|
||||
sortedAscending = true,
|
||||
sortingArrowAlignment = UnityEngine.TextAlignment.Center,
|
||||
width = 300,
|
||||
minWidth = 200,
|
||||
autoResize = true,
|
||||
allowToggleVisibility = false
|
||||
},
|
||||
};
|
||||
|
||||
var state = new MultiColumnHeaderState(columns);
|
||||
return state;
|
||||
}
|
||||
|
||||
|
||||
public static MultiColumnHeaderState CreateDebug()
|
||||
{
|
||||
var columns = new[]
|
||||
{
|
||||
new MultiColumnHeaderState.Column
|
||||
{
|
||||
headerContent = new UnityEngine.GUIContent("Name"),
|
||||
headerTextAlignment = UnityEngine.TextAlignment.Left,
|
||||
sortedAscending = true,
|
||||
sortingArrowAlignment = UnityEngine.TextAlignment.Center,
|
||||
width = 300,
|
||||
minWidth = 200,
|
||||
autoResize = true,
|
||||
allowToggleVisibility = false
|
||||
},
|
||||
new MultiColumnHeaderState.Column
|
||||
{
|
||||
headerContent = new UnityEngine.GUIContent("Guid"),
|
||||
headerTextAlignment = UnityEngine.TextAlignment.Right,
|
||||
sortedAscending = true,
|
||||
sortingArrowAlignment = UnityEngine.TextAlignment.Left,
|
||||
width = 200,
|
||||
minWidth = 60,
|
||||
autoResize = true
|
||||
},
|
||||
new MultiColumnHeaderState.Column
|
||||
{
|
||||
headerContent = new UnityEngine.GUIContent("depth"),
|
||||
headerTextAlignment = UnityEngine.TextAlignment.Right,
|
||||
sortedAscending = true,
|
||||
sortingArrowAlignment = UnityEngine.TextAlignment.Left,
|
||||
width = 200,
|
||||
minWidth = 60,
|
||||
autoResize = true
|
||||
},
|
||||
};
|
||||
|
||||
var state = new MultiColumnHeaderState(columns);
|
||||
return state;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Search
|
||||
|
||||
protected void SearchStringChanged(string lastSearch, string newSearch)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Drawing
|
||||
protected override void AfterRowsGUI()
|
||||
{
|
||||
base.AfterRowsGUI();
|
||||
this.searchString = StoredSearchString;
|
||||
}
|
||||
|
||||
//check here to see if multicolumn or not
|
||||
protected override void RowGUI(RowGUIArgs args)
|
||||
{
|
||||
var evt = UnityEngine.Event.current;
|
||||
var item = (AkWwiseTreeViewItem)args.item;
|
||||
if (m_pickerMode == PickerMode.ComponentPicker)
|
||||
{
|
||||
CellGUI(args.rowRect, item, ObjectColumns.Name, ref args);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < args.GetNumVisibleColumns(); ++i)
|
||||
{
|
||||
CellGUI(args.GetCellRect(i), item, (ObjectColumns)args.GetColumn(i), ref args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CellGUI(UnityEngine.Rect cellRect, AkWwiseTreeViewItem item, ObjectColumns column, ref RowGUIArgs args)
|
||||
{
|
||||
// Center cell rect vertically (makes it easier to place controls, icons etc in the cells)
|
||||
CenterRectUsingSingleLineHeight(ref cellRect);
|
||||
|
||||
switch (column)
|
||||
{
|
||||
case ObjectColumns.Name:
|
||||
{
|
||||
UnityEngine.Rect iconRect = new UnityEngine.Rect(cellRect);
|
||||
iconRect.x += GetContentIndent(item);
|
||||
iconRect.width = AkWwisePickerIcons.kIconWidth;
|
||||
UnityEngine.GUI.DrawTexture(iconRect, icons.GetIcon(item.objectType), UnityEngine.ScaleMode.ScaleToFit);
|
||||
//// Default icon and label
|
||||
args.rowRect = cellRect;
|
||||
base.RowGUI(args);
|
||||
}
|
||||
break;
|
||||
case ObjectColumns.Guid:
|
||||
{
|
||||
UnityEngine.GUI.Label(cellRect, item.objectGuid.ToString());
|
||||
}
|
||||
break;
|
||||
case ObjectColumns.Depth:
|
||||
{
|
||||
UnityEngine.GUI.Label(cellRect, item.depth.ToString());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetExpandedUpwardsRecursive(TreeViewItem item)
|
||||
{
|
||||
if (item == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
SetExpanded(item.id, true);
|
||||
SetExpandedUpwardsRecursive(item.parent);
|
||||
}
|
||||
|
||||
public AkWwiseTreeViewItem Find(int id)
|
||||
{
|
||||
var result = this.m_Rows.FirstOrDefault(element => element.id == id);
|
||||
return result as AkWwiseTreeViewItem;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region click and drag/drop
|
||||
protected override bool CanMultiSelect(TreeViewItem item)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override void SelectionChanged(IList<int> selectedIds)
|
||||
{
|
||||
dataSource.ItemSelected(Find(selectedIds.Last()));
|
||||
base.SelectionChanged(selectedIds);
|
||||
}
|
||||
|
||||
public bool CheckWaapi()
|
||||
{
|
||||
return AkWwiseEditorSettings.Instance.UseWaapi && AkWaapiUtilities.IsConnected() &&
|
||||
AkWwiseProjectInfo.GetData().currentDataSource == AkWwiseProjectInfo.DataSourceType.WwiseAuthoring;
|
||||
}
|
||||
|
||||
protected override void ContextClickedItem(int id)
|
||||
{
|
||||
UnityEditor.GenericMenu menu = new UnityEditor.GenericMenu();
|
||||
var item = Find(id);
|
||||
if (CheckWaapi())
|
||||
{
|
||||
if (CanPlay(item))
|
||||
menu.AddItem(UnityEditor.EditorGUIUtility.TrTextContent("Play \u2215 Stop _SPACE"), false,
|
||||
() => AkWaapiUtilities.TogglePlayEvent(item.objectType, item.objectGuid));
|
||||
else
|
||||
menu.AddDisabledItem(UnityEditor.EditorGUIUtility.TrTextContent("Play \u2215 Stop _Space"));
|
||||
|
||||
menu.AddItem(UnityEditor.EditorGUIUtility.TrTextContent("Stop All"), false,
|
||||
() => AkWaapiUtilities.StopAllTransports());
|
||||
|
||||
menu.AddSeparator("");
|
||||
|
||||
if (CanRenameWithLog(item, false))
|
||||
menu.AddItem(UnityEditor.EditorGUIUtility.TrTextContent("Rename _F2"), false,
|
||||
() => BeginRename(item));
|
||||
else
|
||||
menu.AddDisabledItem(UnityEditor.EditorGUIUtility.TrTextContent("Rename"));
|
||||
|
||||
if (CanDelete(item, false))
|
||||
menu.AddItem(UnityEditor.EditorGUIUtility.TrTextContent("Delete _Delete"), false,
|
||||
() => AkWaapiUtilities.Delete(item.objectGuid));
|
||||
else
|
||||
menu.AddDisabledItem(UnityEditor.EditorGUIUtility.TrTextContent("Delete"));
|
||||
|
||||
menu.AddSeparator("");
|
||||
if (item.objectType == WwiseObjectType.Soundbank)
|
||||
{
|
||||
menu.AddItem(UnityEditor.EditorGUIUtility.TrTextContent("Open Folder/WorkUnit #O"), false,
|
||||
() => AkWaapiUtilities.OpenWorkUnitInExplorer(item.objectGuid));
|
||||
menu.AddItem(UnityEditor.EditorGUIUtility.TrTextContent("Open Folder/SoundBank "), false,
|
||||
() => AkWaapiUtilities.OpenSoundBankInExplorer(item.objectGuid));
|
||||
}
|
||||
else
|
||||
{
|
||||
menu.AddItem(UnityEditor.EditorGUIUtility.TrTextContent("Open Containing Folder #O"), false,
|
||||
() => AkWaapiUtilities.OpenWorkUnitInExplorer(item.objectGuid));
|
||||
}
|
||||
|
||||
menu.AddItem(UnityEditor.EditorGUIUtility.TrTextContent("Find in Project Explorer #F"), false,
|
||||
() => m_dataSource.SelectObjectInAuthoring(item.objectGuid));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (AkWwiseProjectInfo.GetData().currentDataSource == AkWwiseProjectInfo.DataSourceType.WwiseAuthoring)
|
||||
{
|
||||
menu.AddItem(UnityEditor.EditorGUIUtility.TrTextContent("Wwise Connection Settings"), false,
|
||||
OpenSettings);
|
||||
menu.AddSeparator("");
|
||||
}
|
||||
|
||||
menu.AddDisabledItem(UnityEditor.EditorGUIUtility.TrTextContent("Play \u2215 Stop"));
|
||||
menu.AddDisabledItem(UnityEditor.EditorGUIUtility.TrTextContent("Stop all"));
|
||||
menu.AddSeparator("");
|
||||
menu.AddDisabledItem(UnityEditor.EditorGUIUtility.TrTextContent("Rename"));
|
||||
menu.AddDisabledItem(UnityEditor.EditorGUIUtility.TrTextContent("Delete"));
|
||||
menu.AddSeparator("");
|
||||
menu.AddDisabledItem(UnityEditor.EditorGUIUtility.TrTextContent("Open Containing Folder"));
|
||||
menu.AddDisabledItem(UnityEditor.EditorGUIUtility.TrTextContent("Find in Project Explorer"));
|
||||
}
|
||||
|
||||
menu.AddItem(UnityEditor.EditorGUIUtility.TrTextContent("Find References in Scene #R"), false,
|
||||
() => FindReferencesInScene(item));
|
||||
|
||||
menu.ShowAsContext();
|
||||
}
|
||||
|
||||
protected void OpenSettings()
|
||||
{
|
||||
UnityEditor.SettingsService.OpenProjectSettings("Project/Wwise Integration");
|
||||
}
|
||||
|
||||
protected override void KeyEvent()
|
||||
{
|
||||
var selected = GetSelection();
|
||||
if (selected.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var item = Find(GetSelection()[0]);
|
||||
if (UnityEngine.Event.current.type == UnityEngine.EventType.KeyDown)
|
||||
{
|
||||
switch (UnityEngine.Event.current.keyCode)
|
||||
{
|
||||
case UnityEngine.KeyCode.KeypadEnter:
|
||||
DoubleClickedItem(item.id);
|
||||
UnityEngine.Event.current.Use();
|
||||
break;
|
||||
case UnityEngine.KeyCode.Space:
|
||||
if (CanPlay(item))
|
||||
AkWaapiUtilities.TogglePlayEvent(item.objectType, item.objectGuid);
|
||||
UnityEngine.Event.current.Use();
|
||||
break;
|
||||
case UnityEngine.KeyCode.Delete:
|
||||
if (CanDelete(item))
|
||||
AkWaapiUtilities.Delete(item.objectGuid);
|
||||
UnityEngine.Event.current.Use();
|
||||
break;
|
||||
case UnityEngine.KeyCode.F2:
|
||||
if (CanRename(item))
|
||||
BeginRename(item);
|
||||
UnityEngine.Event.current.Use();
|
||||
break;
|
||||
case UnityEngine.KeyCode.O:
|
||||
if (UnityEngine.Event.current.shift)
|
||||
{
|
||||
if (CanOpen(item))
|
||||
AkWaapiUtilities.OpenWorkUnitInExplorer(item.objectGuid);
|
||||
UnityEngine.Event.current.Use();
|
||||
}
|
||||
break;
|
||||
case UnityEngine.KeyCode.F:
|
||||
if (UnityEngine.Event.current.shift)
|
||||
{
|
||||
if (CanSelect(item))
|
||||
m_dataSource.SelectObjectInAuthoring(item.objectGuid);
|
||||
UnityEngine.Event.current.Use();
|
||||
}
|
||||
break;
|
||||
case UnityEngine.KeyCode.R:
|
||||
if (UnityEngine.Event.current.shift)
|
||||
{
|
||||
FindReferencesInScene(item);
|
||||
UnityEngine.Event.current.Use();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static void FindReferencesInScene(AkWwiseTreeViewItem item)
|
||||
{
|
||||
var reference = WwiseObjectReference.FindWwiseObject(item.objectType, item.objectGuid);
|
||||
var path = UnityEditor.AssetDatabase.GetAssetPath(reference);
|
||||
|
||||
if (path.IndexOf(' ') != -1)
|
||||
path = '"' + path + '"';
|
||||
|
||||
if (path == string.Empty)
|
||||
{
|
||||
UnityEngine.Debug.Log($"No references to {item.displayName} in scene.");
|
||||
return;
|
||||
}
|
||||
|
||||
#if !UNITY_2019_1_OR_NEWER
|
||||
//drop "Assets" part of path
|
||||
path = string.Join("/", path.Split('/').Skip(1));
|
||||
#endif
|
||||
|
||||
var searchFilter = "ref:" + path;
|
||||
|
||||
System.Type type = typeof(UnityEditor.SearchableEditorWindow);
|
||||
System.Reflection.FieldInfo info = type.GetField("searchableWindows",
|
||||
System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static);
|
||||
var searchableWindows = info.GetValue(null) as List<UnityEditor.SearchableEditorWindow>;
|
||||
|
||||
foreach (UnityEditor.SearchableEditorWindow sw in searchableWindows)
|
||||
{
|
||||
info = type.GetField("m_HierarchyType",
|
||||
System.Reflection.BindingFlags.NonPublic);
|
||||
if (sw.GetType().ToString() == "UnityEditor.SceneHierarchyWindow")
|
||||
{
|
||||
if (sw.GetType().ToString() == "UnityEditor.SceneHierarchyWindow")
|
||||
{
|
||||
System.Reflection.MethodInfo setSearchFilter = typeof(UnityEditor.SearchableEditorWindow).GetMethod(
|
||||
"SetSearchFilter", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
|
||||
object[] parameters = new object[] { searchFilter, 0, false, false };
|
||||
|
||||
setSearchFilter.Invoke(sw, parameters);
|
||||
sw.Repaint();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void RenameEnded(RenameEndedArgs args)
|
||||
{
|
||||
var item = Find(args.itemID);
|
||||
|
||||
if (ValidateNameChange(item, args.newName))
|
||||
{
|
||||
var name = args.newName.Replace(" ", "_");
|
||||
AkWaapiUtilities.Rename(item.objectGuid, name);
|
||||
item.displayName = args.newName;
|
||||
}
|
||||
}
|
||||
protected override bool CanRename(TreeViewItem item)
|
||||
{
|
||||
return CanRenameWithLog(item, true);
|
||||
}
|
||||
|
||||
protected bool CanRenameWithLog(TreeViewItem item, bool log)
|
||||
{
|
||||
if (!CheckWaapi()) return false;
|
||||
|
||||
var wwiseItem = (AkWwiseTreeViewItem)item;
|
||||
if (item == null)
|
||||
{
|
||||
if (log) UnityEngine.Debug.LogWarning("Tree item no longer exists");
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((wwiseItem.objectType == WwiseObjectType.PhysicalFolder) || (wwiseItem.objectType == WwiseObjectType.WorkUnit))
|
||||
{
|
||||
if (log) UnityEngine.Debug.LogWarning("You can't change the name of a PhysicalFolder/WorkUnit");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (item.parent == null)
|
||||
{
|
||||
if (log) UnityEngine.Debug.LogWarning("A root tree item can not be renamed");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected bool CanPlay(TreeViewItem item)
|
||||
{
|
||||
if (!CheckWaapi()) return false;
|
||||
|
||||
var wwiseItem = (AkWwiseTreeViewItem)item;
|
||||
if (wwiseItem.objectType == WwiseObjectType.Event) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
protected bool CanDelete(TreeViewItem item, bool log = true)
|
||||
{
|
||||
if (!CheckWaapi()) return false;
|
||||
|
||||
var wwiseItem = (AkWwiseTreeViewItem)item;
|
||||
|
||||
if ((wwiseItem.objectType == WwiseObjectType.PhysicalFolder) || (wwiseItem.objectType == WwiseObjectType.WorkUnit)
|
||||
|| wwiseItem.WwiseTypeInChildren(WwiseObjectType.WorkUnit))
|
||||
{
|
||||
if (log) UnityEngine.Debug.LogWarning("You can't delete a PhysicalFolder/WorkUnit from within Unity");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected bool CanSelect(TreeViewItem item)
|
||||
{
|
||||
if (!CheckWaapi()) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected bool CanOpen(TreeViewItem item)
|
||||
{
|
||||
if (!CheckWaapi()) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
const int MAX_NAME_LENGTH = 1024;
|
||||
bool ValidateNameChange(AkWwiseTreeViewItem item, string newName)
|
||||
{
|
||||
if (item == null)
|
||||
{
|
||||
UnityEngine.Debug.LogWarning("Tree item no longer exists");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (newName.Trim() == System.String.Empty)
|
||||
{
|
||||
UnityEngine.Debug.LogWarning("Names cannot be left blank");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (newName.Trim().Length >= MAX_NAME_LENGTH)
|
||||
{
|
||||
UnityEngine.Debug.LogWarning($"Names must be less than {MAX_NAME_LENGTH} characters long.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the new name is the same as the old name, consider this to be unchanged
|
||||
if (item.displayName == newName)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (newName.Contains('/') || newName.Contains('\\'))
|
||||
{
|
||||
UnityEngine.Debug.LogWarning("Item names cannot contain / or \\.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Validate that an item with this name doesn't exist already
|
||||
if (item.parent.children.Find((i) => i.displayName == newName) != null)
|
||||
{
|
||||
UnityEngine.Debug.LogWarning("An item with this name already exists at this level");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public delegate void DoubleClickFunctionDelegate(AkWwiseTreeViewItem element);
|
||||
|
||||
private DoubleClickFunctionDelegate doubleClickExternalFunction;
|
||||
public void SetDoubleClickFunction(DoubleClickFunctionDelegate f)
|
||||
{
|
||||
doubleClickExternalFunction = f;
|
||||
}
|
||||
|
||||
protected override void DoubleClickedItem(int id)
|
||||
{
|
||||
base.DoubleClickedItem(id);
|
||||
var doubleClickedElement = m_dataSource.FindById(id);
|
||||
doubleClickExternalFunction?.Invoke(doubleClickedElement);
|
||||
}
|
||||
|
||||
public bool DragDropEnabled;
|
||||
protected override bool CanStartDrag(CanStartDragArgs args)
|
||||
{
|
||||
return DragDropEnabled;
|
||||
}
|
||||
|
||||
protected override void SetupDragAndDrop(SetupDragAndDropArgs args)
|
||||
{
|
||||
UnityEditor.DragAndDrop.PrepareStartDrag();
|
||||
|
||||
var draggedRows = GetRows().Where(item => args.draggedItemIDs.Contains(item.id)).ToList();
|
||||
var draggedItem = draggedRows[0] as AkWwiseTreeViewItem;
|
||||
if (draggedItem.objectGuid == System.Guid.Empty ||
|
||||
draggedItem.objectType == WwiseObjectType.Bus ||
|
||||
draggedItem.objectType == WwiseObjectType.PhysicalFolder ||
|
||||
draggedItem.objectType == WwiseObjectType.Folder ||
|
||||
draggedItem.objectType == WwiseObjectType.WorkUnit ||
|
||||
draggedItem.objectType == WwiseObjectType.Project ||
|
||||
draggedItem.objectType == WwiseObjectType.StateGroup ||
|
||||
draggedItem.objectType == WwiseObjectType.SwitchGroup)
|
||||
return;
|
||||
|
||||
|
||||
var reference = WwiseObjectReference.FindOrCreateWwiseObject(draggedItem.objectType, draggedItem.name, draggedItem.objectGuid);
|
||||
if (!reference)
|
||||
return;
|
||||
|
||||
var groupReference = reference as WwiseGroupValueObjectReference;
|
||||
if (groupReference)
|
||||
{
|
||||
var parent = draggedItem.parent as AkWwiseTreeViewItem;
|
||||
groupReference.SetupGroupObjectReference(parent.name, parent.objectGuid);
|
||||
}
|
||||
|
||||
UnityEditor.MonoScript script;
|
||||
if (DragDropMonoScriptMap.TryGetValue(reference.WwiseObjectType, out script))
|
||||
{
|
||||
UnityEngine.GUIUtility.hotControl = 0;
|
||||
UnityEditor.DragAndDrop.PrepareStartDrag();
|
||||
UnityEditor.DragAndDrop.objectReferences = new UnityEngine.Object[] { script };
|
||||
AkWwiseTypes.DragAndDropObjectReference = reference;
|
||||
UnityEditor.DragAndDrop.StartDrag("Dragging an AkObject");
|
||||
}
|
||||
}
|
||||
|
||||
public void SetDataSource(AkWwiseTreeDataSource datasource)
|
||||
{
|
||||
if (m_dataSource != null)
|
||||
{
|
||||
m_dataSource.modelChanged -= this.ModelChanged;
|
||||
m_dataSource.TreeView = null;
|
||||
}
|
||||
m_dataSource = datasource;
|
||||
m_dataSource.modelChanged += this.ModelChanged;
|
||||
m_dataSource.TreeView = this;
|
||||
m_dataSource.FetchData();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
#region Icons
|
||||
public class AkWwisePickerIcons
|
||||
{
|
||||
public const float kIconWidth = 18f;
|
||||
|
||||
private UnityEngine.Texture2D m_textureWwiseAcousticTextureIcon;
|
||||
private UnityEngine.Texture2D m_textureWwiseAuxBusIcon;
|
||||
private UnityEngine.Texture2D m_textureWwiseBusIcon;
|
||||
private UnityEngine.Texture2D m_textureWwiseEventIcon;
|
||||
private UnityEngine.Texture2D m_textureWwiseFolderIcon;
|
||||
private UnityEngine.Texture2D m_textureWwiseGameParameterIcon;
|
||||
private UnityEngine.Texture2D m_textureWwisePhysicalFolderIcon;
|
||||
private UnityEngine.Texture2D m_textureWwiseProjectIcon;
|
||||
private UnityEngine.Texture2D m_textureWwiseSoundbankIcon;
|
||||
private UnityEngine.Texture2D m_textureWwiseStateIcon;
|
||||
private UnityEngine.Texture2D m_textureWwiseStateGroupIcon;
|
||||
private UnityEngine.Texture2D m_textureWwiseSwitchIcon;
|
||||
private UnityEngine.Texture2D m_textureWwiseSwitchGroupIcon;
|
||||
private UnityEngine.Texture2D m_textureWwiseWorkUnitIcon;
|
||||
private UnityEngine.Texture2D m_textureWwiseTriggerIcon;
|
||||
|
||||
protected UnityEngine.Texture2D GetTexture(string texturePath)
|
||||
{
|
||||
try
|
||||
{
|
||||
return UnityEditor.AssetDatabase.LoadAssetAtPath<UnityEngine.Texture2D>(texturePath);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
UnityEngine.Debug.LogError(string.Format("WwiseUnity: Failed to find local texture: {0}", ex));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadIcons()
|
||||
{
|
||||
var tempWwisePath = "Assets/Wwise/API/Editor/WwiseWindows/TreeViewIcons/";
|
||||
|
||||
m_textureWwiseAcousticTextureIcon = GetTexture(tempWwisePath + "acoustictexture_nor.png");
|
||||
m_textureWwiseAuxBusIcon = GetTexture(tempWwisePath + "auxbus_nor.png");
|
||||
m_textureWwiseBusIcon = GetTexture(tempWwisePath + "bus_nor.png");
|
||||
m_textureWwiseEventIcon = GetTexture(tempWwisePath + "event_nor.png");
|
||||
m_textureWwiseFolderIcon = GetTexture(tempWwisePath + "folder_nor.png");
|
||||
m_textureWwiseGameParameterIcon = GetTexture(tempWwisePath + "gameparameter_nor.png");
|
||||
m_textureWwisePhysicalFolderIcon = GetTexture(tempWwisePath + "physical_folder_nor.png");
|
||||
m_textureWwiseProjectIcon = GetTexture(tempWwisePath + "wproj.png");
|
||||
m_textureWwiseSoundbankIcon = GetTexture(tempWwisePath + "soundbank_nor.png");
|
||||
m_textureWwiseStateIcon = GetTexture(tempWwisePath + "state_nor.png");
|
||||
m_textureWwiseStateGroupIcon = GetTexture(tempWwisePath + "stategroup_nor.png");
|
||||
m_textureWwiseSwitchIcon = GetTexture(tempWwisePath + "switch_nor.png");
|
||||
m_textureWwiseSwitchGroupIcon = GetTexture(tempWwisePath + "switchgroup_nor.png");
|
||||
m_textureWwiseWorkUnitIcon = GetTexture(tempWwisePath + "workunit_nor.png");
|
||||
m_textureWwiseTriggerIcon = GetTexture(tempWwisePath + "trigger_nor.png");
|
||||
}
|
||||
|
||||
public UnityEngine.Texture2D GetIcon(WwiseObjectType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case WwiseObjectType.AcousticTexture:
|
||||
return m_textureWwiseAcousticTextureIcon;
|
||||
case WwiseObjectType.AuxBus:
|
||||
return m_textureWwiseAuxBusIcon;
|
||||
case WwiseObjectType.Bus:
|
||||
return m_textureWwiseBusIcon;
|
||||
case WwiseObjectType.Event:
|
||||
return m_textureWwiseEventIcon;
|
||||
case WwiseObjectType.Folder:
|
||||
return m_textureWwiseFolderIcon;
|
||||
case WwiseObjectType.GameParameter:
|
||||
return m_textureWwiseGameParameterIcon;
|
||||
case WwiseObjectType.PhysicalFolder:
|
||||
return m_textureWwisePhysicalFolderIcon;
|
||||
case WwiseObjectType.Project:
|
||||
return m_textureWwiseProjectIcon;
|
||||
case WwiseObjectType.Soundbank:
|
||||
return m_textureWwiseSoundbankIcon;
|
||||
case WwiseObjectType.State:
|
||||
return m_textureWwiseStateIcon;
|
||||
case WwiseObjectType.StateGroup:
|
||||
return m_textureWwiseStateGroupIcon;
|
||||
case WwiseObjectType.Switch:
|
||||
return m_textureWwiseSwitchIcon;
|
||||
case WwiseObjectType.SwitchGroup:
|
||||
return m_textureWwiseSwitchGroupIcon;
|
||||
case WwiseObjectType.WorkUnit:
|
||||
return m_textureWwiseWorkUnitIcon;
|
||||
case WwiseObjectType.Trigger:
|
||||
return m_textureWwiseTriggerIcon;
|
||||
default:
|
||||
return m_textureWwisePhysicalFolderIcon;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a5c009a9e39bd5418016e6fbde0fa62
|
@ -0,0 +1,194 @@
|
||||
#if UNITY_EDITOR
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor.IMGUI.Controls;
|
||||
using UnityEngine;
|
||||
|
||||
public class AkWwiseTreeViewItem : TreeViewItem, System.IEquatable<AkWwiseTreeViewItem>
|
||||
{
|
||||
public System.Guid objectGuid;
|
||||
public WwiseObjectType objectType;
|
||||
public int numChildren;
|
||||
public bool isSorted;
|
||||
|
||||
public string name
|
||||
{
|
||||
get { return displayName; }
|
||||
set {
|
||||
displayName = value;
|
||||
if (parent != null)
|
||||
{
|
||||
(parent as AkWwiseTreeViewItem).SortChildren();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int m_depth;
|
||||
public override int depth
|
||||
{
|
||||
get { return m_depth; }
|
||||
set {
|
||||
m_depth= value;
|
||||
if (children != null)
|
||||
{
|
||||
foreach (var child in this.children)
|
||||
{
|
||||
if (child != null && child.depth != depth + 1)
|
||||
child.depth = depth + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public AkWwiseTreeViewItem(WwiseObjectInfo info, int id, int depth) : base(id, depth, info.name)
|
||||
{
|
||||
objectGuid = info.objectGUID;
|
||||
objectType = info.type;
|
||||
numChildren = info.childrenCount;
|
||||
|
||||
if (objectType == WwiseObjectType.Event)
|
||||
{
|
||||
numChildren = 0;
|
||||
}
|
||||
|
||||
children = new List<TreeViewItem>();
|
||||
this.depth = depth;
|
||||
|
||||
}
|
||||
|
||||
public AkWwiseTreeViewItem(string displayName, int depth, int id, System.Guid objGuid, WwiseObjectType objType) : base(id, depth, displayName)
|
||||
{
|
||||
objectGuid = objGuid;
|
||||
objectType = objType;
|
||||
|
||||
children = new List<TreeViewItem>();
|
||||
this.depth = depth;
|
||||
}
|
||||
|
||||
public AkWwiseTreeViewItem()
|
||||
{
|
||||
objectGuid = System.Guid.Empty;
|
||||
objectType = WwiseObjectType.None;
|
||||
children = new List<TreeViewItem>();
|
||||
}
|
||||
|
||||
public AkWwiseTreeViewItem(AkWwiseTreeViewItem other) : base(other.id, other.depth, other.displayName)
|
||||
{
|
||||
objectGuid = other.objectGuid;
|
||||
objectType = other.objectType;
|
||||
children = new List<TreeViewItem>();
|
||||
this.depth = other.depth;
|
||||
}
|
||||
|
||||
public bool Equals(AkWwiseTreeViewItem other)
|
||||
{
|
||||
return objectGuid == other.objectGuid && displayName == other.displayName && objectType == other.objectType;
|
||||
}
|
||||
|
||||
public void AddWwiseItemChild(AkWwiseTreeViewItem child)
|
||||
{
|
||||
child.depth = this.depth + 1;
|
||||
child.parent = this;
|
||||
children.Add(child);
|
||||
isSorted = false;
|
||||
}
|
||||
public void SortChildren()
|
||||
{
|
||||
children.Sort();
|
||||
isSorted = true;
|
||||
}
|
||||
|
||||
public override int CompareTo(TreeViewItem B)
|
||||
{
|
||||
return CompareTo(this, B as AkWwiseTreeViewItem);
|
||||
}
|
||||
public int CompareTo(AkWwiseTreeViewItem A, AkWwiseTreeViewItem B)
|
||||
{
|
||||
// Items are sorted like so:
|
||||
// 1- Physical folders, sorted alphabetically
|
||||
// 1- WorkUnits, sorted alphabetically (with default work unit first)
|
||||
// 2- Virtual folders, sorted alphabetically
|
||||
// 3- Normal items, sorted alphabetically
|
||||
if (A.objectType == B.objectType)
|
||||
{
|
||||
if (A.objectType == WwiseObjectType.WorkUnit)
|
||||
{
|
||||
if (A.displayName == "Default Work Unit")
|
||||
return -1;
|
||||
else if (B.displayName == "Default Work Unit")
|
||||
return 1;
|
||||
}
|
||||
return string.CompareOrdinal(A.displayName, B.displayName);
|
||||
}
|
||||
else if (A.objectType == WwiseObjectType.PhysicalFolder)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (B.objectType == WwiseObjectType.PhysicalFolder)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if (A.objectType == WwiseObjectType.WorkUnit || A.objectType == WwiseObjectType.WorkUnit)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (B.objectType == WwiseObjectType.WorkUnit || B.objectType == WwiseObjectType.WorkUnit)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if (A.objectType == WwiseObjectType.Folder)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (B.objectType == WwiseObjectType.Folder)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if (A.objectType == WwiseObjectType.Bus || B.objectType == WwiseObjectType.AuxBus)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (A.objectType == WwiseObjectType.AuxBus || B.objectType == WwiseObjectType.Bus)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
public bool WwiseTypeInChildren(WwiseObjectType t)
|
||||
{
|
||||
if (this.objectType == t) return true;
|
||||
|
||||
if (!hasChildren)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (var child in children)
|
||||
{
|
||||
if ((child as AkWwiseTreeViewItem).WwiseTypeInChildren(t)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bdcfe814d77960b4ca2d74394aa4b321
|
@ -0,0 +1,756 @@
|
||||
#if UNITY_EDITOR
|
||||
/*******************************************************************************
|
||||
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) 2025 Audiokinetic Inc.
|
||||
*******************************************************************************/
|
||||
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.ObjectModel;
|
||||
using UnityEditor.IMGUI.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// This class communicates with Wwise Authoring via AkWaapiUtilities to keep track of the Wwise object hierarchy in the project.
|
||||
/// This hierarchy information is stored in a tree structure and is used by the Wwise Picker when it is in WAAPI mode.
|
||||
/// Changes to the project are received via WAAPI subscriptions.
|
||||
/// </summary>
|
||||
public class AkWwiseTreeWAAPIDataSource : AkWwiseTreeDataSource
|
||||
{
|
||||
|
||||
private System.Timers.Timer selectTimer;
|
||||
private System.Timers.Timer searchTimer;
|
||||
|
||||
private ReturnOptions waapiWwiseObjectOptions =
|
||||
new ReturnOptions(new string[] { "id", "name", "type", "childrenCount", "path", "workunitType", "parent" });
|
||||
|
||||
|
||||
public bool AutoSyncSelection;
|
||||
public bool WaitingForSearchResults;
|
||||
|
||||
public AkWwiseTreeWAAPIDataSource() : base()
|
||||
{
|
||||
Connect();
|
||||
|
||||
selectTimer = new System.Timers.Timer();
|
||||
selectTimer.Interval = 200;
|
||||
selectTimer.AutoReset = false;
|
||||
selectTimer.Elapsed += FireSelect;
|
||||
|
||||
searchTimer = new System.Timers.Timer();
|
||||
searchTimer.Interval = 200;
|
||||
searchTimer.AutoReset = false;
|
||||
searchTimer.Elapsed += FireSearch;
|
||||
}
|
||||
|
||||
public override void FetchData()
|
||||
{
|
||||
Data.Clear();
|
||||
m_MaxID = 0;
|
||||
ProjectRoot = CreateProjectRootItem();
|
||||
|
||||
foreach (var type in FolderNames.Keys)
|
||||
{
|
||||
AkWaapiUtilities.GetResultListDelegate<WwiseObjectInfoJsonObject> callback = (List<WwiseObjectInfoJsonObject> items) =>
|
||||
{
|
||||
AddBaseFolder(AkWaapiUtilities.ParseObjectInfo(items), type);
|
||||
};
|
||||
AkWaapiUtilities.GetWwiseObjectAndDescendants(FolderNames[type], waapiWwiseObjectOptions, 2, callback);
|
||||
}
|
||||
Changed();
|
||||
}
|
||||
|
||||
public override AkWwiseTreeViewItem GetComponentDataRoot(WwiseObjectType objectType)
|
||||
{
|
||||
var tempProjectRoot = new AkWwiseTreeViewItem(ProjectRoot);
|
||||
if (!wwiseObjectFolders.ContainsKey(objectType))
|
||||
{
|
||||
return tempProjectRoot;
|
||||
}
|
||||
|
||||
tempProjectRoot.AddWwiseItemChild(wwiseObjectFolders[objectType]);
|
||||
return tempProjectRoot;
|
||||
}
|
||||
|
||||
WwiseObjectType componentObjectType;
|
||||
public override void LoadComponentData(WwiseObjectType objectType)
|
||||
{
|
||||
componentObjectType = objectType;
|
||||
LoadComponentDataDelayed();
|
||||
}
|
||||
|
||||
public void LoadComponentDataDelayed()
|
||||
{
|
||||
//Delay call until data has been fetched
|
||||
if (!wwiseObjectFolders.ContainsKey(componentObjectType))
|
||||
{
|
||||
UnityEditor.EditorApplication.delayCall += LoadComponentDataDelayed;
|
||||
}
|
||||
else
|
||||
{
|
||||
AkWaapiUtilities.GetResultListDelegate<WwiseObjectInfoJsonObject> callback = (List<WwiseObjectInfoJsonObject> items) =>
|
||||
{
|
||||
AddItems(AkWaapiUtilities.ParseObjectInfo(items));
|
||||
};
|
||||
AkWaapiUtilities.GetWwiseObjectAndDescendants(wwiseObjectFolders[componentObjectType].objectGuid,
|
||||
waapiWwiseObjectOptions, -1, callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private string searchString;
|
||||
private WwiseObjectType searchObjectTypeFilter;
|
||||
public override void UpdateSearchResults(string searchFilter, WwiseObjectType objectType = WwiseObjectType.None)
|
||||
{
|
||||
searchTimer.Stop();
|
||||
searchString = searchFilter;
|
||||
searchObjectTypeFilter = objectType;
|
||||
searchTimer.Enabled = true;
|
||||
searchTimer.Start();
|
||||
}
|
||||
|
||||
private void FireSearch(object sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
if (WaitingForSearchResults) return;
|
||||
if (SearchRoot == null)
|
||||
{
|
||||
SearchRoot = new AkWwiseTreeViewItem(ProjectRoot);
|
||||
}
|
||||
|
||||
SearchRoot.children.Clear();
|
||||
SearchData = new TreeItems();
|
||||
TreeUtility.TreeToList(SearchRoot, ref SearchData);
|
||||
AkWaapiUtilities.GetResultListDelegate<WwiseObjectInfoJsonObject> callback = (List<WwiseObjectInfoJsonObject> items) =>
|
||||
{
|
||||
AddSearchResults(AkWaapiUtilities.ParseObjectInfo(items));
|
||||
treeviewCommandQueue.Enqueue(new TreeViewCommand(() => Expand(SearchRoot.objectGuid, false)));
|
||||
WaitingForSearchResults = false;
|
||||
};
|
||||
AkWaapiUtilities.Search(searchString, searchObjectTypeFilter, waapiWwiseObjectOptions, callback);
|
||||
WaitingForSearchResults = true;
|
||||
}
|
||||
|
||||
public override AkWwiseTreeViewItem GetSearchResults()
|
||||
{
|
||||
if (SearchRoot == null)
|
||||
{
|
||||
SearchRoot = new AkWwiseTreeViewItem(ProjectRoot);
|
||||
}
|
||||
|
||||
return SearchRoot;
|
||||
}
|
||||
|
||||
public void AddSearchResults(IEnumerable<WwiseObjectInfo> matchList)
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (var info in matchList)
|
||||
{
|
||||
if (!FilterPath(info.path))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var match = FindInSearchResults(info.objectGUID);
|
||||
if (match != null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var matchItem = FindByGuid(info.objectGUID);
|
||||
if (matchItem == null)
|
||||
{
|
||||
AkWaapiUtilities.GetResultListDelegate<WwiseObjectInfoJsonObject> callback = (List<WwiseObjectInfoJsonObject> items) =>
|
||||
{
|
||||
AddItemWithAncestorsToSearch(AkWaapiUtilities.ParseObjectInfo(items));
|
||||
};
|
||||
AkWaapiUtilities.GetWwiseObjectAndAncestors(info.objectGUID, waapiWwiseObjectOptions, callback);
|
||||
continue;
|
||||
}
|
||||
|
||||
AddItemToSearch(matchItem);
|
||||
}
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
UnityEngine.Debug.LogError("Search died");
|
||||
UnityEngine.Debug.LogError(e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void AddItemToSearch(AkWwiseTreeViewItem sourceItem)
|
||||
{
|
||||
var matchItem = new AkWwiseTreeViewItem(sourceItem);
|
||||
SearchData.Add(matchItem);
|
||||
|
||||
var sourceParent = sourceItem.parent as AkWwiseTreeViewItem;
|
||||
var parentCopy = FindInSearchResults(sourceParent.objectGuid);
|
||||
if (parentCopy != null)
|
||||
{
|
||||
parentCopy.AddWwiseItemChild(matchItem);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
parentCopy = new AkWwiseTreeViewItem(sourceParent);
|
||||
parentCopy.AddWwiseItemChild(matchItem);
|
||||
SearchData.Add(parentCopy);
|
||||
var nextParent = sourceParent.parent as AkWwiseTreeViewItem;
|
||||
while (nextParent != null)
|
||||
{
|
||||
var parentInSearchItems = FindInSearchResults(nextParent.objectGuid);
|
||||
if (parentInSearchItems != null)
|
||||
{
|
||||
parentInSearchItems.AddWwiseItemChild(parentCopy);
|
||||
break;
|
||||
}
|
||||
parentInSearchItems = new AkWwiseTreeViewItem(nextParent);
|
||||
parentInSearchItems.AddWwiseItemChild(parentCopy);
|
||||
SearchData.Add(parentInSearchItems);
|
||||
parentCopy = parentInSearchItems;
|
||||
nextParent = nextParent.parent as AkWwiseTreeViewItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void AddItemWithAncestors(List<WwiseObjectInfo> infoItems, bool selectAfterCreated = false)
|
||||
{
|
||||
var parent = ProjectRoot;
|
||||
//Items obtained from the WAAPI call are sorted by path so we can simply iterate over them
|
||||
foreach (var infoItem in infoItems)
|
||||
{
|
||||
var newItem = FindByGuid(infoItem.objectGUID);
|
||||
if (newItem == null)
|
||||
{
|
||||
newItem = new AkWwiseTreeViewItem(infoItem, GenerateUniqueID(), parent.depth + 1);
|
||||
Data.Add(newItem);
|
||||
parent.AddWwiseItemChild(newItem);
|
||||
}
|
||||
|
||||
if (!CheckIfFullyLoaded(parent))
|
||||
{
|
||||
System.Guid guid = new System.Guid(parent.objectGuid.ToString());
|
||||
AkWaapiUtilities.GetResultListDelegate<WwiseObjectInfoJsonObject> callback = (List<WwiseObjectInfoJsonObject> items) =>
|
||||
{
|
||||
UpdateParentWithLoadedChildren(guid, AkWaapiUtilities.ParseObjectInfo(items));
|
||||
};
|
||||
AkWaapiUtilities.GetChildren(parent.objectGuid, waapiWwiseObjectOptions, callback);
|
||||
}
|
||||
parent = newItem;
|
||||
}
|
||||
|
||||
if (selectAfterCreated)
|
||||
{
|
||||
treeviewCommandQueue.Enqueue(new TreeViewCommand(() => Expand(parent.objectGuid, true)));
|
||||
}
|
||||
}
|
||||
|
||||
public void AddItemWithAncestorsToSearch(List<WwiseObjectInfo> infoItems)
|
||||
{
|
||||
AddItemWithAncestors(infoItems, false);
|
||||
var item = FindByGuid(infoItems.Last().objectGUID);
|
||||
AddItemToSearch(item);
|
||||
}
|
||||
|
||||
public void AddItems(List<WwiseObjectInfo> infoItems)
|
||||
{
|
||||
foreach (var infoItem in infoItems)
|
||||
{
|
||||
if (infoItem.type == WwiseObjectType.None)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var tParent = FindByGuid(infoItem.parentID);
|
||||
if (tParent == null || tParent == ProjectRoot)
|
||||
{
|
||||
tParent = ProjectRoot;
|
||||
}
|
||||
|
||||
var tChild = FindByGuid(infoItem.objectGUID);
|
||||
if (tChild == null)
|
||||
{
|
||||
tChild = new AkWwiseTreeViewItem(infoItem, GenerateUniqueID(), tParent.depth + 1);
|
||||
Data.Add(tChild);
|
||||
tParent.AddWwiseItemChild(tChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void AddBaseFolder(List<WwiseObjectInfo> infoItems, WwiseObjectType oType)
|
||||
{
|
||||
if (infoItems != null && infoItems.Count > 0)
|
||||
{
|
||||
AddItems(infoItems);
|
||||
var folder = FindByGuid(infoItems[0].objectGUID);
|
||||
wwiseObjectFolders[oType] = folder;
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateParentWithLoadedChildren(System.Guid parentGuid, List<WwiseObjectInfo> children)
|
||||
{
|
||||
if (children == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = FindByGuid(parentGuid);
|
||||
if (parent == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
parent.children.Remove(null);
|
||||
|
||||
parent.numChildren = children.Count;
|
||||
if (parent.children.Count > children.Count)
|
||||
{
|
||||
parent.children.Clear();
|
||||
}
|
||||
|
||||
foreach (var child in children)
|
||||
{
|
||||
if (parent.children.Any(c => ((AkWwiseTreeViewItem)c).objectGuid == child.objectGUID))
|
||||
continue;
|
||||
else
|
||||
parent.AddWwiseItemChild(new AkWwiseTreeViewItem(child, GenerateUniqueID(), parent.depth + 1));
|
||||
}
|
||||
}
|
||||
|
||||
public void SetChildren(System.Guid parentGuid, List<WwiseObjectInfo> children)
|
||||
{
|
||||
if (children == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = FindByGuid(parentGuid);
|
||||
parent.children.Clear();
|
||||
parent.children.Remove(null);
|
||||
|
||||
parent.numChildren = children.Count;
|
||||
|
||||
foreach (var child in children)
|
||||
{
|
||||
parent.AddWwiseItemChild(new AkWwiseTreeViewItem(child, GenerateUniqueID(), parent.depth + 1));
|
||||
}
|
||||
}
|
||||
|
||||
bool CheckIfFullyLoaded(AkWwiseTreeViewItem item)
|
||||
{
|
||||
if (item == ProjectRoot)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (item.objectType == WwiseObjectType.Event)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (item.numChildren != item.children.Count)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (item.children.Contains(null))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private ReadOnlyDictionary<WwiseObjectType, string> FolderNames = new ReadOnlyDictionary<WwiseObjectType, string>(new Dictionary<WwiseObjectType, string>()
|
||||
{
|
||||
{ WwiseObjectType.AuxBus , @"\Master-Mixer Hierarchy" },
|
||||
{ WwiseObjectType.Event , @"\Events" },
|
||||
{ WwiseObjectType.State, @"\States"},
|
||||
{ WwiseObjectType.StateGroup, @"\States"},
|
||||
{ WwiseObjectType.Soundbank, @"\SoundBanks"},
|
||||
{ WwiseObjectType.Switch, @"\Switches"},
|
||||
{ WwiseObjectType.SwitchGroup, @"\Switches"},
|
||||
{ WwiseObjectType.AcousticTexture, @"\Virtual Acoustics" },
|
||||
{ WwiseObjectType.Trigger, @"\Triggers" },
|
||||
{ WwiseObjectType.GameParameter, @"\Game Parameters" },
|
||||
});
|
||||
|
||||
|
||||
static List<AkWaapiUtilities.SubscriptionInfo> subscriptions = new List<AkWaapiUtilities.SubscriptionInfo>();
|
||||
|
||||
/// <summary>
|
||||
/// Subscribes to nameChanged, childAdded, childRemoved, and selectionChanged WAAPI events in order to keep the picker in sync with the Wwise project explorer.
|
||||
/// </summary>
|
||||
public void SubscribeTopics()
|
||||
{
|
||||
var options = new ReturnOptions(new string[] { "id", "parent", "name", "type", "childrenCount", "path", "workunitType" });
|
||||
AkWaapiUtilities.Subscribe(ak.wwise.core.@object.nameChanged, OnWaapiRenamed, SubscriptionHandshake, options);
|
||||
AkWaapiUtilities.Subscribe(ak.wwise.core.@object.childAdded, OnWaapiChildAdded, SubscriptionHandshake, options);
|
||||
AkWaapiUtilities.Subscribe(ak.wwise.core.@object.childRemoved, OnWaapiChildRemoved, SubscriptionHandshake, options);
|
||||
AkWaapiUtilities.Subscribe(ak.wwise.ui.selectionChanged, OnWwiseSelectionChanged, SubscriptionHandshake, options);
|
||||
}
|
||||
|
||||
public void SubscriptionHandshake(AkWaapiUtilities.SubscriptionInfo sub)
|
||||
{
|
||||
subscriptions.Add(sub);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unsubscribes from currently active subscriptions.
|
||||
/// </summary>
|
||||
void UnsubscribeTopics()
|
||||
{
|
||||
var tSubs = subscriptions;
|
||||
foreach (var sub in tSubs)
|
||||
{
|
||||
if (sub.SubscriptionId != 0)
|
||||
{
|
||||
AkWaapiUtilities.Unsubscribe(sub.SubscriptionId);
|
||||
}
|
||||
}
|
||||
subscriptions.Clear();
|
||||
}
|
||||
|
||||
void OnWaapiRenamed(string json)
|
||||
{
|
||||
var renamedItem = AkWaapiUtilities.ParseRenameObject(json);
|
||||
treeviewCommandQueue.Enqueue(new TreeViewCommand(() => Rename(renamedItem.objectInfo.objectGUID, renamedItem.newName)));
|
||||
}
|
||||
|
||||
void OnWaapiChildAdded(string json)
|
||||
{
|
||||
var added = AkWaapiUtilities.ParseChildAddedOrRemoved(json);
|
||||
|
||||
if (added.childInfo.type == WwiseObjectType.None)
|
||||
return;
|
||||
|
||||
var parent = FindByGuid(added.parentInfo.objectGUID);
|
||||
|
||||
// New object created, but parent is not loaded yet, so we can ignore it
|
||||
if (parent == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var child = FindByGuid(added.childInfo.objectGUID);
|
||||
if (child == null)
|
||||
{
|
||||
child = new AkWwiseTreeViewItem(added.childInfo, GenerateUniqueID(), parent.depth + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
child.numChildren = added.childInfo.childrenCount;
|
||||
child.displayName = added.childInfo.name;
|
||||
}
|
||||
|
||||
parent.AddWwiseItemChild(child);
|
||||
Data.Add(child);
|
||||
parent.numChildren = added.parentInfo.childrenCount;
|
||||
child.depth = parent.depth + 1;
|
||||
|
||||
if (!CheckIfFullyLoaded(parent))
|
||||
{
|
||||
AkWaapiUtilities.GetResultListDelegate<WwiseObjectInfoJsonObject> callback = (List<WwiseObjectInfoJsonObject> items) =>
|
||||
{
|
||||
UpdateParentWithLoadedChildren(parent.objectGuid, AkWaapiUtilities.ParseObjectInfo(items));
|
||||
};
|
||||
AkWaapiUtilities.GetChildren(parent.objectGuid, waapiWwiseObjectOptions, callback);
|
||||
}
|
||||
|
||||
if (!CheckIfFullyLoaded(child))
|
||||
{
|
||||
AkWaapiUtilities.GetResultListDelegate<WwiseObjectInfoJsonObject> callback = (List<WwiseObjectInfoJsonObject> items) =>
|
||||
{
|
||||
UpdateParentWithLoadedChildren(child.objectGuid, AkWaapiUtilities.ParseObjectInfo(items));
|
||||
};
|
||||
AkWaapiUtilities.GetChildren(child.objectGuid, waapiWwiseObjectOptions, callback);
|
||||
}
|
||||
ScheduleRebuild();
|
||||
}
|
||||
|
||||
void OnWaapiChildRemoved(string json)
|
||||
{
|
||||
var removed = AkWaapiUtilities.ParseChildAddedOrRemoved(json);
|
||||
toRequeue.Enqueue(new TreeViewCommand(() => Remove(removed.parentInfo, removed.childInfo)));
|
||||
}
|
||||
|
||||
void OnWwiseSelectionChanged(string json)
|
||||
{
|
||||
if (AutoSyncSelection)
|
||||
{
|
||||
var objects = AkWaapiUtilities.ParseSelectedObjects(json);
|
||||
if (objects.Count > 0)
|
||||
{
|
||||
if (FilterPath(objects[0].path))
|
||||
{
|
||||
treeviewCommandQueue.Enqueue(new TreeViewCommand(() => SelectItem(objects[0].objectGUID)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Rename(System.Guid objectGuid, string newName)
|
||||
{
|
||||
var item = FindByGuid(objectGuid);
|
||||
if (item != null)
|
||||
{
|
||||
item.name = newName;
|
||||
}
|
||||
else
|
||||
{
|
||||
toRequeue.Enqueue(new TreeViewCommand(() => Rename(objectGuid, newName)));
|
||||
}
|
||||
}
|
||||
|
||||
public void Remove(WwiseObjectInfo parentInfo, WwiseObjectInfo childInfo)
|
||||
{
|
||||
var parent = FindByGuid(parentInfo.objectGUID);
|
||||
|
||||
//Object removed, but it was never loaded so we can ignore it
|
||||
if (parent == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
parent.numChildren = parentInfo.childrenCount;
|
||||
var index = parent.children.FindIndex(el => ((AkWwiseTreeViewItem)el).objectGuid == childInfo.objectGUID);
|
||||
if (index != -1)
|
||||
{
|
||||
parent.children.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
|
||||
public void Expand(System.Guid objectGuid, bool select)
|
||||
{
|
||||
if (TreeView == null || !TreeView.ExpandItem(objectGuid, select))
|
||||
{
|
||||
toRequeue.Enqueue(new TreeViewCommand(() => Expand(objectGuid, select)));
|
||||
}
|
||||
}
|
||||
|
||||
public override void SelectItem(System.Guid itemGuid)
|
||||
{
|
||||
if (TreeView == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (TreeView.m_storedSearchString != string.Empty)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!TreeView.ExpandItem(itemGuid, true))
|
||||
{
|
||||
var item = FindByGuid(itemGuid);
|
||||
treeviewCommandQueue.Enqueue(new TreeViewCommand(() => Expand(itemGuid, true)));
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
AkWaapiUtilities.GetResultListDelegate<WwiseObjectInfoJsonObject> callback = (List<WwiseObjectInfoJsonObject> items) =>
|
||||
{
|
||||
AddItemWithAncestors(AkWaapiUtilities.ParseObjectInfo(items));
|
||||
};
|
||||
AkWaapiUtilities.GetWwiseObjectAndAncestors(itemGuid, waapiWwiseObjectOptions, callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool FilterPath(string path)
|
||||
{
|
||||
var splitpath = path.Split('\\');
|
||||
if (splitpath.Length > 1)
|
||||
{
|
||||
var folder = @"\" + splitpath[1];
|
||||
if (FolderNames.Values.Contains(folder) || WaapiKeywords.FolderDisplaynames.Values.Contains(folder))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void ItemSelected(AkWwiseTreeViewItem item)
|
||||
{
|
||||
if (AutoSyncSelection)
|
||||
{
|
||||
SelectObjectInAuthoring(item.objectGuid);
|
||||
}
|
||||
}
|
||||
|
||||
private System.Guid guidToSelect;
|
||||
public override void SelectObjectInAuthoring(System.Guid objectGuid)
|
||||
{
|
||||
selectTimer.Stop();
|
||||
guidToSelect = objectGuid;
|
||||
selectTimer.Enabled = true;
|
||||
selectTimer.Start();
|
||||
}
|
||||
|
||||
private void FireSelect(object sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
AkWaapiUtilities.SelectObjectInAuthoring(guidToSelect);
|
||||
}
|
||||
|
||||
//Make a single command queue
|
||||
private ConcurrentQueue<TreeViewCommand> treeviewCommandQueue = new ConcurrentQueue<TreeViewCommand>();
|
||||
private Queue<TreeViewCommand> toRequeue = new Queue<TreeViewCommand>();
|
||||
|
||||
public class TreeViewCommand
|
||||
{
|
||||
public System.Action payload;
|
||||
|
||||
public TreeViewCommand(System.Action payload)
|
||||
{
|
||||
this.payload = payload;
|
||||
}
|
||||
public void Execute()
|
||||
{
|
||||
payload.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public override void ScheduleRebuild()
|
||||
{
|
||||
rebuildFlag = true;
|
||||
}
|
||||
|
||||
private bool rebuildFlag = false;
|
||||
private bool refreshFlag = false;
|
||||
|
||||
public void Update()
|
||||
{
|
||||
while (treeviewCommandQueue.Count > 0)
|
||||
{
|
||||
if (treeviewCommandQueue.TryDequeue(out TreeViewCommand cmd))
|
||||
{
|
||||
cmd.Execute();
|
||||
refreshFlag = true;
|
||||
}
|
||||
}
|
||||
|
||||
while (toRequeue.Count > 0)
|
||||
{
|
||||
treeviewCommandQueue.Enqueue(toRequeue.Dequeue());
|
||||
}
|
||||
|
||||
//Preemptively load items in hierarchy that are close to being exposed ( up to grandchildren of unexpanded items)
|
||||
if (rebuildFlag)
|
||||
{
|
||||
TreeUtility.TreeToList(ProjectRoot, ref Data);
|
||||
if (TreeView != null)
|
||||
{
|
||||
Preload(ProjectRoot, TreeView.state);
|
||||
}
|
||||
refreshFlag = true;
|
||||
rebuildFlag = false;
|
||||
}
|
||||
|
||||
|
||||
//Updates treeView data and sets repaint flag
|
||||
if (refreshFlag)
|
||||
{
|
||||
Changed();
|
||||
refreshFlag = false;
|
||||
}
|
||||
}
|
||||
|
||||
void Preload(AkWwiseTreeViewItem parent, TreeViewState treeState)
|
||||
{
|
||||
if (parent == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CheckIfFullyLoaded(parent))
|
||||
{
|
||||
AkWaapiUtilities.GetResultListDelegate<WwiseObjectInfoJsonObject> callback = (List<WwiseObjectInfoJsonObject> items) =>
|
||||
{
|
||||
UpdateParentWithLoadedChildren(parent.objectGuid, AkWaapiUtilities.ParseObjectInfo(items));
|
||||
};
|
||||
AkWaapiUtilities.GetChildren(parent.objectGuid, waapiWwiseObjectOptions, callback);
|
||||
}
|
||||
|
||||
//Preload one level of hidden items.
|
||||
if (IsExpanded(treeState, parent.id) || (parent.parent != null && IsExpanded(treeState, parent.parent.id)) ||
|
||||
parent.id == ProjectRoot.id )
|
||||
{
|
||||
foreach (AkWwiseTreeViewItem childItem in parent.children)
|
||||
{
|
||||
|
||||
Preload(childItem, treeState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetExpanded(IEnumerable<System.Guid> ids)
|
||||
{
|
||||
if (TreeView != null)
|
||||
{
|
||||
foreach (var id in ids)
|
||||
{
|
||||
treeviewCommandQueue.Enqueue(new TreeViewCommand(() => Expand(id, false)));
|
||||
}
|
||||
TreeView.state.expandedIDs.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
public void Connect()
|
||||
{
|
||||
AkWaapiUtilities.Connected += OnConnection;
|
||||
AkWaapiUtilities.QueueConsumed += ScheduleRebuild;
|
||||
AkWaapiUtilities.Disconnecting += Disconnect;
|
||||
}
|
||||
|
||||
public void OnConnection()
|
||||
{
|
||||
SubscribeTopics();
|
||||
FetchData();
|
||||
}
|
||||
|
||||
public void Disconnect(bool still_connected)
|
||||
{
|
||||
this.treeviewCommandQueue = new ConcurrentQueue<TreeViewCommand>();
|
||||
if (ProjectRoot != null)
|
||||
ProjectRoot.children = new List<TreeViewItem>();
|
||||
if (still_connected)
|
||||
{
|
||||
UnsubscribeTopics();
|
||||
}
|
||||
else
|
||||
{
|
||||
subscriptions.Clear();
|
||||
}
|
||||
Changed();
|
||||
}
|
||||
|
||||
|
||||
public void Cleanup()
|
||||
{
|
||||
subscriptions.Clear();
|
||||
}
|
||||
|
||||
|
||||
~AkWwiseTreeWAAPIDataSource()
|
||||
{
|
||||
Disconnect(true);
|
||||
}
|
||||
|
||||
public override void SaveExpansionStatus(List<int> expandedItems)
|
||||
{
|
||||
AkWwiseProjectInfo.GetData().ExpandedWaapiItemIds = expandedItems;
|
||||
}
|
||||
|
||||
public override List<int> LoadExpansionSatus()
|
||||
{
|
||||
return AkWwiseProjectInfo.GetData().ExpandedWaapiItemIds;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b25adaa3c223034eb560af7458658c1
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8498c6f3703602946a895e399481a46f
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 063aeff4706afe2418321e34eaf2678d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
blueberryPeak/Assets/Wwise/API/Editor/WwiseWindows/TreeViewIcons/acoustictexture_nor.png
(Stored with Git LFS)
Normal file
BIN
blueberryPeak/Assets/Wwise/API/Editor/WwiseWindows/TreeViewIcons/acoustictexture_nor.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 311aae98c3bd2e943a15b320dd052212
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
blueberryPeak/Assets/Wwise/API/Editor/WwiseWindows/TreeViewIcons/auxbus_nor.png
(Stored with Git LFS)
Normal file
BIN
blueberryPeak/Assets/Wwise/API/Editor/WwiseWindows/TreeViewIcons/auxbus_nor.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92e103fedb2b4654d84deb69bca1d81b
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
blueberryPeak/Assets/Wwise/API/Editor/WwiseWindows/TreeViewIcons/blank.png
(Stored with Git LFS)
Normal file
BIN
blueberryPeak/Assets/Wwise/API/Editor/WwiseWindows/TreeViewIcons/blank.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f9efe3af208bcd94297685b3651bd771
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
blueberryPeak/Assets/Wwise/API/Editor/WwiseWindows/TreeViewIcons/bus_nor.png
(Stored with Git LFS)
Normal file
BIN
blueberryPeak/Assets/Wwise/API/Editor/WwiseWindows/TreeViewIcons/bus_nor.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e96c9e458ebcdc943aa97539d4f59ecd
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
blueberryPeak/Assets/Wwise/API/Editor/WwiseWindows/TreeViewIcons/event_nor.png
(Stored with Git LFS)
Normal file
BIN
blueberryPeak/Assets/Wwise/API/Editor/WwiseWindows/TreeViewIcons/event_nor.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 161e1975fa5cd7a4996b103ef23b3f62
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
blueberryPeak/Assets/Wwise/API/Editor/WwiseWindows/TreeViewIcons/folder_nor.png
(Stored with Git LFS)
Normal file
BIN
blueberryPeak/Assets/Wwise/API/Editor/WwiseWindows/TreeViewIcons/folder_nor.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfd957c0b83aa994fa5467d072c9d5bb
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
blueberryPeak/Assets/Wwise/API/Editor/WwiseWindows/TreeViewIcons/gameparameter_nor.png
(Stored with Git LFS)
Normal file
BIN
blueberryPeak/Assets/Wwise/API/Editor/WwiseWindows/TreeViewIcons/gameparameter_nor.png
(Stored with Git LFS)
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user