#Baked Singleton Entity doesn't exist on build

1 messages · Page 1 of 1 (latest)

delicate viper
#

Hi, devs! How you doing?

I've been trying to build a dedicated server for Linux and upload it to UGS. My team could build it correctly for past commits, but my project refuses to build it correctly. Here's the issue:

We have a subscene with bunch of objects. One of them is an object (called NetcodeSpawner) with an Authoring that holds every prefab that we need to connect players (all the ghosted prefabs.)
The entity that should be created is never being created on build. I've tested it using a system that queries for its type and logs the creation status, and there's never a message saying that the entity exists.

Notes to give better context:

  • No system destroy this entity, it should be permanent during the server lifetime.
  • To build, I turn off the scene using the checkbox on the right side at the Hierarchy.
  • I've tried to clear all the project cache and all of the Editor cache.
  • I've tried to checkout to the latest working build commit and still have the same problem.
  • It's a IL2CPP dedicated server build for Linux
  • The subscene isn't on Build Settings, only its parent scene.
  • The object doesn't have the Editor Only tag, only objects like the one above it, used for scene organization (see the screenshot)
  • Other dev always have built it correctly and this entity was showing up on his builds.
  • I'm using the correct Unity account to build and connect to UGS.
  • Systems that uses it as RequireForUpdate are not updating, proving that the entity doesn't exist on build.
  • Searched on the Internet and got help from others of my team and some of the upper notes are failed solutions, thats why I'm here.

The authoring code is really simple (and should work since it works on other devs machines) as it follows: https://paste.ofcode.org/36m4qLKFj5SbKtRtjQcaWaB

delicate viper
#

bump

somber hill
#

are you sure subscene itself is loaded?

delicate viper
# somber hill are you sure subscene itself is loaded?

Yep! Some of the baked entities are present and found in queries during the build. Even the SubScene GUID appears in the build folders.

However, just to be certain, what is the best way to check if the SubScene is loaded during the build?

somber hill
#

as well as OnStopRunning

#

to see when things are unloaded

delicate viper
delicate viper
# somber hill to see when things are unloaded

After some tests, I've noticed that none of the subscene entities are spawning. Something during the build process is unloading the subscene (even before OnCreate).

I've tested on Windows Dedicated Server build and it works fine, maybe there's something wrong with Linux Dedicated Server builds?

edgy elk
#

Something during the build process is unloading the subscene (even before OnCreate).
what do you mean by that?

#

subscenes are pretty much only ever loaded after OnCreate

#

they load asynchronously from the scenesystem.update

#

so it takes multiple frames to load

#

so subscene entities will never exist during oncreate

delicate viper
edgy elk
#

that makes more sense ^^

somber hill
#

Because subscene is never loaded to be unloaded in the first place

delicate viper
# somber hill That still doesn't make much sense

The point is: none of the subscene entities are present on the build, the system that I've made to find these entities does not find them.

I'm able to create entities and work with it, like RPCs that I send on GoInGameSystem. These show up.

Something is going on when I build for Linux instead of Windows

somber hill
#

ok, so it's whole subscenes are corrupt?

#

or one specific?

delicate viper