So I’m trying to add components to a blueprint I create procedurally, but the “add new subobject” node crashes my project. I’ve included some delays in case this takes a while to read
I’m doing this through an editor utility widget blueprint, so it crashes when I press the button. One more thing that might be related to this issue, is if I “create asset” and use my custom made blueprint (e.g. BP_Products) , the asset will not appear in the editor and if I try to exit, it will try and save as “empty package”. The “create asset” node only works for blueprints if use class as “blueprint” then reparent. This is another issue, however, because the created blueprint does not inherit the Event graph, nor it inherits parameters like “expose to cinematics” from variables.
Ahhh so it’s basically claiming the subobject data doesn’t exist at all there and is causing the crash. Could you try and store a reference to it/put it through an isValid to see if the assignment itself is failing?
Sorry for the late reply, it seems to be valid. I found out that using a Level Sequence as a class has a similar error. Both are valid. Casting to their corresponding class is casting successfully (UE 5.1.1).But the blueprint is not visible in the folder, the level sequence is visible but if I double click I get a crash, If I load the sequence into a movie pipeline queue, I also get a crash. If I save the sequence and have it open while crashing, I can’t re open the editor because it tries to open the sequence and crashes. I have to go manually to the directory and delete the assets so that the editor will open properly.
Using “blueprint” as class is also valid. Also found out that the “empty package” from the blueprint is not being saved in the disk folder as .uasset.
Creating “Level” with that node does not crash the editor until I navigate to the folder’s path. I briefly see the assets created (but in “white” instead of yellow") then it crashes with this code
So it throws a memory exception even if the asset itself is accessed? I don’t have too many ideas for this one, it’s pitching null pointers where there should be data. I’m thinking this is definitely a bug report for the full team.
Doing some further tool development, I came across more. I tried duplicating a level sequence using the “duplicate asset” node. The sequence it creates has all sorts of bugs as well with the blueprint I also create procedurally then spawn it inside that sequence (create asset, get asset blueprint, reparent blueprint. In the blueprint’s construction script, I have an array of static meshes then I add a static mesh component based on that array).
After the procedural sequence creation, manually trying to click “track” on the spawned blueprint (which was also added automatically) crashes the editor.
Dragging a static mesh asset over the duplicated sequencer tracks, to assign it to the blueprint’s static mesh (NODE components), would also crash the editor (if it goes over where the keyframes are)
I cannot “clear” and remove the static meshes in the duplicated sequence if the original one had some assigned.
The procedurally added meshes which are being tracked in the sequence were using material interface. In the duplicated sequence, it keeps some sort of data for the material interface, so the materials in the new ones are all messed up.
Elaborating more on my answer above. It’s a bit of a workaround, not a straight workflow.
First you need to use the “create asset” node to create a “blueprint factory asset” on on the node’s “asset class” (you can specify name and location in your folder structure) That’s only done once. Then you open that blueprint asset, there should be a dropdown to chose the parent blueprint that you want. Then, using that factory, here’s my setup on how to create blueprints procedurally, then add components to it.