示例#1
0
    public override void OnChildInspectorGUI()
    {
        m_LoadBankEventHandlerInspector.OnGUI();
        m_UnloadBankEventHandlerInspector.OnGUI();
#if !(AK_WWISE_ADDRESSABLES && UNITY_ADDRESSABLES)
        using (new UnityEditor.EditorGUILayout.VerticalScope("box"))
        {
            UnityEditor.EditorGUILayout.PropertyField(loadAsync, new UnityEngine.GUIContent("Asynchronous:"));
            UnityEditor.EditorGUILayout.PropertyField(decode, new UnityEngine.GUIContent("Decode compressed data:"));

            if (!decode.boolValue)
            {
                return;
            }

            var oldSaveDecodedValue = saveDecoded.boolValue;
            UnityEditor.EditorGUILayout.PropertyField(saveDecoded, new UnityEngine.GUIContent("Save decoded bank:"));
            if (!oldSaveDecodedValue || saveDecoded.boolValue)
            {
                return;
            }

            var bank = target as AkBank;
            AkBasePathGetter.EvaluateGamePaths();
            var decodedBankPath = System.IO.Path.Combine(AkBasePathGetter.DecodedBankFullPath, bank.data.Name + ".bnk");

            try
            {
                System.IO.File.Delete(decodedBankPath);
            }
            catch (System.Exception e)
            {
                UnityEngine.Debug.Log("WwiseUnity: Could not delete existing decoded SoundBank. Please delete it manually. " + e);
            }
        }
#endif
    }