Created
November 12, 2021 10:11
-
-
Save RoeiRubach/3c12d5ead45a39b77ea48ce9d117b333 to your computer and use it in GitHub Desktop.
[Unity Editor Console Reporter]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| public static class ConsoleReporter | |
| { | |
| private static readonly string _cantFind = "coulnd't be found!"; | |
| private static readonly string _redError = "<b><color=red>Error: </color></b>"; | |
| private static readonly string _clickHighlight = "Click to highlight in hierarchy"; | |
| private static readonly string _inspectorWasntSet = "was not set in the inspector!"; | |
| public static void LogNullObject(string objectName) | |
| { | |
| Debug.Log($"{_redError} {objectName} {_cantFind}"); | |
| } | |
| public static void LogInspectorRefMissing(string objectName, Transform hierarchyObject) | |
| { | |
| Debug.Log($"{_redError} {objectName} {_inspectorWasntSet}" + | |
| $"<color=lightblue> {_clickHighlight} </color>", hierarchyObject); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment