public bool BakedReverbGUI(SteamAudioManager phononManager) { SteamAudioListener bakedReverb = GameObject.FindObjectOfType <SteamAudioListener>(); if (bakedReverb == null) { return(false); } EditorGUILayout.LabelField("Baked Reverb", EditorStyles.boldLabel); GUI.enabled = !Baker.IsBakeActive() && !EditorApplication.isPlayingOrWillChangePlaymode; EditorGUILayout.BeginHorizontal(); bakedReverb.UpdateBakedDataStatistics(); bool previousValues = bakedReverb.bakeToggle; bool newValue = GUILayout.Toggle(bakedReverb.bakeToggle, " reverb"); if (previousValues != newValue) { Undo.RecordObject(bakedReverb, "Toggled reverb in Phonon Manager"); bakedReverb.bakeToggle = newValue; } EditorGUILayout.LabelField((bakedReverb.bakedDataSize / 1000.0f).ToString("0.0") + " KB"); EditorGUILayout.EndHorizontal(); GUI.enabled = true; return(true); }
public void BakedReverbStatsGUI() { SteamAudioListener bakedReverb = serializedObject.targetObject as SteamAudioListener; GUI.enabled = !Baker.IsBakeActive() && !EditorApplication.isPlayingOrWillChangePlaymode; bakedReverb.UpdateBakedDataStatistics(); for (int i = 0; i < bakedReverb.bakedProbeNames.Count; ++i) { EditorGUILayout.LabelField(bakedReverb.bakedProbeNames[i], (bakedReverb.bakedProbeDataSizes[i] / 1000.0f).ToString("0.0") + " KB"); } EditorGUILayout.LabelField("Total Size", (bakedReverb.bakedDataSize / 1000.0f).ToString("0.0") + " KB"); GUI.enabled = true; }