The game build doesn't work the same as in the editor.

For example, the AI works well in the editor, follows from point to point, moves along the Nav Mesh, but in the build, the AI gets stuck in the wall.
Also, as I understood, “make array” doesn’t work. In the editor, the logic associated with it works in editor, but not in the build.
I think it may be related to the fact that most of the logic is tied to Event Begin Play and doesn’t have enough time to load. However, I’m not sure. Could you suggest how to fix these issues?

Hey @Huyfrommount!

Do you think you could get us some snippets of code so we can take a look?

As far as the Navmesh one, that’s going to take some deep diving. But the makearray we can take a look at and see if we can’t figure out what the issue might be! It may be as simple as moving it to an earlier point in begin play, or putting it on the construction script!

Get us some code, and let us at it! :slight_smile:

Hello, I have a sensor that sets the state of an Electric System to “broke.” When the system breaks, it sends a message back to the sensor, and then the sensor activates a lamp corresponding to the index of the Electric System. This functionality is implemented using interfaces.

Here is the blueprint for the sensor: Sensor posted by anonymous | blueprintUE | PasteBin For Unreal Engine

Additionally, I have implemented this in the Level Blueprint: Level BP posted by anonymous | blueprintUE | PasteBin For Unreal Engine

I know the blueprint for the electric system is quite extensive and needs to be optimized and remastered, but here the key functionalities: Begin Play and Send Broken events: Electric Fix posted by anonymous | blueprintUE | PasteBin For Unreal Engine

While this setup works well in the editor, it doesn’t function properly in the build. I suspect that the issue may be related to how I package and build the game. Currently, I package it through Platforms → Windows → Package project, but I’m not entirely sure if this is the root cause of the problem.

As I suspected, the issue lies in the Event Begin Play. It’s uncertain in which order it starts, causing inconsistencies. To address this, I added a 0.2-second delay and initialization events that trigger once the component actors are loaded.

For the AI, which relied on Begin Play and Event Tick, I resolved it by introducing a boolean variable that switches to true when the Begin Play events conclude. This variable is then checked during every tick event.

By testing the game in standalone mode, it provides a clearer representation of how the game will run once it’s built.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.