I have a question. I would like to declare a variable in c++ and make it accessible from Animation of Blueprint. Is that possible?
Thanks in advance.
Yes it is possible, but I don’t know how.
I know it’s possible because following a tutorial I was able to create a Blueprint node in C++ that modifes an existing variable that is normally only accessible via C++
But I don’t know why the tutorial works
It was the tutorial video on Youtube for how to make splitscreen so you can turn it on/off during gameplay via blueprint.
UPROPERTY(EditAnyWhere, BlueprintReadWrite, Category = Movements)
float WalkSpeed = 500.f;
By using the UPROPERTY you can set up how that variables shows up in blueprint. There’s also ReadOnly, VisibleAnyWhere, EditDefaultsOnly.
Check this out https://docs.unrealengine.com/en-us/Programming/Tutorials/VariablesTimersEvents/2
Thank you guys, I have solved by creating animation from c++ and make as a parent then casting it from GetMesh.GetAnimInctence(), therefore, I am able to get access to variable. But I am afraid I have another question I will leave it till tomorrow. I would be appreciated if you answer me.