class InspectorUtility

Provides information about custom inspectors.

Custom inspectors allow the developer to control exactly how certain types are displayed in the inspector window in the editor.

Public

Constructors

InspectorUtility

InspectorUtility()

Methods

~InspectorUtility

~InspectorUtility() noexcept

GetCustomInspector

MonoObject *GetCustomInspector(MonoReflectionType *type)

Creates an inspector capable of displaying GUI elements for an object of the provided type.

type
Type of the object that will be displayed in the inspector.

Returns: Custom user defined inspector if it exists for the provided type, or the generic inspector.

GetCustomInspectableFieldType

MonoReflectionType *GetCustomInspectableFieldType(MonoReflectionType *type)

Gets a custom InspectableField type for the specified type.

This only searches custom user defined implementations, not the built-in ones.

type
Type of the object to find an InspectableField for.

Returns: Implementation of InspectableField capable of display contents of the provided type, or null if one wasn't found.

staticInstance

static T &Instance()

Returns a reference to the module instance.

Module has to have been started up first otherwise an exception will be thrown.

staticInstancePtr

static T *InstancePtr()

Returns a pointer to the module instance.

Module has to have been started up first otherwise an exception will be thrown.

staticShutDown

static void ShutDown()

Shuts down this module and frees any resources it is using.

staticIsStarted

static bool IsStarted()

Query if the module has been started.

Protected

Methods

~Module<T>

virtual ~Module<T>() = default

OnStartUp

virtual void OnStartUp()

Override if you want your module to be notified once it has been constructed and started.

OnShutDown

virtual void OnShutDown()

Override if you want your module to be notified just before it is deleted.

staticInstanceInternal

static T *&InstanceInternal()

Returns a singleton instance of this module.

staticIsDestroyed

static bool &IsDestroyed()

Checks has the Module been shut down.

staticIsStartedUp

static bool &IsStartedUp()

Checks has the Module been started up.

Private

Methods

ReloadAssemblyData

void ReloadAssemblyData()

Reloads all assembly types and attempts to find uses of CustomInspector attribute.

Old data cleared and replaced with new.

Fields

mCustomInspectorAtribute

MonoClass * mCustomInspectorAtribute

mTypeField

MonoField * mTypeField

mInspectorTypes

UnorderedMap<MonoClass *, MonoClass *> mInspectorTypes

mInspectableFieldTypes

UnorderedMap<MonoClass *, MonoClass *> mInspectableFieldTypes

mOnAssemblyRefreshAssembliesLoadedConnection

HEvent mOnAssemblyRefreshAssembliesLoadedConnection