Skip to content

Commit 055d7fd

Browse files
authored
Merge pull request #10 from coherence/feat/upgrade-sdk-2.0.0
feat: upgrade to coherence SDK 2.0.0
2 parents da457a0 + 61752d2 commit 055d7fd

122 files changed

Lines changed: 7767 additions & 11538 deletions

File tree

Some content is hidden

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

Assets/Prefabs/Characters/Player.prefab

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5227,6 +5227,18 @@ MonoBehaviour:
52275227
m_Script: {fileID: 11500000, guid: ff62c046a053f416a8dc48ad6483a25e, type: 3}
52285228
m_Name:
52295229
m_EditorClassIdentifier:
5230+
OnAuthorityRequest:
5231+
m_PersistentCalls:
5232+
m_Calls: []
5233+
OnNetworkedInstantiation:
5234+
m_PersistentCalls:
5235+
m_Calls: []
5236+
OnBeforeNetworkedInstantiation:
5237+
m_PersistentCalls:
5238+
m_Calls: []
5239+
OnNetworkedDestruction:
5240+
m_PersistentCalls:
5241+
m_Calls: []
52305242
OnStateRemote:
52315243
m_PersistentCalls:
52325244
m_Calls: []
@@ -5245,12 +5257,24 @@ MonoBehaviour:
52455257
OnAuthTransferComplete:
52465258
m_PersistentCalls:
52475259
m_Calls: []
5248-
OnConnectedEntityChanged:
5260+
OnNetworkedParentChanged:
52495261
m_PersistentCalls:
52505262
m_Calls: []
52515263
OnInputSimulatorConnected:
52525264
m_PersistentCalls:
52535265
m_Calls: []
5266+
OnRigidbody2DPositionUpdate:
5267+
m_PersistentCalls:
5268+
m_Calls: []
5269+
OnRigidbody3DPositionUpdate:
5270+
m_PersistentCalls:
5271+
m_Calls: []
5272+
OnRigidbody2DRotationUpdate:
5273+
m_PersistentCalls:
5274+
m_Calls: []
5275+
OnRigidbody3DRotationUpdate:
5276+
m_PersistentCalls:
5277+
m_Calls: []
52545278
coherenceSyncConfig: {fileID: 11400000, guid: 2102c450ebbb84ed6b27d06dfcf6659f,
52555279
type: 2}
52565280
archetype:
@@ -5554,23 +5578,12 @@ MonoBehaviour:
55545578
GeneratesArchetypeDefinition: 1
55555579
interpolationLocation: 4
55565580
RigidbodyUpdateMode: 0
5557-
OnRigidbody2DPositionUpdate:
5558-
m_PersistentCalls:
5559-
m_Calls: []
5560-
OnRigidbody3DPositionUpdate:
5561-
m_PersistentCalls:
5562-
m_Calls: []
5563-
OnRigidbody2DRotationUpdate:
5564-
m_PersistentCalls:
5565-
m_Calls: []
5566-
OnRigidbody3DRotationUpdate:
5567-
m_PersistentCalls:
5568-
m_Calls: []
55695581
bakedScriptType: Coherence.Generated.CoherenceSync_cd9bcc1feead9419fac0c5981ce85c23,
55705582
Assembly-CSharp
5583+
isGlobal: 0
55715584
approveAuthorityTransferRequests: 1
55725585
simulationType: 0
5573-
authorityTransferType: 0
5586+
authorityTransferConfig: 0
55745587
orphanedBehavior: 0
55755588
lifetimeType: 0
55765589
uniquenessType: 0
@@ -5594,19 +5607,9 @@ MonoBehaviour:
55945607
- rid: 265633315173171207
55955608
- rid: 265633315173171208
55965609
- rid: 265633315173171209
5597-
onNetworkedInstantiation:
5598-
m_PersistentCalls:
5599-
m_Calls: []
5600-
onBeforeNetworkedInstantiation:
5601-
m_PersistentCalls:
5602-
m_Calls: []
5603-
onNetworkedDestruction:
5604-
m_PersistentCalls:
5605-
m_Calls: []
56065610
scenePrefabInstanceUUID:
56075611
coherenceUUID:
5608-
assetVersion:
5609-
usingReflection: 0
5612+
assetVersion: 20
56105613
coherenceTag:
56115614
componentActions:
56125615
- rid: 5551134440486600705
@@ -5618,6 +5621,7 @@ MonoBehaviour:
56185621
- rid: 2368829914428211328
56195622
floatingOriginMode: 0
56205623
floatingOriginParentedMode: 1
5624+
synchronizationChannel: Default
56215625
references:
56225626
version: 2
56235627
RefIds:
@@ -6324,7 +6328,7 @@ MonoBehaviour:
63246328
type: 0
63256329
minRange: 0
63266330
maxRange: 0
6327-
sampleRate: 0
6331+
sampleRate: 20
63286332
floatCompression: 0
63296333
fields: []
63306334
unityComponent: {fileID: 8498588009909292941}

