Closed JaredP94 closed 4 years ago
Is there any way of preserving compatibility with UE 4.24? :) Maybe we should introduce helper functions for this.
I've done some backward compatibility testing and it appears there are two unsupported changes:
Removing the SelfActor
key from affected tasks/decorators where the workaround in #112 was discussed. The method of getting the AI controller and it's controller pawn still works as expected, however, the task/decorator seemingly becomes invalid if the SelfActor
key is not present (even though unused). I'll add the key back into the affected tasks/decorators to remedy this.
The deprecated bIsABot
call on line 60 of RTSGameplayLibrary.cpp.
An engine version check solves this:
#if ENGINE_MINOR_VERSION < 25
return OwnerComponent->GetPlayerOwner() && OwnerComponent->GetPlayerOwner()->bIsABot;
#else
return OwnerComponent->GetPlayerOwner() && OwnerComponent->GetPlayerOwner()->IsABot();
#endif
Should you want to move this to a helper function, would you want to create a utility class or keep the function localised to the affected class since it's a single occurrence?
Thanks for checking, and thanks for adding the SelfActor key back!
I thought about adding a utility class, and which one(s) (e.g. one utility class per engine version, one per feature domain, or none at all).
In this case, with that single instance, let's do it with just a single helper function right there, and see how this goes in the future :)
Thanks!
I've made the changes to the tasks/decorators and was able to successfully use them in both 4.24 and 4.25.
I've also added the helper function as discussed so all should be in order with cross-version support.
Please let me know if there's anything else you'd like to look into before accepting the changes :)
Fabulous! Thanks for even updating the documentation images! :)
Thanks for everything!
Hi @npruehs,
This pull request adds plugin support for 4.25.
Also includes: