Adding more network features for scripts. #709
Adding more network features for scripts. #709Toys0125 wants to merge 5 commits intoBasisVR:developerfrom
Conversation
Had to do this as we can not assume Id=0 means no owner as we start at id 0 for first user.
|
Other option is when we release the owner we set |
|
We really should just have a trygetownershipid that gives you back false or true, done that a few places in the code base. I like using zero as the starting point as well, that's programming |
Okay added the TryGetOwnerId in which checks if we have it cached, and outputs the owner id, otherwise returns false. |
| "UnityEngine.EventSystems.EventTrigger+Entry", | ||
| "UnityEngine.EventSystems.EventTrigger+TriggerEvent", | ||
| "UnityEngine.EventSystems.EventTriggerType", | ||
| "UnityEngine.EventSystems.*", |
There was a problem hiding this comment.
im weary of .* can see this becoming a magical ow shit moment if unity adds something
| return Result; | ||
| } | ||
|
|
||
| public bool TryGetOwnerId(out ushort OwnerId) |
There was a problem hiding this comment.
i need convincing this is better then just making people async the server and store the result
For instance the server normally sends a remove owner and set the ID=0. Which works for everyone, except the first person. We start the player Id at 0. Which breaks this assumption with single player or low player count servers. So went and added a simple bool that the NetworkContent class will track if there is an owner assigned.