Download

Getting asset actor instances in levels

Hi all, I’m trying to find the function to replace a selected browser asset’s actors in active level. How would one go about this in c++? I can retrieve the asset but how can I find the actors that use it?

Can use actor iterator. Just need access to GetWorld(). Example:



 for (TActorIterator<AEquipmentDisengagePoint> ActorItr(GetWorld()); ActorItr; ++ActorItr)
 {
  AEquipmentDisengagePoint* nextPoint = Cast<AEquipmentDisengagePoint>(*ActorItr);
  if (nextPoint)
  {
      // do something with the actor
  }
}


https://docs.unrealengine.com/en-US/…tor/index.html

Great thank you so much!!