Alexa.Ki
(Alendromeda.ki)
June 13, 2022, 9:33pm
1
Hi , I am trying to do this is C++, Please correct me If I am doing something not right.
What I tying is :
void AMyTestClass::InitPickup(EItemType ItemType_In, FText Name_In, FText UIPrefix_In, UStaticMesh* StaticMesh_In)
{
Init(ItemType_In, Name_In);
UI_Prefix = UIPrefix_In;
if (IsValid(StaticMesh))
{
StaticMesh->SetStaticMesh(StaticMesh_In);
}
}
Thank You
If you get an error post it here
1 Like
Alexa.Ki
(Alendromeda.ki)
June 13, 2022, 10:11pm
3
I am not getting any error but the mesh information is not updating by assigning the static mesh.
I think I am doing something not correct or missing… currently debugging the issue
Does it work in blueprint? have you set breakpoints in VS to check if SetStaticMesh is reached and what it does after?
1 Like
Alexa.Ki
(Alendromeda.ki)
June 14, 2022, 12:13am
5
yes it worked in Blueprints and now its working in C++ too, I were doing it wrong under init
function, Now its working fine