C++ - array of mesh components, how to
How to correctly keep a couple of logically related mesh components in my class? (think sides of a dice that I want to be separate meshes)
(In the example below I use a UCustomMeshComponent which inherits from UMeshComponent) It did work for me either by doing:
However the latter one has some issues - for example cannot add an UPROPERTY() tag to it, as it crashes the engine (not being able to cast TArray to a property) and causes my custom meshes to disappear after I go to play mode and then exit from it. The first one on the other hand is not very versatile...
Or maybe there is a better way to do it?
asked Mar 25 '14 at 09:25 PM in C++ Programming
if it is always 6 sides you can use a static array
Use a USTRUCT()
Why not create the array variable in the derived blueprint and make a function in the c++ class that takes the array in from the blueprint and then call that function in the blueprint?
answered Jan 20 '15 at 08:11 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here