Skip to content

Commit

Permalink
Fix for missing DrawLine, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Carter committed Aug 22, 2015
1 parent 6fbd7c5 commit 994c11f
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Debug.cs
Expand Up @@ -8,6 +8,45 @@
public static class Debug
{
//Unity replacement methods
public static void DrawRay(Vector3 start, Vector3 dir, Color? color=null, float duration = 0.0f, bool depthTest = true)
{
var col = color ?? Color.white;
UnityEngine.Debug.DrawRay(start, dir, col, duration, depthTest);
}

public static void DrawLine(Vector3 start, Vector3 end, Color? color=null, float duration = 0.0f, bool depthTest = true)
{
var col = color ?? Color.white;
UnityEngine.Debug.DrawLine(start, end, col, duration, depthTest);
}

public static void Break()
{
UnityEngine.Debug.Break();
}

#if UNITY_5
public static void Assert(bool condition)
{
UnityEngine.Debug.Assert(condition);
}

public static void Assert(bool condition, string message)
{
UnityEngine.Debug.Assert(condition, message);
}

public static void Assert(bool condition, string format, params object[] args)
{
UnityEngine.Debug.Assert(condition, format, args);
}

public static void ClearDeveloperConsole()
{
UnityEngine.Debug.ClearDeveloperConsole();
}
#endif

[StackTraceIgnore]
static public void LogFormat(UnityEngine.Object context, string message, params object[] par)
{
Expand Down
8 changes: 8 additions & 0 deletions LICENSE.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 994c11f

Please sign in to comment.