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

Commit 2211cdc

Browse files
authored
Add Partials to Codegen (#613)
* add partials database impl * add partials * remove standard lib utils * fix playground * add changelog * add equality and hashcode to all * reorder
1 parent 8fdc87f commit 2211cdc

22 files changed

+338
-159
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
- Added an `ISnapshottable<T>` interface to all generated components. This allows you to convert a component to a snapshot.
1111
- Added an `EntityId` property on the Readers/Writers to access the `EntityId` of the underlying SpatialOS entity.
1212
- Added a `HasEntity` method to the `WorkerSystem`. This allows you to check if an entity is checked out on your worker.
13+
- Added operators and conversion methods to `Coordinates`, `Vector3d`, and `Vector3f` in code generation.
14+
- This supercedes the `StandardLibraryUtils` feature module which was removed as a consequence.
1315

1416
### Changed
1517

@@ -24,6 +26,10 @@
2426

2527
- Fixed a bug where schema components with a field named `value` would generate invalid code.
2628

29+
### Removed
30+
31+
- Removed the `StandardLibraryUtils` feature module as it was superceded by inserting the methods during code generation.
32+
2733
## `0.1.2` - 2018-11-01
2834

2935
### Added

workers/unity/Assets/Playground/Config/CubeTemplate.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static EntityTemplate CreateCubeEntityTemplate(Coordinates coords)
2121
.AddComponent(cubeTargetVelocity, WorkerUtils.UnityGameLogic)
2222
.AddComponent(launchable, WorkerUtils.UnityGameLogic)
2323
.AddTransformSynchronizationComponents(WorkerUtils.UnityGameLogic,
24-
location: coords.NarrowToUnityVector());
24+
location: coords.ToUnityVector());
2525

2626
return entityBuilder.Build();
2727
}

workers/unity/Assets/Playground/Improbable.Playground.asmdef

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"Unity.Entities.Hybrid",
1010
"Unity.Mathematics",
1111
"Improbable.Gdk.Generated",
12-
"Improbable.Gdk.StandardLibraryUtils",
1312
"Improbable.Gdk.Mobile",
1413
"Improbable.Gdk.Mobile.Android",
1514
"Improbable.Gdk.Mobile.iOS"

workers/unity/Assets/Playground/Scripts/Player/PlayerCommandsSystem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ protected override void OnUpdate()
8686
return;
8787
}
8888

89-
var impactPoint = info.point.ToSpatialVector3f();
90-
var launchDirection = ray.direction.ToSpatialVector3f();
89+
var impactPoint = Vector3f.FromUnityVector(info.point);
90+
var launchDirection = Vector3f.FromUnityVector(ray.direction);
9191

9292
sender.RequestsToSend.Add(Launcher.LaunchEntity.CreateRequest(playerId,
9393
new LaunchCommandRequest(component.SpatialEntityId, impactPoint, launchDirection,

workers/unity/Packages/com.improbable.gdk.standardlibraryutils/CoordinatesExtensions.cs

Lines changed: 0 additions & 29 deletions
This file was deleted.

workers/unity/Packages/com.improbable.gdk.standardlibraryutils/CoordinatesExtensions.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

workers/unity/Packages/com.improbable.gdk.standardlibraryutils/Improbable.Gdk.StandardLibraryUtils.asmdef

Lines changed: 0 additions & 11 deletions
This file was deleted.

workers/unity/Packages/com.improbable.gdk.standardlibraryutils/Improbable.Gdk.StandardLibraryUtils.asmdef.meta

Lines changed: 0 additions & 7 deletions
This file was deleted.

workers/unity/Packages/com.improbable.gdk.standardlibraryutils/Vector3dExtensions.cs

Lines changed: 0 additions & 29 deletions
This file was deleted.

workers/unity/Packages/com.improbable.gdk.standardlibraryutils/Vector3dExtensions.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)