Skip to content
This repository was archived by the owner on Oct 20, 2021. It is now read-only.

Commit f21491a

Browse files
author
Paul Balaji
authored
Tidy up project (#68)
1 parent 43f1ff0 commit f21491a

34 files changed

+772
-450
lines changed

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,26 @@
22

33
## Unreleased
44

5+
### Breaking changes
6+
7+
- Tidied up the project structure. [#68](https://github.com/spatialos/gdk-for-unity-blank-project/pull/68)
8+
- Moved `CreatePlayerEntityTemplate` to the new `EntityTemplates` static class.
9+
- Removed `Improbable.Gdk.TransformSynchronization` from the assembly definition.
10+
11+
### Added
12+
13+
- Created prefabs for `UnityClient`, `UnityGameLogic` and `MobileClient` workers under `Resources/Prefabs/Worker`. [#68](https://github.com/spatialos/gdk-for-unity-blank-project/pull/68)
14+
- Created a new `EntityTemplates` static class. [#68](https://github.com/spatialos/gdk-for-unity-blank-project/pull/68)
15+
16+
### Changed
17+
18+
- The **SpatialOS** > **Generate snapshot** button now generates a snapshot directly without displaying a pop-up window. [#68](https://github.com/spatialos/gdk-for-unity-blank-project/pull/68)
19+
520
## `0.2.6` - 2019-08-05
621

722
### Changed
8-
- Upgraded to GDK for Unity version `0.2.6`
23+
24+
- Upgraded to GDK for Unity version `0.2.6`.
925

1026
### Added
1127

workers/unity/Assets/BlankProject.asmdef

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"Improbable.Gdk.Core",
55
"Improbable.Gdk.Generated",
66
"Improbable.Gdk.Mobile",
7-
"Improbable.Gdk.TransformSynchronization",
87
"Improbable.Gdk.PlayerLifecycle",
98
"Unity.Entities",
109
"Unity.Entities.Hybrid",
@@ -13,5 +12,10 @@
1312
"optionalUnityReferences": [],
1413
"includePlatforms": [],
1514
"excludePlatforms": [],
16-
"allowUnsafeCode": false
15+
"allowUnsafeCode": false,
16+
"overrideReferences": false,
17+
"precompiledReferences": [],
18+
"autoReferenced": true,
19+
"defineConstraints": [],
20+
"versionDefines": []
1721
}

workers/unity/Assets/Resources/Plane.prefab.meta renamed to workers/unity/Assets/BlankProject.meta

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

workers/unity/Assets/Scripts.meta renamed to workers/unity/Assets/BlankProject/Scripts.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

workers/unity/Assets/BlankProject/Scripts/Config.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using Improbable;
2+
using Improbable.Gdk.Core;
3+
using Improbable.Gdk.PlayerLifecycle;
4+
5+
namespace BlankProject.Scripts.Config
6+
{
7+
public static class EntityTemplates
8+
{
9+
public static EntityTemplate CreatePlayerEntityTemplate(string workerId, byte[] serializedArguments)
10+
{
11+
var clientAttribute = EntityTemplate.GetWorkerAccessAttribute(workerId);
12+
var serverAttribute = UnityGameLogicConnector.WorkerType;
13+
14+
var template = new EntityTemplate();
15+
template.AddComponent(new Position.Snapshot(), clientAttribute);
16+
template.AddComponent(new Metadata.Snapshot("Player"), serverAttribute);
17+
18+
PlayerLifecycleHelper.AddPlayerLifecycleComponents(template, workerId, serverAttribute);
19+
20+
template.SetReadAccess(UnityClientConnector.WorkerType, MobileClientWorkerConnector.WorkerType, serverAttribute);
21+
template.SetComponentWriteAccess(EntityAcl.ComponentId, serverAttribute);
22+
23+
return template;
24+
}
25+
}
26+
}

workers/unity/Assets/BlankProject/Scripts/Config/EntityTemplates.cs.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

workers/unity/Assets/BlankProject/Scripts/Metrics.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

workers/unity/Assets/Editor/SnapshotGenerator/SnapshotGeneratorWindow.cs.meta renamed to workers/unity/Assets/BlankProject/Scripts/Metrics/MetricSendSystem.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)