File tree Expand file tree Collapse file tree 2 files changed +24
-5
lines changed
Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 11version https://git-lfs.github.com/spec/v1
2- oid sha256:026cc16090895fccf6986872589ab0129472754d2336647da1d6b17d0a5771e0
3- size 19736
2+ oid sha256:9af454d928daae25e64d1f1592ad353a6ec85de9caf74f067322a0c065d31554
3+ size 19742
Original file line number Diff line number Diff line change 22using System . Collections . Generic ;
33using UnityEngine ;
44
5- public class Player : MonoBehaviour
6- {
5+ public class Player : MonoBehaviour {
76
87
98 public string username ;
109 public string avatarPath ;
1110
1211
13- public void Init ( string username , string avatarPath )
12+ private void Awake ( )
1413 {
14+ StartCoroutine ( StartChecks ( ) ) ;
15+ }
16+
17+ public void Init ( string username , string avatarPath )
18+ {
19+ Debug . Log ( "Player.Init() username = " + username ) ;
20+
1521 this . username = username ;
1622 this . avatarPath = avatarPath ;
1723 }
1824
25+ /**
26+ * Hide if no username
27+ */
28+ IEnumerator StartChecks ( )
29+ {
30+ yield return new WaitForSeconds ( 1f ) ;
31+
32+ // you left your toys out
33+ if ( username == null || username == "" )
34+ gameObject . SetActive ( false ) ;
35+ }
36+
37+
1938
2039}
You can’t perform that action at this time.
0 commit comments