Hello,
So I am trying to expose the properties of the AudioReverbPreset’s., such as General, Room, Etc., ideally i’d like to just reference those like so:
Code
public AudioReverbPreset initReverbPreset;
public ReverbProps initReverbProps;
[System.Serializable]
public class ReverbProps {
[Range(-10000, 0)]
public int room;
[Range(-10000, 0)]
public int roomHF;
[Range(-10000, 0)]
public int roomLF;
[Range(0.1f, 20)]
public float decayTime;
[Range(0.1f, 2)]
public float decayHFRatio;
[Range(-10000, 1000)]
public int reflections;
[Range(0, 0.3f)]
public float reflectionsDelay;
[Range(-10000, 2000)]
public int reverb;
[Range(0, 0.1f)]
public float reverbDelay;
[Range(1000, 20000)]
public float hfReference;
[Range(20, 1000)]
public float lfReference;
[Range(0, 100)]
public float diffusion;
[Range(0, 100)]
public float density;
}//ReverbProps
initReverbProps.room = initReverbPreset.room;
initReverbProps.room = initReverbPreset.room;
But obviously that doesn’t work, storing the properties in a separate class to display them inside of a custom editor is my only work around so far but in order to do that i need to have an object with the reverb zone active in the game scene and update that specific component to retreive the proper values per reverb preset.
Instead of creating and destroying a gameobject/reverb component over and over again after every editor value update, it would be more ideal to simply grab the preset default values and refer to those.
The question is, how? There is no api that i can see that suggests you can do this.
The only thing i have found is here: Unity - Scripting API: AudioReverbZone.reverbPreset
Which suggest you can “Get reverb preset properties.” yet provides no api to do so.
Thoughts?