Skip to content

Conversation

@JasonXuDeveloper
Copy link
Owner

Summary

  • Fixes CS0104 ambiguous reference error between YooAsset.SceneHandle and UnityEngine.SceneManagement.SceneHandle in Unity 6 (6000.x)
  • Adds a using alias to explicitly specify YooAsset.SceneHandle in Bootstrap.Common.cs

Root Cause

Unity 6 introduced UnityEngine.SceneManagement.SceneHandle, which conflicts with YooAsset.SceneHandle when both namespaces are imported.

Solution

Added using alias at the top of the file:

using SceneHandle = YooAsset.SceneHandle;

This keeps the code clean and makes the intent explicit.

Fixes #587

Test plan

  • Verify compilation succeeds in Unity 6000.x
  • Verify existing behavior is preserved (no logic changes)

🤖 Generated with Claude Code

Add using alias to explicitly specify YooAsset.SceneHandle, fixing
CS0104 compilation error when UnityEngine.SceneManagement.SceneHandle
conflicts with YooAsset.SceneHandle in Unity 6000.x.

Fixes #587

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: JasonXuDeveloper - 傑 <[email protected]>
Copilot AI review requested due to automatic review settings January 27, 2026 23:13
@github-actions github-actions bot added the core label Jan 27, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Resolves Unity 6 (6000.x) compilation error (CS0104) caused by an ambiguous SceneHandle reference between UnityEngine.SceneManagement and YooAsset.

Changes:

  • Adds a using alias to explicitly bind SceneHandle to YooAsset.SceneHandle within Bootstrap.Common.cs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: Copilot review found no issues and Unity Tests passed (or were skipped for non-code changes).

@JasonXuDeveloper JasonXuDeveloper enabled auto-merge (squash) January 27, 2026 23:16
@github-actions
Copy link

Unity Test Results

EditMode: All tests passed
PlayMode: All tests passed

Unity Version: 2022.3.55f1
Project Path: UnityProject

✅ All tests passed! The PR is ready for review.

View workflow run

Click here to view the full workflow run

@JasonXuDeveloper JasonXuDeveloper merged commit 2369bb4 into master Jan 27, 2026
24 checks passed
@JasonXuDeveloper JasonXuDeveloper deleted the fix/scenehandle-ambiguous-reference-587 branch January 27, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Bootstrap.Common.cs 编译报错:SceneHandle 存在引用歧义

2 participants