I’m working on a button when both player click on it,game start.
so I just create a script which is spawned by host, and within there is a NetworkVariable,if someone click on it,it will add 1. As it’s value reach to the sum of client,game start.
The problem is it seems that there is no way to allow everyone to change the same networkVariable.
even I had used serverRpc(RequireOwnership = false) and writepermission is server, if I’m not owner I still can’t change the value.
P.S.
the networkvariable is spawned on server like this:
NetworkManager.Singleton.OnServerStarted += () =>
{
foreach (var NGO in networkPrefabs)
{
var ngo = Instantiate(NGO);
ngo.Spawn();
}
};