Skip to content

Commit 32a7722

Browse files
Fix play mode test scene jumping issue
This commit fixes an issue where play mode tests would jump to the init scene but not run any tests. Changes: - Wrap TestRunnerCallbacks.IsRunningTests check with #if UNITY_INCLUDE_TESTS in ChangeScene.cs This ensures the test runner check is only performed when test framework is available - Add test assembly reference to JEngine.Core.Editor.asmdef (GUID:0acc523941302664db1f4e527237feb3) - Update .gitignore to exclude Claude-generated files The root cause was that ChangeScene.cs was trying to check TestRunnerCallbacks.IsRunningTests without verifying the test framework was available, which could cause the check to fail or not work properly during play mode tests. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent a1f7876 commit 32a7722

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,12 @@ UnityProject/Build/*
1616
/UnityProject/UserSettings/Layouts
1717
/UnityProject/HybridCLRData
1818
/UnityProject/UserSettings
19+
20+
# Auto Claude generated files
21+
.auto-claude/
22+
.auto-claude-security.json
23+
.auto-claude-status
24+
.claude_settings.json
25+
.worktrees/
26+
.security-key
27+
logs/security/

UnityProject/Packages/com.jasonxudeveloper.jengine.core/Editor/JEngine.Core.Editor.asmdef

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"GUID:f51ebe6a0ceec4240a699833d6309b23",
1212
"GUID:e34a5702dd353724aa315fb8011f08c3",
1313
"GUID:3743e71edcd5bd8499007797ef02cbfb",
14-
"GUID:27619889b8ba8c24980f49ee34dbb44a"
14+
"GUID:27619889b8ba8c24980f49ee34dbb44a",
15+
"GUID:0acc523941302664db1f4e527237feb3"
1516
],
1617
"includePlatforms": [
1718
"Editor"

UnityProject/Packages/com.jasonxudeveloper.jengine.core/Editor/Misc/ChangeScene.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ internal static class ChangeScene
1212
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
1313
private static void DoChange()
1414
{
15+
#if UNITY_INCLUDE_TESTS
1516
// Skip scene change when running Play Mode tests
1617
if (TestRunnerCallbacks.IsRunningTests)
1718
{
1819
return;
1920
}
21+
#endif
2022

2123
var jump = Settings.Instance.jumpStartUp;
2224
if (!jump) return;

0 commit comments

Comments
 (0)