private object ObjectFieldValue(NodeFieldDesc desc) { Object oldValue = (Object)mCurBehaviorNode.args_dict.GetTreeDictValue(desc.type, desc.name); EditorGUILayout.LabelField(GetPropDesc(desc)); Object newValue = EditorGUILayout.ObjectField("", oldValue, desc.type, false); if (newValue == null) { return(null); } if (BehaviorTreeArgsDict.IsGameObjectType(desc.type) && !BehaviorTreeArgsDict.SatisfyCondition((GameObject)newValue, desc.constraintTypes)) { return(null); } return(newValue); }