SceneKit and On-Demand Resources (ODR)

Hi,


In the documentation (Table 1-1 On-demand resource types), a table lists the types of streamable assets supported by on demand resources.


However, the types listed contradict the following statement on the same page:

The resources can be of any type supported by bundles except for executable code.


My question is, can SceneKit scenes, SceneKit particles and SceneKit texture atlases be part of downloadable asset bundles with on demand resources ?

The table only lists SpriteKit scenes, SpriteKit particles and SpriteKit texture atlases.


Best regards,
Karl.

Accepted Reply

Apple's answer:


"SceneKit scenes, particles and texture atlases are not executable, although they may be binary data. But as such can be included in ODR asset catalogs. In fact, SceneKit encodes its data similarly to SpriteKit, so the allowances for SpriteKit are maintained for SceneKit. Keep in mind, however that a 3D scene may often have references to textures, so it is recommended—but optional—to put scenes and textures together in a SceneKit asset catalog, which is a folder with the “scnasset" extension. Xcode manages these as a folder reference and will assign an ODR tag to the entire asset catalog rather than individual sub-items. You can also choose to have more than one SceneKit asset catalog within your app, so you shouldn’t be limited there."


They also said you can create a new .scnasset folder either by creating a new asset catalog (New > File > Resource) then changing its extension from .xcassets to .scnassets, selecting another file then selecting the .scnassets file again to upate the XCode UI (the renaming part is important, otherwise the On Demand Resource Tags section will be missing:) OR "you could create a folder entitled e.g level2.scnassets directly in the Finder, and just drag that into your project and Xcode will correctly recognize it as a SceneKit asset catalog."

Replies

Apple's answer:


"SceneKit scenes, particles and texture atlases are not executable, although they may be binary data. But as such can be included in ODR asset catalogs. In fact, SceneKit encodes its data similarly to SpriteKit, so the allowances for SpriteKit are maintained for SceneKit. Keep in mind, however that a 3D scene may often have references to textures, so it is recommended—but optional—to put scenes and textures together in a SceneKit asset catalog, which is a folder with the “scnasset" extension. Xcode manages these as a folder reference and will assign an ODR tag to the entire asset catalog rather than individual sub-items. You can also choose to have more than one SceneKit asset catalog within your app, so you shouldn’t be limited there."


They also said you can create a new .scnasset folder either by creating a new asset catalog (New > File > Resource) then changing its extension from .xcassets to .scnassets, selecting another file then selecting the .scnassets file again to upate the XCode UI (the renaming part is important, otherwise the On Demand Resource Tags section will be missing:) OR "you could create a folder entitled e.g level2.scnassets directly in the Finder, and just drag that into your project and Xcode will correctly recognize it as a SceneKit asset catalog."