* Fix for when inspected object gets destroyed
* Fix for displaying Dictionaries/Lists nested inside a Dictionary
* Cleanups
This commit is contained in:
sinaioutlander
2020-09-07 17:05:37 +10:00
parent 4e8b84b67e
commit 72d31eaa64
10 changed files with 186 additions and 165 deletions

View File

@ -48,12 +48,6 @@ namespace Explorer
public bool GetObjectAsGameObject()
{
if (Target == null)
{
MelonLogger.Log("Target is null!");
return false;
}
var targetType = Target.GetType();
if (targetType == typeof(GameObject))
@ -108,6 +102,22 @@ namespace Explorer
{
try
{
if (Target == null)
{
MelonLogger.Log("Target is null!");
DestroyWindow();
return;
}
else if (Target is UnityEngine.Object uObj)
{
if (!uObj)
{
MelonLogger.Log("Target was destroyed!");
DestroyWindow();
return;
}
}
if (!m_object && !GetObjectAsGameObject())
{
throw new Exception("Object is null!");