April 23rd, 2021
- Single camera via camera manager in UE4
Having custom editor only objects appear is quite a task overall
CameraComponentis a good example of how it is done in source code:Engine\UE4\Source\Runtime\Engine\Classes\Camera\CameraComponent.h : 149. This header contains the editor driven functions for creating an managing the proxy mesh that represents the camera positioning in the Blueprint Editor.- Powered by a
ProxyMeshComponent, it is updated whenOnRegisteris called. Here a new Mesh is created, setup and other calls to update the position is called.
Responding to changes in the is done in a few places.
- To Respond to an editor proprety change (Like a input field), use
PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
- To Respond to an editor proprety change (Like a input field), use
| |
For
ActorComponentsOverrideOnRegisteras this is called after a proprerty changeWITH_EDITORvsWITH_EDITOR_DATA
| |
- Component Visualisers
- Used by components such as
USpringArmCmponentto visualise the target arm length when selectedFComponentVisualizeris a base class that is extended.- Provides a draw method that will be called in the editor when the object is selected. Here you can provide debug draw / other draw types
- The Visualiser has to be registered with the editor on module start up so it is best suited to be in the an Editor module
- https://sondreutheim.com/post/ue4_component_visualizers
- Used by components such as
- Get a base project up and to get a component visualiser up as well as try and understand how to draw and update objects in the editor after property change.