Api Sandbox UI ScenePanel
class

ScenePanel

public class ScenePanel : Panel

Allows to render a scene world onto a panel.

Constructors

ScenePanel()
ScenePanel(String sceneFilename)

Creates and loads a Scene from a file to render to this panel.

Properties

Name Type Description
World SceneWorld Shortcut to Camera.World
Camera SceneCamera The camera we're going to be using to render
RenderOnce Boolean If enabled, the scene will only render once. That isn't totally accurate though, because we'll also re-render the scene when the size of the panel changes.
RenderTexture Texture The texture that the panel is rendering to internally. This will change to a different texture if the panel changes size, so I wouldn't hold onto this object.
RenderScene Scene The Scene this panel renders.
HasContent virtual Boolean

Methods

virtual Void Tick()
Void RenderNextFrame()

Render the panel again next frame. This is meant to be used with RenderOnce, where you might want to render on demand or only once.

virtual Void Delete(Boolean immediate = False)
virtual Void SetProperty(String name, String value)
Assembly: Sandbox.Engine Namespace: Sandbox.UI Full Name: Sandbox.UI.ScenePanel