mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 17:26:02 +08:00
PropertyField null check and default includeChildren value
This commit is contained in:
parent
ab74f8fd36
commit
ace1e8ccd8
@ -9,7 +9,8 @@ using UnityEngine;
|
|||||||
/// <summary> UNEC-specific version of <see cref="EditorGUILayout"/> </summary>
|
/// <summary> UNEC-specific version of <see cref="EditorGUILayout"/> </summary>
|
||||||
public static class NodeEditorGUILayout {
|
public static class NodeEditorGUILayout {
|
||||||
|
|
||||||
public static void PropertyField(SerializedProperty property, bool includeChildren) {
|
public static void PropertyField(SerializedProperty property, bool includeChildren = true) {
|
||||||
|
if (property == null) throw new NullReferenceException();
|
||||||
Node node = property.serializedObject.targetObject as Node;
|
Node node = property.serializedObject.targetObject as Node;
|
||||||
NodePort port = node.GetPortByFieldName(property.name);
|
NodePort port = node.GetPortByFieldName(property.name);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user