InGameGizmosSettings
A class in Root.Township, the global namespace.
Global settings asset holding the pooled line and sphere gizmo prefabs, with static helpers to draw debug lines and spheres in the game world. Get it through GlobalSettings<InGameGizmosSettings>.Instance.
- Listed in Global namespace: I to L
- Inherits or implements
GlobalSettings<InGameGizmosSettings> - Derived types
InGameGizmosSettings,InGameGizmosSettings.Create - Nested types
Create - Attributes
GlobalSettings
Constructors
| Member | What it is |
|---|---|
InGameGizmosSettings() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
2 private and internal fields
| Member | What it is |
|---|---|
private PooledObjectDefinition lineDefinition | Pool definition for the line gizmo prefab used by DrawLine. |
private PooledObjectDefinition sphereDefinition | Pool definition for the sphere gizmo prefab used by DrawSphere. |
Properties
| Member | What it is |
|---|---|
static Color Color { get; set; } | Colour applied to each gizmo when it is taken from the pool. Set it before calling DrawLine or DrawSphere. Defaults to white. |
Methods
| Member | What it is |
|---|---|
static PooledObject DrawLine(Vector3 from, Vector3 to) | Takes an InGameLineGizmo from the pool and places it between two world points, or between two transforms with local offsets. Returns it so you can release it. |
static PooledObject DrawLine(Transform from, Transform to, Vector3 offsetFrom, Vector3 offsetTo) | Takes an InGameLineGizmo from the pool and places it between two world points, or between two transforms with local offsets. Returns it so you can release it. |
static PooledObject DrawSphere(Vector3 position, float radius) | Takes an InGameSphereGizmo from the pool and places it at a world point, or on a transform with an offset, at the given radius. |
static PooledObject DrawSphere(Transform position, float radius, Vector3 offset) | Takes an InGameSphereGizmo from the pool and places it at a world point, or on a transform with an offset, at the given radius. |