@@ -9,7 +9,7 @@ namespace HoloToolkit.Unity
99{
1010 public class UAudioManagerBaseEditor < TEvent > : Editor where TEvent : AudioEvent , new ( )
1111 {
12- protected UAudioManagerBase < TEvent > myTarget ;
12+ protected UAudioManagerBase < TEvent > MyTarget ;
1313 private string [ ] eventNames ;
1414 private int selectedEventIndex = 0 ;
1515 private readonly string [ ] posTypes = { "2D" , "3D" , "Spatial Sound" } ;
@@ -18,37 +18,37 @@ namespace HoloToolkit.Unity
1818 protected void SetUpEditor ( )
1919 {
2020 // Having a null array of events causes too many errors and should only happen on first adding anyway.
21- if ( this . myTarget . EditorEvents == null )
21+ if ( this . MyTarget . EditorEvents == null )
2222 {
23- this . myTarget . EditorEvents = new TEvent [ 0 ] ;
23+ this . MyTarget . EditorEvents = new TEvent [ 0 ] ;
2424 }
25- this . eventNames = new string [ this . myTarget . EditorEvents . Length ] ;
26- UpdateEventNames ( this . myTarget . EditorEvents ) ;
25+ this . eventNames = new string [ this . MyTarget . EditorEvents . Length ] ;
26+ UpdateEventNames ( this . MyTarget . EditorEvents ) ;
2727 }
2828
2929 protected void DrawInspectorGUI ( bool showEmitters )
3030 {
3131 this . serializedObject . Update ( ) ;
3232 EditorGUI . BeginChangeCheck ( ) ;
33- DrawEventHeader ( this . myTarget . EditorEvents ) ;
33+ DrawEventHeader ( this . MyTarget . EditorEvents ) ;
3434
35- if ( this . myTarget . EditorEvents != null && this . myTarget . EditorEvents . Length > 0 )
35+ if ( this . MyTarget . EditorEvents != null && this . MyTarget . EditorEvents . Length > 0 )
3636 {
3737 // Display current event in dropdown.
3838 EditorGUI . indentLevel ++ ;
3939 this . selectedEventIndex = EditorGUILayout . Popup ( this . selectedEventIndex , this . eventNames ) ;
4040
41- if ( this . selectedEventIndex < this . myTarget . EditorEvents . Length )
41+ if ( this . selectedEventIndex < this . MyTarget . EditorEvents . Length )
4242 {
4343 TEvent selectedEvent ;
4444
45- selectedEvent = this . myTarget . EditorEvents [ this . selectedEventIndex ] ;
46- SerializedProperty selectedEventProperty = this . serializedObject . FindProperty ( "events .Array.data[" + this . selectedEventIndex . ToString ( ) + "]" ) ;
45+ selectedEvent = this . MyTarget . EditorEvents [ this . selectedEventIndex ] ;
46+ SerializedProperty selectedEventProperty = this . serializedObject . FindProperty ( "Events .Array.data[" + this . selectedEventIndex . ToString ( ) + "]" ) ;
4747 EditorGUILayout . Space ( ) ;
4848
4949 if ( selectedEventProperty != null )
5050 {
51- DrawEventInspector ( selectedEventProperty , selectedEvent , this . myTarget . EditorEvents , showEmitters ) ;
51+ DrawEventInspector ( selectedEventProperty , selectedEvent , this . MyTarget . EditorEvents , showEmitters ) ;
5252 if ( ! DrawContainerInspector ( selectedEventProperty , selectedEvent ) )
5353 {
5454 EditorGUI . indentLevel ++ ;
@@ -66,7 +66,7 @@ protected void DrawInspectorGUI(bool showEmitters)
6666
6767 if ( UnityEngine . GUI . changed )
6868 {
69- EditorUtility . SetDirty ( this . myTarget ) ;
69+ EditorUtility . SetDirty ( this . MyTarget ) ;
7070 }
7171 }
7272
@@ -81,13 +81,13 @@ private void DrawEventHeader(TEvent[] EditorEvents)
8181 {
8282 if ( EditorGUILayoutExtensions . Button ( "Remove" ) )
8383 {
84- this . myTarget . EditorEvents = RemoveAudioEvent ( EditorEvents , this . selectedEventIndex ) ;
84+ this . MyTarget . EditorEvents = RemoveAudioEvent ( EditorEvents , this . selectedEventIndex ) ;
8585 }
8686 }
8787
8888 if ( EditorGUILayoutExtensions . Button ( "Add" ) )
8989 {
90- this . myTarget . EditorEvents = AddAudioEvent ( EditorEvents ) ;
90+ this . MyTarget . EditorEvents = AddAudioEvent ( EditorEvents ) ;
9191 }
9292
9393 EditorGUILayout . EndHorizontal ( ) ;
@@ -184,15 +184,15 @@ private void DrawEventInspector(SerializedProperty selectedEventProperty, TEvent
184184 private bool DrawContainerInspector ( SerializedProperty selectedEventProperty , TEvent selectedEvent )
185185 {
186186 bool addedSound = false ;
187- EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "Container.containerType " ) ) ;
187+ EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "Container.ContainerType " ) ) ;
188188
189189 if ( ! selectedEvent . IsContinuous ( ) )
190190 {
191- EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "Container.looping " ) ) ;
191+ EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "Container.Looping " ) ) ;
192192
193- if ( selectedEvent . Container . looping )
193+ if ( selectedEvent . Container . Looping )
194194 {
195- EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "Container.loopTime " ) ) ;
195+ EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "Container.LoopTime " ) ) ;
196196 }
197197 }
198198
@@ -201,7 +201,7 @@ private bool DrawContainerInspector(SerializedProperty selectedEventProperty, TE
201201
202202 if ( selectedEvent . IsContinuous ( ) )
203203 {
204- EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "Container.crossfadeTime " ) ) ;
204+ EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "Container.CrossfadeTime " ) ) ;
205205 }
206206
207207 EditorGUILayout . BeginHorizontal ( ) ;
@@ -220,7 +220,7 @@ private bool DrawContainerInspector(SerializedProperty selectedEventProperty, TE
220220
221221 private void DrawSoundClipInspector ( SerializedProperty selectedEventProperty , TEvent selectedEvent )
222222 {
223- bool allowLoopingClip = ! selectedEvent . Container . looping ;
223+ bool allowLoopingClip = ! selectedEvent . Container . Looping ;
224224
225225 if ( allowLoopingClip )
226226 {
@@ -230,15 +230,15 @@ private void DrawSoundClipInspector(SerializedProperty selectedEventProperty, TE
230230 }
231231 }
232232
233- for ( int i = 0 ; i < selectedEvent . Container . sounds . Length ; i ++ )
233+ for ( int i = 0 ; i < selectedEvent . Container . Sounds . Length ; i ++ )
234234 {
235235 EditorGUILayout . Space ( ) ;
236236 EditorGUILayout . BeginHorizontal ( ) ;
237- EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "Container.sounds .Array.data[" + i + "].sound " ) ) ;
237+ EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "Container.Sounds .Array.data[" + i + "].Sound " ) ) ;
238238
239239 if ( EditorGUILayoutExtensions . Button ( "Remove" ) )
240240 {
241- selectedEventProperty . FindPropertyRelative ( "Container.sounds .Array.data[" + i + "]" ) . DeleteCommand ( ) ;
241+ selectedEventProperty . FindPropertyRelative ( "Container.Sounds .Array.data[" + i + "]" ) . DeleteCommand ( ) ;
242242 break ;
243243 }
244244
@@ -247,23 +247,23 @@ private void DrawSoundClipInspector(SerializedProperty selectedEventProperty, TE
247247 if ( ! selectedEvent . IsContinuous ( ) )
248248 {
249249 EditorGUILayout . BeginHorizontal ( ) ;
250- EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "Container.sounds .Array.data[" + i + "].delayCenter " ) ) ;
251- EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "Container.sounds .Array.data[" + i + "].delayRandomization " ) ) ;
250+ EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "Container.Sounds .Array.data[" + i + "].DelayCenter " ) ) ;
251+ EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "Container.Sounds .Array.data[" + i + "].DelayRandomization " ) ) ;
252252 EditorGUILayout . EndHorizontal ( ) ;
253253
254254 //Disable looping next clips in a simultaneous container only.
255255 if ( allowLoopingClip )
256256 {
257- EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "Container.sounds .Array.data[" + i + "].looping " ) ) ;
257+ EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "Container.Sounds .Array.data[" + i + "].Looping " ) ) ;
258258
259- if ( selectedEvent . Container . sounds [ i ] . looping && selectedEvent . Container . containerType == AudioContainerType . Simultaneous )
259+ if ( selectedEvent . Container . Sounds [ i ] . Looping && selectedEvent . Container . ContainerType == AudioContainerType . Simultaneous )
260260 {
261261 allowLoopingClip = false ;
262262 }
263263 }
264264 else
265265 {
266- selectedEvent . Container . sounds [ i ] . looping = false ;
266+ selectedEvent . Container . Sounds [ i ] . Looping = false ;
267267 }
268268 }
269269 }
@@ -293,18 +293,18 @@ private void UpdateEventNames(TEvent[] EditorEvents)
293293 private void AddSound ( TEvent selectedEvent )
294294 {
295295
296- UAudioClip [ ] tempClips = new UAudioClip [ selectedEvent . Container . sounds . Length + 1 ] ;
297- selectedEvent . Container . sounds . CopyTo ( tempClips , 0 ) ;
296+ UAudioClip [ ] tempClips = new UAudioClip [ selectedEvent . Container . Sounds . Length + 1 ] ;
297+ selectedEvent . Container . Sounds . CopyTo ( tempClips , 0 ) ;
298298 tempClips [ tempClips . Length - 1 ] = new UAudioClip ( ) ;
299- selectedEvent . Container . sounds = tempClips ;
299+ selectedEvent . Container . Sounds = tempClips ;
300300 }
301301
302302 private TEvent [ ] AddAudioEvent ( TEvent [ ] EditorEvents )
303303 {
304304 TEvent tempEvent = new TEvent ( ) ;
305305 TEvent [ ] tempEventArray = new TEvent [ EditorEvents . Length + 1 ] ;
306306 tempEvent . Container = new AudioContainer ( ) ;
307- tempEvent . Container . sounds = new UAudioClip [ 0 ] ;
307+ tempEvent . Container . Sounds = new UAudioClip [ 0 ] ;
308308 EditorEvents . CopyTo ( tempEventArray , 0 ) ;
309309 tempEventArray [ EditorEvents . Length ] = tempEvent ;
310310 this . eventNames = new string [ tempEventArray . Length ] ;
0 commit comments