Game Scene Split up
This commit is contained in:
@@ -12,10 +12,19 @@ namespace ProjectM.Client
|
||||
/// <summary>Active scheme (<see cref="ProjectM.Simulation.InputSchemeId"/>): 0 = mouse/keyboard, 1 = gamepad.</summary>
|
||||
public static byte Scheme;
|
||||
|
||||
/// <summary>When true, <see cref="AimReticleSystem"/> keeps the OS cursor VISIBLE even while aiming (the
|
||||
/// editor-only DebugOverlay sets this so its IMGUI buttons stay clickable). Non-#if so the reticle system
|
||||
/// can read it in any build; nothing sets it outside the editor.</summary>
|
||||
public static bool ForceCursorVisible;
|
||||
|
||||
// Static fields can survive editor domain reloads (fast enter-play-mode); reset on every play-enter so a
|
||||
// stale gamepad value from a prior session can't briefly hide the cursor / show the world reticle before
|
||||
// the input gather republishes the real scheme.
|
||||
[UnityEngine.RuntimeInitializeOnLoadMethod(UnityEngine.RuntimeInitializeLoadType.SubsystemRegistration)]
|
||||
static void ResetOnEnterPlayMode() => Scheme = ProjectM.Simulation.InputSchemeId.KeyboardMouse;
|
||||
static void ResetOnEnterPlayMode()
|
||||
{
|
||||
Scheme = ProjectM.Simulation.InputSchemeId.KeyboardMouse;
|
||||
ForceCursorVisible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user