SceneObject PrimarySceneObject

book_4_sparkGenerated
code_blocksInput

Description

The PrimarySceneObject field in the Editor.Assets.AssetPreview class represents the main SceneObject that is used within the asset preview. This object is typically the focal point of the scene, and it is the primary element that is rendered and manipulated during the preview process.

Usage

To use the PrimarySceneObject field, you can access it directly from an instance of the AssetPreview class. This field is public, allowing you to get or set the primary scene object as needed. It is important to ensure that the SceneObject assigned to this field is properly initialized and configured to be displayed in the asset preview.

Example

// Example of accessing and setting the PrimarySceneObject

// Assume 'assetPreview' is an instance of AssetPreview
SceneObject mySceneObject = new SceneObject();

// Set the primary scene object
assetPreview.PrimarySceneObject = mySceneObject;

// Access the primary scene object
SceneObject currentSceneObject = assetPreview.PrimarySceneObject;