@@ -114,10 +114,37 @@ private void DrawEventInspector(SerializedProperty selectedEventProperty, TEvent
114114
115115 // Positioning
116116 selectedEvent . spatialization = ( SpatialPositioningType ) EditorGUILayout . Popup ( "Positioning" , ( int ) selectedEvent . spatialization , this . posTypes ) ;
117- EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "roomSize" ) ) ;
118- EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "minGain" ) ) ;
119- EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "maxGain" ) ) ;
120- EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "unityGainDistance" ) ) ;
117+
118+ if ( selectedEvent . spatialization == SpatialPositioningType . SpatialSound )
119+ {
120+ EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "roomSize" ) ) ;
121+ EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "minGain" ) ) ;
122+ EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "maxGain" ) ) ;
123+ EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "unityGainDistance" ) ) ;
124+ EditorGUILayout . Space ( ) ;
125+ }
126+ else if ( selectedEvent . spatialization == SpatialPositioningType . ThreeD )
127+ {
128+ Rect editorSize = new Rect ( 0f , 0f , 1f , 1f ) ;
129+ float curveHeight = 30f ;
130+ float curveWidth = 300f ;
131+
132+ //Simple 3D Sounds properties
133+ EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "maxDistanceAttenuation3D" ) ) ;
134+
135+ //volume attenuation
136+ selectedEventProperty . FindPropertyRelative ( "attenuationCurve" ) . animationCurveValue = EditorGUILayout . CurveField ( "Attenuation" , selectedEventProperty . FindPropertyRelative ( "attenuationCurve" ) . animationCurveValue , Color . red , editorSize , GUILayout . Height ( curveHeight ) , GUILayout . Width ( curveWidth ) , GUILayout . ExpandHeight ( false ) , GUILayout . ExpandWidth ( true ) ) ;
137+ //Spatial green
138+ selectedEventProperty . FindPropertyRelative ( "spatialCurve" ) . animationCurveValue = EditorGUILayout . CurveField ( "Spatial" , selectedEventProperty . FindPropertyRelative ( "spatialCurve" ) . animationCurveValue , Color . green , editorSize , GUILayout . Height ( curveHeight ) , GUILayout . Width ( curveWidth ) , GUILayout . ExpandHeight ( false ) , GUILayout . ExpandWidth ( true ) ) ;
139+ //spread lightblue
140+ selectedEventProperty . FindPropertyRelative ( "spreadCurve" ) . animationCurveValue = EditorGUILayout . CurveField ( "Spread" , selectedEventProperty . FindPropertyRelative ( "spreadCurve" ) . animationCurveValue , Color . blue , editorSize , GUILayout . Height ( curveHeight ) , GUILayout . Width ( curveWidth ) , GUILayout . ExpandHeight ( false ) , GUILayout . ExpandWidth ( true ) ) ;
141+ //lowpass purple
142+ selectedEventProperty . FindPropertyRelative ( "lowPassCurve" ) . animationCurveValue = EditorGUILayout . CurveField ( "LowPass" , selectedEventProperty . FindPropertyRelative ( "lowPassCurve" ) . animationCurveValue , Color . magenta , editorSize , GUILayout . Height ( curveHeight ) , GUILayout . Width ( curveWidth ) , GUILayout . ExpandHeight ( false ) , GUILayout . ExpandWidth ( true ) ) ;
143+ //Yellow reverb
144+ selectedEventProperty . FindPropertyRelative ( "reverbCurve" ) . animationCurveValue = EditorGUILayout . CurveField ( "Reverb" , selectedEventProperty . FindPropertyRelative ( "reverbCurve" ) . animationCurveValue , Color . yellow , editorSize , GUILayout . Height ( curveHeight ) , GUILayout . Width ( curveWidth ) , GUILayout . ExpandHeight ( false ) , GUILayout . ExpandWidth ( true ) ) ;
145+
146+ EditorGUILayout . Space ( ) ;
147+ }
121148
122149 // Bus
123150 EditorGUILayout . PropertyField ( selectedEventProperty . FindPropertyRelative ( "bus" ) ) ;
0 commit comments