UE5 EA2 to Preview 1, Control Rig Component "Add Mapped Skeletal Mesh" cannot be added to Construction Script anymore, crashes engine

I was using the Control Rig Component’s events on Character Blueprint to “Set Control Transform” skipping the Animation Blueprint, and any casting required for procedural animation. It requires you to “Add Mapped Skeletal Mesh” on Construction Script to have the mesh actually get updated, but with Preview 1 it prevents you from even adding the node to Construction Script.

I have tried the node executed by Begin Play, or other events from the Control Rig Component, but it seems to only work with the Construction Script. It crashes whenever I look at the viewport with just a mesh selected, the Component added, Control Rig Class selected on the component, and a clean Character Blueprint. Have no problems in EA2 with the same blueprint.

Not really sure whether preventing you from adding the node was intentional, or if there is another way that one is supposed to use the Control Rig Component to update Control transforms (outside of just updating it in the Animation Blueprint.) It just seemed much simpler to update the transforms right in the main blueprint, instead of using the Animation Blueprint in between the main blueprint and the Control Rig.

6 Likes

Same here, I can’t find a way to attach control rig components to meshes in BP’s! Odd there isn’t more talk on the subject.

We have the same issue trying to work with Control Rig in the 5.0 Preview 1. On the CPP side of things, the AddMappedSkeletalMesh function is now marked as ‘UnsafeDuringActorConstruction’ which means it cannot be called in the construction script.

We tried to use the function during the PostInitialize event, but the error message provided in the function UControlRigComponent::EnsureCalledOutsideOfBracket says that the AddMappedSkeletalMesh function should be called during the construction script.

It seems like ControlRig has a new intended use for this function, but it seems like were gonna have to wait for some guidance/documentation to know what that is.

2 Likes

I attached “Add Mapped Skeletal Mesh” to “On Pre Initialize” event (the first of the list of events from the Control Rig Component details tab) and it works. I noticed how it only moved the highlighted bones from the Control Rig Component, not the bones from the mesh, and would crash if I had the “Add Mapped Skeletal Mesh” attached to any other event.

The Control Rig Component is there to be able to swap control rigs around, but if you put “Add Mapped Skeletal Mesh” on Construction Script, then you would not be giving the control rig you swap it to a mapped skeletal mesh. This is my assumption why its not longer on Construction Script, but needs to be called right after that for the current rig, and future rig changes.

4 Likes

I’m having this issue in UE5.0, I have a working camera rig in 4.27

I created the control rig and then I made a blue print that has a cine camera in it.
I created the control rig component and attached my rig and mapped an element which I attach to one of the controls so it can move my camera around.

I put all my logic in the construction script since this will be used for animating with sequencer.

worked perfectly in ue4, but in ue5 the rig just doesn’t want to parent with camera anymore.

Any thoughts?

This solution for a different problem might be useful.

Hi @Namean , do you know if it’s possible to “Add Mapped Skeletal Mesh” “On Pre Initialize” and to run an Animation Blueprint at the same time? My ABP no longer works, on edit-mode, once I “Add Mapped Skeletal Mesh”.

Yes you can do this, instead of adding it inside the construction script you add it with “On Pre Initialize (Control Rig)” and plug the component from that node into the add mapped skeletal mesh target.