What a world may hold

Since SDK 0.2.1

A world holds no code of its own: its scripts are FL# scripts. Its scene can still put components on objects, with the values you gave them, and Unity starts them as soon as the scene loads. So before loading a world, every player's game checks it against the list below and loads it without what is not allowed; the rest of the world loads as usual. The World Publisher runs the same check when you build, so you know first.

Allowed

FamilyComponents
RenderingTransform, mesh filters and renderers, skinned meshes, LOD groups, lights, light probes, reflection probes, URP volumes and their effects, decals, lens flares, particles (Particle System, VFX Graph), trails, lines, sprites and tilemaps, terrains and their trees, skybox, wind zones, occlusion areas and portals, 3D text
Physicsrigidbodies, every collider, joints, constant forces, cloth, articulation bodies, and the 2D ones
AudioAudio Source, reverb zones, audio filters (low pass, high pass, echo, distortion, chorus, reverb)
AnimationAnimator, Animation, Playable Director (Timeline and its tracks), constraints (parent, position, rotation, scale, aim, look at)
UICanvas, Canvas Group, all of uGUI (Event Trigger and the physics raycasters included), TextMeshPro
VideoVideo Player playing a video clip included in the world
XR Interaction Toolkitgrab and simple interactables, snap volumes, socket interactors, grab transformers, interaction filters, teleportation areas and anchors, climb interactables, Tracked Device Graphic Raycaster and Physics Raycaster, Lazy Follow, affordance receivers and themes
NodeWorld SDKFL# Script, NW World, its NW World Config, Platform Switch, Network Template, Play Mode Bootstrap
Camerakept for its settings: the game gives its background to the player's camera, then turns it off

Shaders: all accepted.

Removed

WhatWhy
Audio Listenerthe player's ears are the game's
Event System and the input modules (Standalone, Touch, Input System UI, XR UI)the player's input is the game's
XR Interaction Manager, and the player's rig: interactors other than sockets, locomotion, input readers, XR Originthe game has its own
Video Player reading a URLa world's Video Player plays a clip included in the world; videos from the Internet go through FL#
render pipeline assets and settingsthe game's
any other script: yours, the game's, a package'sa world's code is FL#
a component holding a [SerializeReference] value of a type not on the listUnity creates that value as the scene loads

A removed component leaves its object in place, with everything else on it.

Event calls

A UnityEvent of an allowed component (a button's On Click (), a slider's On Value Changed…) keeps its calls to the methods of the allowed components and of the GameObject (GameObject.SetActive, AudioSource.Play, Animator.SetTrigger…). A call is removed when:

  • its target is a removed component, a Camera, or an object outside the world;
  • it names a type that is not on the list (with no target, Unity would call a static method of that type);
  • its method is one of these: SendMessage, SendMessageUpwards, BroadcastMessage, StartCoroutine, Invoke, InvokeRepeating, Destroy, DestroyImmediate, DontDestroyOnLoad, hideFlags, a Video Player's url and source, the XR Interaction Toolkit's interactionManager and snapCollider. They call methods by name, reach outside the world, keep an object after the player leaves, or touch files or the network.

Every other method of the allowed components was checked once: none touches the network or the files. What these calls cannot do, your FL# scripts do.

An animation event is kept when its function is a method an event may call on an allowed script (a button's Select, for example); otherwise it is removed.

When you publish

After each platform's build, the World Publisher checks its bundle. Each thing that is not allowed shows under Content check in the Build tab and in the Console, for example:

The component AudioListener on the object Bar/Camera is not allowed: it will be removed for players

The world is built all the same. Fix the scene and build again, or leave it: players load it without these things. The messages are in French when your computer is in French.

In the players' games

The game checks each version of a world once, then keeps the checked world to load it faster the next time. A new version of the list checks it again. The game's log says what it removed and from which object (lines starting with [ContentCheck]).

What no check covers: a world made to exploit a bug of Unity's own bundle reader, and shaders, which run on the graphics card.