Skip to content

Commit a499b40

Browse files
committed
Improved inline comment
1 parent 3af6d81 commit a499b40

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Assets/Tests/InputSystem/CoreTests_Actions_Reference.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ public void Actions_Reference_ShouldReevaluateIfAssociatedEntityIsDeleted(Type t
179179
Assert.That(reference.ToDisplayName(), Is.EqualTo("map1/action1"));
180180
Assert.That(reference.ToString(), Is.EqualTo(":map1/action1"));
181181

182-
// Delete the referenced action directly or indirectly
182+
// Remove the referenced action directly or indirectly. Note that this doesn't destroy an action or action map
183+
// since they are regular reference types. However, an InputActionReference is based on asset an and action ID
184+
// So if a map is removed from an asset but remains valid in memory it is no longer a valid reference.
183185
if (typeToDelete == typeof(InputAction))
184186
asset.RemoveAction("map1/action1");
185187
else if (typeToDelete == typeof(InputActionMap))

0 commit comments

Comments
 (0)