Skip to main content
Version: 0.4.1

Best practices

Rules for a world that looks good and runs fast on every device. Follow them from the start: it is much easier than fixing a slow world later.

Design for the smallest device. A standalone headset has a phone GPU and little memory, and draws two eyes at 72 frames per second or more. A world that runs well on Quest runs well everywhere. For what each platform can draw at all (shaders, lighting data, project settings), see Look right on every platform.

Budgets​

Target
TrianglesUnder 200,000 for the entire scene
MaterialsAs few as possible. One atlas material can cover most of a world
Real-time lightsAs few as possible. Aim for none besides one directional light, with no real-time shadows
Reflection probesA few, baked, 128 or 256 pixels
Textures2048 for large surfaces, 1024 or less for props
LightmapsMax Lightmap Size 1024 or 2048
MirrorsFew, small and switchable. 512 pixels on Quest, 1024 on PC

These are hard limits. StageTime or the world builder enforces them:

Quest, Pico and phonesPC
VFX Graph particle capacity, whole world500,0002,000,000
Bundle size StageTime loads, per platform128 MB128 MB
Storage for all your worlds5 GB5 GB
Render Texture size2048 × 20482048 × 2048

A world over the VFX budget on a device still loads, but its effects are turned off there. All the limits are listed in Limits and crashes.

tip

Stay well under the bundle limit. Every player downloads the world before they can join. Textures and lightmaps make up most of the download.

Lighting​

Baked light is almost free to draw. Real-time light is the most expensive thing in most scenes.

  1. Set every light you can to Baked. Bake with Window → Rendering → Lighting → Generate Lighting.
  2. Avoid real-time shadows. Set Shadow Type to No Shadows on a Realtime directional light. Leave shadows on for a Baked one: they go into the lightmap and cost nothing to draw.
  3. Use as few real-time lights as possible. StageTime gives each object one extra real-time light besides the main directional light. Only the main directional light casts real-time shadows, up to 50 m away.
  4. Light moving objects and players with an Adaptive Probe Volume that covers where they go. Light Probe Groups do nothing in StageTime.
  5. Give each room or distinct area with shiny or metal surfaces a baked reflection probe, at 128 or 256 pixels. Without one, PBR materials reflect the skybox and look wrong indoors.
  6. Keep lightmaps small:
    • Keep Max Lightmap Size at 1024 or 2048.
    • Lower Lightmap Resolution for large or distant surfaces.
    • Turn off Contribute Global Illumination on small objects. The probe volume lights them.
    • Use Non-Directional lightmaps unless normal maps need the extra detail. Directional lightmaps use twice the memory.
  7. Bake again after you change the level. The builder packs the baked data as it is.

Lighting on every platform lists the lightmapper rules the builder depends on.

Materials and textures​

Each material on each object is a draw call. Draw calls are what a headset runs out of first.

  1. Use few materials. Share one material between many objects.

  2. Use texture atlases. Put the textures of many objects into one texture, so they can share one material. The Card deck example draws 52 cards with one material and one 512 × 512 atlas.

  3. Prefer PBR materials (Universal Render Pipeline/Lit) when they suit the style. Give each surface realistic smoothness and metallic values, and a normal map where players see it up close. For matte surfaces, turn off Specular Highlights and Environment Reflections (under Advanced Options).

    For large or distant surfaces, Simple Lit or Baked Lit is cheaper. Use Unlit for screens and signs.

  4. Spend maps where they show. Leave out normal, metallic and occlusion maps when the surface reads fine without them, and pack several objects' maps into one atlas.

  5. Size textures for what players see. 2048 is plenty for large surfaces and 1024 or less for props. Keep mipmaps on for textures on 3D objects.

  6. Keep transparency small. Large alpha-blended surfaces that overlap (glass walls, fog cards, layered foliage) are among the most expensive things a headset draws. Use opaque materials where you can, and cut-out (alpha clip) sparingly.

Meshes​

  1. Target under 200,000 triangles for the entire scene. The Game view's Stats panel shows how many triangles are in view.
  2. Combine meshes. Join the static parts of a room or building into a few meshes that share one material, in your modelling tool or before you import them.
  3. Mark objects that never move as Static, so Unity batches them (Batching Static) and bakes their lighting (Contribute GI).
  4. Use LOD Groups for detailed objects that players see from far away.
  5. Give large mesh colliders a simple mesh. Use box, sphere and capsule colliders where they fit.
  6. Remove what players never see: faces inside walls, the underside of the floor, objects outside the play area.

