NetPlayer.cs 457 B

12345678910111213141516171819202122232425
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using Mirror;
  4. using UnityEngine;
  5. public class NetPlayer : NetworkBehaviour
  6. {
  7. public Behaviour[] LocalComponents;
  8. void Start()
  9. {
  10. if(!isLocalPlayer){
  11. foreach(Behaviour localComponent in LocalComponents){
  12. localComponent.enabled=false;
  13. }
  14. }
  15. }
  16. // Update is called once per frame
  17. void Update()
  18. {
  19. }
  20. }