Hey all,
I have a problem where the Blueprint isn’t updating the skeletal mesh component Skeletal Mesh Asset, even though it is rendered in the viewport!
I am pretty sure this has something to do with finding the correct function and getting it loaded from the asset registry on time to have the skeletal mesh component still registered with the correct asset in the Blueprint.
The primary data asset is currently in the base C++ class. (loaded in the asset registry as normal)
I have several TObjectPtr<USkeletalMeshComponent>
I want to assign values to from the data asset.
All USkeletalMeshComponent
are being initialized in the constructor as they should be (CreateDefaultSubobject
).
I can’t find the place (function) in time where the data asset is loaded, and I can use it, but the components will register the change in the blueprint.
I tried OnConstruction
, PostRegisterAllComponents
, PostInitializedComponents
, PretInitializedComponents
, and PreRegisterAllComponents
. Other initialize methods didn’t have the data asset loaded.
I tried USkeletalMeshComponent::SetSkeletalMeshAsset
and USkeletalMeshComponent::SetSkinnedAssetAndUpdate
; both render the mesh in the viewport, but the displayed BP mesh is still empty. (see image)
More info:
It’s a primary data asset, so it’s loaded with the default loading of all data assets.
TObjectPtr MyDataAsset;
Thanks