Skip to content

Commit a4cafe2

Browse files
Merge pull request #834 from Unity-Technologies/develop
release v2.1.0: merge to main
2 parents 60c19dc + a20d6f5 commit a4cafe2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+873
-490
lines changed

.yamato/mobile-build-and-run.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Build_Player_With_Tests_iOS_{{ project.name }}_{{ editor }}:
1313
flavor: b1.large
1414

1515
commands:
16-
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
17-
- unity-downloader-cli -c Editor -c iOS -u {{ editor }} --fast --wait
16+
- pip install unity-downloader-cli==1.2.0 --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
17+
- unity-downloader-cli -c Editor -c iOS -u 2021.3.15f1 --fast --wait
1818
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
1919
- chmod +x ./utr
2020
- ./utr --suite=playmode --platform=iOS --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --build-only --testfilter=Unity.BossRoom.Tests.Runtime
@@ -37,12 +37,12 @@ Build_Player_With_Tests_Android_{{ project.name }}_{{ editor }}:
3737
type: Unity::VM
3838
# Any generic image can be used, no need to have Android tools in the image for building
3939
# All Android tools will be downloaded by unity-downloader-cli
40-
image: desktop/android-execution-r19:v0.1.1-860408
40+
image: mobile/android-execution-base:stable
4141
flavor: b1.xlarge
4242

4343
commands:
4444
# Download unity-downloader-cli
45-
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
45+
- pip install unity-downloader-cli==1.2.0 --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
4646
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools/utr-standalone/utr.bat --output utr.bat
4747
- python .yamato/disable-burst-if-requested.py --project-path {{ project.path }} --platform Android
4848
- unity-downloader-cli -c Editor -c Android -u {{ editor }} --fast --wait
@@ -103,7 +103,7 @@ mobile_test_android_{{ project.name }}_{{ editor }}:
103103
name: {{ project.name }} mobile project tests - {{ editor }} on Android
104104
agent:
105105
type: Unity::mobile::shield
106-
image: mobile/android-execution-r19:stable
106+
image: mobile/android-execution-base:stable
107107
flavor: b1.medium
108108

109109
# Skip repository cloning
@@ -119,7 +119,7 @@ mobile_test_android_{{ project.name }}_{{ editor }}:
119119
start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
120120
start %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices
121121
set UTR_VERSION=0.12.0
122-
./utr --artifacts_path=build/test-results --testproject={{ project.path }} --editor-location=.Editor --reruncount=2 --suite=playmode --platform=android --player-connection-ip=%BOKKEN_HOST_IP% --player-load-path=build/players --testfilter=Unity.BossRoom.Tests.Runtime
122+
./utr --artifacts_path=build/test-results --testproject={{ project.path }} --editor-location=.Editor --reruncount=2 --suite=playmode --platform=android --player-load-path=build/players --testfilter=Unity.BossRoom.Tests.Runtime
123123
# Set uploadable artifact paths
124124
artifacts:
125125
logs:

Assets/GameData/NetworkPrefabs.asset

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:f1602e4cff482bcacf4eaac104fe12fe5d46e71c871a94415b96ada086f44e71
3+
size 2790

Assets/GameData/NetworkPrefabs.asset.meta

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Prefabs/CharGFX/PlayerGraphics_Rogue.prefab

