float CameraZFar { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The CameraZFar property in the Editor.EditorPreferences class specifies the maximum distance at which objects will be rendered in the scene. This property is crucial for determining the rendering range of the camera, affecting how far into the scene the camera can see and render objects.

Usage

To adjust the rendering distance of the camera in the editor, set the CameraZFar property to a desired value within the specified range. This property is static, so it can be accessed directly through the EditorPreferences class.

The value must be a float and should be within the range of 1 to 100,000, as defined by the Sandbox.RangeAttribute. This ensures that the rendering distance is neither too short nor excessively long, which could impact performance or visual quality.

Example

// Example of setting the CameraZFar property
Editor.EditorPreferences.CameraZFar = 5000.0f;

// This sets the camera's far clipping plane to 5000 units, allowing objects up to 5000 units away to be rendered.