public void SetAddressableBank(WwiseAddressableSoundBank asset) { bank = asset; EditorUtility.SetDirty(this); AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); }
public bool UpdateAddressableBankReference(WwiseAddressableSoundBank asset, string name) { if (name == ObjectName) { SetAddressableBank(asset); return(true); } return(false); }
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); }
public override void CompleteData() { SetAddressableBank(WwiseAddressableSoundBank.GetAddressableBankAsset(DisplayName)); }