I have a code piece that tries to find CameraActor in the Level named “Camera_Main”. When I try to log the name of the actor, I receive ID Name. I can not use GetActorLabel because It is only available for Development Builds! I would like to find a specific CameraActor by name. How this can be achieved here?
The actor you need has a name CameraActor_UAID_B025AA4388AE771302_1295454503 and you need to compare it with him if you want to find this particular actor.
But if this actor spawns during the game - you can get a reference to it after creation, and you don’t need to search for it by name (besides, it could be random).
Or you can save a soft reference to this actor somewhere (for example, in a data asset or data table), if the actor already exists on the level.
First I tried to get Camera Actor with ActorHasTag Function. But I always hate it to find something by string-based comparison. Someone can easily change it and no one would notice until we receive errors! Sometimes it would be hard to locate the errors!
Instead, I created a BP_GameController and took my in-level CameraActor reference in there. I do not know if it is the best practice to take references from the Level but I would like to take any advice on how to take references for any Actor included inside the Level.