Skip to content

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

@HinataYoki

Description

@HinataYoki

JEngine Version

e.g 1.0.9

Unity Version

e.g Unity6000.5

Target Platform

Windows

Bug Description

错误描述 (Description)

在使用 JEngine 时,项目出现编译错误。报错指向 Bootstrap.Common.cs 文件,提示 SceneHandleUnityEngine.SceneManagement.SceneHandleYooAsset.SceneHandle 之间存在二义性引用。

这似乎是因为项目中同时引入了 UnityEngine.SceneManagementYooAsset 命名空间,而两者都包含 SceneHandle 类型,导致编译器无法确定使用哪一个。

报错信息 (Error Log)

Packages\com.jasonxudeveloper.jengine.core\Runtime\Bootstrap.Common.cs(45,37): error CS0104: 'SceneHandle' is an ambiguous reference between 'UnityEngine.SceneManagement.SceneHandle' and 'YooAsset.SceneHandle'

### Steps to Reproduce

在 Unity 项目中导入 JEngine 框架。


### Expected Behavior

代码应能正常编译,不应产生命名空间冲突。

### Error Logs

```shell

Additional Context

No response

Checklist

  • I have searched existing issues to ensure this bug hasn't been reported before
  • I have tested with the latest version of JEngine

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions