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

Releases: spatialos/gdk-for-unity

GDK for Unity Alpha Release 0.2.2

15 May 17:02
4471b59
Compare
Choose a tag to compare

The w4_r1000_e1 template used in the FPS Starter Project has now been deprecated. If you use this template, update your launch configuration to use the new w4_r1000_e10 template.

This release contains a new feature module for launching cloud deployments from the Unity Editor, and improvements to the mobile workflow.

Keep giving us your feedback and/or suggestions! Check out our Discord, our forums, or here in the Github issues!

For more information, have a browse through our detailed release notes below! 🎉


Breaking Changes

  • The w4_r1000_e1 template used in the FPS Starter Project has now been deprecated. If you use this template, update your launch configuration to use the new w4_r1000_e10 template.
  • Removed the Improbable.Gdk.Mobile.Android and Improbable.Gdk.Mobile.iOS packages. All functionality is now available inside the Improbable.Gdk.Mobile package.

Added

  • Added support for Windows x86 builds.
  • Added a user-friendly error message when the build system fails to find a SpatialOS Build Configuration instance.
  • Added two menu items: SpatialOS > Launch mobile device > Android on local and SpatialOS > Launch mobile device > Android on cloud.
  • Added a new, project-generic, deployment launcher feature module, com.improbable.gdk.deploymentlauncher. This editor-only module includes functionality to:
    • Upload assemblies from the editor.
    • Launch and stop deployments from the editor.
    • View basic information about live deployments (start time, region, number of connected workers) in the editor.

Changed

  • Added a Improbable.Gdk.Core.Editor asmdef.
    • Moved SingletonScriptableObject<T> from the build system feature module into this assembly and made it public.
    • Pulled out the UiStateManager from the BuildConfigEditor into this assembly and made it public.
  • Exceptions thrown in user-code callbacks no longer cause other callbacks scheduled for that frame to not fire. Instead, the exceptions are caught and logged with Debug.LogException.
  • Upgraded the Worker SDK version to 13.7.1.
  • Updated the default method of loading a Development Authentication Token to search for a DevAuthToken.txt asset at the root of any Resources folder.
  • Removed the AndroidClientWorkerConnector and iOSClientWorkerConnector and their specific scenes. You can now use the MobileClientWorkerConnector and its MobileClientScene to connect to a mobile device.

Fixed

  • Fixed a bug where if an entity received an event and was removed from your worker's view in the same ops list, the event would not be removed.
  • Fixed a bug where clicking on SpatialOS > Generate Dev Authentication Token would not always refresh the asset database correctly.
  • Fixed a bug where requireables on a GameObject linked to the worker entity were not injected properly.
  • Fixed a bug where the DevAuthToken.txt asset would be imported from an invalid AssetDatabase path.

GDK for Unity Alpha Release 0.2.1

15 Apr 14:48
8ba0b57
Compare
Choose a tag to compare

This release contains a new feature module for building interest queries in a user-friendly way and usability improvements to the Player Lifecycle Feature Module in additional to a number of bug fixes and other, smaller features!

Keep giving us your feedback and/or suggestions! Check out our Discord, our forums, or here in the Github issues!

For more information, have a browse through our detailed release notes below! 🎉


Breaking Changes

  • Removed clientAccess from the AddPlayerLifecycleComponents signature. We now construct the client access attribute within the helper.

Added

  • Added a static helper in the EntityTemplate class to construct worker access attributes. See the API docs for more info.
  • Added an optional callback as an argument to the RequestPlayerCreation method in SendCreatePlayerRequestSystem. This callback is invoked upon receiving a response to a player creation request.
  • Added a new Query-based interest helper module, com.improbable.gdk.querybasedinteresthelper.
    • InterestTemplate provides functionality to ergonomically add, replace and clear queries from an Interest component.
    • InterestQuery reduces boilerplate code required to construct interest queries.
    • Constraint contains static methods to easily create constraints for an interest query.
  • Added a Improbable.Gdk.Core.Collections.Result<T, E> struct to represent a result which can either contain a value T or an error E.
  • Added Scripting Define Symbol DISABLE_REACTIVE_COMPONENTS. Using this symbol will disable all reactive components and systems.
  • Added a WorkerFlagReader which you can subscribe and Require. This allows you to:
    • Add callbacks for changes to worker flags.
    • Read the value of worker flags.

Changed

  • The player lifecycle module now dynamically queries for PlayerCreator entities, and sends requests to a random one each time. This removes the reliance on a hardcoded PlayerCreator Entity ID.
  • Removed the Type suffix from player lifecycle schema types.
  • RedirectedProcess.RunAsync() now takes a CancellationToken? as a parameter. This token can be used to cancel the underlying process.
  • Updated the Unity version to 2018.3.11

