* 获取当前场景 * @throws 如果场景未初始化
()
| 90 | * @throws 如果场景未初始化 |
| 91 | */ |
| 92 | get scene(): Scene { |
| 93 | const scene = getInternalAPI().getScene(); |
| 94 | if (!scene) { |
| 95 | throw new Error('[PluginAPI] 场景未初始化,请先打开或创建一个场景'); |
| 96 | } |
| 97 | return scene; |
| 98 | }, |
| 99 | |
| 100 | /** |
| 101 | * 获取当前场景(可能为 null) |
nothing calls this directly
no test coverage detected