RaptorDeps
Cached detection of optional dependencies that RAPTOR does not reference at compile time.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
Finds types and assemblies by name, or a dependency through a named probe. Results are cached until the next domain reload. Bakery is the built-in probe. Modules add their own with RegisterProbe.
public static class RaptorDepsFields
Bakery
public const string Bakery;Probe name for Bakery GPU Lightmapper. The probe looks for its runtime light (BakeryRuntimeAssembly) and its editor window (any assembly).
Methods
FindType
public static Type FindType(string fullName, string assemblyName = null)Returns a type by full name from the named assembly, or from any loaded assembly when assemblyName is null. Misses are cached too.
| Parameter | Type | Default | Description |
|---|---|---|---|
fullName | string | The type's full name. | |
assemblyName | string | null | The assembly's simple name, or null for any loaded assembly. |
Returns: The type, or null.
Has
public static bool Has(string dependency)Whether the named dependency's probe finds it. Returns false for an unknown name. The result is cached.
| Parameter | Type | Description |
|---|---|---|
dependency | string | The dependency's name. |
Returns: True when found.
HasAssembly
public static bool HasAssembly(string assemblyName)Whether an assembly with this simple name is loaded. The result is cached.
| Parameter | Type | Description |
|---|---|---|
assemblyName | string | The assembly's simple name. Null or empty returns false. |
Returns: True when loaded.
HasType
public static bool HasType(string fullName, string assemblyName = null)Whether the type exists. See FindType.
| Parameter | Type | Default | Description |
|---|---|---|---|
fullName | string | The type's full name. | |
assemblyName | string | null | The assembly's simple name, or null for any loaded assembly. |
Returns: True when it exists.
RegisterProbe
public static bool RegisterProbe(string dependency, Func<bool> probe)Adds a named probe. Returns false and keeps the existing probe when the name is taken.
| Parameter | Type | Description |
|---|---|---|
dependency | string | The dependency's name. |
probe | Func<bool> | Returns true when the dependency is installed. |
Returns: False when the name is taken.
Call from an [InitializeOnLoad] static constructor on the main thread. A probe that throws counts as not found.