Class TypeExtensions
Namespace: Aspid.FastTools.Types.Editors
Assembly: Aspid.FastTools.Editor.dll
Provides extension methods for locating and opening the MonoScript defining a
Type.
public static class TypeExtensions
Inheritance
Methods
FindMonoScript(Type)
Searches script assets for a declaration of type.
public static MonoScript FindMonoScript(this Type type)
Parameters
type Type
The type to locate, or null for no match.
Returns
MonoScript
The matching script asset; otherwise, null if no declaration is found.
Remarks
Text matching is limited to assets matching the type name and, for nested types, the declaring type's script.
Check GetClass before assigning the result to a component's m_Script property.
OpenInScriptEditor(Type)
Opens the script defining type at its declaration line.
public static void OpenInScriptEditor(this Type type)
Parameters
type Type
The type whose script to open.
Remarks
Logs a warning when no script can be located; a null type is ignored.