using UnityEngine;
using System;
using System.Collections.Generic;
using System.Diagnostics;

namespace mgaia.Utils
{
    /// <summary>
    /// Classe utilizada para executar asserts
    /// </summary>
    /// <owner>Felipe</owner>
    public static class Assert
    {
        /// <summary>
        /// Dispara uma mensagem se assert se a condição for falsa
        /// </summary>
        [Conditional("UNITY_EDITOR")]
        public static void AssertTrue(bool condition, string msg)
        {
#if UNITY_EDITOR
            if (!condition)
            {
                UnityEngine.Debug.Break();
                throw new InvalidOperationException("Assert failed: " + msg + "\n" + new System.Diagnostics.StackTrace(1).ToString());
            }
#endif
        }
    }
}