OnBegin function not working on private version

Hey!

We’re having issues with the onbegin function.

Specifically, this function works as expected when we launch a session of our project on UEFN. However, it stops working when we upload a private version.

Has anyone else experienced this kind of problem?

Thanks!

Hi @Einoow,

We were just having a similar problem, our custom device works perfectly on a session from within UEFN but not on private builds.

If the OnBegin method doesn’t fire, then that explains it. And this quite a showstopper, we were about to publish a public version.

4 Likes

Hey, another dev of the team here!

We are not sure if the problem is on the OnBegin function of the devices or on the devices themselves not starting. They have the Enabled at Game Start option checked but it does not seems to be working in private uploaded versions, only in uefn editor.

Any thoughs why could this be happening?

Thanks in advance.

1 Like

Thank you for your report! We would like to look into this further, would you be able to submit a bug report using the form available here? Fortnite Creative

1 Like

Thanks! Form is already sent!

1 Like

Adding more information here in case it can be helpful!

Here are our OnBegin functions:

OnBeging functions


image
image
image
image
image
image

Island settings






@leonidas If you can share some additional data, maybe we can take a look and find common points! Thanks in advance.

Cheers!

We aren’t 100% certain, but it seems using Agent.Respawn() in our case produced issues on private builds.

We refactored our custom device and used a teleporter device instead and that fixed it. We were able to publish successfully both a private and later on a public build.

Hope that helps!

1 Like

Wish you could just stick a Print(“Debug: OnBegin Function.”) on the first line, but since this is happening in a private version try this.

Try adding something you know will run for sure on the first line of the OnBegin function. Something like

@editable
TestButton : button_device = button_device{}

… OnBegin …
TestButton.Enable()

Setup the button to be disabled by default, then start your private session and see if it works.

I’ve also had weird cases where I’ve had to add an arbitrary amount of Sleep(Duration:float) before calling anything else. Maybe try to Sleep for a second or two, at the very least for a frame Sleep(0.0)

1 Like

Indeed, Agent.Respawn() seem to be the blame. Removing them have solve the OnBegin problem. Still having some teleport/spawner troubles but at least devices started to work.

Thank you very much!!!

1 Like

Happy it was solved on your side too! And we need more debugging tools :innocent:

A debugger with break points would be a blessing.

2 Likes

Hey there,

I’m encountering the same problem. My OnBegin() is not firing when playing on private code or published map version. Only in a UEFN Session it’s working fine.

Any other ideas what could lead to this behaviour?
It seems like there’s only a very slight chance that it does work.