如何从嵌在工作区中的快速运动场加载.sks文件?

时间:2022-06-01 16:19:29

In the documentation for fileNamed: when loading scenes from .sks files says:

在文件名的文档中:当从.sks文件加载场景时,说明:

The name of the file, without a file extension.
The file must be in the app’s main bundle and have a .sks filename extension.

My usage in a Playground:

我在操场上的习惯:

if let scene = PlanetsScene(fileNamed: "PlanetsScene") 

Is there any workaround for this? Stuff that runs in Playground do not seem to have access to the apps main bundle. I have embedded my Playground inside the project workspace, and can access all the other classes i set public, but can't just seem to load .sks files.

有什么办法吗?在操场上运行的东西似乎无法访问应用程序的主包。我已经将我的游乐场嵌入到项目工作区中,并且可以访问我设置为public的所有其他类,但是不能仅仅加载.sks文件。

1 个解决方案

#1


0  

Can you put symbolic links to the original *.sks files into your Playground's Resources?

你能把符号链接放到原来的*上吗?sks文件到你的操场资源?

#1


0  

Can you put symbolic links to the original *.sks files into your Playground's Resources?

你能把符号链接放到原来的*上吗?sks文件到你的操场资源?