Mirror
Mirror copied to clipboard
Feature Request: Send Syncvars to subset of observers
New feature of being able to send Syncvars to subset of observers.
Lets say you have two teams of players, right now if you want to securely use SyncVars to send health data to only the relevant players you can only send a players health to its owner or all its observers (a setting on the NetworkBehaviour).
This is a proposal for having a list inside on SyncVar<T>
of connections (they must also be observers) which can receive that SyncVars data. This lets you use SyncVars for team games where your team mates can have health bars (their mana, or whatever you want) of each other and enemy players cant use hacked clients to see the other teams health as they wont receive the other teams health data sync vars.
It seems like it should be relatively simple to add as you just check if the lists isnt null (or have a bool in the class as well to activate it?) and then use that to send the data to the right connections (assuming they are also an observer)
I would give it a go but i think that it'd require doing some changes in weaver and i've got no experience with that.