static void Main(string[] args) { //<snippet1> WarningException myEx = new WarningException("This is a warning"); Console.WriteLine(myEx.Message); Console.WriteLine(myEx.ToString()); //</snippet1> }
void LogWarning(string errorMessage) { #if Unity_Editor || UNITY_STANDALONE Debug.LogWarning(errorMessage); #else WarningException myEx = new WarningException(errorMessage); Console.Write(myEx.ToString()); #endif }