Skip to main content

Resources

A resource is anything you upload or create once and use in many places: models, images, sounds, scripts and more. Here is how folders and paths work, and how objects use resources.

ResourceUsed for
modela 3D object
imagea texture, or a picture in an interface card
videoa video surface, or a card
audioa sound source, or one-shot sounds from a script
fonttext
materiala material you reuse across objects
geometrya shape you reuse across objects
prefaba saved group of objects you can add again
splata Gaussian-splat capture
cardan interface layout
patcha visual graph you can reuse and call
scriptbehaviour written in TypeScript

Folders and paths​

Resources are kept in folders, like files on your computer. A path is the folder names and the resource name, joined with slashes:

Models/Trees/oak.glb

Names are unique inside a folder, so a path always points to exactly one resource.

Scripts import each other by path. When you rename or move a resource, every script that imports it is updated for you. You do not have to fix the imports by hand.

Imported files keep their parts together

When a model comes with its own textures, they are stored under the model. Move or delete the model, and its textures go with it. You never have to manage them one by one.

An object does not hold a copy of a resource. It holds a reference to it:

  • A model object points to a model.
  • A material's colour map points to an image.
  • A text object points to a font.

So when you change a resource, everything that uses it updates at once. Edit one material, and every sign in your scene that uses it changes.

This also explains one symptom. If a resource is missing, the object still exists but is not drawn. You do not get an error message.

Resources load while the scene runs​

Resources that are not preloaded arrive after the scene has opened. You may notice this:

  • a model appears a moment after the scene starts;
  • a material looks finished, but its texture is missing for a moment;
  • text appears a moment late.

Some things must be on screen from the very first frame, like a title card or a logo. Do not make them depend on a large download. You can also preload them, or keep the scene hidden until the content has arrived.


Next: Cameras — what your visitor looks through.