Skip to content

Commit

Permalink
Merge pull request #834 from Unity-Technologies/develop
Browse files Browse the repository at this point in the history
release v2.1.0: merge to main
  • Loading branch information
fernando-cortez authored Apr 27, 2023
2 parents 60c19dc + a20d6f5 commit a4cafe2
Show file tree
Hide file tree
Showing 48 changed files with 873 additions and 490 deletions.
12 changes: 6 additions & 6 deletions .yamato/mobile-build-and-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Build_Player_With_Tests_iOS_{{ project.name }}_{{ editor }}:
flavor: b1.large

commands:
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
- unity-downloader-cli -c Editor -c iOS -u {{ editor }} --fast --wait
- pip install unity-downloader-cli==1.2.0 --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
- unity-downloader-cli -c Editor -c iOS -u 2021.3.15f1 --fast --wait
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
- chmod +x ./utr
- ./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
Expand All @@ -37,12 +37,12 @@ Build_Player_With_Tests_Android_{{ project.name }}_{{ editor }}:
type: Unity::VM
# Any generic image can be used, no need to have Android tools in the image for building
# All Android tools will be downloaded by unity-downloader-cli
image: desktop/android-execution-r19:v0.1.1-860408
image: mobile/android-execution-base:stable
flavor: b1.xlarge

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

