Skip to content

Commit 8c008bc

Browse files
committed
Clarified in xmldoc that removing an action map still leaves all contained actions intact.
1 parent 4dfc4f4 commit 8c008bc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Packages/com.unity.inputsystem/InputSystem/Actions/InputActionSetupExtensions.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,13 @@ public static void AddActionMap(this InputActionAsset asset, InputActionMap map)
8181
/// <summary>
8282
/// Remove the given action map from the asset.
8383
/// </summary>
84-
/// <param name="asset">Asset to add the action map to.</param>
84+
/// <param name="asset">The asset to remove the action from.</param>
8585
/// <param name="map">An action map. If the given map is not part of the asset, the method
8686
/// does nothing.</param>
87+
/// <remarks>Any action contained in the removed map will remain unchanged and still be
88+
/// associated with its parent input action map. If this operation is successful, map will no
89+
/// longer be associated with <paramref name="asset"/> and <see cref="InputActionMap.asset"/> will
90+
/// return <c>null</c>.</remarks>
8791
/// <exception cref="ArgumentNullException"><paramref name="asset"/> or <paramref name="map"/> is <c>null</c>.</exception>
8892
/// <exception cref="InvalidOperationException"><paramref name="map"/> is currently enabled (see <see
8993
/// cref="InputActionMap.enabled"/>) or is part of an <see cref="InputActionAsset"/> that has <see cref="InputActionMap"/>s
@@ -116,6 +120,10 @@ public static void RemoveActionMap(this InputActionAsset asset, InputActionMap m
116120
/// <param name="nameOrId">The name or ID (see <see cref="InputActionMap.id"/>) of a map in the
117121
/// asset. Note that lookup is case-insensitive. If no map with the given name or ID is found,
118122
/// the method does nothing.</param>
123+
/// <remarks>Any action contained in the removed map will remain unchanged and still be
124+
/// associated with its parent input action map. If this operation is successful, map will no
125+
/// longer be associated with <paramref name="asset"/> and <see cref="InputActionMap.asset"/> will
126+
/// return <c>null</c>.</remarks>
119127
/// <exception cref="ArgumentNullException"><paramref name="asset"/> or <paramref name="nameOrId"/> is <c>null</c>.</exception>
120128
/// <exception cref="InvalidOperationException">The map referenced by <paramref name="nameOrId"/> is currently enabled
121129
/// (see <see cref="InputActionMap.enabled"/>).</exception>

0 commit comments

Comments
 (0)