I would to import my voxel objects into UE4 as a content assets, which can be further placed into the level. The voxel object is basically a mesh built up from multiple cubes with color that each cube can have. I have custom fileformat, that is capable for storing voxel data in array, binary encoded. Moreover, each voxel object should have destructable behaviour, so I deducing that it finally should be some kind of blueprint or so.
What I’ve already figured out is that I must have a custom class for voxel objects (there I have my UVoxelObject based on UObject) and a factory that can load objects from conent browser (UVoxelObjectFactory based on UFactory).
By overloading some virtual methods of factory and adding my custom file extension to Formats variable, I achieved basic behaviour of Unreal Editor, that allows me to browse for my voxel files, and create empty assets in my content browser.
However, I can’t drag & drop them into the level.
How to approach to this problem, how to make them draggable into the level? Is there something like blueprint for assets / classes? Should I use AActor instead of UObject for UVoxelObject base (I’ve tried this, but editor crashes after importing) ?
Each voxel object, that will be dropped into the level should finally have mesh with material, and some kind of raw data, that will be used further in destruction time.
Thanks in advance for help.