Class TerminalScreen3D
A terminal screen living in the scene: a mesh surface the camera can look at across the room or lean into. The pointer is a camera ray against the collider; hits map through the surface UV to cells, and a mouse over a uGUI element is left to the UI. An external ray (an XR controller, an in-game cursor) can drive it through PointFromRay, ButtonFromRay, and ScrollFromRay instead of the mouse. A renderer whose material has a _TerminalDisplay texture, such as one built around the Terminal Screen sub graph, keeps its materials and receives the display texture; otherwise the screen shows it unlit.
Assembly: DarkEffekt.Terminal
Section titled “Assembly: DarkEffekt.Terminal”[AddComponentMenu("Terminal/Terminal Screen (3D)")][RequireComponent(typeof(MeshRenderer), typeof(MeshFilter))][Icon("Packages/com.darkeffekt.terminal/Editor/Icons/Assets/TerminalScreen3D.png")]public sealed class TerminalScreen3D : TerminalScreenBaseInheritance: System.Object -> UnityEngine.Object -> UnityEngine.Component -> UnityEngine.Behaviour -> UnityEngine.MonoBehaviour -> DarkEffekt.Terminal.Unity.TerminalScreenBase
Properties
Section titled “Properties”PreserveAspect
Section titled “PreserveAspect”Keep the grid’s shape on this surface, letterboxed. Off stretches it to fill.
public bool PreserveAspect { get; set; }Resolution
Section titled “Resolution”Pixels across the screen. Sets the session’s font size so its columns and rows fill this width; zero keeps the session’s own.
public int Resolution { get; set; }FitRows
Section titled “FitRows”With a resolution set, the session’s rows follow its columns so the grid fills the screen. Change the column count with TerminalSession.SetSize; the rows given there are replaced.
public bool FitRows { get; set; }IsShown
Section titled “IsShown”False while nothing can see this screen, which skips its effect pass.
protected override bool IsShown { get; }SurfaceSize
Section titled “SurfaceSize”The screen’s width and height in world units: the part of the mesh its material’s screen rect covers, or the whole UV square. Zero when the mesh cannot be read.
public Vector2 SurfaceSize { get; }SurfaceAspect
Section titled “SurfaceAspect”The width over height of the surface this screen covers. A positive value letterboxes the grid to keep its shape; zero stretches it to fill.
protected override float SurfaceAspect { get; }Methods
Section titled “Methods”PresentTexture(Texture)
Section titled “PresentTexture(Texture)”Shows the styled display texture on the visual this presenter drives.
protected override void PresentTexture(Texture texture)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
UnityEngine.Texture |
texture |
OnDestroy()
Section titled “OnDestroy()”protected override void OnDestroy()LateUpdate()
Section titled “LateUpdate()”protected override void LateUpdate()PointFromRay(Ray, out int, out int)
Section titled “PointFromRay(Ray, out int, out int)”Drives the screen from an arbitrary world ray. Returns true when the ray lands on the screen.
public bool PointFromRay(Ray ray, out int col, out int row)Returns
Section titled “Returns”System.Boolean
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
UnityEngine.Ray |
ray |
System.Int32 |
col |
System.Int32 |
row |
ButtonFromRay(Ray, TermMouseButton, bool)
Section titled “ButtonFromRay(Ray, TermMouseButton, bool)”Presses or releases a button at a world ray, for external pointers. Returns true when the ray lands on the screen.
public bool ButtonFromRay(Ray ray, TermMouseButton button, bool pressed)Returns
Section titled “Returns”System.Boolean
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
UnityEngine.Ray |
ray |
| DarkEffekt.Terminal.TermMouseButton | button |
System.Boolean |
pressed |
DamageFromRay(Ray, float)
Section titled “DamageFromRay(Ray, float)”Cracks the panel where a world ray lands, with a severity from 0 to 1. False when the ray misses the screen.
public bool DamageFromRay(Ray ray, float severity = 0.5)Returns
Section titled “Returns”System.Boolean
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
UnityEngine.Ray |
ray |
System.Single |
severity |
DamageAtPoint(Vector3, float)
Section titled “DamageAtPoint(Vector3, float)”Cracks the panel at a world point on its surface, such as a collision contact. False when the point is not on the screen.
public bool DamageAtPoint(Vector3 worldPoint, float severity = 0.5)Returns
Section titled “Returns”System.Boolean
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
UnityEngine.Vector3 |
worldPoint |
System.Single |
severity |
ScrollFromRay(Ray, float)
Section titled “ScrollFromRay(Ray, float)”Scrolls at a world ray, for external pointers: positive is up. Returns true when the ray lands on the screen.
public bool ScrollFromRay(Ray ray, float delta)Returns
Section titled “Returns”System.Boolean
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
UnityEngine.Ray |
ray |
System.Single |
delta |