Description
The Camera
property of the AssetPreview
class provides access to the SceneCamera
used for rendering asset previews in the editor. This camera is responsible for capturing the visual representation of assets within the preview scene, allowing developers to view and interact with assets in a simulated environment.
Usage
To use the Camera
property, you first need to have an instance of the AssetPreview
class. Once you have the instance, you can access the Camera
property to manipulate or retrieve information about the scene camera used in the asset preview.
Example usage:
var assetPreview = new AssetPreview();
var camera = assetPreview.Camera;
// You can now use the camera to adjust settings or retrieve information
Example
var assetPreview = new AssetPreview();
var camera = assetPreview.Camera;
// Example: Adjust the camera's position
camera.Position = new Vector3(0, 0, 10);
// Example: Change the camera's field of view
camera.FieldOfView = 75.0f;