mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
Exclude strings from array types manually to prevent them from being treated as char arrays.
This commit is contained in:
parent
22ffe445d4
commit
0a3a9920f3
@ -340,7 +340,7 @@ namespace XNodeEditor {
|
||||
list.drawElementCallback =
|
||||
(Rect rect, int index, bool isActive, bool isFocused) => {
|
||||
XNode.NodePort port = node.GetPort(fieldName + " " + index);
|
||||
if (hasArrayData) {
|
||||
if (hasArrayData && arrayData.propertyType != SerializedPropertyType.String) {
|
||||
if (arrayData.arraySize <= index) {
|
||||
EditorGUI.LabelField(rect, "Array[" + index + "] data out of range");
|
||||
return;
|
||||
@ -468,7 +468,7 @@ namespace XNodeEditor {
|
||||
EditorUtility.SetDirty(node);
|
||||
}
|
||||
|
||||
if (hasArrayData) {
|
||||
if (hasArrayData && arrayData.propertyType != SerializedPropertyType.String) {
|
||||
if (arrayData.arraySize <= index) {
|
||||
Debug.LogWarning("Attempted to remove array index " + index + " where only " + arrayData.arraySize + " exist - Skipped");
|
||||
Debug.Log(rl.list[0]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user