ScreenAnchor
Pins the entity to a point on the screen, for HUDs and menus: a score in the top-left corner stays there whatever the window’s shape, and it doesn’t move when the camera follows the player or shakes. Set while the game runs, after every Update; the entity keeps its Z. With the camera’s Camera.HudSize set, it keeps its size on the screen too as the camera zooms.
The camera’s rotation is ignored. The Scene view shows it where the game does on a 16:9 screen, and dragging it there sets its Offset.
In a network game, each machine keeps its own entity with this on it: it isn’t sent.
Properties
Section titled “Properties”Each is listed as its key in the scene file and the MCP tools, then its kind of value, its default and what it does.
anchor: one of TopLeft, Top, TopRight, Left, Center, Right, BottomLeft, Bottom, BottomRight = “TopLeft”. The corner, edge or middle of the screen it stays by, at its position from there in world units. (Field: one of its values.)offset: [x, y] = [0,0]. World units from the anchor point. Right and up are positive, so a top-left score sits at something like (1.5, -0.6). (Field: a vector.)
Scripts use it as ScreenAnchor: its methods, events and values that aren’t saved with the scene.