Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit 772a2bf

Browse files
author
Jamie Brynes
authored
Remove AuthoritativeEntityResolver (#1453)
1 parent cf3a0e9 commit 772a2bf

File tree

4 files changed

+19
-42
lines changed

4 files changed

+19
-42
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- The GDK now depends on .NET Core v3.1.3xx instead of v2.2.2xx. [#1443](https://github.com/spatialos/gdk-for-unity/pull/1443)
1212
- Removed APIs for AuthorityLossImminent. [#1451](https://github.com/spatialos/gdk-for-unity/pull/1451)
1313
- All authority changes to `AuthorityLossImminent` will now be dropped, and callbacks will no longer trigger.
14+
- Removed the `AuthoritativeEntityResolver`. The implementation was fundamentally flawed. [#1453](https://github.com/spatialos/gdk-for-unity/pull/1453)
1415

1516
### Added
1617

UPGRADE_GUIDE.md

+18-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,26 @@ The `Reader` and `Writer` classes have had their `public Authority Authority` pr
2525

2626
### .NET Core Update
2727

28-
The GDK, in particular the code generator and deployment launcher, has been updated to use [.NET Core SDK v3.1.3xx](https://dotnet.microsoft.com/download/dotnet-core/3.1).
28+
The GDK, in particular the code generator and deployment launcher, has been updated to use [.NET Core SDK v3.1.3xx](https://dotnet.microsoft.com/download/dotnet-core/3.1).
2929

3030
To update, download and install the new version from the link provided above.
3131

32+
### `AuthoritativeEntityResolver` removal
33+
34+
We removed the `AuthoritativeEntityResolver` as the implementation was fundamentally flawed. Depending on how you were using it, there are different replacements:
35+
36+
#### For your player entity
37+
38+
Use the `OwningWorkerEntityResolver` which uses the `OwningWorker` component from the Player Lifecycle Feature Module. Make sure that when you create your player's `EntityTemplate` you add the relevant components with:
39+
40+
```csharp
41+
PlayerLifecycleHelper.AddPlayerLifecycleComponents(EntityTemplate template, clientWorkerId, serverAccess);
42+
```
43+
44+
#### For server authoritative entities
45+
46+
If you were using this resolver on the server, we recommend merging the two Prefabs into one and rely on the GDK enabling/disabling behaviours when they are active or not.
47+
3248
## From `0.3.7` to `0.3.8`
3349

3450
### Asset based entity representation
@@ -69,7 +85,7 @@ The Scripting Backend defined in the Unity Project Settings is now overwritten b
6985

7086
In [#1376](https://github.com/spatialos/gdk-for-unity/pull/1376), some generated code has changed locations in your project. If you are ignoring these files in your `.gitignore`, you will want to add two new entries:
7187

72-
Before:
88+
Before:
7389

7490
```
7591
Assets/Generated/Source.meta

workers/unity/Packages/io.improbable.gdk.core/Representation/Types/AuthoritativeEntityResolver.cs

-37
This file was deleted.

workers/unity/Packages/io.improbable.gdk.core/Representation/Types/AuthoritativeEntityResolver.cs.meta

-3
This file was deleted.

0 commit comments

Comments
 (0)