API ReferenceSandbox.UI

ScenePanelclass

Allows to render a scene world onto a panel.

objectPanelScenePanel
Namespace
Sandbox.UI
Assembly
Sandbox.Engine
Declaration
public class Sandbox.UI.ScenePanel : Sandbox.UI.Panel

Constructors2

Showing 2 constructors

Methods5

Showing 5 methods

public virtual void Delete(bool immediate = False)PUBLICVIRTUAL

ParameterTypeDescription
immediate = Falsebool
Returns:void

public virtual void OnDraw()PUBLICVIRTUAL

Returns:void

public void RenderNextFrame()PUBLIC

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.

Returns:void

public virtual void SetProperty(string name, string value)PUBLICVIRTUAL

ParameterTypeDescription
namestring
valuestring
Returns:void

public virtual void Tick()PUBLICVIRTUAL

Returns:void

Properties5

Showing 5 properties

public Sandbox.SceneCamera Sandbox.UI.ScenePanel.Camera { get; set; }PUBLICGETSETOBSOLETE

The camera we're going to be using to render

Obsolete: Handling SceneObjects like this manually will be removed soon. Use the actual Scene.

Returns:SceneCamera

public bool Sandbox.UI.ScenePanel.RenderOnce { get; set; }PUBLICGETSET

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.

Returns:bool

public Sandbox.Scene Sandbox.UI.ScenePanel.RenderScene { get; set; }PUBLICGETSET

The Scene this panel renders.

Returns:Scene

public Sandbox.Texture Sandbox.UI.ScenePanel.RenderTexture { get; set; }PUBLICGETSET

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.

Returns:Texture

public Sandbox.SceneWorld Sandbox.UI.ScenePanel.World { get; set; }PUBLICGETSETOBSOLETE

Shortcut to Camera.World

Obsolete: Handling SceneObjects like this manually will be removed soon. Use the actual Scene.

Returns:SceneWorld

On this page