Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // how to "extend" Debug class in Unity
- // @kurtdekker
- static class Debug
- {
- // gotta mirror all the other ones!
- public static void Log( string s)
- {
- UnityEngine.Debug.Log( s);
- }
- public static void LogWarning( string s)
- {
- UnityEngine.Debug.LogWarning( s);
- }
- public static void LogError( string s)
- {
- UnityEngine.Debug.LogError( s);
- }
- // @kurtdekker
- public static void Log( string s, UnityEngine.Object o)
- {
- UnityEngine.Debug.Log( s, o);
- }
- public static void LogWarning( string s, UnityEngine.Object o)
- {
- UnityEngine.Debug.LogWarning( s, o);
- }
- public static void LogError( string s, UnityEngine.Object o)
- {
- UnityEngine.Debug.LogError( s, o);
- }
- public static void LogError( object o)
- {
- UnityEngine.Debug.LogError( o.ToString());
- }
- public static void Break()
- {
- UnityEngine.Debug.Break();
- }
- // gotta keep mirroring more; that's as a typing exercise for you!!
- // @kurtdekker
- public static void KurtLog( string s)
- {
- UnityEngine.Debug.Log( "KurtLog:" + s);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment