File tree Expand file tree Collapse file tree 3 files changed +22
-4
lines changed
Assets/BossRoom/Scripts/Client/UI Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections ;
3
3
using TMPro ;
4
+ using Unity . Multiplayer . Samples . BossRoom . Shared . Infrastructure ;
4
5
using Unity . Netcode ;
5
6
using Unity . Netcode . Transports . UNET ;
6
7
using Unity . Netcode . Transports . UTP ;
@@ -14,10 +15,15 @@ public class IPConnectionWindow : MonoBehaviour
14
15
CanvasGroup m_CanvasGroup ;
15
16
16
17
[ SerializeField ]
18
+ TextMeshProUGUI m_TitleText ;
19
+
17
20
IPUIMediator m_IPUIMediator ;
18
21
19
- [ SerializeField ]
20
- TextMeshProUGUI m_TitleText ;
22
+ [ Inject ]
23
+ void InjectDependencies ( IPUIMediator ipUIMediator )
24
+ {
25
+ m_IPUIMediator = ipUIMediator ;
26
+ }
21
27
22
28
void Awake ( )
23
29
{
Original file line number Diff line number Diff line change
1
+ using Unity . Multiplayer . Samples . BossRoom . Shared . Infrastructure ;
1
2
using UnityEngine ;
2
3
using UnityEngine . UI ;
3
4
@@ -11,9 +12,14 @@ public class IPHostingUI : MonoBehaviour
11
12
[ SerializeField ]
12
13
CanvasGroup m_CanvasGroup ;
13
14
14
- [ SerializeField ]
15
15
IPUIMediator m_IPUIMediator ;
16
16
17
+ [ Inject ]
18
+ void InjectDependencies ( IPUIMediator ipUIMediator )
19
+ {
20
+ m_IPUIMediator = ipUIMediator ;
21
+ }
22
+
17
23
void Awake ( )
18
24
{
19
25
m_IPInputField . text = IPUIMediator . k_DefaultIP ;
Original file line number Diff line number Diff line change 1
1
using System ;
2
+ using Unity . Multiplayer . Samples . BossRoom . Shared . Infrastructure ;
2
3
using UnityEngine ;
3
4
using UnityEngine . UI ;
4
5
@@ -13,9 +14,14 @@ public class IPJoiningUI : MonoBehaviour
13
14
14
15
[ SerializeField ] InputField m_PortInputField ;
15
16
16
- [ SerializeField ]
17
17
IPUIMediator m_IPUIMediator ;
18
18
19
+ [ Inject ]
20
+ void InjectDependencies ( IPUIMediator ipUIMediator )
21
+ {
22
+ m_IPUIMediator = ipUIMediator ;
23
+ }
24
+
19
25
void Awake ( )
20
26
{
21
27
m_IPInputField . text = IPUIMediator . k_DefaultIP ;
You can’t perform that action at this time.
0 commit comments