Class AssetPreview
Generic asset preview editor viewport base class.
Inheritance
Implements
Namespace: FlaxEditor.Viewport.Previews
Assembly: FlaxEngine.CSharp.dll
Syntax
public abstract class AssetPreview : EditorViewport, IComparable, IDrawable, IEditorPrimitivesOwnerConstructors
AssetPreview(Boolean, ViewportCamera)
Initializes a new instance of the AssetPreview class.
Declaration
protected AssetPreview(bool useWidgets, ViewportCamera camera)Parameters
| System.Boolean
        useWidgets If set to  | 
| FlaxEditor.Viewport.Cameras.ViewportCamera
        camera The camera controller. | 
AssetPreview(Boolean, Single)
Initializes a new instance of the AssetPreview class.
Declaration
protected AssetPreview(bool useWidgets, float orbitRadius = 50F)Parameters
| System.Boolean
        useWidgets If set to  | 
| System.Single
        orbitRadius The initial orbit radius. | 
Fields
EnvProbe
The env probe. Allows to modify rendering settings.
Declaration
public EnvironmentProbe EnvProbeField Value
| EnvironmentProbe 
 | 
PostFxVolume
Gets the post fx volume. Allows to modify rendering settings.
Declaration
public PostFxVolume PostFxVolumeField Value
| PostFxVolume 
 | 
PreviewLight
The preview light. Allows to modify rendering settings.
Declaration
public DirectionalLight PreviewLightField Value
| DirectionalLight 
 | 
Sky
SkyLight
The sky light. Allows to modify rendering settings.
Declaration
public SkyLight SkyLightField Value
| SkyLight 
 | 
Properties
EditorPrimitives
Gets the editor primitives renderer. Valid only if ShowEditorPrimitives is true.
Declaration
public EditorPrimitives EditorPrimitives { get; }Property Value
| FlaxEditor.Gizmo.EditorPrimitives 
 | 
HasLoadedAssets
Gets a value indicating whether this viewport has loaded dependant assets.
Declaration
public override bool HasLoadedAssets { get; }Property Value
| System.Boolean 
 | 
Overrides
ShowDebugDraw
Gets or sets a value indicating whether draw DebugDraw shapes.
Declaration
public bool ShowDebugDraw { get; set; }Property Value
| System.Boolean 
 | 
ShowDefaultSceneActors
Gets or sets a value indicating whether show default scene actors (sky, env probe, skylight, directional light, etc.).
Declaration
public bool ShowDefaultSceneActors { get; set; }Property Value
| System.Boolean 
 | 
ShowEditorPrimitives
Gets or sets a value indicating whether draw DebugDraw shapes and other editor primitives such as gizmos.
Declaration
public bool ShowEditorPrimitives { get; set; }Property Value
| System.Boolean 
 | 
Methods
add_CustomDebugDraw(AssetPreview.CustomDebugDrawDelegate)
Declaration
public void add_CustomDebugDraw(AssetPreview.CustomDebugDrawDelegate value)Parameters
| AssetPreview.CustomDebugDrawDelegate
        value 
 | 
DrawEditorPrimitives(GPUContext, ref RenderContext, GPUTexture, GPUTexture)
Declaration
public virtual void DrawEditorPrimitives(GPUContext context, ref RenderContext renderContext, GPUTexture target, GPUTexture targetDepth)Parameters
| GPUContext
        context 
 | 
| RenderContext
        renderContext 
 | 
| GPUTexture
        target 
 | 
| GPUTexture
        targetDepth 
 | 
OnDebugDraw(GPUContext, ref RenderContext)
Called when drawing debug shapes with DebugDraw for this viewport.
Declaration
protected virtual void OnDebugDraw(GPUContext context, ref RenderContext renderContext)Parameters
| GPUContext
        context The GPU context. | 
| RenderContext
        renderContext The render context. | 
OnDestroy()
remove_CustomDebugDraw(AssetPreview.CustomDebugDrawDelegate)
Declaration
public void remove_CustomDebugDraw(AssetPreview.CustomDebugDrawDelegate value)Parameters
| AssetPreview.CustomDebugDrawDelegate
        value 
 | 
Events
CustomDebugDraw
Custom debug drawing event (via DebugDraw).
Declaration
public event AssetPreview.CustomDebugDrawDelegate CustomDebugDrawEvent Type
| AssetPreview.CustomDebugDrawDelegate 
 |