I am trying to package for Android ETC2. The message log shows an error saying
there is no member named GetActorLabel in AActor.
How can I fix this?
I am trying to package for Android ETC2. The message log shows an error saying
there is no member named GetActorLabel in AActor.
How can I fix this?
I don’t know a solution for this, this might be intended to be so.
But I have a different approach to exactly find out which actor I am working with, with the help of tags.
Hey yeed44-
Can you provide the full log for reference? Are you using GetActorLabel anywhere in your project? If you’re able to reproduce the message in a new project, can you provide the setup steps to help me reproduce the issue locally?
Hey !
Yes, I was using GetActorLabel inside of an Actor. I was raycasting and trying to find out via FHitResult with GetActor()->GetActorLabel() which Actor got hit by the ray. That actually works the way I thought it would, but when trying to package for Android ETC2 the cross compiler for Android would complain about GetActorLabel() not being a member of AActor.
I have worked around this by simply not using GetActorLabel() anymore, but instead giving the relevant objects inside my scene a tag and checking for that tag with ActorHasTag(Fname).
Hey yeed44-
This is indeed intended. Looking at the Actor.h source code, the GetActorLable() is inside an #if WITH_EDITOR preprocessor directive. This means that the function will only work while working in the editor and will be excluded when packaged. This is why the package fails.
Cheers
You may have just saved my bacon. What a great function, its a pity they have it under the WITH EDITOR directive. I don’t understand the motivation of making it an Editor Only. Hrmmm