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

Commit 1a30d90

Browse files
authored
Remove serialization helpers from code (#847)
1 parent a3de1c9 commit 1a30d90

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
- Added constructors for all generated component snapshot types.
4444
- Added the ability to send arbitrary serialized data in a player creation request.
4545
- Replaced `Vector3f` position in `CreatePlayerRequestType` with a `bytes` field for sending arbitrary serialized data.
46-
- Added `SerializeArguments` and `DeserializeArguments<T>` methods to `PlayerLifecycleHelper`.
4746
- Added `RequestPlayerCreation` to manually request for player creation in `SendCreatePlayerRequestSystem`.
4847
- Added a menu item, navigate to **SpatialOS** > **Generate Dev Authentication Token**, to generate a TextAsset containing the [Development Authentication Token](https://docs.improbable.io/reference/latest/shared/auth/development-authentication).
4948
- Added the ability to mark a build target as `Required` which will cause builds to fail in the Editor if the prerequisite build support is not installed.

workers/unity/Packages/com.improbable.gdk.playerlifecycle/PlayerLifecycleHelper.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,6 @@ public static void AddPlayerLifecycleComponents(EntityTemplate template,
2323
template.AddComponent(owningComponent, serverAccess);
2424
}
2525

26-
public static byte[] SerializeArguments(object playerCreationArguments)
27-
{
28-
using (var memoryStream = new MemoryStream())
29-
{
30-
var binaryFormatter = new BinaryFormatter();
31-
binaryFormatter.Serialize(memoryStream, playerCreationArguments);
32-
return memoryStream.ToArray();
33-
}
34-
}
35-
36-
public static T DeserializeArguments<T>(byte[] serializedArguments)
37-
{
38-
using (var memoryStream = new MemoryStream())
39-
{
40-
var binaryFormatter = new BinaryFormatter();
41-
memoryStream.Write(serializedArguments, 0, serializedArguments.Length);
42-
memoryStream.Seek(0, SeekOrigin.Begin);
43-
return (T) binaryFormatter.Deserialize(memoryStream);
44-
}
45-
}
46-
4726
public static bool IsOwningWorker(SpatialEntityId entityId, World workerWorld)
4827
{
4928
var entityManager = workerWorld.GetOrCreateManager<EntityManager>();

0 commit comments

Comments
 (0)