备份,准备做双端
This commit is contained in:
@@ -51,8 +51,9 @@ public class trackFractureController : MonoBehaviour
|
||||
[SerializeField] private float moveDuration = 0.35f;
|
||||
|
||||
[Header("Debug")]
|
||||
[SerializeField] private bool enableDebugKeyTrigger = true;
|
||||
[SerializeField] private bool debugLogs = true;
|
||||
[Tooltip("Editor-only debug hotkeys (1-5) to trigger track fracture. Never active in builds.")]
|
||||
[SerializeField] private bool enableDebugKeyTrigger = false;
|
||||
[SerializeField] private bool debugLogs = false;
|
||||
|
||||
private readonly FractureAndDrift[] fractureDrivers = new FractureAndDrift[TrackCount];
|
||||
private readonly Renderer[] trackRenderers = new Renderer[TrackCount];
|
||||
@@ -89,8 +90,12 @@ public class trackFractureController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private void Update()
|
||||
{
|
||||
// Editor-only debug hotkeys. Compiled out of player builds entirely so a serialized
|
||||
// scene value can never leave number-key fracture triggers or per-frame Input polling
|
||||
// active in a shipped game.
|
||||
if (!enableDebugKeyTrigger)
|
||||
{
|
||||
return;
|
||||
@@ -122,6 +127,7 @@ public class trackFractureController : MonoBehaviour
|
||||
TriggerTrackFracture(4);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user