How to get a reference for a specific actor in the world?

Hi. Is there a way to get a reference in python for a specific actor in the scene? I need to always identify a specific traffic light and it seems that it’s not possible using the Python API. The only available thing is the find_actor method which however requires an id that changes everytime I restart the server. Is for example possible to find an actor based on the label name in the unreal engine editor (e.g. BP_TrafficLight01_8220)?

Thanks in advance.

Hi @Genfu94, for traffic lights your best bet is to locate them by their location as unreal will produce different ids every iteration and the editor label is not visible from the Python API. We are working on improving traffic light API to identify them in more reliable way.

Yeah thank you @Axel. I located them by their location in the end. Just as a future reference for other people having the same problem, just consider that between coordinates in carla and coordinates in unreal engine there is a factor of 100.