Assets/Prefabs/Characters/RobotArm.prefab

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,18 @@ MonoBehaviour:
133133
m_Script: {fileID: 11500000, guid: ff62c046a053f416a8dc48ad6483a25e, type: 3}
134134
m_Name:
135135
m_EditorClassIdentifier:
136+
OnAuthorityRequest:
137+
m_PersistentCalls:
138+
m_Calls: []
139+
OnNetworkedInstantiation:
140+
m_PersistentCalls:
141+
m_Calls: []
142+
OnBeforeNetworkedInstantiation:
143+
m_PersistentCalls:
144+
m_Calls: []
145+
OnNetworkedDestruction:
146+
m_PersistentCalls:
147+
m_Calls: []
136148
OnStateRemote:
137149
m_PersistentCalls:
138150
m_Calls: []
@@ -151,12 +163,24 @@ MonoBehaviour:
151163
OnAuthTransferComplete:
152164
m_PersistentCalls:
153165
m_Calls: []
154-
OnConnectedEntityChanged:
166+
OnNetworkedParentChanged:
155167
m_PersistentCalls:
156168
m_Calls: []
157169
OnInputSimulatorConnected:
158170
m_PersistentCalls:
159171
m_Calls: []
172+
OnRigidbody2DPositionUpdate:
173+
m_PersistentCalls:
174+
m_Calls: []
175+
OnRigidbody3DPositionUpdate:
176+
m_PersistentCalls:
177+
m_Calls: []
178+
OnRigidbody2DRotationUpdate:
179+
m_PersistentCalls:
180+
m_Calls: []
181+
OnRigidbody3DRotationUpdate:
182+
m_PersistentCalls:
183+
m_Calls: []
160184
coherenceSyncConfig: {fileID: 11400000, guid: fc4e57916a9a64176a0df04c97f0d9af,
161185
type: 2}
162186
archetype:
@@ -252,23 +276,12 @@ MonoBehaviour:
252276
GeneratesArchetypeDefinition: 1
253277
interpolationLocation: 1
254278
RigidbodyUpdateMode: 0
255-
OnRigidbody2DPositionUpdate:
256-
m_PersistentCalls:
257-
m_Calls: []
258-
OnRigidbody3DPositionUpdate:
259-
m_PersistentCalls:
260-
m_Calls: []
261-
OnRigidbody2DRotationUpdate:
262-
m_PersistentCalls:
263-
m_Calls: []
264-
OnRigidbody3DRotationUpdate:
265-
m_PersistentCalls:
266-
m_Calls: []
267279
bakedScriptType: Coherence.Generated.CoherenceSync_aa7ea8e0044f0964eb9c782a689ca1b1,
268280
Assembly-CSharp
281+
isGlobal: 0
269282
approveAuthorityTransferRequests: 1
270283
simulationType: 0
271-
authorityTransferType: 2
284+
authorityTransferConfig: 2
272285
orphanedBehavior: 1
273286
lifetimeType: 1
274287
uniquenessType: 1
@@ -287,25 +300,16 @@ MonoBehaviour:
287300
- rid: 2368830277639733250
288301
- rid: 2368830277639733287
289302
- rid: 2368830277639733289
290-
onNetworkedInstantiation:
291-
m_PersistentCalls:
292-
m_Calls: []
293-
onBeforeNetworkedInstantiation:
294-
m_PersistentCalls:
295-
m_Calls: []
296-
onNetworkedDestruction:
297-
m_PersistentCalls:
298-
m_Calls: []
299303
scenePrefabInstanceUUID:
300304
coherenceUUID: RobotArm
301-
assetVersion:
302-
usingReflection: 0
305+
assetVersion: 20
303306
coherenceTag:
304307
componentActions:
305308
- rid: 2368830277159485441
306309
- rid: 2368830277639733265
307310
floatingOriginMode: 0
308311
floatingOriginParentedMode: 1
312+
synchronizationChannel: Default
309313
references:
310314
version: 2
311315
RefIds:
@@ -707,7 +711,7 @@ MonoBehaviour:
707711
type: 0
708712
minRange: 0
709713
maxRange: 0
710-
sampleRate: 0
714+
sampleRate: 20
711715
floatCompression: 0
712716
fields: []
713717
unityComponent: {fileID: 9849676}