# Skip repository cloning
Expand All @@ -119,7 +119,7 @@ mobile_test_android_{{ project.name }}_{{ editor }}:
start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
start %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices
set UTR_VERSION=0.12.0
./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
./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
# Set uploadable artifact paths
artifacts:
logs:
Expand Down
3 changes: 3 additions & 0 deletions Assets/GameData/NetworkPrefabs.asset
Git LFS file not shown
8 changes: 8 additions & 0 deletions Assets/GameData/NetworkPrefabs.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions Assets/Prefabs/CharGFX/PlayerGraphics_Rogue.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,6 @@ PrefabInstance:
objectReference: {fileID: 11400000, guid: 23c3465e22da67c4e812c4faf3adb1cb, type: 2}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
--- !u!1 &8385572559299522089 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 3736552308919084700, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
m_PrefabInstance: {fileID: 5153647769164318901}
m_PrefabAsset: {fileID: 0}
--- !u!4 &9157042335656178835 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
m_PrefabInstance: {fileID: 5153647769164318901}
m_PrefabAsset: {fileID: 0}
--- !u!82 &3541643525863551320 stripped
AudioSource:
m_CorrespondingSourceObject: {fileID: -674663276945163795, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
Expand All @@ -150,6 +140,11 @@ AudioSource:
m_CorrespondingSourceObject: {fileID: 8195155732997438405, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
m_PrefabInstance: {fileID: 5153647769164318901}
m_PrefabAsset: {fileID: 0}
--- !u!1 &8385572559299522089 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 3736552308919084700, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
m_PrefabInstance: {fileID: 5153647769164318901}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1406736000558620622
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -259,7 +254,7 @@ MonoBehaviour:
m_SoundEffect: {fileID: 8300000, guid: ef1b245877a39b94d86a631867e20a61, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
m_LoopSound: 1
m_LoopSound: 0
- m_AnimatorNodeName: Buff1
m_AnimatorNodeNameHash: -1764501741
m_Prefab: {fileID: 0}
Expand All @@ -276,4 +271,9 @@ MonoBehaviour:
- {fileID: 3541643525863551320}
- {fileID: 3908673605568263024}
m_Animator: {fileID: 0}
m_ClientCharacterVisualization: {fileID: 0}
m_ClientCharacter: {fileID: 0}
--- !u!4 &9157042335656178835 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
m_PrefabInstance: {fileID: 5153647769164318901}
m_PrefabAsset: {fileID: 0}
24 changes: 12 additions & 12 deletions Assets/Prefabs/CharGFX/PlayerGraphics_Tank.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,6 @@ PrefabInstance:
objectReference: {fileID: 11400000, guid: 23c3465e22da67c4e812c4faf3adb1cb, type: 2}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
--- !u!1 &8385572559299522089 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 3736552308919084700, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
m_PrefabInstance: {fileID: 5153647769164318901}
m_PrefabAsset: {fileID: 0}
--- !u!4 &9157042335656178835 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
m_PrefabInstance: {fileID: 5153647769164318901}
m_PrefabAsset: {fileID: 0}
--- !u!82 &3541643525863551320 stripped
AudioSource:
m_CorrespondingSourceObject: {fileID: -674663276945163795, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
Expand All @@ -93,6 +83,11 @@ AudioSource:
m_CorrespondingSourceObject: {fileID: 8195155732997438405, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
m_PrefabInstance: {fileID: 5153647769164318901}
m_PrefabAsset: {fileID: 0}
--- !u!1 &8385572559299522089 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 3736552308919084700, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
m_PrefabInstance: {fileID: 5153647769164318901}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1781430389835594798
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -202,12 +197,17 @@ MonoBehaviour:
m_SoundEffect: {fileID: 8300000, guid: 5ef809d665d13b245b559cd6170f5794, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
m_LoopSound: 1
m_LoopSound: 0
m_AudioSources:
- {fileID: 3541643525863551320}
- {fileID: 3908673605568263024}
m_Animator: {fileID: 0}
m_ClientCharacterVisualization: {fileID: 0}
m_ClientCharacter: {fileID: 0}
--- !u!4 &9157042335656178835 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
m_PrefabInstance: {fileID: 5153647769164318901}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &5238530588286883888
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down
4 changes: 2 additions & 2 deletions Assets/Prefabs/Game/EnemySpawner.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_BreakableElements: []
m_DormantCooldown: 180
IsBroken:
m_InternalValue: 0
m_Breakable: {fileID: 5343699662503375493}
m_WaveSpawner: {fileID: 4844841199312666291}
--- !u!114 &5343699662503375493
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
62 changes: 5 additions & 57 deletions Assets/Prefabs/NetworkingManager.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -51,62 +51,9 @@ MonoBehaviour:
ProtocolVersion: 0
NetworkTransport: {fileID: 8549047561508999566}
PlayerPrefab: {fileID: 4927145850774787080, guid: 1d3f5528d25661949890bcd7f47fe81a, type: 3}
NetworkPrefabs:
- Override: 0
Prefab: {fileID: 6009713983291384756, guid: 8237adf32a9b6de4892e6febe6b4bdef, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 3713729372785093424, guid: 6cdd52f1fa2ed34469a487ae6477eded, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 3688950541947916333, guid: 365e94337fd10fe4ebde1906df413ac7, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 2842198241268549130, guid: 30c420f004b8f6445ad2bdb2addb234a, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 2842198241268549130, guid: 7e3b8103f5622f64fa677352730f295c, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 2842198241268549130, guid: 411974b75a8b43d4e9b3c9069a5067fb, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 2842198241268549130, guid: 0251e08eeed89e844a8527b3a7874cc2, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 176558388678216176, guid: 98fafd094d0c0fa41abe5c3322251839, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 3106828016798330210, guid: 5c107a985e30aa2469a62ecf015d43a8, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 5473352307376472481, guid: 3e5c32e5766633a4eaf9e7c393418b34, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 1583543423304314434, guid: 4c1a321755b60c54099d0402be05fa2e, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
Prefabs:
NetworkPrefabsLists:
- {fileID: 11400000, guid: 67e4325119a857f48967fab772faf1d7, type: 2}
TickRate: 30
ClientConnectionBufferTimeout: 5
ConnectionApproval: 1
Expand All @@ -122,6 +69,7 @@ MonoBehaviour:
LoadSceneTimeOut: 20
SpawnTimeout: 1
EnableNetworkLogs: 1
OldPrefabList: []
--- !u!114 &8549047561508999566
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -144,7 +92,7 @@ MonoBehaviour:
ConnectionData:
Address: 127.0.0.1
Port: 7777
ServerListenAddress:
ServerListenAddress: 127.0.0.1
DebugSimulator:
PacketDelayMS: 0
PacketJitterMS: 0
Expand Down
10 changes: 6 additions & 4 deletions Assets/Prefabs/UI/IPPopup.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 20.3
m_fontSize: 33
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
Expand Down Expand Up @@ -785,7 +785,7 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 32.2
m_fontSize: 50
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
Expand Down Expand Up @@ -935,6 +935,7 @@ MonoBehaviour:
m_IPInputField: {fileID: 783666621484907260}
m_PortInputField: {fileID: 3692047279709044436}
m_CanvasGroup: {fileID: 3432270648822068983}
m_HostButton: {fileID: 8503688101831781139}
--- !u!1 &2513356161705610835
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2211,7 +2212,7 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 32.2
m_fontSize: 50
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
Expand Down Expand Up @@ -3287,6 +3288,7 @@ MonoBehaviour:
m_CanvasGroup: {fileID: 6846323567751854231}
m_IPInputField: {fileID: 2677382141616317261}
m_PortInputField: {fileID: 7282211495594724544}
m_JoinButton: {fileID: 8754602378570439514}
--- !u!1 &5924530127146065184
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -3577,7 +3579,7 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 20.3
m_fontSize: 33
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
Expand Down
8 changes: 7 additions & 1 deletion Assets/Scripts/ConnectionManagement/ConnectionManager.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using Unity.BossRoom.Utils;
using Unity.Collections;
using Unity.Netcode;
using UnityEngine;
using UUnity.BossRoom.ConnectionManagement;
Expand Down Expand Up @@ -99,6 +98,7 @@ void Start()
NetworkManager.OnServerStarted += OnServerStarted;
NetworkManager.ConnectionApprovalCallback += ApprovalCheck;
NetworkManager.OnTransportFailure += OnTransportFailure;
NetworkManager.OnServerStopped += OnServerStopped;
}

void OnDestroy()
Expand All @@ -108,6 +108,7 @@ void OnDestroy()
NetworkManager.OnServerStarted -= OnServerStarted;
NetworkManager.ConnectionApprovalCallback -= ApprovalCheck;
NetworkManager.OnTransportFailure -= OnTransportFailure;
NetworkManager.OnServerStopped -= OnServerStopped;
}

internal void ChangeState(ConnectionState nextState)
Expand Down Expand Up @@ -147,6 +148,11 @@ void OnTransportFailure()
m_CurrentState.OnTransportFailure();
}

void OnServerStopped(bool _) // we don't need this parameter as the ConnectionState already carries the relevant information
{
m_CurrentState.OnServerStopped();
}

public void StartClientLobby(string playerName)
{
m_CurrentState.StartClientLobby(playerName);
Expand Down
Loading

0 comments on commit a4cafe2

Please sign in to comment.