Prespawned ghost entities loaded in at startup can not be despawned using the ghost relevancy, neither SetIsRelevant or SetIsIrrelevant, unless a period of time has passed. In my testing, it varies between 3 to 5 seconds after initial startup of the server world. Depending on the client latency and load duration
Reproduce:
-
Have a prespawned ghost auto-load in at startup.
-
Have a ghost relevancy system setting all ghosts to irrelevant.
-
Expect that the prespawned ghost will disappear from the client hierarchy. This however does not happen.
-
Now add a 5 second delay to the ghost relevancy system. I.e., if (state.WorldUnmanaged.Time.ElapsedTime < 5f) return;
-
Notice that after 5 seconds and once the ghost relevancy system starts running, the prespawned ghost disappears as expected.
1 Like
Yeah i have the same issue.
Also happens if that scene entity is relevant for the connection it won’t receive ghost field data.
Hey!
Thanks for the report, we’ll dig into this.
Can I ask what quantity of prespawn ghosts (and non Prespawned ghosts) you’re both using? Cheers!
1 Like
Thanks for taking this up.
I have 1 client ghost and about 30 prespawned plus or minus 5 depending on the location it spawned in.
1 Like
Update: This appears to be correct behaviour in our internal master branch. I’ll grab the pre-release branch now.
Just to clarify: Prespawned ghosts are Disabled until a snapshot containing them (or containing their deletion) arrives. Are the prespawned ghosts in your hierarchies disabled? They should appear greyed out in the Entities hierarchy, and any individual entity should have the Disabled tag component on it.
If it is disabled, can I ask why you consider this a bug? If you see them as Enabled, then that 100% is a bug. LMK thoughts.
1 Like
Huh, hrm. Okay, so my custom hybrid linking system had with disabled filter option so it is rendering disabled entities, thus making them appear as if they were fully networked when they’re not. The option is so prespawned entities show up in scene view and outside of play mode where all ghosts are disabled. Added in a check for that and everything works now.
Sorry about that. Bug on my end.
Np at all, glad it’s resolved.
1 Like