How to get inherited Mesh Component to show in BP editor?
I'm sure this'll end up with a simple answer, but I cannot for the life of me figure it out. In the base C++ class of which the Blueprint is based on, I have a Scene Component as its root and a Static Mesh Component for visual representation. All this is being done in the constructor.
(because the tags are breaking, see picture for complete code)
The mesh I want to use in for the visual representation is set in the editor through the variable ObjectMesh declared in the class' header. However, the mesh set in the editor doesn't show up in the blueprint editor. Which while survivable, is just a pain to work with.
Now, to get around this I could just hard-code the mesh's location into the code, specifically the constructor, but I don't want to do that for obvious reasons. To get to show the mesh during gameplay, I'd need to move
Any help figuring out how to show it in said window would be much appreciated.
While redbox's answer did result in results very similar to what I needed, it wasn't quite there. After rethinking the problem, the way I'm going about implementing the class' functionality doesn't allow for the visual feedback I was after. For this reason I'm going to mark this question as answered and hope that someone who finds there way here can either get the help they need from it (it's very valid code) or come to the same conclusion as me.
answered Nov 16 '18 at 09:19 AM
You should declare mesh component as, for example, UPROPERTY(VisibleAnywhere, EditDefaultsOnly). With it you can set mesh directly into this component in editor.
answered Nov 16 '18 at 05:21 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here