mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
!W 绘制不可被unity序列化的类型端口
This commit is contained in:
parent
354f7d10d8
commit
38df17b58b
@ -52,10 +52,28 @@ namespace XNodeEditor {
|
||||
SerializedProperty iterator = serializedObject.GetIterator();
|
||||
bool enterChildren = true;
|
||||
EditorGUIUtility.labelWidth = 84;
|
||||
List<string> _names = new List<string>();
|
||||
while (iterator.NextVisible(enterChildren)) {
|
||||
enterChildren = false;
|
||||
if (excludes.Contains(iterator.name)) continue;
|
||||
NodeEditorGUILayout.PropertyField(iterator, true);
|
||||
_names.Add(iterator.name);
|
||||
}
|
||||
|
||||
//处理一下没被绘制的端口
|
||||
foreach (var port in target.Ports)
|
||||
{
|
||||
//动态的跳过
|
||||
if (port.IsDynamic)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//不受unity序列化支持,但是被标记为了输入或输出
|
||||
if (!_names.Contains(port.fieldName))
|
||||
{
|
||||
NodeEditorGUILayout.PortField(port);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user