Fixed

  • Fixed an issue where player creation requests could retry infinitely without logging failure.
  • Fixed an issue where if you called RedirectedProcess.Command(...) in a non-main thread, it would throw an exception.
  • Fixed an issue where having the same name for a schema package and a schema component would lead to generating invalid code.

Internal

  • Tools package now uses PackageManager API instead of parsing manifest.json.
  • Updated default snapshot to have more than one PlayerCreator entity.
  • Fixed package dependencies.
  • Worker flag changes are propagated to the ViewDiff.
  • Exposed GetWorkerFlag(string name) on the View.

GDK for Unity Alpha Release 0.2.0

19 Mar 21:11
bf7978a
Compare
Choose a tag to compare

This release contains major breaking changes to the Core ECS and MonoBehaviour APIs, based on feedback and learnings from 0.1.x releases. There are some performance improvements out-of-the-box, with the ability to isolate and disable reactive components for further gains.

Keep giving us your feedback and/or suggestions! Check out our Discord, our forums, or here in the Github issues!

For more information, have a browse through our detailed release notes below! 🎉


Breaking Changes

  • Changed the format of the BuildConfiguration asset. Please recreate, or copy it from workers/unity/Playground/Assets/Config/BuildConfiguration.asset.
  • Command request and responses are no longer constructed from static methods CreateRequest and CreateResponse. Instead, they are constructors that take the same arguments.
  • The Require attribute has moved from the Improbable.Gdk.GameObjectRepresentation namespace to the Improbable.Gdk.Subscriptions namespace.
  • The generated Readers have been renamed from {COMPONENT_NAME}.Requirable.Reader to {COMPONENT_NAME}Reader.
  • The Reader callback events' names have changed.
    • On{EVENT_NAME} is now On{EVENT_NAME}Event.
    • {FIELD_NAME}Updated is now On{FIELD_NAME}Update.
  • The generated Writers have been renamed from {COMPONENT_NAME}.Requirable.Writer to {COMPONENT_NAME}Writer.
  • The Writer send method names have changed.
    • Send{EVENT_NAME} is now Send{EVENT_NAME}Event.
    • Send is now SendUpdate.
  • The generated command senders in MonoBehaviours have also changed.
    • {COMPONENT_NAME}.Requirable.CommandRequestSender and {COMPONENT_NAME}.Requirable.CommandResponseHandler have been combined and are now called {COMPONENT_NAME}CommandSender.
    • {COMPONENT_NAME}.Requirable.CommandRequestHandler is now called {COMPONENT_NAME}CommandReceiver.
  • When creating GameObjects, the IEntityGameObjectCreator.OnEntityCreated signature has changed from GameObject OnEntityCreated(SpatialOSEntity entity) to void OnEntityCreated(SpatialOSEntity entity, EntityGameObjectLinker linker).
  • The signature of IEntityGameObjectCreator.OnEntityCreated has changed from void OnEntityRemoved(EntityId entityId, GameObject linkedGameObject) to void OnEntityRemoved(EntityId entityId).
    • All linked GameObject instances are still unlinked before this is called, however it is now your responsibility to track if a GameObject was created when the entity was added.
    • You should now call linker.LinkGameObjectToSpatialOSEntity() to link the GameObject to the SpatialOS entity.
    • You should also pass-in a list of ComponentType to LinkGameObjectToSpatialOSEntity which you wish to be copied from the GameObject to the ECS entity associated with the GameObject.
      • Note that for the Transform Synchronization feature module to work correctly, you need to set up a linked Transform Component on your GameObject. You also need to link any Rigidbody Component on your GameObject.
    • There is no limit on the number of GameObject instances that you can link to a SpatialOS entity. However, you cannot add a component type to a linked GameObject instance more than once.
    • Deleting a linked GameObject unlinks it from the SpatialOS entity automatically.
  • SpatialOSComponent has been renamed to LinkedEntityComponent.
    • The field SpatialEntityId on the LinkedEntityComponent has been renamed to EntityId.
    • The field Entity has been removed.
  • The Improbable.Gdk.Core.Dispatcher class has been removed.

Added

  • All generated schema types, enums, and types which implement ISpatialComponentSnapshot are now marked as Serializable.
    • Note that generated types that implement ISpatialComponentData are not marked as Serializable.
  • Added the DynamicConverter class for converting a ISpatialComponentSnapshot to an ISpatialComponentUpdate.
  • Added a generated ECS shared component called {COMPONENT_NAME}.ComponentAuthority for each SpatialOS component.
    • This component contains a single boolean which denotes whether a worker instance has write access authority over that component.
    • The component does not tell you about soft-handover (AuthorityLossImminent).
  • You may now [Require] an EntityId, Entity, World, ILogDispatcher, and WorldCommandSender in MonoBehaviours.
  • Added constructors for all generated component snapshot types.
  • Added the ability to send arbitrary serialized data in a player creation request.
    • Replaced Vector3f position in CreatePlayerRequestType with a bytes field for sending arbitrary serialized data.
  • Added RequestPlayerCreation to manually request for player creation in SendCreatePlayerRequestSystem.
  • Added a menu item, navigate to SpatialOS > Generate Dev Authentication Token, to generate a TextAsset containing the Development Authentication Token.
  • 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.

