ios - 从不是 SKScene 的屏幕访问 Sprite 图集

标签 ios sprite-kit atlas

我有一个 SpriteKit 游戏,可以毫无问题地访问 Sprite 图集图像。

但是,在我的一些菜单中,我使用标准 iOS UI 组件,例如 TableView 和 Collection View 。对于这些屏幕,我将所有内容布置在标准 UIView Controller 上。

但是,在这些屏幕上,我无法访问图像,除非我将这些图像添加到不理想的单独文件夹中。

如何从纹理图集中访问它们?谢谢

最佳答案

你不能。单独添加这些图像,是否还需要将这些图像添加到 Sprite Kit atlas 取决于如果不这样做,游戏的性能是否会受到影响。目前没有从 SKTextureAtlas 中提取单个图像的实用方法。

关于ios - 从不是 SKScene 的屏幕访问 Sprite 图集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22735868/

相关文章:

ios - SpriteKit : Preload sound file into memory before playing?

xcode - swift 2 Spritekit : Issue with background music not resuming when the game is unpaused

ios - 'undefined' has no propType for native prop error react native

ios - ios中stringByAppendingString和appendString的区别

core-graphics - 在 Spritekit 中用两种颜色绘制矩形/圆形和三角形。 . .

python - 在 Ubuntu 中安装 scikit-learn 时遇到一些麻烦

ios - 从特定图集 Sprite-kit 加载所有文件

installation - 在 ATLAS 中构建共享库

ios - 使用 Objective-C 从 url 检索 JSON

ios - 从 AVFoundation 相机流生成 mipmaped MTLTextures