Mirage icon indicating copy to clipboard operation
Mirage copied to clipboard

Read only property for ServerObjectManager nextNetworkId

Open emrys90 opened this issue 3 years ago • 1 comments

Please explain the suggested feature in detail. Adding a read only property for what the next NetId that would be assigned to a spawned object.

How exactly does this keep you from releasing your game right now? I use network id's as a form of ownership check on clients, and being able to access the net id before spawning so that its part of initial payload is ideal.

emrys90 avatar Jun 05 '22 03:06 emrys90

You can create a very simple NetIdGenerator and set the field on ServerObjectManager. And then add the Next Id a public field on that.

Would be better to use a custom NetIdGenerator instead of add a getter for next id. The property would only be able to give the next ID if using the default ids but not if using Generator.

James-Frowen avatar Jun 06 '22 18:06 James-Frowen