Unity3d Player name change

0 votes
Hey,
times, I got a question, etc. I want love in my game that spawns the player with a different name I got but I don't know how anyone could please help me? (If the name does not change, no player can see each other)
 
Dobby

 

asked Apr 1, 2014 in AppWarpS2 by dobby5 (16 points)

1 Answer

0 votes
Can you provide some more details about the issues you are facing??
Are you using one of our sample or building your own game?
answered Apr 2, 2014 by Suyash Mohan (900 points)
I used this codes from sample for my own game this code is form warp 1 and i used the DLL from warp2:

appwarp:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

using com.shephertz.app42.gaming.multiplayer.client;
using com.shephertz.app42.gaming.multiplayer.client.events;
using com.shephertz.app42.gaming.multiplayer.client.listener;
using com.shephertz.app42.gaming.multiplayer.client.command;
using com.shephertz.app42.gaming.multiplayer.client.message;
using com.shephertz.app42.gaming.multiplayer.client.transformer;

//using UnityEditor;

using AssemblyCSharp;

public class appwarp : MonoBehaviour {

    //please update with values you get after signing up
    public static string apiKey = "apikey";
    public static string secretKey = "I used a ip
    public static string roomid = "myroomid";
    public static string username;
    Listener listen = new Listener();
    public static Vector3 newPos = new Vector3(0,0,0);
   
    void Start () {
        WarpClient.initialize(apiKey,secretKey);
        WarpClient.GetInstance().AddConnectionRequestListener(listen);
        WarpClient.GetInstance().AddChatRequestListener(listen);
        WarpClient.GetInstance().AddLobbyRequestListener(listen);
        WarpClient.GetInstance().AddNotificationListener(listen);
        WarpClient.GetInstance().AddRoomRequestListener(listen);
        WarpClient.GetInstance().AddUpdateRequestListener(listen);
        WarpClient.GetInstance().AddZoneRequestListener(listen);
       
        // join with a unique name (current time stamp)
        username = System.DateTime.UtcNow.Ticks.ToString();
        WarpClient.GetInstance().Connect(username, "");
       
        //EditorApplication.playmodeStateChanged += OnEditorStateChanged;
        addPlayer();
    }
   
    public float interval = 0.1f;
    float timer = 0;
In this sample, we have used a random name to connect to AppWarp server. So all of your clients should get a random name.
Yes by warp version 2 is is all ok i have the script from warp 1 and i used the dll from warp 2 and than dont function the radeom name system
can you remove the third person component from the simple demo warp2 (viking warp2) ? and than my send ?
Sorry, your English is very confusing. What do you mean by warp version 2 and warp version 1.

We can not modify our sample, without understanding what exactly your are building. But since, our samples are available with source code, you can easily modify them yourself. If you want, you can remove the third person controller scripts from inspector window.
I want the third person component out of the warp 2 script out who I do not know how they would perhaps do for me?
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...