Hi Is there any solution for accessing an actor in ue4? At now I use “get all actors of class” in blueprint and compare their names to the actor I wanted, and if intended actor is is found do the remaining works. However I reach to correct result, but I’m not satisfied about efficiency. Is there any one can suggest me any better solution for this problem?
You can add a variable referencing a object of class of required actor and then set it’s default to that actor if you have it or assign it during runtime if you spawn it later.
Thanks for your reply. I think I have to explain my problem in detail…I store name of all actors in database and try to retrieve an actor based on a query. then I want to access that actor and do some thing with it. so at first I don’t know which actor will be selected and can’t add a reference to it. Can you help me in more detail.
Thanks
I’m afraid there isn’t faster option then (or I don’t know about it). You can try moving your code from blueprint to cpp as cpp is faster, but that’s about that.