Skip to content

Commit

Permalink
feat: Bridge classes removal, Namespace cleanup [MTT-4014] (Unity-Tec…
Browse files Browse the repository at this point in the history
…hnologies#732)

* wip namespaces, locations and unused code

* Door code has been refactored into one class

* Removed NetworkFloorSwitchState and renamed switch class to FloorSwitch, updated the scenes and prefabs accordingly

* renamed projectile to PhysicsProjectile to better describe the intent, merged data objects with server class where it was possible

* Renamed projectiles to missiles and other merges

* wip ServerCharacter, NetworkCharacterState and ClientCharacterVisualization trifecta refactoring

* Further removals of bridge classes and general cleanup

Removed NetworkCharacterState and CharacterClassContainer, merged into ServerCharacter

* Renamed FXProjectileTargetedAction to FXMissileAction

* Undid projectile to missile renaming

* Removed GlobalSatticNetworkObjects prefab in BossRoom scene

BossRoom state now lives in the scene root and is easier to locate.

* Reset BossRoom subscene lifetimescope references

* #

* Resetting prefab inspector values where major changes were done

* Enemy portal is now a subclass of Breakable

* Merged TossedItem client and server classes into one

* Restored NetworkingManager.prefab

* Enemy spawner now has a Breakable component on it, alongside with ENemyPortal

* EnemySpawner crystals reset

* Fixed more prefab errors

removed a duiplicate NetworkAvatarGuidHandler that caused problems on PlayerAvatar

* formatting

* Build errors cleanup

* Update Assets/Scripts/Gameplay/GameplayObjects/Character/ServerCharacter.cs

Co-authored-by: Sam Bellomo <[email protected]>

* ClientCharacterVisuzliation renamed to ClientCharacter

* PhysicsProjectile tweaks

* Removed unnecessary collider that was causing issues with projectiles

* Floor switch fix

* more namespace changes, renamed asmdef

* more namespace adjustments

* restored broken references between LifetimeScopes (namespace changes break them)

* removed duplicate subscription

* addressing github comments

* field renames to match the new type name

* removing unused methods
removing useless "private"

* removing unused methods

* fixed injection issue due to broken ref to parent lifetimescope

* comments feedback

* changed tests namespace in yamato

* changelog

Co-authored-by: Sam Bellomo <[email protected]>
Co-authored-by: Samuel Bellomo <[email protected]>
  • Loading branch information
3 people authored Sep 26, 2022
1 parent 8b9acd2 commit 2763006
Show file tree
Hide file tree
Showing 307 changed files with 2,576 additions and 3,584 deletions.
8 changes: 4 additions & 4 deletions .yamato/mobile-build-and-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Build_Player_With_Tests_iOS_{{ project.name }}_{{ editor }}:
- unity-downloader-cli -c Editor -c iOS -u {{ editor }} --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.Multiplayer.Samples.BossRoom.Tests.Runtime
- ./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

artifacts:
players:
Expand Down Expand Up @@ -48,7 +48,7 @@ Build_Player_With_Tests_Android_{{ project.name }}_{{ editor }}:
- unity-downloader-cli -c Editor -c Android -u {{ editor }} --fast --wait
# Build player(s)
- set UTR_VERSION=0.12.0
- ./utr.bat --suite=playmode --platform=Android --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --scripting-backend=mono --build-only --testfilter=Unity.Multiplayer.Samples.BossRoom.Tests.Runtime
- ./utr.bat --suite=playmode --platform=Android --editor-location=.Editor --testproject={{ project.path }} --player-save-path=build/players --artifacts_path=build/logs --scripting-backend=mono --build-only --testfilter=Unity.BossRoom.Tests.Runtime
artifacts:
players:
paths:
Expand Down Expand Up @@ -86,7 +86,7 @@ mobile_test_ios_{{ project.name }}_{{ editor }}:
# Give UTR execution permissions
- chmod +x ./utr
# Run the test build on the device
- ./utr --suite=playmode --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results --testfilter=Unity.Multiplayer.Samples.BossRoom.Tests.Runtime
- ./utr --suite=playmode --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results --testfilter=Unity.BossRoom.Tests.Runtime

artifacts:
logs:
Expand Down Expand Up @@ -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.Multiplayer.Samples.BossRoom.Tests.Runtime
./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
# Set uploadable artifact paths
artifacts:
logs:
Expand Down
2 changes: 1 addition & 1 deletion .yamato/project-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test_{{ project.name }}_{{ editor }}_{{ platform.name }}:
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
- unity-downloader-cli -u {{ editor }} -c editor -w --fast
- upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests --extra-utr-arg=--testfilter=Unity.Multiplayer.Samples.BossRoom.Tests.Runtime
- upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests --extra-utr-arg=--testfilter=Unity.BossRoom.Tests.Runtime
artifacts:
logs:
paths:
Expand Down
66 changes: 17 additions & 49 deletions Assets/Prefabs/Character/Character.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ GameObject:
m_Component:
- component: {fileID: 4600110157238723791}
- component: {fileID: 4600110157238723790}
- component: {fileID: 4600110157238723777}
- component: {fileID: -909640835356089789}
- component: {fileID: 514105321093282895}
- component: {fileID: -5107732197415868221}
- component: {fileID: -6618539813679097072}
- component: {fileID: 7420593339233078707}
- component: {fileID: 4058497248645145345}
- component: {fileID: 350177175035117514}
Expand All @@ -24,6 +21,7 @@ GameObject:
- component: {fileID: 4309865414312164521}
- component: {fileID: 753347877357705413}
- component: {fileID: -2014321709067566591}
- component: {fileID: 3884788294438199994}
m_Layer: 3
m_Name: Character
m_TagString: Player
Expand Down Expand Up @@ -62,36 +60,6 @@ MonoBehaviour:
AlwaysReplicateAsRoot: 0
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
--- !u!114 &4600110157238723777
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4600110157238723781}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: edb78c1621dad5149bb47b96120d3fbf, type: 3}
m_Name:
m_EditorClassIdentifier:
heldNetworkObject:
m_InternalValue: 0
m_NetworkHealthState: {fileID: 514105321093282895}
m_NetworkLifeState: {fileID: -5107732197415868221}
m_CharacterClassContainer: {fileID: -6618539813679097072}
--- !u!114 &-909640835356089789
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4600110157238723781}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ae9a06a3585027044ababe9f9cb7b8e6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ClientCharacterVisualization: {fileID: 0}
--- !u!114 &514105321093282895
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -120,19 +88,6 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_LifeState:
m_InternalValue: 0
--- !u!114 &-6618539813679097072
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4600110157238723781}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4a3a07abfb44d50469112a0db6a202b2, type: 3}
m_Name:
m_EditorClassIdentifier:
m_CharacterClass: {fileID: 0}
--- !u!114 &7420593339233078707
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -145,10 +100,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 920a440eb254ba348915767fd046027a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_NetworkCharacterState: {fileID: 4600110157238723777}
m_ClientVisualization: {fileID: 0}
m_CharacterClass: {fileID: 0}
m_BrainEnabled: 1
m_KilledDestroyDelaySeconds: 3
m_StartingAction: 0
m_StartingAction: {fileID: 0}
m_DamageReceiver: {fileID: 753347877357705413}
m_Movement: {fileID: 4309865414312164521}
m_PhysicsWrapper: {fileID: 4058497248645145345}
Expand Down Expand Up @@ -248,7 +204,6 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_NavMeshAgent: {fileID: 745390554272530562}
m_Rigidbody: {fileID: 3375535791397456380}
m_NetworkCharacterState: {fileID: 4600110157238723777}
m_CharLogic: {fileID: 7420593339233078707}
--- !u!114 &753347877357705413
MonoBehaviour:
Expand Down Expand Up @@ -289,3 +244,16 @@ MonoBehaviour:
ScaleThreshold: 0.01
InLocalSpace: 0
Interpolate: 1
--- !u!114 &3884788294438199994
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4600110157238723781}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ebe9bfd21e47445488dfd84b4e0c9884, type: 3}
m_Name:
m_EditorClassIdentifier:
m_AvatarRegistry: {fileID: 11400000, guid: 48d17d764bff6c643a3dc035fb71c979, type: 2}
79 changes: 38 additions & 41 deletions Assets/Prefabs/Character/Imp.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,6 @@ PrefabInstance:
objectReference: {fileID: 3121817358174221070}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1ffde884792e9a44a9fbe049ebb79c9f, type: 3}
--- !u!1 &5858966600248860054 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6839301660383890230, guid: 1ffde884792e9a44a9fbe049ebb79c9f, type: 3}
m_PrefabInstance: {fileID: 1127359556114831008}
m_PrefabAsset: {fileID: 0}
--- !u!4 &6486568539699693356 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6170428688339538316, guid: 1ffde884792e9a44a9fbe049ebb79c9f, type: 3}
m_PrefabInstance: {fileID: 1127359556114831008}
m_PrefabAsset: {fileID: 0}
--- !u!95 &929086692793228630 stripped
Animator:
m_CorrespondingSourceObject: {fileID: 234724737205816310, guid: 1ffde884792e9a44a9fbe049ebb79c9f, type: 3}
Expand All @@ -95,6 +85,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 9520a47fc61d5ab4ca99cdac2d574909, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &5858966600248860054 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6839301660383890230, guid: 1ffde884792e9a44a9fbe049ebb79c9f, type: 3}
m_PrefabInstance: {fileID: 1127359556114831008}
m_PrefabAsset: {fileID: 0}
--- !u!114 &5401475423617019972
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -108,6 +103,11 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Animator: {fileID: 929086692793228630}
--- !u!4 &6486568539699693356 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6170428688339538316, guid: 1ffde884792e9a44a9fbe049ebb79c9f, type: 3}
m_PrefabInstance: {fileID: 1127359556114831008}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &2173896227866280545
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -247,6 +247,14 @@ PrefabInstance:
propertyPath: animator
value:
objectReference: {fileID: 929086692793228630}
- target: {fileID: 8398944656959553575, guid: 64cfd098f62285f42918875fef849e88, type: 3}
propertyPath: m_CharacterClass
value:
objectReference: {fileID: 11400000, guid: fa81aca63f2fce545a3b9e046b6e42e7, type: 2}
- target: {fileID: 8398944656959553575, guid: 64cfd098f62285f42918875fef849e88, type: 3}
propertyPath: m_ClientVisualization
value:
objectReference: {fileID: 3121817358174221070}
- target: {fileID: 8398944656959553575, guid: 64cfd098f62285f42918875fef849e88, type: 3}
propertyPath: m_KilledDestroyDelaySeconds
value: 2
Expand All @@ -265,27 +273,6 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 64cfd098f62285f42918875fef849e88, type: 3}
--- !u!1 &3713729372785093424 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 3288448142974003537, guid: 64cfd098f62285f42918875fef849e88, type: 3}
m_PrefabInstance: {fileID: 2173896227866280545}
m_PrefabAsset: {fileID: 0}
--- !u!4 &3713729372785093434 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3288448142974003547, guid: 64cfd098f62285f42918875fef849e88, type: 3}
m_PrefabInstance: {fileID: 2173896227866280545}
m_PrefabAsset: {fileID: 0}
--- !u!114 &9169118397563301302 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6995351927119310807, guid: 64cfd098f62285f42918875fef849e88, type: 3}
m_PrefabInstance: {fileID: 2173896227866280545}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3713729372785093424}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ae9a06a3585027044ababe9f9cb7b8e6, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &827948680237315002 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1537501989561463259, guid: 64cfd098f62285f42918875fef849e88, type: 3}
Expand All @@ -297,17 +284,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 6733907396f36c44891916e5c62f25a0, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &3837839015300097846 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3128178037050369367, guid: 64cfd098f62285f42918875fef849e88, type: 3}
--- !u!1 &3713729372785093424 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 3288448142974003537, guid: 64cfd098f62285f42918875fef849e88, type: 3}
m_PrefabInstance: {fileID: 2173896227866280545}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3713729372785093424}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 818290ebb0ac23541921b4dfc6842778, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &-4570750241117365215
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -325,8 +306,24 @@ MonoBehaviour:
m_UIStatePrefab: {fileID: -1943162842029199943, guid: 2b07482491a17964380023240087ce16, type: 3}
m_NetworkNameState: {fileID: 0}
m_NetworkHealthState: {fileID: 827948680237315002}
m_ClientCharacter: {fileID: 9169118397563301302}
m_ServerCharacter: {fileID: 0}
m_BaseHP: {fileID: 11400000, guid: 95633dc134a4e654f863831b22b5681a, type: 2}
m_TransformToTrack: {fileID: 6486568539699693356}
m_VerticalWorldOffset: 2.2
m_VerticalScreenOffset: 20
--- !u!4 &3713729372785093434 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3288448142974003547, guid: 64cfd098f62285f42918875fef849e88, type: 3}
m_PrefabInstance: {fileID: 2173896227866280545}
m_PrefabAsset: {fileID: 0}
--- !u!114 &3837839015300097846 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3128178037050369367, guid: 64cfd098f62285f42918875fef849e88, type: 3}
m_PrefabInstance: {fileID: 2173896227866280545}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3713729372785093424}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 818290ebb0ac23541921b4dfc6842778, type: 3}
m_Name:
m_EditorClassIdentifier:
Loading

0 comments on commit 2763006

Please sign in to comment.