Description
The SceneSize
field in the Editor.Assets.AssetPreview
class represents the dimensions of the scene used for asset previews. It is a public instance field of type Vector3
, which means it can be accessed and modified directly on an instance of AssetPreview
. The Vector3
type allows you to specify the width, height, and depth of the scene, providing a three-dimensional space for rendering asset previews.
Usage
To use the SceneSize
field, you need to have an instance of the AssetPreview
class. You can then directly access and modify the SceneSize
field to set the desired dimensions of the scene for your asset preview.
For example, if you want to set the scene size to a specific width, height, and depth, you can do so by assigning a new Vector3
value to the SceneSize
field.
Example
// Example of setting the SceneSize field
// Create an instance of AssetPreview
var assetPreview = new Editor.Assets.AssetPreview();
// Set the scene size to a width of 10, height of 5, and depth of 15
assetPreview.SceneSize = new Vector3(10, 5, 15);
// Access the current scene size
Vector3 currentSize = assetPreview.SceneSize;
// Output the current scene size
// Note: Use appropriate logging or UI methods to display the size
// Example: Log.Info($"Current Scene Size: {currentSize}");