Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased] - yyyy-mm-dd

### Fixed

- Fixed compilation error CS0246 (`The type or namespace name 'InputSystemState' could not be found`) in non-development Player builds that include test assemblies with the `UNITY_INCLUDE_TESTS` scripting define symbol set. The 1.20.2 fix for the related CS0117 `remoteConnection` error didn't cover the test framework assembly.


## [1.20.2] - 2026-12-03
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ private static TData DeserializeData<TData>(byte[] data)
return JsonUtility.FromJson<TData>(json);
}

#if DEBUG
#if UNITY_EDITOR || UNITY_INCLUDE_TESTS
// State we want to take across domain reloads. We can only take some of the
// state across. Subscriptions will be lost and have to be manually restored.
[Serializable]
Expand Down Expand Up @@ -786,6 +786,6 @@ internal void RestoreState(SerializedState state, InputManager manager)
m_Senders = state.senders;
}

#endif
#endif // UNITY_EDITOR || UNITY_INCLUDE_TESTS
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4522,7 +4522,7 @@ private bool FlipBuffersForDeviceIfNecessary(InputDevice device, InputUpdateType

// Stuff everything that we want to survive a domain reload into
// a m_SerializedState.
#if DEBUG
#if UNITY_EDITOR || UNITY_INCLUDE_TESTS
[Serializable]
internal struct DeviceState
{
Expand Down Expand Up @@ -4836,6 +4836,6 @@ private bool RestoreDeviceFromSavedState(ref DeviceState deviceState, InternedSt
return true;
}

#endif // DEBUG
#endif // UNITY_EDITOR || UNITY_INCLUDE_TESTS
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace UnityEngine.InputSystem
{
#if DEBUG
#if UNITY_EDITOR || UNITY_INCLUDE_TESTS
/// <summary>
/// Snapshot of the state used by the input system.
/// </summary>
Expand All @@ -29,5 +29,5 @@ internal struct InputSystemState
[NonSerialized] public ISavedState touchState;
[NonSerialized] public ISavedState inputUserState;
}
#endif
#endif // UNITY_EDITOR || UNITY_INCLUDE_TESTS
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public virtual void Setup()
runtime = new InputTestRuntime();

// Push current input system state on stack.
#if DEVELOPMENT_BUILD || UNITY_EDITOR
#if UNITY_EDITOR || UNITY_INCLUDE_TESTS
m_StateManager.SaveAndReset(false, runtime);
#endif
// Override the editor messing with logic like canRunInBackground and focus and
Expand Down Expand Up @@ -192,7 +192,7 @@ public virtual void TearDown()

try
{
#if DEVELOPMENT_BUILD || UNITY_EDITOR
#if UNITY_EDITOR || UNITY_INCLUDE_TESTS
m_StateManager.Restore();
#endif
runtime.Dispose();
Expand Down
Loading