LEARNING EXAMPLE
Compose a camera view before copying scene-camera settings
draft illustrativeOrigin: original-example · review: draft · snapshot: 3ba1c69afc74a97f-7fcd0798fd6ea455
Example
using Sandbox;
// Illustrative draft: call this only in a path whose lifecycle contract has
// been verified for the installed build.
public static class CameraCompositionOrderExample
{
public static void Prepare(CameraComponent camera, SceneCamera destination)
{
if (camera is null || destination is null)
return;
camera.ComposeView();
camera.UpdateSceneCamera(destination, includeTags: true);
}
}
The destination scene-camera receives the selected camera settings after one explicit composition step.
Constraints and verification
- Normal scene ticking may already compose the view; repeated calls must be tested rather than assumed safe.
- This example is not an installed-engine compile or runtime result.
- Evidence hash:
9345c9d2580b603d1290732e46a23424204bf00149a47e0c1834329f261d089f - Compile/runtime verification: illustrative
Linked API declarations
type:Sandbox.CameraComponenttype:Sandbox.SceneCameramethod:Sandbox.CameraComponent:ComposeView()method:Sandbox.CameraComponent:UpdateSceneCamera(Sandbox.SceneCamera,System.Boolean)