SetValueForPitch() 개인적인 메소드

private SetValueForPitch ( UnityEditor.Audio.AudioMixerController controller, AudioMixerSnapshotController snapshot, float value ) : void
controller UnityEditor.Audio.AudioMixerController
snapshot AudioMixerSnapshotController
value float
리턴 void
예제 #1
0
        public void CopyAllSettingsToAllSnapshots(AudioMixerGroupController group, AudioMixerSnapshotController snapshot)
        {
            for (int n = 0; n < group.effects.Length; n++)
            {
                CopyEffectSettingsToAllSnapshots(group, n, snapshot, true);
            }

            AudioMixerSnapshotController[] snaps = snapshots;
            for (int n = 0; n < snaps.Length; n++)
            {
                if (snaps[n] == snapshot)
                {
                    continue;
                }
                var dst = snaps[n];
                group.SetValueForVolume(this, dst, group.GetValueForVolume(this, snapshot));
                group.SetValueForPitch(this, dst, group.GetValueForPitch(this, snapshot));
            }
        }
 public void CopyAllSettingsToAllSnapshots(AudioMixerGroupController group, AudioMixerSnapshotController snapshot)
 {
   for (int effectIndex = 0; effectIndex < group.effects.Length; ++effectIndex)
     this.CopyEffectSettingsToAllSnapshots(group, effectIndex, snapshot, true);
   AudioMixerSnapshotController[] snapshots = this.snapshots;
   for (int index = 0; index < snapshots.Length; ++index)
   {
     if (!((UnityEngine.Object) snapshots[index] == (UnityEngine.Object) snapshot))
     {
       AudioMixerSnapshotController snapshot1 = snapshots[index];
       group.SetValueForVolume(this, snapshot1, group.GetValueForVolume(this, snapshot));
       group.SetValueForPitch(this, snapshot1, group.GetValueForPitch(this, snapshot));
     }
   }
 }
 public static float DoInitialModule(AudioMixerGroupController group, AudioMixerController controller, List<AudioMixerGroupController> allGroups)
 {
   Rect rect = EditorGUILayout.BeginVertical(EditorStyles.inspectorDefaultMargins, new GUILayoutOption[0]);
   float valueForPitch = group.GetValueForPitch(controller, controller.TargetSnapshot);
   if (AudioMixerEffectGUI.Slider(AudioMixerEffectView.Texts.pitch, ref valueForPitch, 100f, 1f, AudioMixerEffectView.Texts.percentage, 0.01f, 10f, controller, (AudioParameterPath) new AudioGroupParameterPath(group, group.GetGUIDForPitch())))
   {
     Undo.RecordObject((UnityEngine.Object) controller.TargetSnapshot, "Change Pitch");
     group.SetValueForPitch(controller, controller.TargetSnapshot, valueForPitch);
   }
   GUILayout.Space(5f);
   EditorGUILayout.EndVertical();
   AudioMixerDrawUtils.DrawSplitter();
   return rect.height;
 }
		public void CopyAllSettingsToAllSnapshots(AudioMixerGroupController group, AudioMixerSnapshotController snapshot)
		{
			for (int i = 0; i < group.effects.Length; i++)
			{
				this.CopyEffectSettingsToAllSnapshots(group, i, snapshot, true);
			}
			AudioMixerSnapshotController[] snapshots = this.snapshots;
			for (int j = 0; j < snapshots.Length; j++)
			{
				if (!(snapshots[j] == snapshot))
				{
					AudioMixerSnapshotController snapshot2 = snapshots[j];
					group.SetValueForVolume(this, snapshot2, group.GetValueForVolume(this, snapshot));
					group.SetValueForPitch(this, snapshot2, group.GetValueForPitch(this, snapshot));
				}
			}
		}