i am creating a few hundred buildings via blueprint. Witch add static mesh component everything works fine, but when i replace the nodes with “add instance” everything works fine too, until i hit the play button. Then the editor crashes with the following:
Please do not bump threads that have not gone unanswered for 4 or more days. This clutters the answerhub and makes it more difficult for us to help anyone. Can you please post your crash logs here, these can be found at the filepath:
\Unreal Projects\PROJECTNAME\saved\logs\
Additionally, as mentioned, have you been able to reproduce this in a blank project with no additional content or is it limited to one project?
Can you share an image of your blueprint? Do they work on a new blank project? Have you tried using them on a different blueprint? I have recently used them and they worked just fine. If you can share your blueprint (without the assets of course) I can test if it works on my end.
Right, i we use the values like 500, spacing 100 100 1000 and Safezone 20000 15000 4000. And then, after hitting play, it crashes. It looks good in the editor thou. We use UE4.6.1
The instanced mesh crashes in preview 4 are a known issue and we are currently attempting to resolve this. Please keep a lookout for a future update, though for now we recommend using 4.6.1 as the preview is an untested build and not recommended for actual project use. It is released so that users can test and see what is coming in future releases. If you could, hazzardous1984, can you post the exact steps you are taking that reproduce the crash. I haven’t been able to see it thus far but perhaps if I follow your steps I can see what may be occurring. The more information I have to reproduce this on my end the better!
I’m seeing the same problem on 4.6.1. For me, I’ve found the problem seems to come from having a static mesh parent, then adding instances in the blueprint constructor.
I had the same problem with a similar “Assertion failed: FromInst->OwnerComponent.Get() == NULL [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.6\Engine\Source\Runtime\Engine\Private\PhysicsEngine\BodyInstance.cpp]” line in my crash log. [UE4.6.1]
I solved the issue by changing some things in my blueprint components tab. Originally I had a Billboard component set as the ROOT with an InstancedStaticMeshComponent under it. Once I removed the Billboard and had the InstancedStaticMeshComponent set as the ROOT I no longer got the crash.
So it would appear the crash has something to do with what is set as the parent component. Hope this can help someone else figure out a solution too.
I had the same problem. Kept crashing on play but looked fine in editor. I also was building my instances in Construction script. Anyway, the way I fixed it is by firstly removing the StaticMeshInstance from the Component list. Then go to your Construction Script > right-click in the viewport > Add InstancedStaticMeshComponent. The relative transform is unimportant as it is currently empty anyways, what is important is the Manual Attachment Bool. Set Manual Attachement to true. Then from your Add InstancedStaticMeshComponent Return Value, get a Set Static Mesh and choose your mesh.
Now that that is set up, you can begin creating instances like you would originally with the Add Instance node, and you can set the Instance Transform accordingly.
Now this should work, and if you uncheck Manual Attachement from the Add InstancedStaticMeshComponent node, it would crash. So leave it checked I wasn’t able to find a similar fix if the InstacedStaticMeshComponent is created in the Component tab. Hope this works for you and whoever else is having this issue!
Also, making the Instanced Static Mesh Component the root from the Components tab seems to work. I guess the problem is attaching this component manually outside of the components tab