Skip to main content

ObjectIssueLog

A class in Root.Township, the global namespace.

Editor-only list of problems found on assets. Its Add and assert methods are marked editor-only, so calls to them are compiled out of game builds.

Constructors​

MemberWhat it is
ObjectIssueLog()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

3 private and internal fields
MemberWhat it is
private List<ObjectIssueLog.Issue> issuesSaved list of objects with their logged issue messages.
private static Logger loggerClass logger.
private Dictionary<Object, ObjectIssueLog.Issue> mapLookup from object to its issue entry, built on first Add.

Methods​

MemberWhat it is
void Add(Object topic, string message)Editor only: records a message against an object, skipping duplicates.
void Assert(Object topic, bool condition, string message)Editor only: throws if the condition is false.
void AssertExists(Object topic, Object value, string message)Editor only: throws if the object is null, or if any object in the list is.
void AssertExists(Object topic, IEnumerable<Object> value, string message)Editor only: throws if the object is null, or if any object in the list is.
void Clear()Empties the log. Throws if nothing was ever added, since the lookup isn't built yet.

Used in​

Members of other types that take, return or hold a ObjectIssueLog: