Releases: spatialos/gdk-for-unity
GDK for Unity Alpha Release 0.2.2
The
w4_r1000_e1template used in the FPS Starter Project has now been deprecated. If you use this template, update your launch configuration to use the neww4_r1000_e10template.
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_e1template used in the FPS Starter Project has now been deprecated. If you use this template, update your launch configuration to use the neww4_r1000_e10template. - Removed the
Improbable.Gdk.Mobile.AndroidandImprobable.Gdk.Mobile.iOSpackages. All functionality is now available inside theImprobable.Gdk.Mobilepackage.
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 localandSpatialOS > 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.Editorasmdef.- Moved
SingletonScriptableObject<T>from the build system feature module into this assembly and made it public. - Pulled out the
UiStateManagerfrom theBuildConfigEditorinto this assembly and made it public.
- Moved
- 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.txtasset at the root of anyResourcesfolder. - Removed the
AndroidClientWorkerConnectorandiOSClientWorkerConnectorand their specific scenes. You can now use theMobileClientWorkerConnectorand itsMobileClientSceneto 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 Tokenwould 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.txtasset would be imported from an invalid AssetDatabase path.
GDK for Unity Alpha Release 0.2.1
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
clientAccessfrom theAddPlayerLifecycleComponentssignature. We now construct the client access attribute within the helper.
Added
- Added a static helper in the
EntityTemplateclass to construct worker access attributes. See the API docs for more info. - Added an optional callback as an argument to the
RequestPlayerCreationmethod inSendCreatePlayerRequestSystem. 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.InterestTemplateprovides functionality to ergonomically add, replace and clear queries from an Interest component.InterestQueryreduces boilerplate code required to construct interest queries.Constraintcontains 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 valueTor an errorE. - Added Scripting Define Symbol
DISABLE_REACTIVE_COMPONENTS. Using this symbol will disable all reactive components and systems. - Added a
WorkerFlagReaderwhich you can subscribe andRequire. 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
Typesuffix from player lifecycle schema types. RedirectedProcess.RunAsync()now takes aCancellationToken?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 theView.
GDK for Unity Alpha Release 0.2.0
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
CreateRequestandCreateResponse. Instead, they are constructors that take the same arguments. - The
Requireattribute has moved from theImprobable.Gdk.GameObjectRepresentationnamespace to theImprobable.Gdk.Subscriptionsnamespace. - The generated Readers have been renamed from
{COMPONENT_NAME}.Requirable.Readerto{COMPONENT_NAME}Reader. - The Reader callback events' names have changed.
On{EVENT_NAME}is nowOn{EVENT_NAME}Event.{FIELD_NAME}Updatedis nowOn{FIELD_NAME}Update.
- The generated Writers have been renamed from
{COMPONENT_NAME}.Requirable.Writerto{COMPONENT_NAME}Writer. - The Writer send method names have changed.
Send{EVENT_NAME}is nowSend{EVENT_NAME}Event.Sendis nowSendUpdate.
- The generated command senders in MonoBehaviours have also changed.
{COMPONENT_NAME}.Requirable.CommandRequestSenderand{COMPONENT_NAME}.Requirable.CommandResponseHandlerhave been combined and are now called{COMPONENT_NAME}CommandSender.{COMPONENT_NAME}.Requirable.CommandRequestHandleris now called{COMPONENT_NAME}CommandReceiver.
- When creating GameObjects, the
IEntityGameObjectCreator.OnEntityCreatedsignature has changed fromGameObject OnEntityCreated(SpatialOSEntity entity)tovoid OnEntityCreated(SpatialOSEntity entity, EntityGameObjectLinker linker). - The signature of
IEntityGameObjectCreator.OnEntityCreatedhas changed fromvoid OnEntityRemoved(EntityId entityId, GameObject linkedGameObject)tovoid OnEntityRemoved(EntityId entityId).- All linked
GameObjectinstances are still unlinked before this is called, however it is now your responsibility to track if aGameObjectwas created when the entity was added. - You should now call
linker.LinkGameObjectToSpatialOSEntity()to link theGameObjectto the SpatialOS entity. - You should also pass-in a list of
ComponentTypetoLinkGameObjectToSpatialOSEntitywhich you wish to be copied from theGameObjectto the ECS entity associated with theGameObject.- 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.
- All linked
SpatialOSComponenthas been renamed toLinkedEntityComponent.- The field
SpatialEntityIdon theLinkedEntityComponenthas been renamed toEntityId. - The field
Entityhas been removed.
- The field
- The
Improbable.Gdk.Core.Dispatcherclass has been removed.
Added
- All generated schema types, enums, and types which implement
ISpatialComponentSnapshotare now marked asSerializable.- Note that generated types that implement
ISpatialComponentDataare not marked asSerializable.
- Note that generated types that implement
- Added the
DynamicConverterclass for converting aISpatialComponentSnapshotto anISpatialComponentUpdate. - Added a generated ECS shared component called
{COMPONENT_NAME}.ComponentAuthorityfor 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]anEntityId,Entity,World,ILogDispatcher, andWorldCommandSenderin MonoBehaviours. - Added constructors for all generated component snapshot types.
- Added the ability to send arbitrary serialized data in a player creation request.
- Replaced
Vector3fposition inCreatePlayerRequestTypewith abytesfield for sending arbitrary serialized data.
- Replaced
- Added
RequestPlayerCreationto manually request for player creation inSendCreatePlayerRequestSystem. - 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
Requiredwhich 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
NullReferenceExceptioninOnEnable.
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
MockConnectionHandlerimplementation for testing code which requires the world to be populated with SpatialOS entities. - Added tests for
StandardSubscriptionManagersandAggregateSubscription. - 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
RequireAPI in MonoBehaviours.
- This now backs the
- Low-level APIs have been changed significantly.
- Added a View separate from the Unity ECS.
- Removed unnecessary
KcpNetworkParametersoverrides inMobileWorkerConnectorwhere it matched the default values.
GDK for Unity Alpha Release 0.1.5
Changed
- Changed
RedirectedProcessto 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.jsonwould cause code generation to throw exceptions. - Fixed a bug where protocol logging would crash Linux workers.
GDK for Unity Alpha Release 0.1.4
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.EntityTemplateis now mutable and exposes a set of APIs to add, remove, and replace component snapshots- This replaces the
Improbable.Gdk.Core.EntityBuilderclass. - These changes also allow you to reuse an
EntityTemplatemore than once.
- This replaces the
- 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
MobileWorkerConnectorto use the KCP network protocol by default. - Changed the
mobile_launch.jsonconfig 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.Buildstatic method is unchanged.
- Note that building via the
Fixed
Clean all workersnow 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, orVector3din a command definition would cause the Code Generator to crash.
Removed
- Removed the
Improbable.Gdk.Core.EntityBuilderclass as it was superceded by the updated functionality inImprobable.Gdk.Core.EntityTemplate.- Removed
CreateSchemaComponentDatafrom each generated component as it is no longer required by theEntityBuilder.
- Removed
- Removed
com.unity.incrementalcompilerpackage as a dependency of theCorepackage.
GDK for Unity Alpha Release 0.1.3
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_packagesdirectory. - Added an
ISnapshottable<T>interface to all generated components. This allows you to convert a component to a snapshot. - Added an
EntityIdproperty on the Readers/Writers to access theEntityIdof the underlying SpatialOS entity. - Added a
HasEntitymethod to theWorkerSystem. This allows you to check if an entity is checked out on your worker. - Added operators and conversion methods to
Coordinates,Vector3d, andVector3fin code generation.- This supercedes the
StandardLibraryUtilsfeature module which was removed as a consequence.
- This supercedes the
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:
EntityIdis now in theImprobable.Gdk.Corenamespace. (PreviouslyImprobable.Worker).Dispatcheris now in theImprobable.Gdk.Corenamespace. (PreviouslyImprobable.Worker).- The
Improbable.Worker.Corenamespace is nowImprobable.Worker.CInterop.
Fixed
- Fixed a bug where schema components with a field named
valuewould generate invalid code.
Removed
- Removed the
StandardLibraryUtilsfeature module as it was superceded by inserting the methods during code generation.
GDK for Unity Alpha Release 0.1.2
Added
- Added the ability to acknowledge
AuthorityLossImminentmessages. - Added an
Open Inspectorbutton to theSpatialOSmenu 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
EntityQueryworld commands.- Added
Improbable.Gdk.Core.EntityQuerySnapshotto hold the result of a single entity from a snapshot query. - Added
Improbable.Gdk.Core.ISpatialComponentSnapshotto differentiate between a snapshot of component state and component data.
- Added
Changed
- Changed the allocation type used internally for Unity ECS chunk iteration from
TemptoTempJob - Running a build in the Editor no longer automatically selects all scenes in the Unity build configuration
Improbable.Gdk.Core.Snapshot.AddEntitynow returns theEntityIdassigned in the snapshot.- Changed the
WorkerConnectorto be more generic and have an explicitStandaloneWorkerConnectorfor 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
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
PlayerLifecyclefeature module. - Updated the
READMEand "Get Started" guide.
Fixed
- The
GameLogicworker is run in headless mode. - The
Clean All Workersmenu item now works.
GDK for Unity Alpha Release
This is the alpha release