I have a BP character derived from a custom class that is itself derived from ACharacter. There are some public BlueprintReadWrite FRotator variables meant for some of the character’s mesh bones. To get the mesh to update while in the viewport editor I currently do the following:
- override ShouldTickIfViewportsOnly() to return true
- Apply the BP variable values to the mesh bones inside override Tick() function
My question is: Is there a better or more preferred way to apply updates to the parent C++ class that are meant only for the editor? In other words, in the Tick function some of the update code is really only applicable when in the editor and during normal runtime is just redundant and effectively does nothing. Is there a way to trigger a custom function that executes my update code when a BP variable is changed?