Changed

  • Upgraded the Worker SDK version to 13.6.2.
  • Improved the UX of the BuildConfiguration inspector.
  • Improved the UX of the GDK’s Tools Configuration window.
  • Deleting a GameObject now automatically unlinks it from its ECS entity. Note that the ECS entity and the SpatialOS entity are not also deleted.
  • Changed the format of the BuildConfiguration asset. Please recreate, or copy it from workers/unity/Playground/Assets/Config/BuildConfiguration.asset.
  • Building workers will not change the active build target anymore. The build target will be set back to whatever was set before starting the build process.

Fixed

  • Fixed a bug where, from the SpatialOS menu in the Unity Editor, running SpatialOS > Generate code would always regenerate code, even if no files had changed.
  • Fixed a bug where building all workers in our sample projects would fail if you have Android build support installed but didn't set the path to the Android SDK.
  • Fixed a bug where some prefabs would not be processed correctly, causing a NullReferenceException in OnEnable.

Internal

  • Changed the code generator to use the schema bundle JSON rather than AST JSON.
    • If you have forked the code generator, this may be a breaking change.
  • Exposed annotations in the code generator model.
  • Added a MockConnectionHandler implementation for testing code which requires the world to be populated with SpatialOS entities.
  • Added tests for StandardSubscriptionManagers and AggregateSubscription.
  • Re-added tests for Reader/Writer injection criteria and MonoBehaviour enabling.
  • Reactive components have been isolated and can be disabled.
  • Subscriptions API has been added, this allows you to subscribe anything for which a manager has been defined.
    • This now backs the Require API in MonoBehaviours.
  • Low-level APIs have been changed significantly.
  • Added a View separate from the Unity ECS.
  • Removed unnecessary KcpNetworkParameters overrides in MobileWorkerConnector where it matched the default values.

GDK for Unity Alpha Release 0.1.5

22 Feb 11:04
7f10936
Compare
Choose a tag to compare

Changed

  • Changed RedirectedProcess to have Builder-like API.
  • Upgraded the project to be compatible with 2018.3.5f1.

Fixed

  • Fixed a bug where launching on Android from the Unity Editor would break if you have spaces in your project path.
  • Fixed a bug where a Unity package with no dependencies field in its package.json would cause code generation to throw exceptions.
  • Fixed a bug where protocol logging would crash Linux workers.

GDK for Unity Alpha Release 0.1.4

28 Jan 18:27
a518da6
Compare
Choose a tag to compare

In our first release of 2019, we've got some big features landing! Notably: support of Unity 2018.3, cloud workflows for mobile builds, and the new Runtime opt in.

For information on upgrading your SpatialOS project to the new Runtime check out the upgrade guide in the SpatialOS documentation.

As always, we want your feedback and/or suggestions. Drop in our Discord, our forums, or here in the Github issues!

Please see the detailed release notes below for more information! 🎉


