mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-06 21:32:23 +08:00
Prevent Unity crashing on PropertyInfo evaluation
Unity crashes from checking Canvas.renderingDisplaySize on a Canvas set to WorldSpace with no worldCamera set.
This commit is contained in:
@ -3,7 +3,9 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityExplorer.Inspectors;
|
||||
using UnityExplorer.Runtime;
|
||||
|
||||
namespace UnityExplorer.CacheObject
|
||||
{
|
||||
@ -28,6 +30,8 @@ namespace UnityExplorer.CacheObject
|
||||
{
|
||||
try
|
||||
{
|
||||
UnityCrashPrevention.CheckPropertyInfoEvaluation(this);
|
||||
|
||||
object ret;
|
||||
if (HasArguments)
|
||||
ret = PropertyInfo.GetValue(DeclaringInstance, this.Evaluator.TryParseArguments());
|
||||
|
Reference in New Issue
Block a user