server trigger onAttach. IsControl == false
Options
in Photon Bolt
hi!
I want server create player. OnAttach isControl = false. I want isControl true.
I want server create player. OnAttach isControl = false. I want isControl true.
BoltEntity entity = BoltNetwork.Instantiate(BoltPrefabs.Player, new Vector3(0, 1, 0), Quaternion.identity); if (evnt.RaisedBy == null){ //server , isControl = false? I want to set it to true. trigger OnAttach entity.TakeControl(); entity.AssignControl(BoltNetwork.Server); Debug.Log("手动触发"); BoltNetwork.Attach(entity.gameObject); //isControl = false. I don't know write code }else entity.AssignControl(evnt.RaisedBy); //client isControl = true. No problem
0
Comments
-
You need to wait a frame for control to update. You should only Take or Assign control, depending if you are the host or not.0
This discussion has been closed.