File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 22// Purpose: Static class for playing audio (clips, sound effects and music).
33// Created by: DavidFDev
44
5- // #define HIDE_IN_EDITOR
6- #define DEBUG_AUDIO
5+ #define HIDE_IN_EDITOR
6+ // #define DEBUG_AUDIO
77
88using System ;
99using System . Collections ;
@@ -165,10 +165,12 @@ public static Playback PlaySfx(string path, Vector3 position = default)
165165 /// <param name="fadeOut">Duration, in seconds, that the old music should take to fade out.</param>
166166 public static void PlayMusic ( AudioClip music , float fadeIn = 1f , float fadeOut = 0.75f )
167167 {
168+ #if DEBUG_AUDIO
168169 static string GetAudioClipName ( AudioSource source )
169170 {
170171 return source . clip == null ? "none" : source . clip . name ;
171172 }
173+ #endif
172174
173175 // Cancel if the new music is the same as the current music
174176 if ( music == _musicPlayback . clip )
You can’t perform that action at this time.
0 commit comments