Class TFSystemInjector
Discovers and provides the active ITransformSystem for a given scene object.
Inherited Members
Namespace: Unity.SimulationPro.Foundation
Assembly: Unity.SimulationPro.Foundation.dll
Syntax
public static class TFSystemInjector
Remarks
Find(GameObject) walks the transform hierarchy of the supplied GameObject looking for a TFSystemComponent. If none is found, GetDefaultTFSystem() searches the entire scene.
Methods
Find(GameObject)
Finds the nearest ITransformSystem by walking the transform hierarchy of the supplied GameObject.
Declaration
public static ITransformSystem Find(GameObject startPoint)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | startPoint | The GameObject from which to begin the hierarchy search. |
Returns
| Type | Description |
|---|---|
| ITransformSystem | The nearest ITransformSystem, falling back to GetDefaultTFSystem() if none is found in the hierarchy. |
GetDefaultTFSystem()
Returns the cached default ITransformSystem, discovering it from the scene if necessary.
Declaration
public static ITransformSystem GetDefaultTFSystem()
Returns
| Type | Description |
|---|---|
| ITransformSystem | The default ITransformSystem. |
SetDefaultTFSystem(ITransformSystem)
Overrides the default ITransformSystem with the provided instance.
Declaration
public static void SetDefaultTFSystem(ITransformSystem system)
Parameters
| Type | Name | Description |
|---|---|---|
| ITransformSystem | system | The transform system to use as the scene default. |