A class in Root.Township, the global namespace.
Builds the in-game inspector's floating bubbles for a prefab: finds components with BubbleInspectorField or BubbleInspectorMethod members and spawns an inspector for each in an arc above it. Called from InGameInspector.
Constructors
| Member | What it is |
|---|
BubbleInspector() | Creates a BubbleInspector with default values. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private static Dictionary<Type, ComponentInspector> inspectors | Cache per component type of its inspector description, or null when it has nothing marked. |
private static List<InteractableInspector> lastSpawned | Bubbles from the last Evaluate, cleaned up on the next one. |
private static Dictionary<Component, ComponentInspector> toSpawn | Components queued for a bubble during an Evaluate. |
Methods
| Member | What it is |
|---|
static void CalculateAngleSpread(int count, out float step, out float angle) | Works out the angle step and start for spreading a number of bubbles over 90 degrees (180 when more than three). |
static Vector3 CalculateAxis(Transform baseTransform) | Flat direction from the local player's head to the object, the axis the bubbles fan around. |
static void Evaluate(NetworkPrefab prefab) | Cleans up the last bubbles, then spawns a new inspector for each marked component of the prefab, spread above its bounds. |
2 private and internal methods
| Member | What it is |
|---|
private static void EvaluateComponent(MonoBehaviour component) | Finds a component's marked methods, fields and properties by reflection (cached per type) and queues it if it has any. |
private static void RecursiveEvaluate(GameObject evaluate) | Runs EvaluateComponent on every MonoBehaviour in the object and its children. |