If I delete a Script/Component from project. MarkedUp will throw lots of errors when trying to "MarkUp" a GameObject with "missing scripts". For now I've solved it with (inside: MarkedUpEditor.cs):
if (serializedObject.targetObject != null)
{
isInitialized = true;
EditorLayoutDataBuilder.BuildLayoutData(serializedObject, out allProps,
out firstLevelProps, out layoutData, out inlineEditors, out targetsRequireUpdate);
layoutController = new InspectorLayoutController(target.GetType().FullName,
layoutData.ToArray());
callbackManager = new CallbackManager(firstLevelProps);
OnInitialize();
}
else
{
UnityEngine.Debug.LogError(target.name + " probably has a Component that doesn't exist anymore! Please remove the missing Component.", target);
}
Also had to add 'isInitialized' to prevent other code from running if Initialization hasn't been done properly. I've not had the time to dig any deeper into a better solution. :)
Hey and again, awesome lib!
If I delete a Script/Component from project. MarkedUp will throw lots of errors when trying to "MarkUp" a GameObject with "missing scripts". For now I've solved it with (inside: MarkedUpEditor.cs):
Also had to add 'isInitialized' to prevent other code from running if Initialization hasn't been done properly. I've not had the time to dig any deeper into a better solution. :)