1

Hi I`m making a multiplayer car game using Mirror. Every Time Player one chooses his character everything works fine. When Player two chooses his character he gets only the same character like the first player. Any Ideas? Here is my code (The set Active lines are for gui):

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Mirror;
using TMPro;


public class CharacterSelecter : MonoBehaviour
{
    public NetworkManager manager;
    public GameObject Player;
    public string Name;
    public TextMeshProUGUI Name_Textbox;
    

    public GameObject Foxy;
    public GameObject Kaktus;
    public GameObject Otter;
    public GameObject Pinguin;
    public GameObject setActive;
    


    void Awake()
    {   
        Foxy.SetActive(false);
        Kaktus.SetActive(false);        
        Otter.SetActive(false);
        Pinguin.SetActive(false);
    }

    public void ChangeCharacter()
    {
        Foxy.SetActive(false);
        Kaktus.SetActive(false);        
        Otter.SetActive(false);
        Pinguin.SetActive(false);
        setActive.SetActive(true);

        manager.playerPrefab = Player;
        Name_Textbox.text = Name;

    }

}

Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36

0 Answers0