Skip to content

Commit 219f3dd

Browse files
Commenting code
1 parent 2a7553a commit 219f3dd

File tree

6 files changed

+36
-43
lines changed

6 files changed

+36
-43
lines changed

Packages/com.unity.inputsystem/InputSystem.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Packages/com.unity.inputsystem/Runtime/InputManager.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#endif
2222

2323
#if UNITY_EDITOR
24-
using UnityEngine.InputSystem.Editor;
24+
//using UnityEngine.InputSystem.Editor;
2525
using CustomBindingPathValidator = System.Func<string, System.Action>;
2626
#endif
2727

@@ -1915,7 +1915,7 @@ public void Update(InputUpdateType updateType)
19151915
private void InitializeActions()
19161916
{
19171917
#if UNITY_EDITOR
1918-
m_Actions = ProjectWideActionsBuildProvider.actionsToIncludeInPlayerBuild;
1918+
//m_Actions = ProjectWideActionsBuildProvider.actionsToIncludeInPlayerBuild;
19191919
#else
19201920
m_Actions = null;
19211921
var candidates = Resources.FindObjectsOfTypeAll<InputActionAsset>();
@@ -2375,9 +2375,9 @@ internal struct AvailableDevice
23752375
private bool m_HaveSentStartupAnalytics;
23762376
#endif
23772377

2378-
private IInputRuntime m_Runtime;
2378+
internal IInputRuntime m_Runtime;
23792379
private InputMetrics m_Metrics;
2380-
private InputSettings m_Settings;
2380+
internal InputSettings m_Settings;
23812381

23822382
// Extract as booleans (from m_Settings) because feature check is in the hot path
23832383

Packages/com.unity.inputsystem/Runtime/InputSystem.cs

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
using UnityEngine.Networking.PlayerConnection;
1919

2020
using System.Linq;
21+
using UnityEditor;
22+
using EditorHelpers = UnityEngine.Rendering.VirtualTexturing.EditorHelpers;
2123

2224
#if UNITY_EDITOR
2325
using CustomBindingPathValidator = System.Func<string, System.Action>;
@@ -855,7 +857,7 @@ public static bool IsFirstLayoutBasedOnSecond(string firstLayoutName, string sec
855857
/// <seealso cref="InputBinding.processors"/>
856858
/// <seealso cref="InputAction.processors"/>
857859
/// <seealso cref="InputControlLayout.ControlItem.processors"/>
858-
/// <seealso cref="UnityEngine.InputSystem.Editor.InputParameterEditor{TObject}"/>
860+
/// <seealso cref="Editor.InputParameterEditor{TObject}"/>
859861
public static void RegisterProcessor(Type type, string name = null)
860862
{
861863
s_Manager.RegisterProcessor(type, name);
@@ -964,7 +966,7 @@ public static void RegisterProcessor(Type type, string name = null)
964966
/// <seealso cref="InputBinding.processors"/>
965967
/// <seealso cref="InputAction.processors"/>
966968
/// <seealso cref="InputControlLayout.ControlItem.processors"/>
967-
/// <seealso cref="UnityEngine.InputSystem.Editor.InputParameterEditor{TObject}"/>
969+
/// <seealso cref="Editor.InputParameterEditor{TObject}"/>
968970
public static void RegisterProcessor<T>(string name = null)
969971
{
970972
RegisterProcessor(typeof(T), name);
@@ -3064,7 +3066,7 @@ public static InputActionAsset actions
30643066

30653067
// Track reference to enable including it in built Players, note that it will discard any non-persisted
30663068
// object reference
3067-
ProjectWideActionsBuildProvider.actionsToIncludeInPlayerBuild = value;
3069+
//ProjectWideActionsBuildProvider.actionsToIncludeInPlayerBuild = value;
30683070
#endif // UNITY_EDITOR
30693071

30703072
// Update underlying value
@@ -3377,7 +3379,7 @@ public static bool runInBackground
33773379
internal static InputRemoting s_Remote;
33783380

33793381
#if DEVELOPMENT_BUILD || UNITY_EDITOR
3380-
private static RemoteInputPlayerConnection s_RemoteConnection;
3382+
internal static RemoteInputPlayerConnection s_RemoteConnection;
33813383
internal static RemoteInputPlayerConnection remoteConnection => s_RemoteConnection;
33823384

33833385
internal static void SetUpRemoting()
@@ -3511,7 +3513,7 @@ internal static void InitializeInEditor(bool calledFromCtor, IInputRuntime runti
35113513
s_Manager.runtime.onPlayModeChanged = OnPlayModeChange;
35123514
s_Manager.runtime.onProjectChange = OnProjectChange;
35133515

3514-
InputEditorUserSettings.s_Settings = new InputEditorUserSettings.SerializedState();
3516+
//InputEditorUserSettings.s_Settings = new InputEditorUserSettings.SerializedState();
35153517

35163518
#if !UNITY_DISABLE_DEFAULT_INPUT_PLUGIN_INITIALIZATION
35173519
InputSystem.PerformDefaultPluginInitialization();
@@ -3531,7 +3533,7 @@ internal static void InitializeInEditor(bool calledFromCtor, IInputRuntime runti
35313533

35323534
s_DomainStateManager = existingSystemStateManagers[0];
35333535
s_Manager.RestoreStateWithoutDevices(s_DomainStateManager.systemState.managerState);
3534-
InputDebuggerWindow.ReviveAfterDomainReload();
3536+
//InputDebuggerWindow.ReviveAfterDomainReload();
35353537

35363538
// Restore remoting state.
35373539
s_RemoteConnection = s_DomainStateManager.systemState.remoteConnection;
@@ -3544,7 +3546,7 @@ internal static void InitializeInEditor(bool calledFromCtor, IInputRuntime runti
35443546
s_Manager.m_SavedAvailableDevices = s_DomainStateManager.systemState.managerState.availableDevices;
35453547

35463548
// Restore editor settings.
3547-
InputEditorUserSettings.s_Settings = s_DomainStateManager.systemState.userSettings;
3549+
//InputEditorUserSettings.s_Settings = s_DomainStateManager.systemState.userSettings;
35483550

35493551
// Get rid of saved state.
35503552
s_DomainStateManager.systemState = new InputSystemState();
@@ -3556,17 +3558,17 @@ internal static void InitializeInEditor(bool calledFromCtor, IInputRuntime runti
35563558
s_DomainStateManager.hideFlags = HideFlags.HideAndDontSave;
35573559

35583560
// See if we have a remembered settings object.
3559-
if (EditorBuildSettings.TryGetConfigObject(InputSettingsProvider.kEditorBuildSettingsConfigKey, out InputSettings settingsAsset))
3561+
/*if (EditorBuildSettings.TryGetConfigObject(InputSettingsProvider.kEditorBuildSettingsConfigKey, out InputSettings settingsAsset))
35603562
{
3561-
s_Manager.settings = settingsAsset;
3563+
s_Manager.settings = settingsAsset;
35623564
}
35633565
35643566
// See if we have a saved actions object
35653567
var savedActions = ProjectWideActionsBuildProvider.actionsToIncludeInPlayerBuild;
3566-
if (savedActions != null)
3567-
s_Manager.actions = savedActions;
3568+
if (savedActions != null)
3569+
s_Manager.actions = savedActions;
35683570
3569-
InputEditorUserSettings.Load();
3571+
InputEditorUserSettings.Load();*/
35703572

35713573
SetUpRemoting();
35723574
}
@@ -3581,7 +3583,7 @@ internal static void InitializeInEditor(bool calledFromCtor, IInputRuntime runti
35813583
// this would cancel the import of large assets that are dependent on the InputSystem package and import it as a dependency.
35823584
EditorApplication.delayCall += ShowRestartWarning;
35833585

3584-
RunInitialUpdate();
3586+
//RunInitialUpdate();
35853587

35863588
EnableActions();
35873589

@@ -3591,7 +3593,7 @@ internal static void InitializeInEditor(bool calledFromCtor, IInputRuntime runti
35913593
private static void ShowRestartWarning()
35923594
{
35933595
if (!s_DomainStateManager.newInputBackendsCheckedAsEnabled &&
3594-
!EditorPlayerSettingHelpers.newSystemBackendsEnabled &&
3596+
//!EditorPlayerSettingHelpers.newSystemBackendsEnabled &&
35953597
!Application.isBatchMode)
35963598
{
35973599
const string dialogText = "The new Input System Package is installed, but not configured to enable native device input, such as keyboard, mouse, or gamepad actions. " +
@@ -3616,8 +3618,8 @@ private static void ShowRestartWarning()
36163618
#endif
36173619
if (userChoseEnableAndRestart)
36183620
{
3619-
EditorPlayerSettingHelpers.newSystemBackendsEnabled = true;
3620-
EditorHelpers.RestartEditorAndRecompileScripts();
3621+
/*EditorPlayerSettingHelpers.newSystemBackendsEnabled = true;
3622+
EditorHelpers.RestartEditorAndRecompileScripts();*/
36213623
}
36223624
}
36233625
s_DomainStateManager.newInputBackendsCheckedAsEnabled = true;
@@ -3692,7 +3694,7 @@ internal static void OnProjectChange()
36923694
////TODO: use dirty count to find whether settings have actually changed
36933695
// May have added, removed, moved, or renamed settings asset. Force a refresh
36943696
// of the UI.
3695-
InputSettingsProvider.ForceReload();
3697+
//InputSettingsProvider.ForceReload();
36963698

36973699
// Also, if the asset holding our current settings got deleted, switch back to a
36983700
// temporary settings object.
@@ -3732,6 +3734,8 @@ internal static void InitializeInPlayer(IInputRuntime runtime, bool loadSettings
37323734
EnableActions();
37333735
}
37343736

3737+
#endif
3738+
37353739
#if DEVELOPMENT_BUILD || UNITY_EDITOR
37363740
internal static void InitializeInPlayer(IInputRuntime runtime, InputSettings settings)
37373741
{
@@ -3749,7 +3753,7 @@ internal static void InitializeInPlayer(IInputRuntime runtime, InputSettings set
37493753
EnableActions();
37503754
}
37513755

3752-
#endif
3756+
#endif //DEVELOPMENT_BUILD || UNITY_EDITOR
37533757

37543758
#if UNITY_INCLUDE_TESTS
37553759
//
@@ -3775,7 +3779,7 @@ internal static void TestHook_EnableActions()
37753779
#endif // UNITY_INCLUDE_TESTS
37763780

37773781
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
3778-
private static void RunInitialUpdate()
3782+
internal static void RunInitialUpdate()
37793783
{
37803784
// Request an initial Update so that user methods such as Start and Awake
37813785
// can access the input devices.
@@ -3920,7 +3924,7 @@ internal static void Destroy()
39203924
// NOTE: Does not destroy InputSystemObject. We want to destroy input system
39213925
// state repeatedly during tests but we want to not create InputSystemObject
39223926
// over and over.
3923-
s_Manager.Destroy();
3927+
//s_Manager.Destroy();
39243928
if (s_RemoteConnection != null)
39253929
Object.DestroyImmediate(s_RemoteConnection);
39263930
s_Manager = null;

Packages/com.unity.inputsystem/Runtime/InputSystemStateManager.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
using System;
22
using UnityEngine.InputSystem;
33
using UnityEngine;
4-
#if UNITY_EDITOR
5-
using UnityEngine.InputSystem.Editor;
6-
#endif
74
using UnityEngine.InputSystem.Utilities;
85

96
namespace UnityEngine.InputSystem
@@ -24,7 +21,7 @@ internal struct InputSystemState
2421
[SerializeField] public InputManager.SerializedState managerState;
2522
[SerializeField] public InputRemoting.SerializedState remotingState;
2623
#if UNITY_EDITOR
27-
[SerializeField] public InputEditorUserSettings.SerializedState userSettings;
24+
//[SerializeField] public InputEditorUserSettings.SerializedState userSettings;
2825
[SerializeField] public string systemObject;
2926
#endif
3027
////TODO: make these saved states capable of surviving domain reloads
@@ -95,7 +92,7 @@ public void OnBeforeSerialize()
9592
}
9693

9794
systemState.remoteConnection = InputSystem.remoteConnection;
98-
systemState.userSettings = InputEditorUserSettings.s_Settings;
95+
//systemState.userSettings = InputEditorUserSettings.s_Settings;
9996
}
10097

10198
public void OnAfterDeserialize()

Packages/com.unity.inputsystem/Runtime/InputSystemTestHooks.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
#if UNITY_EDITOR
4-
using UnityEngine.InputSystem.Editor;
4+
//using UnityEngine.InputSystem.Editor;
55
#endif
66
using UnityEngine.InputSystem.LowLevel;
77

@@ -22,7 +22,7 @@ internal static void TestHook_InitializeForPlayModeTests(bool enableRemoting, II
2222
s_Manager.runtime.onPlayModeChanged = InputSystem.OnPlayModeChange;
2323
s_Manager.runtime.onProjectChange = InputSystem.OnProjectChange;
2424

25-
InputEditorUserSettings.s_Settings = new InputEditorUserSettings.SerializedState();
25+
//InputEditorUserSettings.s_Settings = new InputEditorUserSettings.SerializedState();
2626

2727
if (enableRemoting)
2828
InputSystem.SetUpRemoting();
@@ -71,9 +71,9 @@ internal static void TestHook_DestroyAndReset()
7171
Object.DestroyImmediate(InputSystem.s_RemoteConnection);
7272

7373
#if UNITY_EDITOR
74-
EditorInputControlLayoutCache.Clear();
74+
/*EditorInputControlLayoutCache.Clear();
7575
InputDeviceDebuggerWindow.s_OnToolbarGUIActions.Clear();
76-
InputEditorUserSettings.s_Settings = new InputEditorUserSettings.SerializedState();
76+
InputEditorUserSettings.s_Settings = new InputEditorUserSettings.SerializedState();*/
7777
#endif
7878

7979
InputSystem.s_Manager = null;

Packages/com.unity.inputsystem/Tests/TestFixture/InputTestStateManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void SaveAndReset(bool enableRemoting, IInputRuntime runtime)
4949
managerState = InputSystem.manager.SaveState(),
5050
remotingState = InputSystem.remoting?.SaveState() ?? new InputRemoting.SerializedState(),
5151
#if UNITY_EDITOR
52-
userSettings = InputEditorUserSettings.s_Settings,
52+
//userSettings = InputEditorUserSettings.s_Settings,
5353
systemObject = JsonUtility.ToJson(InputSystem.domainStateManager),
5454
#endif
5555
inputActionState = InputActionState.SaveAndResetState(),
@@ -138,7 +138,7 @@ public void Restore()
138138
else InputSystem.manager.ApplySettings();
139139

140140
#if UNITY_EDITOR
141-
InputEditorUserSettings.s_Settings = state.userSettings;
141+
//InputEditorUserSettings.s_Settings = state.userSettings;
142142
JsonUtility.FromJsonOverwrite(state.systemObject, InputSystem.domainStateManager);
143143
#endif
144144

0 commit comments

Comments
 (0)