Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Third Party Agregar nombre con photon en unity3d

Discussion in 'Multiplayer' started by CastryGames, Mar 13, 2018.

  1. CastryGames

    CastryGames

    Joined:
    Oct 1, 2014
    Posts:
    77
    mi problema es el siguiente , esta es mi script :

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.UI;

    public class SeleccionarPersonajes : MonoBehaviour {

    public List<Jugadores> MisPersonajes = new List<Jugadores>();
    public Dissonance.Integrations.PhotonUnityNetworking.Demo.PunMenuController Padre;
    public Transform Ruta;
    public GameObject Boton;
    public InputField NombreActual;
    public GameObject BotonSiguiente;
    public Text Salida;
    public void CambiarNombreaaaaaa()
    {
    CambiarNombre (NombreActual.text);
    }
    public void Start()
    { Salida.text = PlayerPrefs.GetString ("nombre");
    CrearListado ();

    }
    public void CambiarNombre(string nombre)
    {
    if (nombre.Length < 10) {
    PlayerPrefs.SetString ("nombre", NombreActual.text);
    BotonSiguiente.SetActive (true);

    } else {
    BotonSiguiente.SetActive (false);
    }
    }




    y en el modelo del jugador lo tengo así :



    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.Events;
    public class sincamara : MonoBehaviour {
    [SerializeField()]
    private GameObject Camararc;
    public TextMesh Salida;
    void Start(){
    Salida.text = PlayerPrefs.GetString ("nombre");




    ME CARGA el nombre todo perfecto el problema es que todos aparecen con el nombre que coloques en la pc , ejemplo si en una pc pongo de nombre al personaje patata todos se llamaran patata y si me conecto con otra pc todos tendrán el nombre que halla puesto en esa pc , que tendría que hacer???


    les agradezco la ayuda y discúlpenme si no me explique bien
     
  2. hugopino2024

    hugopino2024

    Joined:
    Mar 6, 2024
    Posts:
    1
    a i me pasa lo mismo, tendrmos que usar un sistema de nombres diferente