Open mages-gamedev opened 5 years ago
private void OnEnable()
{
//InitInspector();
}
……
protected bool InspectorGUIStart(bool force = false)
{
InitInspector();
Repaint();
// Not initialized, try initializing
//if (hasSortableArrays && listIndex.Count == 0)
// InitInspector();
//if (hasEditable && editableIndex.Count == 0)
// InitInspector();
……
}
any fix for this?
@delzrm -- This isn't a real fix, but you can at least suppress the errors by wrapping the offending line with a try/catch.
try {
styleEditBox = new GUIStyle(EditorStyles.helpBox) { padding = new RectOffset(5, 5, 5, 5) };
} catch (Exception) {
}
You're not really supposed to use try/catch like this since it's terrible for performance, but seeing as it's in an initialization method in an Editor script, it's not really a performance critical segment of code.
Upon recompilation of scripts, an error consistently pops up
This is the line throwing the null ref error: