Instantiate object with data
Luckie12
✭
So i am trying to instantiate my player over the PhotonNetwork
using
But when i Build and run, the .Name is empty...
Thanks for any help!
using
This works for the local player that is being spawned in the editor of unity.
GameObject thisPlayer = PhotonNetwork.Instantiate(playerPrefab.name, Vector3.up * 5, Quaternion.identity, 0) as GameObject;
var tP = thisPlayer.GetComponent();
tP.GetComponent().Name = MainLogin.LogTextSplitHolder[0];
tP.GetComponent().Score = 1000;
But when i Build and run, the .Name is empty...
Thanks for any help!
0