class
ManagedSceneGizmos
Inherits:
SceneGizmos
Manages all active managed gizmo methods.
Finds all gizmos methods in loaded assemblies, and calls them every frame.
Public
Constructors
ManagedSceneGizmos
ManagedSceneGizmos(const SPtr<EditorSceneInstance> &scene)
Methods
~ManagedSceneGizmos
~ManagedSceneGizmos() noexcept
PrepareForDraw
void PrepareForDraw(const HCamera &camera) override
Called just before rendering gizmos.
Allows derived classes to add gizmos for drawing.
Private
Methods
ReloadAssemblyData
void ReloadAssemblyData()
Finds all gizmo methods (marked with the DrawGizmo attribute).
Clears any previously found methods.
DoOnSceneObjectSelectionChanged
void DoOnSceneObjectSelectionChanged(const Vector<HSceneObject> &sceneObjects, bool added)
Triggered when entries are added or removed from the selection.
- sceneObjects
- Newly selected or deselected scene objects.
- added
- If true, the provided objects were added to the selection. If false, the provided objects were removed from the selection.
IsValidDrawGizmoMethod
Checks is the provided method a valid gizmo draw method and if it is, returns properties of that method.
- method
- Method to check.
- componentType
- Output parameter containing the component the method is part of. Only valid if this method returns true.
- drawGizmoFlags
- Output parameters containing optional flags that control gizmo properties. Only valid if this method returns true.
Returns: True if the method is a valid draw gizmo method.
IsValidOnSelectionChangedMethod
bool IsValidOnSelectionChangedMethod(MonoMethod *method, MonoClass *&componentType)
Checks is the provided method a valid selection changed callback method.
- method
- Method to check.
- componentType
- Output parameter containing the component the method is part of. Only valid if this method returns true.
Returns: True if the method is a valid selection changed callback method.
Fields
mScene
WeakSPtr<EditorSceneInstance> mScene
mOnAssemblyRefreshAssembliesLoadedConnection
HEvent mOnAssemblyRefreshAssembliesLoadedConnection
mSelectionSceneObjectAddedConnection
HEvent mSelectionSceneObjectAddedConnection
mSelectionSceneObjectRemovedConnection
HEvent mSelectionSceneObjectRemovedConnection
mDrawGizmoAttribute
MonoClass * mDrawGizmoAttribute
mFlagsField
MonoField * mFlagsField
mOnSelectionChangedAttribute
MonoClass * mOnSelectionChangedAttribute
mGizmoDrawers
UnorderedMap<String, TInlineArray<GizmoData, 2>> mGizmoDrawers
mSelectionChangedCallbacks
Map<String, SelectionChangedData> mSelectionChangedCallbacks