forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAudioEffectParameterPath.cs
More file actions
33 lines (33 loc) · 1.15 KB
/
Copy pathAudioEffectParameterPath.cs
File metadata and controls
33 lines (33 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
namespace UnityEditor.Audio
{
internal sealed class AudioEffectParameterPath : AudioGroupParameterPath
{
public AudioMixerEffectController effect;
public AudioEffectParameterPath(AudioMixerGroupController group, AudioMixerEffectController effect, GUID parameter) : base(group, parameter)
{
this.effect = effect;
}
public override string ResolveStringPath(bool getOnlyBasePath)
{
if (getOnlyBasePath)
{
return base.GetBasePath(this.group.GetDisplayString(), this.effect.effectName);
}
if (this.effect.GetGUIDForMixLevel() == this.parameter)
{
return "Mix Level" + base.GetBasePath(this.group.GetDisplayString(), this.effect.effectName);
}
MixerParameterDefinition[] effectParameters = MixerEffectDefinitions.GetEffectParameters(this.effect.effectName);
for (int i = 0; i < effectParameters.Length; i++)
{
GUID gUIDForParameter = this.effect.GetGUIDForParameter(effectParameters[i].name);
if (gUIDForParameter == this.parameter)
{
return effectParameters[i].name + base.GetBasePath(this.group.GetDisplayString(), this.effect.effectName);
}
}
return "Error finding Parameter path.";
}
}
}