+12-12
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,6 @@ PrefabInstance:
130130
objectReference: {fileID: 11400000, guid: 23c3465e22da67c4e812c4faf3adb1cb, type: 2}
131131
m_RemovedComponents: []
132132
m_SourcePrefab: {fileID: 100100000, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
133-
--- !u!1 &8385572559299522089 stripped
134-
GameObject:
135-
m_CorrespondingSourceObject: {fileID: 3736552308919084700, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
136-
m_PrefabInstance: {fileID: 5153647769164318901}
137-
m_PrefabAsset: {fileID: 0}
138-
--- !u!4 &9157042335656178835 stripped
139-
Transform:
140-
m_CorrespondingSourceObject: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
141-
m_PrefabInstance: {fileID: 5153647769164318901}
142-
m_PrefabAsset: {fileID: 0}
143133
--- !u!82 &3541643525863551320 stripped
144134
AudioSource:
145135
m_CorrespondingSourceObject: {fileID: -674663276945163795, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
@@ -150,6 +140,11 @@ AudioSource:
150140
m_CorrespondingSourceObject: {fileID: 8195155732997438405, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
151141
m_PrefabInstance: {fileID: 5153647769164318901}
152142
m_PrefabAsset: {fileID: 0}
143+
--- !u!1 &8385572559299522089 stripped
144+
GameObject:
145+
m_CorrespondingSourceObject: {fileID: 3736552308919084700, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
146+
m_PrefabInstance: {fileID: 5153647769164318901}
147+
m_PrefabAsset: {fileID: 0}
153148
--- !u!114 &1406736000558620622
154149
MonoBehaviour:
155150
m_ObjectHideFlags: 0
@@ -259,7 +254,7 @@ MonoBehaviour:
259254
m_SoundEffect: {fileID: 8300000, guid: ef1b245877a39b94d86a631867e20a61, type: 3}
260255
m_SoundStartDelaySeconds: 0
261256
m_VolumeMultiplier: 1
262-
m_LoopSound: 1
257+
m_LoopSound: 0
263258
- m_AnimatorNodeName: Buff1
264259
m_AnimatorNodeNameHash: -1764501741
265260
m_Prefab: {fileID: 0}
@@ -276,4 +271,9 @@ MonoBehaviour:
276271
- {fileID: 3541643525863551320}
277272
- {fileID: 3908673605568263024}
278273
m_Animator: {fileID: 0}
279-
m_ClientCharacterVisualization: {fileID: 0}
274+
m_ClientCharacter: {fileID: 0}
275+
--- !u!4 &9157042335656178835 stripped
276+
Transform:
277+
m_CorrespondingSourceObject: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
278+
m_PrefabInstance: {fileID: 5153647769164318901}
279+
m_PrefabAsset: {fileID: 0}

Assets/Prefabs/CharGFX/PlayerGraphics_Tank.prefab

+12-12
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,6 @@ PrefabInstance:
7373
objectReference: {fileID: 11400000, guid: 23c3465e22da67c4e812c4faf3adb1cb, type: 2}
7474
m_RemovedComponents: []
7575
m_SourcePrefab: {fileID: 100100000, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
76-
--- !u!1 &8385572559299522089 stripped
77-
GameObject:
78-
m_CorrespondingSourceObject: {fileID: 3736552308919084700, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
79-
m_PrefabInstance: {fileID: 5153647769164318901}
80-
m_PrefabAsset: {fileID: 0}
81-
--- !u!4 &9157042335656178835 stripped
82-
Transform:
83-
m_CorrespondingSourceObject: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
84-
m_PrefabInstance: {fileID: 5153647769164318901}
85-
m_PrefabAsset: {fileID: 0}
8676
--- !u!82 &3541643525863551320 stripped
8777
AudioSource:
8878
m_CorrespondingSourceObject: {fileID: -674663276945163795, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
@@ -93,6 +83,11 @@ AudioSource:
9383
m_CorrespondingSourceObject: {fileID: 8195155732997438405, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
9484
m_PrefabInstance: {fileID: 5153647769164318901}
9585
m_PrefabAsset: {fileID: 0}
86+
--- !u!1 &8385572559299522089 stripped
87+
GameObject:
88+
m_CorrespondingSourceObject: {fileID: 3736552308919084700, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
89+
m_PrefabInstance: {fileID: 5153647769164318901}
90+
m_PrefabAsset: {fileID: 0}
9691
--- !u!114 &1781430389835594798
9792
MonoBehaviour:
9893
m_ObjectHideFlags: 0
@@ -202,12 +197,17 @@ MonoBehaviour:
202197
m_SoundEffect: {fileID: 8300000, guid: 5ef809d665d13b245b559cd6170f5794, type: 3}
203198
m_SoundStartDelaySeconds: 0
204199
m_VolumeMultiplier: 1
205-
m_LoopSound: 1
200+
m_LoopSound: 0
206201
m_AudioSources:
207202
- {fileID: 3541643525863551320}
208203
- {fileID: 3908673605568263024}
209204
m_Animator: {fileID: 0}
210-
m_ClientCharacterVisualization: {fileID: 0}
205+
m_ClientCharacter: {fileID: 0}
206+
--- !u!4 &9157042335656178835 stripped
207+
Transform:
208+
m_CorrespondingSourceObject: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
209+
m_PrefabInstance: {fileID: 5153647769164318901}
210+
m_PrefabAsset: {fileID: 0}
211211
--- !u!1001 &5238530588286883888
212212
PrefabInstance:
213213
m_ObjectHideFlags: 0

Assets/Prefabs/Game/EnemySpawner.prefab

+2-2
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ MonoBehaviour:
466466
m_EditorClassIdentifier:
467467
m_BreakableElements: []
468468
m_DormantCooldown: 180
469-
IsBroken:
470-
m_InternalValue: 0
469+
m_Breakable: {fileID: 5343699662503375493}
470+
m_WaveSpawner: {fileID: 4844841199312666291}
471471
--- !u!114 &5343699662503375493
472472
MonoBehaviour:
473473
m_ObjectHideFlags: 0

Assets/Prefabs/NetworkingManager.prefab

+5-57
Original file line numberDiff line numberDiff line change
@@ -51,62 +51,9 @@ MonoBehaviour:
5151
ProtocolVersion: 0
5252
NetworkTransport: {fileID: 8549047561508999566}
5353
PlayerPrefab: {fileID: 4927145850774787080, guid: 1d3f5528d25661949890bcd7f47fe81a, type: 3}
54-
NetworkPrefabs:
55-
- Override: 0
56-
Prefab: {fileID: 6009713983291384756, guid: 8237adf32a9b6de4892e6febe6b4bdef, type: 3}
57-
SourcePrefabToOverride: {fileID: 0}
58-
SourceHashToOverride: 0
59-
OverridingTargetPrefab: {fileID: 0}
60-
- Override: 0
61-
Prefab: {fileID: 3713729372785093424, guid: 6cdd52f1fa2ed34469a487ae6477eded, type: 3}
62-
SourcePrefabToOverride: {fileID: 0}
63-
SourceHashToOverride: 0
64-
OverridingTargetPrefab: {fileID: 0}
65-
- Override: 0
66-
Prefab: {fileID: 3688950541947916333, guid: 365e94337fd10fe4ebde1906df413ac7, type: 3}
67-
SourcePrefabToOverride: {fileID: 0}
68-
SourceHashToOverride: 0
69-
OverridingTargetPrefab: {fileID: 0}
70-
- Override: 0
71-
Prefab: {fileID: 2842198241268549130, guid: 30c420f004b8f6445ad2bdb2addb234a, type: 3}
72-
SourcePrefabToOverride: {fileID: 0}
73-
SourceHashToOverride: 0
74-
OverridingTargetPrefab: {fileID: 0}
75-
- Override: 0
76-
Prefab: {fileID: 2842198241268549130, guid: 7e3b8103f5622f64fa677352730f295c, type: 3}
77-
SourcePrefabToOverride: {fileID: 0}
78-
SourceHashToOverride: 0
79-
OverridingTargetPrefab: {fileID: 0}
80-
- Override: 0
81-
Prefab: {fileID: 2842198241268549130, guid: 411974b75a8b43d4e9b3c9069a5067fb, type: 3}
82-
SourcePrefabToOverride: {fileID: 0}
83-
SourceHashToOverride: 0
84-
OverridingTargetPrefab: {fileID: 0}
85-
- Override: 0
86-
Prefab: {fileID: 2842198241268549130, guid: 0251e08eeed89e844a8527b3a7874cc2, type: 3}
87-
SourcePrefabToOverride: {fileID: 0}
88-
SourceHashToOverride: 0
89-
OverridingTargetPrefab: {fileID: 0}
90-
- Override: 0
91-
Prefab: {fileID: 176558388678216176, guid: 98fafd094d0c0fa41abe5c3322251839, type: 3}
92-
SourcePrefabToOverride: {fileID: 0}
93-
SourceHashToOverride: 0
94-
OverridingTargetPrefab: {fileID: 0}
95-
- Override: 0
96-
Prefab: {fileID: 3106828016798330210, guid: 5c107a985e30aa2469a62ecf015d43a8, type: 3}
97-
SourcePrefabToOverride: {fileID: 0}
98-
SourceHashToOverride: 0
99-
OverridingTargetPrefab: {fileID: 0}
100-
- Override: 0
101-
Prefab: {fileID: 5473352307376472481, guid: 3e5c32e5766633a4eaf9e7c393418b34, type: 3}
102-
SourcePrefabToOverride: {fileID: 0}
103-
SourceHashToOverride: 0
104-
OverridingTargetPrefab: {fileID: 0}
105-
- Override: 0
106-
Prefab: {fileID: 1583543423304314434, guid: 4c1a321755b60c54099d0402be05fa2e, type: 3}
107-
SourcePrefabToOverride: {fileID: 0}
108-
SourceHashToOverride: 0
109-
OverridingTargetPrefab: {fileID: 0}
54+
Prefabs:
55+
NetworkPrefabsLists:
56+
- {fileID: 11400000, guid: 67e4325119a857f48967fab772faf1d7, type: 2}
11057
TickRate: 30
11158
ClientConnectionBufferTimeout: 5
11259
ConnectionApproval: 1
@@ -122,6 +69,7 @@ MonoBehaviour:
12269
LoadSceneTimeOut: 20
12370
SpawnTimeout: 1
12471
EnableNetworkLogs: 1
72+
OldPrefabList: []
12573
--- !u!114 &8549047561508999566
12674
MonoBehaviour:
12775
m_ObjectHideFlags: 0
@@ -144,7 +92,7 @@ MonoBehaviour:
14492
ConnectionData:
14593
Address: 127.0.0.1
14694
Port: 7777
147-
ServerListenAddress:
95+
ServerListenAddress: 127.0.0.1
14896
DebugSimulator:
14997
PacketDelayMS: 0
15098
PacketJitterMS: 0

Assets/Prefabs/UI/IPPopup.prefab

+6-4
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ MonoBehaviour:
173173
m_faceColor:
174174
serializedVersion: 2
175175
rgba: 4294967295
176-
m_fontSize: 20.3
176+
m_fontSize: 33
177177
m_fontSizeBase: 36
178178
m_fontWeight: 400
179179
m_enableAutoSizing: 1
@@ -785,7 +785,7 @@ MonoBehaviour:
785785
m_faceColor:
786786
serializedVersion: 2
787787
rgba: 4294967295
788-
m_fontSize: 32.2
788+
m_fontSize: 50
789789
m_fontSizeBase: 36
790790
m_fontWeight: 400
791791
m_enableAutoSizing: 1
@@ -935,6 +935,7 @@ MonoBehaviour:
935935
m_IPInputField: {fileID: 783666621484907260}
936936
m_PortInputField: {fileID: 3692047279709044436}
937937
m_CanvasGroup: {fileID: 3432270648822068983}
938+
m_HostButton: {fileID: 8503688101831781139}
938939
--- !u!1 &2513356161705610835
939940
GameObject:
940941
m_ObjectHideFlags: 0
@@ -2211,7 +2212,7 @@ MonoBehaviour:
22112212
m_faceColor:
22122213
serializedVersion: 2
22132214
rgba: 4294967295
2214-
m_fontSize: 32.2
2215+
m_fontSize: 50
22152216
m_fontSizeBase: 36
22162217
m_fontWeight: 400
22172218
m_enableAutoSizing: 1
@@ -3287,6 +3288,7 @@ MonoBehaviour:
32873288
m_CanvasGroup: {fileID: 6846323567751854231}
32883289
m_IPInputField: {fileID: 2677382141616317261}
32893290
m_PortInputField: {fileID: 7282211495594724544}
3291+
m_JoinButton: {fileID: 8754602378570439514}
32903292
--- !u!1 &5924530127146065184
32913293
GameObject:
32923294
m_ObjectHideFlags: 0
@@ -3577,7 +3579,7 @@ MonoBehaviour:
35773579
m_faceColor:
35783580
serializedVersion: 2
35793581
rgba: 4294967295
3580-
m_fontSize: 20.3
3582+
m_fontSize: 33
35813583
m_fontSizeBase: 36
35823584
m_fontWeight: 400
35833585
m_enableAutoSizing: 1

Assets/Scripts/ConnectionManagement/ConnectionManager.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Collections.Generic;
33
using Unity.BossRoom.Utils;
4-
using Unity.Collections;
54
using Unity.Netcode;
65
using UnityEngine;
76
using UUnity.BossRoom.ConnectionManagement;
@@ -99,6 +98,7 @@ void Start()
9998
NetworkManager.OnServerStarted += OnServerStarted;
10099
NetworkManager.ConnectionApprovalCallback += ApprovalCheck;
101100
NetworkManager.OnTransportFailure += OnTransportFailure;
101+
NetworkManager.OnServerStopped += OnServerStopped;
102102
}
103103

104104
void OnDestroy()
@@ -108,6 +108,7 @@ void OnDestroy()
108108
NetworkManager.OnServerStarted -= OnServerStarted;
109109
NetworkManager.ConnectionApprovalCallback -= ApprovalCheck;
110110
NetworkManager.OnTransportFailure -= OnTransportFailure;
111+
NetworkManager.OnServerStopped -= OnServerStopped;
111112
}
112113

113114
internal void ChangeState(ConnectionState nextState)
@@ -147,6 +148,11 @@ void OnTransportFailure()
147148
m_CurrentState.OnTransportFailure();
148149
}
149150

151+
void OnServerStopped(bool _) // we don't need this parameter as the ConnectionState already carries the relevant information
152+
{
153+
m_CurrentState.OnServerStopped();
154+
}
155+
150156
public void StartClientLobby(string playerName)
151157
{
152158
m_CurrentState.StartClientLobby(playerName);

0 commit comments

Comments
 (0)