You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

31 line
520 B

  1. using System;
  2. using System.Diagnostics;
  3. using UnityEngine;
  4. public class UnityAssert
  5. {
  6. [Conditional("DEBUG")]
  7. public static void Assert(bool condition, string message = "")
  8. {
  9. if (!condition)
  10. {
  11. UnityEngine.Debug.LogError(message);
  12. }
  13. }
  14. private class AssertFailedException : Exception
  15. {
  16. public AssertFailedException()
  17. {
  18. }
  19. public AssertFailedException(string s) : base(s)
  20. {
  21. }
  22. public AssertFailedException(string s, Exception inner) : base(s, inner)
  23. {
  24. }
  25. }
  26. }