Assets/Prefabs/Logic/FlowersCounter.prefab

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@ MonoBehaviour:
4545
m_Script: {fileID: 11500000, guid: ff62c046a053f416a8dc48ad6483a25e, type: 3}
4646
m_Name:
4747
m_EditorClassIdentifier:
48+
OnAuthorityRequest:
49+
m_PersistentCalls:
50+
m_Calls: []
51+
OnNetworkedInstantiation:
52+
m_PersistentCalls:
53+
m_Calls: []
54+
OnBeforeNetworkedInstantiation:
55+
m_PersistentCalls:
56+
m_Calls: []
57+
OnNetworkedDestruction:
58+
m_PersistentCalls:
59+
m_Calls: []
4860
OnStateRemote:
4961
m_PersistentCalls:
5062
m_Calls: []
@@ -63,12 +75,24 @@ MonoBehaviour:
6375
OnAuthTransferComplete:
6476
m_PersistentCalls:
6577
m_Calls: []
66-
OnConnectedEntityChanged:
78+
OnNetworkedParentChanged:
6779
m_PersistentCalls:
6880
m_Calls: []
6981
OnInputSimulatorConnected:
7082
m_PersistentCalls:
7183
m_Calls: []
84+
OnRigidbody2DPositionUpdate:
85+
m_PersistentCalls:
86+
m_Calls: []
87+
OnRigidbody3DPositionUpdate:
88+
m_PersistentCalls:
89+
m_Calls: []
90+
OnRigidbody2DRotationUpdate:
91+
m_PersistentCalls:
92+
m_Calls: []
93+
OnRigidbody3DRotationUpdate:
94+
m_PersistentCalls:
95+
m_Calls: []
7296
coherenceSyncConfig: {fileID: 11400000, guid: 776d16ef0265241d88f5dfee7416d27a,
7397
type: 2}
7498
archetype:
@@ -82,23 +106,12 @@ MonoBehaviour:
82106
GeneratesArchetypeDefinition: 1
83107
interpolationLocation: 1
84108
RigidbodyUpdateMode: 0
85-
OnRigidbody2DPositionUpdate:
86-
m_PersistentCalls:
87-
m_Calls: []
88-
OnRigidbody3DPositionUpdate:
89-
m_PersistentCalls:
90-
m_Calls: []
91-
OnRigidbody2DRotationUpdate:
92-
m_PersistentCalls:
93-
m_Calls: []
94-
OnRigidbody3DRotationUpdate:
95-
m_PersistentCalls:
96-
m_Calls: []
97109
bakedScriptType: Coherence.Generated.CoherenceSync_20d53524fceab40d5a9ab892525615cb,
98110
Assembly-CSharp
111+
isGlobal: 0
99112
approveAuthorityTransferRequests: 1
100113
simulationType: 0
101-
authorityTransferType: 2
114+
authorityTransferConfig: 2
102115
orphanedBehavior: 1
103116
lifetimeType: 1
104117
uniquenessType: 1
@@ -110,23 +123,14 @@ MonoBehaviour:
110123
- rid: 6129763270525976576
111124
- rid: 6129763270525976578
112125
- rid: 6129763270525976580
113-
onNetworkedInstantiation:
114-
m_PersistentCalls:
115-
m_Calls: []
116-
onBeforeNetworkedInstantiation:
117-
m_PersistentCalls:
118-
m_Calls: []
119-
onNetworkedDestruction:
120-
m_PersistentCalls:
121-
m_Calls: []
122126
scenePrefabInstanceUUID:
123127
coherenceUUID: FlowersCounter
124-
assetVersion:
125-
usingReflection: 0
128+
assetVersion: 20
126129
coherenceTag:
127130
componentActions: []
128131
floatingOriginMode: 0
129132
floatingOriginParentedMode: 1
133+
synchronizationChannel: Default
130134
references:
131135
version: 2
132136
RefIds:
@@ -193,7 +197,7 @@ MonoBehaviour:
193197
type: 0
194198
minRange: 0
195199
maxRange: 0
196-
sampleRate: 0
200+
sampleRate: 20
197201
floatCompression: 0
198202
fields: []
199203
unityComponent: {fileID: 5847726189716557621}
@@ -234,7 +238,7 @@ MonoBehaviour:
234238
type: 0
235239
minRange: 0
236240
maxRange: 0
237-
sampleRate: 0
241+
sampleRate: 20
238242
floatCompression: 0
239243
fields: []
240244
unityComponent: {fileID: 5847726189716557621}

