An abstract class in Root.Township, the global namespace.
Base for the debug bubble inspector's entries (component, method, value and interactor inspectors). Each is shown as a floating bubble you can grab, move and twist.
Constructors
| Member | What it is |
|---|
protected InspectorBase() | Creates an InspectorBase with default values. |
Properties
| Member | What it is |
|---|
virtual bool CanMove { get; } | Whether the bubble can be moved. True by default, but the bubble does not check it. |
virtual bool CanRotate { get; } | Whether twisting the bubble calls Rotate. False by default. |
Transform CurrentTransform { get; set; } | The bubble's transform, set when the inspector is registered with it. |
abstract InspectorType InspectorType { get; } | Which kind of inspector this is. Picks the bubble's material. |
abstract string Name { get; } | The text shown on the bubble. |
Events
| Member | What it is |
|---|
event Action<string> UpdateName | Raised to change the extra text after the bubble's name. |
Methods
| Member | What it is |
|---|
virtual void Clean() | Cleanup hook. Does nothing in the base class. |
static InteractableInspector GetInteractable<T>(Transform baseTransform, Component baseComponent, T inspector, Vector3 offset) | Spawns a debug inspector bubble at a transform, offsets it and registers the inspector on it. |
abstract void Interact(Component target, InteractableInspector interactable) | Called when the bubble is tapped without moving it. |
virtual void Move(Vector3 from, Vector3 to) | Called while the bubble is dragged, with the old and new positions. |
virtual void Rotate(float angle, Component target) | Called while the bubble is twisted, with the angle. Only if CanRotate. |
protected void OnUpdateName(string name) | Raises UpdateName so the bubble appends the given text to its label. |
Used in
Members of other types that take, return or hold a InspectorBase: