Skip to content

Commit 2763006

Browse files
feat: Bridge classes removal, Namespace cleanup [MTT-4014] (#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]>
1 parent 8b9acd2 commit 2763006

File tree

307 files changed

+2576
-3584
lines changed

Some content is hidden

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

307 files changed

+2576
-3584
lines changed

Diff for: .yamato/mobile-build-and-run.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Build_Player_With_Tests_iOS_{{ project.name }}_{{ editor }}:
1717
- unity-downloader-cli -c Editor -c iOS -u {{ editor }} --fast --wait
1818
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
1919
- chmod +x ./utr
20-
- ./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
20+
- ./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
2121

2222
artifacts:
2323
players:
@@ -48,7 +48,7 @@ Build_Player_With_Tests_Android_{{ project.name }}_{{ editor }}:
4848
- unity-downloader-cli -c Editor -c Android -u {{ editor }} --fast --wait
4949
# Build player(s)
5050
- set UTR_VERSION=0.12.0
51-
- ./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
51+
- ./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
5252
artifacts:
5353
players:
5454
paths:
@@ -86,7 +86,7 @@ mobile_test_ios_{{ project.name }}_{{ editor }}:
8686
# Give UTR execution permissions
8787
- chmod +x ./utr
8888
# Run the test build on the device
89-
- ./utr --suite=playmode --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results --testfilter=Unity.Multiplayer.Samples.BossRoom.Tests.Runtime
89+
- ./utr --suite=playmode --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results --testfilter=Unity.BossRoom.Tests.Runtime
9090

9191
artifacts:
9292
logs:
@@ -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.Multiplayer.Samples.BossRoom.Tests.Runtime
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
123123
# Set uploadable artifact paths
124124
artifacts:
125125
logs:

Diff for: .yamato/project-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ test_{{ project.name }}_{{ editor }}_{{ platform.name }}:
1717
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
1818
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
1919
- unity-downloader-cli -u {{ editor }} -c editor -w --fast
20-
- upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests --extra-utr-arg=--testfilter=Unity.Multiplayer.Samples.BossRoom.Tests.Runtime
20+
- upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests --extra-utr-arg=--testfilter=Unity.BossRoom.Tests.Runtime
2121
artifacts:
2222
logs:
2323
paths:

Diff for: Assets/Prefabs/Character/Character.prefab

+17-49
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@ GameObject:
1010
m_Component:
1111
- component: {fileID: 4600110157238723791}
1212
- component: {fileID: 4600110157238723790}
13-
- component: {fileID: 4600110157238723777}
14-
- component: {fileID: -909640835356089789}
1513
- component: {fileID: 514105321093282895}
1614
- component: {fileID: -5107732197415868221}
17-
- component: {fileID: -6618539813679097072}
1815
- component: {fileID: 7420593339233078707}
1916
- component: {fileID: 4058497248645145345}
2017
- component: {fileID: 350177175035117514}
@@ -24,6 +21,7 @@ GameObject:
2421
- component: {fileID: 4309865414312164521}
2522
- component: {fileID: 753347877357705413}
2623
- component: {fileID: -2014321709067566591}
24+
- component: {fileID: 3884788294438199994}
2725
m_Layer: 3
2826
m_Name: Character
2927
m_TagString: Player
@@ -62,36 +60,6 @@ MonoBehaviour:
6260
AlwaysReplicateAsRoot: 0
6361
DontDestroyWithOwner: 0
6462
AutoObjectParentSync: 1
65-
--- !u!114 &4600110157238723777
66-
MonoBehaviour:
67-
m_ObjectHideFlags: 0
68-
m_CorrespondingSourceObject: {fileID: 0}
69-
m_PrefabInstance: {fileID: 0}
70-
m_PrefabAsset: {fileID: 0}
71-
m_GameObject: {fileID: 4600110157238723781}
72-
m_Enabled: 1
73-
m_EditorHideFlags: 0
74-
m_Script: {fileID: 11500000, guid: edb78c1621dad5149bb47b96120d3fbf, type: 3}
75-
m_Name:
76-
m_EditorClassIdentifier:
77-
heldNetworkObject:
78-
m_InternalValue: 0
79-
m_NetworkHealthState: {fileID: 514105321093282895}
80-
m_NetworkLifeState: {fileID: -5107732197415868221}
81-
m_CharacterClassContainer: {fileID: -6618539813679097072}
82-
--- !u!114 &-909640835356089789
83-
MonoBehaviour:
84-
m_ObjectHideFlags: 0
85-
m_CorrespondingSourceObject: {fileID: 0}
86-
m_PrefabInstance: {fileID: 0}
87-
m_PrefabAsset: {fileID: 0}
88-
m_GameObject: {fileID: 4600110157238723781}
89-
m_Enabled: 1
90-
m_EditorHideFlags: 0
91-
m_Script: {fileID: 11500000, guid: ae9a06a3585027044ababe9f9cb7b8e6, type: 3}
92-
m_Name:
93-
m_EditorClassIdentifier:
94-
m_ClientCharacterVisualization: {fileID: 0}
9563
--- !u!114 &514105321093282895
9664
MonoBehaviour:
9765
m_ObjectHideFlags: 0
@@ -120,19 +88,6 @@ MonoBehaviour:
12088
m_EditorClassIdentifier:
12189
m_LifeState:
12290
m_InternalValue: 0
123-
--- !u!114 &-6618539813679097072
124-
MonoBehaviour:
125-
m_ObjectHideFlags: 0
126-
m_CorrespondingSourceObject: {fileID: 0}
127-
m_PrefabInstance: {fileID: 0}
128-
m_PrefabAsset: {fileID: 0}
129-
m_GameObject: {fileID: 4600110157238723781}
130-
m_Enabled: 1
131-
m_EditorHideFlags: 0
132-
m_Script: {fileID: 11500000, guid: 4a3a07abfb44d50469112a0db6a202b2, type: 3}
133-
m_Name:
134-
m_EditorClassIdentifier:
135-
m_CharacterClass: {fileID: 0}
13691
--- !u!114 &7420593339233078707
13792
MonoBehaviour:
13893
m_ObjectHideFlags: 0
@@ -145,10 +100,11 @@ MonoBehaviour:
145100
m_Script: {fileID: 11500000, guid: 920a440eb254ba348915767fd046027a, type: 3}
146101
m_Name:
147102
m_EditorClassIdentifier:
148-
m_NetworkCharacterState: {fileID: 4600110157238723777}
103+
m_ClientVisualization: {fileID: 0}
104+
m_CharacterClass: {fileID: 0}
149105
m_BrainEnabled: 1
150106
m_KilledDestroyDelaySeconds: 3
151-
m_StartingAction: 0
107+
m_StartingAction: {fileID: 0}
152108
m_DamageReceiver: {fileID: 753347877357705413}
153109
m_Movement: {fileID: 4309865414312164521}
154110
m_PhysicsWrapper: {fileID: 4058497248645145345}
@@ -248,7 +204,6 @@ MonoBehaviour:
248204
m_EditorClassIdentifier:
249205
m_NavMeshAgent: {fileID: 745390554272530562}
250206
m_Rigidbody: {fileID: 3375535791397456380}
251-
m_NetworkCharacterState: {fileID: 4600110157238723777}
252207
m_CharLogic: {fileID: 7420593339233078707}
253208
--- !u!114 &753347877357705413
254209
MonoBehaviour:
@@ -289,3 +244,16 @@ MonoBehaviour:
289244
ScaleThreshold: 0.01
290245
InLocalSpace: 0
291246
Interpolate: 1
247+
--- !u!114 &3884788294438199994
248+
MonoBehaviour:
249+
m_ObjectHideFlags: 0
250+
m_CorrespondingSourceObject: {fileID: 0}
251+
m_PrefabInstance: {fileID: 0}
252+
m_PrefabAsset: {fileID: 0}
253+
m_GameObject: {fileID: 4600110157238723781}
254+
m_Enabled: 1
255+
m_EditorHideFlags: 0
256+
m_Script: {fileID: 11500000, guid: ebe9bfd21e47445488dfd84b4e0c9884, type: 3}
257+
m_Name:
258+
m_EditorClassIdentifier:
259+
m_AvatarRegistry: {fileID: 11400000, guid: 48d17d764bff6c643a3dc035fb71c979, type: 2}

Diff for: Assets/Prefabs/Character/Imp.prefab

+38-41
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,6 @@ PrefabInstance:
6969
objectReference: {fileID: 3121817358174221070}
7070
m_RemovedComponents: []
7171
m_SourcePrefab: {fileID: 100100000, guid: 1ffde884792e9a44a9fbe049ebb79c9f, type: 3}
72-
--- !u!1 &5858966600248860054 stripped
73-
GameObject:
74-
m_CorrespondingSourceObject: {fileID: 6839301660383890230, guid: 1ffde884792e9a44a9fbe049ebb79c9f, type: 3}
75-
m_PrefabInstance: {fileID: 1127359556114831008}
76-
m_PrefabAsset: {fileID: 0}
77-
--- !u!4 &6486568539699693356 stripped
78-
Transform:
79-
m_CorrespondingSourceObject: {fileID: 6170428688339538316, guid: 1ffde884792e9a44a9fbe049ebb79c9f, type: 3}
80-
m_PrefabInstance: {fileID: 1127359556114831008}
81-
m_PrefabAsset: {fileID: 0}
8272
--- !u!95 &929086692793228630 stripped
8373
Animator:
8474
m_CorrespondingSourceObject: {fileID: 234724737205816310, guid: 1ffde884792e9a44a9fbe049ebb79c9f, type: 3}
@@ -95,6 +85,11 @@ MonoBehaviour:
9585
m_Script: {fileID: 11500000, guid: 9520a47fc61d5ab4ca99cdac2d574909, type: 3}
9686
m_Name:
9787
m_EditorClassIdentifier:
88+
--- !u!1 &5858966600248860054 stripped
89+
GameObject:
90+
m_CorrespondingSourceObject: {fileID: 6839301660383890230, guid: 1ffde884792e9a44a9fbe049ebb79c9f, type: 3}
91+
m_PrefabInstance: {fileID: 1127359556114831008}
92+
m_PrefabAsset: {fileID: 0}
9893
--- !u!114 &5401475423617019972
9994
MonoBehaviour:
10095
m_ObjectHideFlags: 0
@@ -108,6 +103,11 @@ MonoBehaviour:
108103
m_Name:
109104
m_EditorClassIdentifier:
110105
m_Animator: {fileID: 929086692793228630}
106+
--- !u!4 &6486568539699693356 stripped
107+
Transform:
108+
m_CorrespondingSourceObject: {fileID: 6170428688339538316, guid: 1ffde884792e9a44a9fbe049ebb79c9f, type: 3}
109+
m_PrefabInstance: {fileID: 1127359556114831008}
110+
m_PrefabAsset: {fileID: 0}
111111
--- !u!1001 &2173896227866280545
112112
PrefabInstance:
113113
m_ObjectHideFlags: 0
@@ -247,6 +247,14 @@ PrefabInstance:
247247
propertyPath: animator
248248
value:
249249
objectReference: {fileID: 929086692793228630}
250+
- target: {fileID: 8398944656959553575, guid: 64cfd098f62285f42918875fef849e88, type: 3}
251+
propertyPath: m_CharacterClass
252+
value:
253+
objectReference: {fileID: 11400000, guid: fa81aca63f2fce545a3b9e046b6e42e7, type: 2}
254+
- target: {fileID: 8398944656959553575, guid: 64cfd098f62285f42918875fef849e88, type: 3}
255+
propertyPath: m_ClientVisualization
256+
value:
257+
objectReference: {fileID: 3121817358174221070}
250258
- target: {fileID: 8398944656959553575, guid: 64cfd098f62285f42918875fef849e88, type: 3}
251259
propertyPath: m_KilledDestroyDelaySeconds
252260
value: 2
@@ -265,27 +273,6 @@ PrefabInstance:
265273
objectReference: {fileID: 0}
266274
m_RemovedComponents: []
267275
m_SourcePrefab: {fileID: 100100000, guid: 64cfd098f62285f42918875fef849e88, type: 3}
268-
--- !u!1 &3713729372785093424 stripped
269-
GameObject:
270-
m_CorrespondingSourceObject: {fileID: 3288448142974003537, guid: 64cfd098f62285f42918875fef849e88, type: 3}
271-
m_PrefabInstance: {fileID: 2173896227866280545}
272-
m_PrefabAsset: {fileID: 0}
273-
--- !u!4 &3713729372785093434 stripped
274-
Transform:
275-
m_CorrespondingSourceObject: {fileID: 3288448142974003547, guid: 64cfd098f62285f42918875fef849e88, type: 3}
276-
m_PrefabInstance: {fileID: 2173896227866280545}
277-
m_PrefabAsset: {fileID: 0}
278-
--- !u!114 &9169118397563301302 stripped
279-
MonoBehaviour:
280-
m_CorrespondingSourceObject: {fileID: 6995351927119310807, guid: 64cfd098f62285f42918875fef849e88, type: 3}
281-
m_PrefabInstance: {fileID: 2173896227866280545}
282-
m_PrefabAsset: {fileID: 0}
283-
m_GameObject: {fileID: 3713729372785093424}
284-
m_Enabled: 1
285-
m_EditorHideFlags: 0
286-
m_Script: {fileID: 11500000, guid: ae9a06a3585027044ababe9f9cb7b8e6, type: 3}
287-
m_Name:
288-
m_EditorClassIdentifier:
289276
--- !u!114 &827948680237315002 stripped
290277
MonoBehaviour:
291278
m_CorrespondingSourceObject: {fileID: 1537501989561463259, guid: 64cfd098f62285f42918875fef849e88, type: 3}
@@ -297,17 +284,11 @@ MonoBehaviour:
297284
m_Script: {fileID: 11500000, guid: 6733907396f36c44891916e5c62f25a0, type: 3}
298285
m_Name:
299286
m_EditorClassIdentifier:
300-
--- !u!114 &3837839015300097846 stripped
301-
MonoBehaviour:
302-
m_CorrespondingSourceObject: {fileID: 3128178037050369367, guid: 64cfd098f62285f42918875fef849e88, type: 3}
287+
--- !u!1 &3713729372785093424 stripped
288+
GameObject:
289+
m_CorrespondingSourceObject: {fileID: 3288448142974003537, guid: 64cfd098f62285f42918875fef849e88, type: 3}
303290
m_PrefabInstance: {fileID: 2173896227866280545}
304291
m_PrefabAsset: {fileID: 0}
305-
m_GameObject: {fileID: 3713729372785093424}
306-
m_Enabled: 1
307-
m_EditorHideFlags: 0
308-
m_Script: {fileID: 11500000, guid: 818290ebb0ac23541921b4dfc6842778, type: 3}
309-
m_Name:
310-
m_EditorClassIdentifier:
311292
--- !u!114 &-4570750241117365215
312293
MonoBehaviour:
313294
m_ObjectHideFlags: 0
@@ -325,8 +306,24 @@ MonoBehaviour:
325306
m_UIStatePrefab: {fileID: -1943162842029199943, guid: 2b07482491a17964380023240087ce16, type: 3}
326307
m_NetworkNameState: {fileID: 0}
327308
m_NetworkHealthState: {fileID: 827948680237315002}
328-
m_ClientCharacter: {fileID: 9169118397563301302}
309+
m_ServerCharacter: {fileID: 0}
329310
m_BaseHP: {fileID: 11400000, guid: 95633dc134a4e654f863831b22b5681a, type: 2}
330311
m_TransformToTrack: {fileID: 6486568539699693356}
331312
m_VerticalWorldOffset: 2.2
332313
m_VerticalScreenOffset: 20
314+
--- !u!4 &3713729372785093434 stripped
315+
Transform:
316+
m_CorrespondingSourceObject: {fileID: 3288448142974003547, guid: 64cfd098f62285f42918875fef849e88, type: 3}
317+
m_PrefabInstance: {fileID: 2173896227866280545}
318+
m_PrefabAsset: {fileID: 0}
319+
--- !u!114 &3837839015300097846 stripped
320+
MonoBehaviour:
321+
m_CorrespondingSourceObject: {fileID: 3128178037050369367, guid: 64cfd098f62285f42918875fef849e88, type: 3}
322+
m_PrefabInstance: {fileID: 2173896227866280545}
323+
m_PrefabAsset: {fileID: 0}
324+
m_GameObject: {fileID: 3713729372785093424}
325+
m_Enabled: 1
326+
m_EditorHideFlags: 0
327+
m_Script: {fileID: 11500000, guid: 818290ebb0ac23541921b4dfc6842778, type: 3}
328+
m_Name:
329+
m_EditorClassIdentifier:

0 commit comments

Comments
 (0)