So, there is this bug.
A custom AIController gets reset to the standard AIController when closing and reopening the editor.
It’s not that much of a problem to go through every single AI Character Class and reset the AIController. But what if I want to package my game? I tried this and apparently AIController instead of MySpecificAIController gets used.
Is there a way for me to package my game correctly?
You might recall the bug I linked in the first line; it’s from August '14. It seems like the issue has reappeared.
One important thing to note: My Character is derived from a Parent Character which is derived from the Character class. It does not matter which AIController the Parent Character has set, but the bug did not happen before I had this Parent-Child relationship.
Yeah, it looks like it’s been reintroduced. I’m guessing it has something to do with fixes to circular dependencies. I’ll escalate this so that it gets addressed as soon as possible. Thanks for reporting!
We’ve been unable to reproduce this issue. As it may be specific to a cyclic dependency issue unique to your assets, is there anyway you could provide us with a stripped down version of your project with the problematice asset and its dependencies?
Also, to help us confirm this is related to the recent cyclic dependency issue fixes, could you try disabling bDeferDependencyLoads in BaseEngine.ini (set it to: bDeferDependencyLoads=false). If that resolves your issues, then it is definitely related.
when I set bDeferDependencyLoads=false, the engine crashes upon startup. I attached the error log. When I set it to true again, it doesn’t crash anymore.
So this is a sign that you do have a cyclic dependency, and that our stuff is working (mostly). If you get us assets to investigate, then we’ll be able to better narrow down the issue.
We’ve already made some fixes in this area that will be in the next release, but I’d like to confirm that yours is not a unique issue that we haven’t seen.
I basically deleted just about everything that’s not a blueprint, but the critical AI Controller and the Characters compile fine and the bug still persists.
You can find those blueprints in Blueprints/AI. The AIController that the Characters should have is called Follower_AI_Con. The Base Class for Characters is Melee_Character. Here the AI Controller stays the one it should be, there is no issue.
The two ‘broken’ characters are the children of Melee_Character: Barbarian and Sword_Fighter.
If you run into any issues with the project, let me now.
If you cannot wait until it is released, then you can temporarily integrate the change and build the editor yourself (it sounds like you’re already working in code).
Thanks for working with us to narrow down the issue!
Oh, I should mention: that if you do integrate the change into your codebase. Then DO NOT take the change here that was made to UObjectGlobals.cpp (only take the change to BlueprintSupport.cpp).
The UObjectGlobals.cpp changes caused other issues that we’re later fixed up in a different change.