Exemple #1
0
 public void SetAddressableBank(WwiseAddressableSoundBank asset)
 {
     bank = asset;
     EditorUtility.SetDirty(this);
     AssetDatabase.SaveAssets();
     AssetDatabase.Refresh();
 }
Exemple #2
0
 public bool UpdateAddressableBankReference(WwiseAddressableSoundBank asset, string name)
 {
     if (name == ObjectName)
     {
         SetAddressableBank(asset);
         return(true);
     }
     return(false);
 }
Exemple #3
0
    public static bool FindBankReferenceAndSetAddressableBank(WwiseAddressableSoundBank addressableAsset, string name)
    {
        var guids = UnityEditor.AssetDatabase.FindAssets("t:" + typeof(WwiseBankReference).Name);
        WwiseBankReference asset;

        foreach (var assetGuid in guids)
        {
            var assetPath = UnityEditor.AssetDatabase.GUIDToAssetPath(assetGuid);
            asset = UnityEditor.AssetDatabase.LoadAssetAtPath <WwiseBankReference>(assetPath);
            if (asset && asset.ObjectName == name)
            {
                asset.SetAddressableBank(addressableAsset);
                return(true);
            }
        }
        return(false);
    }
Exemple #4
0
 public override void CompleteData()
 {
     SetAddressableBank(WwiseAddressableSoundBank.GetAddressableBankAsset(DisplayName));
 }