[fix] 解决编辑器打包时出现的 _serializedObject.targetObject 意外销毁的情况 (#17)
parent
3918b707e3
commit
689e582efd
|
@ -115,6 +115,11 @@ namespace HybridCLR.Editor
|
||||||
{
|
{
|
||||||
using (CreateSettingsWindowGUIScope())
|
using (CreateSettingsWindowGUIScope())
|
||||||
{
|
{
|
||||||
|
//解决编辑器打包时出现的 _serializedObject.targetObject 意外销毁的情况
|
||||||
|
if (_serializedObject == null||!_serializedObject.targetObject)
|
||||||
|
{
|
||||||
|
InitGUI();
|
||||||
|
}
|
||||||
_serializedObject.Update();
|
_serializedObject.Update();
|
||||||
EditorGUI.BeginChangeCheck();
|
EditorGUI.BeginChangeCheck();
|
||||||
EditorGUILayout.PropertyField(_enable);
|
EditorGUILayout.PropertyField(_enable);
|
||||||
|
|
Loading…
Reference in New Issue