API ReferenceSandbox.UI

WorldPanelclass

An interactive 2D panel rendered in the 3D world.

objectRootPanelWorldPanel
Namespace
Sandbox.UI
Assembly
Sandbox.Engine
Declaration
public class Sandbox.UI.WorldPanel : Sandbox.UI.RootPanel

Constructors1

Showing 1 constructors

public WorldPanel(Sandbox.SceneWorld world)PUBLICCONSTRUCTOR

ParameterTypeDescription
worldSceneWorld

Methods5

Showing 5 methods

public virtual void Delete(bool immediate = False)PUBLICVIRTUAL

ParameterTypeDescription
immediate = Falsebool
Returns:void

public virtual void OnDeleted()PUBLICVIRTUAL

Returns:void

public virtual bool RayToLocalPosition(Ray ray, Vector2 position, float distance)PUBLICVIRTUAL

ParameterTypeDescription
rayRay
positionVector2
distancefloat
Returns:bool

protected virtual void UpdateBounds(Sandbox.Rect rect)PROTECTEDVIRTUALPER-FRAME

Update the bounds for this panel. We purposely do nothing here because on world panels you can change the bounds by setting `Sandbox.UI.RootPanel.PanelBounds`.

ParameterTypeDescription
rectRect
Returns:void

protected virtual void UpdateScale(Sandbox.Rect screenSize)PROTECTEDVIRTUALPER-FRAME

We override this to prevent the scale automatically being set based on screen size changing.. because that's obviously not needed here.

ParameterTypeDescription
screenSizeRect
Returns:void

Properties7

Showing 7 properties

public float Sandbox.UI.WorldPanel.MaxInteractionDistance { get; set; }PUBLICGETSET

Maximum distance at which a player can interact with this world panel.

Returns:float

public Vector3 Sandbox.UI.WorldPanel.Position { get; set; }PUBLICGETSET

Position of the world panel in 3D space.

Returns:Vector3

public Rotation Sandbox.UI.WorldPanel.Rotation { get; set; }PUBLICGETSET

Rotation of the world panel in 3D space.

Returns:Rotation

public static float Sandbox.UI.WorldPanel.ScreenToWorldScale { get; set; }PUBLICSTATICGETSET

Returns:float

public Sandbox.ITagSet Sandbox.UI.WorldPanel.Tags { get; set; }PUBLICGETSET

Tags that are applied to the underlying SceneObject

Returns:ITagSet

public float Sandbox.UI.WorldPanel.WorldScale { get; set; }PUBLICGETSET

Scale of the world panel in 3D space.

Returns:float

On this page