private void Start() { pvs = GameObject.FindObjectOfType <PlayerVisitSender>(); if (pvs != null) { hostData = pvs.playerToVisit; SetHostCharacter(); ConstructRoom(); } }
void Start() { // Set up the Editor before calling into the realtime database. FirebaseApp.DefaultInstance.SetEditorDatabaseUrl("https://bbvajam.firebaseio.com/"); FirebaseDatabase.DefaultInstance.GoOnline(); // Get the root reference location of the database. reference = FirebaseDatabase.DefaultInstance.RootReference; pvs = GameObject.FindObjectOfType <PlayerVisitSender>(); playerData = pvs.playerToVisit; if (playerData != null) { StartCoroutine(Waiter(playerData.avatarName, playerData)); } //reference.ChildAdded += HandleChildAdded; }