Effects, mirrors and video​

  • Mirrors: an ST Mirror draws the scene a second time. Keep mirrors few and small, and give players a button that turns them off.
  • Particles: stay inside the VFX Graph budget for Quest and phones, and test on a headset. Use a Particle System for small, simple effects.
  • Pools: show many copies of an object (splats, sparks, shells) with an ST Object Pool, with a capacity no larger than you need. Use Instantiate for copies made now and then, and Destroy them when they are done.
  • Render Textures: blit when something changes, not every frame. See Render Textures and Graphics.Blit.
  • Images: an ST Image Loader keeps one image. Use one loader and change its link, not one loader per picture.
  • No post-processing: StageTime renders without HDR, bloom or Volumes. Do not rely on them for the look.

Models and other assets​

A world looks only as good as its assets. Placeholder art built from boxes looks poor, and it also runs badly.

  1. Do not build models from Unity primitives. A chair made from six cubes, or a lamp made from cylinders, is many objects, many draw calls and many hidden faces. It also cannot be textured well. This is the most common mistake when an AI agent builds a scene.
  2. Use quality models. For anything complex (characters, vehicles, plants, furniture, detailed props), look for hand-made models. If you work with an agent and it finds no good one, supply your own. Keep one style, scale and level of detail across the world.
  3. Model simple objects properly. Make each simple model as one mesh in a modelling tool such as Blender, with UVs and one material, and export it as FBX. An agent can do this through a Blender MCP server (see Work with AI agents). Bevel hard edges so they catch the light.
  4. Check the shading. Look for flat or faceted surfaces, black faces, light leaks, seams and stretched textures.
  5. Bring your own assets. Make or find the models, textures and sounds you want, and give them to your agent to use. Good sources are your own work, asset packs you have bought and free libraries with clear licences. Do not rely only on generated placeholder art.
  6. Check licences. Use only assets you have the right to use and share.
  7. Check Asset Store materials. They often use built-in shaders, which draw pink in URP. Convert them with Window → Rendering → Render Pipeline Converter.

UI and interaction​

  1. Choose fonts and a colour palette first, and use them everywhere. Make text large enough to read in VR.
  2. Use opaque panels. Transparent UI is drawn over the scene behind it, which is slow on Quest. Avoid layers of transparent images and long fades.
  3. Show a canvas only when it is needed: near an object, during a game, or after a button press. Turn it off otherwise. Keep one always visible only when players always need it.

Scripts​

  • Do not do work in Update that only needs to happen sometimes. Use SendCustomEventDelayedSeconds for timers.
  • Build strings only when they change, not every frame.
  • Set fields in the Inspector. Call GetComponent once in Start and keep the result.
  • Let StageTime do the heavy work: search and sort big lists with an ST Data Table, and fly projectiles with an ST Projectile Launcher.
  • Stay inside the script limits. A script that breaks one is stopped.

Networking​

  • Sync state, not motion. Sync when something started, and let every device work out the rest from the room clock. Do not change synced values every frame.
  • Keep state in [Synced] fields so players who join later get it. Use network events for moments such as a sound or an effect.
  • Decide on one device. Events such as OnPlayerTriggerEnter and OnProjectileHit run on every device. Change synced values only on the owner. See Ownership and sync.
  • Move objects with ST Object Sync, not with your own synced positions.

Test​

  1. Press Play for layout and logic.
  2. Use Build & Test (Desktop) and Build & Test (VR) for everything else. Some problems only show in a headset.
  3. Upload the world as Private and open it on a standalone headset. That is the device that matters most.
  4. Test with two players. See Test with more players.

Checklist​

  • Lighting is baked. Real-time lights are few or none, with no real-time shadows.
  • An Adaptive Probe Volume covers where players and moving objects go.
  • Baked reflection probes where surfaces are shiny or metal.
  • Few materials, with atlases. PBR where it suits the style, a cheaper shader for large or distant surfaces.
  • Under 200,000 triangles in the whole scene.
  • Static objects are combined and marked Static.
  • No models built from Unity primitives. Assets share one style, and the shading looks right.
  • UI is opaque, readable in VR and only shown when needed.
  • Mirrors can be turned off. Transparency is small.
  • Nothing in the scripts runs every frame unless it must.
  • Tested in VR with Build & Test, and on a standalone headset.