private void Start() { _levelChangeHandler = FindObjectOfType <LevelChangeHandler>(); NickNameSetter ns = FindObjectOfType <NickNameSetter>(); if (ns != null) { _nickname = ns.GetNickName(); } }
void Start() { _reference = FirebaseDatabase.DefaultInstance.GetReference(DatabaseConstants.PLAYERS); _sessionId = Random.Range(0, 1000000).ToString(); _collection = FindObjectOfType <CameraCollection>(); _collection.SetSessionID(_sessionId); NickNameSetter ns = FindObjectOfType <NickNameSetter>(); if (ns != null) { _sesionNick = ns.GetNickName(); } }