Assets/Samples/coherence/1.3.1/Connect Dialog_ Rooms/RoomsDialogUI.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ private void CreateRoomAndJoin()
205205
private void RefreshRegions()
206206
{
207207
ShowLoadingState();
208-
cloudRooms.RefreshRegions(OnRegionsChanged);
208+
bridge.CloudService.Regions.FetchRegions(OnRegionsChanged);
209209
}
210210
#endregion
211211

@@ -269,7 +269,7 @@ private void OnRoomCreated(RequestResponse<RoomData> requestResponse)
269269
}
270270
}
271271

272-
private void OnRegionsChanged(RequestResponse<IReadOnlyList<string>> requestResponse)
272+
private void OnRegionsChanged(RequestResponse<Region[]> requestResponse)
273273
{
274274
HideLoadingState();
275275

@@ -287,7 +287,7 @@ private void OnRegionsChanged(RequestResponse<IReadOnlyList<string>> requestResp
287287

288288
regionDropdown.options = options;
289289

290-
if (regions.Count > 0 && !lanOnlineToggle.isOn)
290+
if (regions.Length > 0 && !lanOnlineToggle.isOn)
291291
{
292292
regionDropdown.captionText.text = regions[0];
293293
selectedRoomService = cloudRooms.GetRoomServiceForRegion(regions[0]);
@@ -351,7 +351,7 @@ private bool AssertRequestResponse(string title, RequestStatus status, Exception
351351
return false;
352352
}
353353

354-
private void OnConnectionError(CoherenceBridge bridge, ConnectionException exception)
354+
private void OnConnectionError(CoherenceBridge _, ConnectionException exception)
355355
{
356356
HideLoadingState();
357357
RefreshRooms();

Assets/Samples/coherence/1.3.1/Connect Dialog_ Worlds/WorldDialogUI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ private void HideError()
208208
popupDialog.SetActive(false);
209209
}
210210

211-
private void OnConnectionError(CoherenceBridge bridge, ConnectionException exception)
211+
private void OnConnectionError(CoherenceBridge _, ConnectionException exception)
212212
{
213213
HideLoadingState();
214214
ShowError("Error connecting to World", exception?.Message);

Assets/Scenes/4_ParentingEntities/Spline.asset

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

Assets/Scripts/FirstSteps/Persistence/Plant.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private void OnPlantButtonReleased(InputAction.CallbackContext obj)
123123
Vector3 facingDirection = Random.insideUnitSphere;
124124
facingDirection.y = 0f;
125125

126-
_newPlant = Instantiate<Flower>(plantPrefab, flowerPreview.position, Quaternion.LookRotation(facingDirection, Vector3.up));
126+
_newPlant = Instantiate(plantPrefab, flowerPreview.position, Quaternion.LookRotation(facingDirection, Vector3.up));
127127
_newPlant.gameObject.name = "Flower";
128128
_newPlant.Plant();
129129
}

0 commit comments

Comments
 (0)