Skip to content

Commit c1e9934

Browse files
committed
Update samples
1 parent 950efee commit c1e9934

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

Example/InfinityColorDebugLogWriter.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if UNITY_EDITOR
12
using AbyssMoth.ScenePauseSystem;
23
using UnityEngine;
34

@@ -36,4 +37,5 @@ public void Resume(in PauseRequest request, Object sender = null)
3637
// ...
3738
}
3839
}
39-
}
40+
}
41+
#endif

Example/InfinityDebugLogWriter.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
#if UNITY_EDITOR
22
using UnityEngine;
33
using AbyssMoth.ScenePauseSystem;
44

@@ -11,8 +11,8 @@ public class InfinityDebugLogWriter : PausableBehaviour
1111
{
1212
private protected override void OnUpdate()
1313
{
14-
Debug.Log(
15-
$"Write message! Pause Sender: [{ReadLastPauseSender?.GetType().Name}] | Resume Sender: [{ReadLastResumeSender?.GetType().Name}]");
14+
Debug.Log($"Write message! Pause Sender: [{ReadLastPauseSender?.GetType().Name}] | Resume Sender: [{ReadLastResumeSender?.GetType().Name}]");
1615
}
1716
}
18-
}
17+
}
18+
#endif

Example/MainMenuUISettings.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if UNITY_EDITOR
12
using UnityEngine;
23
using AbyssMoth.ScenePauseSystem;
34

@@ -16,11 +17,12 @@ private void ReadUserInput()
1617
{
1718
if (Input.GetKeyDown(KeyCode.P))
1819
{
19-
if (pauseSystem.IsPaused)
20+
if (pauseSystem.IsPaused) // NOTE: Please Cache PauseRequest in production.
2021
pauseSystem.ResumeGame(new PauseRequest { IsPerformSettings = true }, this);
2122
else
2223
pauseSystem.PauseGame(new PauseRequest { IsPerformSettings = true }, this);
2324
}
2425
}
2526
}
26-
}
27+
}
28+
#endif

0 commit comments

Comments
 (0)