Skip to content

Commit 3b68c97

Browse files
committed
Fix strange out of range error
1 parent 7f25598 commit 3b68c97

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

com.unity.render-pipelines.core/Runtime/Inputs/InputRegistering.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ static void AddEntriesWithoutCheck(SerializedProperty spAxes, List<InputManagerE
6262
int endOfCurrentInputList = spAxes.arraySize;
6363
spAxes.arraySize = endOfCurrentInputList + newEntries.Count;
6464

65-
SerializedProperty spAxis = spAxes.GetArrayElementAtIndex(endOfCurrentInputList);
65+
SerializedProperty spAxis = spAxes.GetArrayElementAtIndex(endOfCurrentInputList - 1);
66+
spAxis.Next(false);
6667
for (int i = 0; i < newEntries.Count; ++i, spAxis.Next(false))
6768
CopyEntry(spAxis, newEntries[i]);
6869
}

0 commit comments

Comments
 (0)