How to set Actor's Tag in C++ on Runtime?

I’m using c++ to spawn lot of actors, and I wanted to get some reference of particular actor, for that I want to set its tag on runtime. I couldn’t find the code for adding the tag on runtime in c++.

AActor* p; (it is your actor object)
p->Tags.Add(FName(“123”));

1 Like