Known Issues

  • IL2CPP builds are broken on Unity 2018.3.2f1 (Unity bug report) (#715)
  • Protocol Logging is automatically disabled on Linux workers due to a linking error. (#714)

Added

  • Added support for the Alpha Locator flow.
  • Added support for connecting mobile devices to cloud deployments via the anonymous authentication flow.
  • Added option to build workers out via IL2CPP in the cmd.
  • Added an example of handling disconnect for mobile workers.
  • Added support for launching an Android client from the Editor over ADB.

Changed

  • Upgraded the Worker SDK version to 13.5.1. This is a stable Worker SDK release! 🎉
  • Improbable.Gdk.EntityTemplate is now mutable and exposes a set of APIs to add, remove, and replace component snapshots
    • This replaces the Improbable.Gdk.Core.EntityBuilder class.
    • These changes also allow you to reuse an EntityTemplate more than once.
  • Upgraded the project to be compatible with 2018.3.2f1.
  • Upgraded the entities package to 0.0.12-preview.21
  • Disabled protocol logging on Linux workers to prevent crashes. This will be reverted once the underlying issue is fixed.
  • Updated the MobileWorkerConnector to use the KCP network protocol by default.
  • Changed the mobile_launch.json config to use the new Runtime.
  • Updated all the launch configs to use the new Runtime.
  • Changed the build process in the Editor such that it skips builds that don't have build support rather than canceling the entire build process.
    • Note that building via the Improbable.Gdk.BuildSystem.WorkerBuilder.Build static method is unchanged.

Fixed

  • Clean all workers now cleans worker configs in addition to built-out workers.
  • Fixed a bug where you could start each built-out worker only once on OSX.
  • Code generation now captures nested package dependencies, so the generated schema contains schema components from all required packages. Previously, code generation only generated schema for top-level dependencies, skipping nested packages.
  • Fixed a bug where spaces in the path would cause code generation to fail on OSX.
  • Fixed an issue in the TransformSynchronization module where an integer underflow would cause a memory crash.
  • Fixed a bug where using Coordinates, Vector3f, or Vector3d in a command definition would cause the Code Generator to crash.

Removed

  • Removed the Improbable.Gdk.Core.EntityBuilder class as it was superceded by the updated functionality in Improbable.Gdk.Core.EntityTemplate.
    • Removed CreateSchemaComponentData from each generated component as it is no longer required by the EntityBuilder.
  • Removed com.unity.incrementalcompiler package as a dependency of the Core package.

GDK for Unity Alpha Release 0.1.3

26 Nov 12:27
f05cfae
Compare
Choose a tag to compare

Added

  • Added Frames Per Second (FPS) and Unity heap usage as metrics sent by MetricSendSystem.cs.
  • Added a warning message to the top of schema files copied into the from_gdk_packages directory.
  • Added an ISnapshottable<T> interface to all generated components. This allows you to convert a component to a snapshot.
  • Added an EntityId property on the Readers/Writers to access the EntityId of the underlying SpatialOS entity.
  • Added a HasEntity method to the WorkerSystem. This allows you to check if an entity is checked out on your worker.
  • Added operators and conversion methods to Coordinates, Vector3d, and Vector3f in code generation.
    • This supercedes the StandardLibraryUtils feature module which was removed as a consequence.

Changed

  • Improved the method of calculating load and FPS.
  • Updated test project Unity version to 2018.2.14f.
  • Upgraded the Worker SDK snapshot version. This entails the following changes:
    • EntityId is now in the Improbable.Gdk.Core namespace. (Previously Improbable.Worker).
    • Dispatcher is now in the Improbable.Gdk.Core namespace. (Previously Improbable.Worker).
    • The Improbable.Worker.Core namespace is now Improbable.Worker.CInterop.

Fixed

  • Fixed a bug where schema components with a field named value would generate invalid code.

Removed

  • Removed the StandardLibraryUtils feature module as it was superceded by inserting the methods during code generation.

GDK for Unity Alpha Release 0.1.2

01 Nov 18:54
6bf5462
Compare
Choose a tag to compare

Added

  • Added the ability to acknowledge AuthorityLossImminent messages.
  • Added an Open Inspector button to the SpatialOS menu in the Unity Editor.
  • Added support for local mobile development.
  • Added a changelog.
  • Added field level dirty markers in components. This allows for partial automatic component updates to be sent.
  • Added full support for EntityQuery world commands.
    • Added Improbable.Gdk.Core.EntityQuerySnapshot to hold the result of a single entity from a snapshot query.
    • Added Improbable.Gdk.Core.ISpatialComponentSnapshot to differentiate between a snapshot of component state and component data.

Changed

  • Changed the allocation type used internally for Unity ECS chunk iteration from Temp to TempJob
  • Running a build in the Editor no longer automatically selects all scenes in the Unity build configuration
  • Improbable.Gdk.Core.Snapshot.AddEntity now returns the EntityId assigned in the snapshot.
  • Changed the WorkerConnector to be more generic and have an explicit StandaloneWorkerConnector for any workers running on OSX/Linux/Windows.
  • Updated the default Unity version to 2018.2.14f1.

Fixed

  • Fixed a bug where deserialising multiple events in a single component update only returned N copies of the last event received, where N is the number of events in the update.
  • Fixed a broken link to the setup guide in an error message.

GDK for Unity Alpha Release 0.1.1

19 Oct 17:27
f343470
Compare
Choose a tag to compare

This is a patch to the alpha release.

Release Notes

Added

  • Better error messages when missing build support for a target platform.
  • Better error messages for common problems when downloading the Worker SDK.

Changed

  • Position updates are now sent after all other updates.
  • Simplified the heartbeating system in the PlayerLifecycle feature module.
  • Updated the README and "Get Started" guide.

Fixed

  • The GameLogic worker is run in headless mode.
  • The Clean All Workers menu item now works.

GDK for Unity Alpha Release

10 Oct 12:45
5d48a07
Compare
Choose a tag to compare

This is the alpha release