Get RAPTOR

RaptorDeps

Cached detection of optional dependencies that RAPTOR does not reference at compile time.

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorclasspreview, 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 RaptorDeps

Fields

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.

ParameterTypeDefaultDescription
fullNamestringThe type's full name.
assemblyNamestringnullThe 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.

ParameterTypeDescription
dependencystringThe 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.

ParameterTypeDescription
assemblyNamestringThe 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.

ParameterTypeDefaultDescription
fullNamestringThe type's full name.
assemblyNamestringnullThe 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.

ParameterTypeDescription
dependencystringThe dependency's name.
probeFunc<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.