You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Delete the referenced action directly or indirectly
120
+
if(typeToDelete==typeof(InputAction))
121
+
asset.RemoveAction("map/action1");
122
+
elseif(typeToDelete==typeof(InputActionMap))
123
+
asset.RemoveActionMap("map");
124
+
elseif(typeToDelete==typeof(InputActionAsset))
125
+
UnityEngine.Object.DestroyImmediate(asset);
118
126
119
127
// TODO reference need to react to this
120
-
Assert.That(reference.action,Is.SameAs(action1));
128
+
Assert.That(reference.action,Is.Null);
121
129
Assert.That(reference.asset,Is.SameAs(asset));
122
130
Assert.That(reference.name,Is.EqualTo("map/action1"));// Unexpected when no longer existing
123
131
Assert.That(reference.ToDisplayName(),Is.EqualTo("map/action1"));// Unexpected when no longer existing
124
-
Assert.That(reference.ToString(),Is.EqualTo(":map/action1"));// Unexpected when no longer existing
132
+
//Assert.That(reference.ToString(), Is.EqualTo(":" + new Guid(action1.m_Id))); // Unexpected when no longer existing
125
133
}
134
+
135
+
// List of bugs addressed on this branch:
136
+
// (FIXED) InputActionReference - Do not set m_Action when calling Set.
137
+
// (FIXED) InputActionReference.asset - Returns incorrect asset after being .Set if .action is called before Set.
138
+
// (FIXED) InputActionReference - Assigned with Set during play-mode corrupts InputActionAsset by mutating asset reference into pointing into potentially another asset and overwrites existign asset.
139
+
// (FIXED) InputActionReferencePropertyDrawer - Assigns direct reference into InputActionAsset to InputActionReference fields leading to corruption.
140
+
// InputActionReference - Contains stale reference and looks like a valid reference if the action is deleted. .action returns removed action.
141
+
// InputActionReference - Do not invalidate if action, action map or asset is deleted/destroyed. .action still returns the action.
142
+
// (FIXED) InputActionAsset.RemoveActionMap - Do not remove actions within the map and they keep a stale reference to the removed map.
143
+
// (FIXED) InputActionAsset.RemoveAction - Throws exception if action do not have any bindings.
0 commit comments