Releases: spatialos/gdk-for-unity
GDK for Unity Alpha Release 0.3.1
In this release, we've improved the responsiveness of the Deployment Launcher and exposed a Worker's IsConnected property in the WorkerSystem. 🎉
We've also fixed a couple of known issues (#957, #958) where valid schema could generate invalid code due to name clashes.
Keep giving us your feedback and/or suggestions! Check out our Discord, our forums, or here in the Github issues!
Feel free to have a browse through our detailed release notes below! 👇
Added
- A
WorkerSystemnow exposes the underlying Worker'sIsConnectedproperty. #1217
Fixed
- Fixed an issue where the Deployment Launcher window would feel unresponsive due to saving changes after every input. #1219
- It will now wait for at least 1 second to elapse after the last change before writing the configuration back to disk.
- Fixed issues (#957, #958) where valid schema would generate invalid code due to name clashes. #1222
- The offending schema properties will no longer be generated and are now logged in the Unity Editor.
Internal
- Changed the default Locator port from 444 to 443. #1220
GDK for Unity Alpha Release 0.3.0
In this release, we've added the ability in the Mobile Launcher window to select which Android device or emulator to launch your app on, and upgraded the Worker SDK to 14.2.1. Following this upgrade, we've also changed the default network connection type to Modular UDP with packet compression enabled. 🚀
On the breaking changes front, empty component updates will no longer trigger callbacks when received and reactive components are now removed completely. 🎉
In addition to the usual bug fixes, we've also made local Worker IDs easier to read when debugging. 🕵️♂️
Keep giving us your feedback and/or suggestions! Check out our Discord, our forums, or here in the Github issues!
We've packed a lot of things in this release, so please have a browse through our detailed release notes below! 👇
Breaking Changes
- Reactive components have been removed completely. #1195
- If you are using reactive components, please see our documentation on the ECS workflow.
- Codegen for the GameObjectCreation package has been moved into the package. If the package is not used, readers and writers will no longer be generated. #1196
- Empty component updates will no longer trigger callbacks when received. #1211
Added
- Added the ability to select which Android device or emulator to launch an application on. #1194
Changed
- Generated Worker ID's for local development are now smaller and easier to read for debugging. #1197
- Upgraded to Worker SDK 14.2.1. #1208
- Versioning scheme for the SDK and Mobile SDK packages have now changed to align with the GDK for Unity version.
- Changed the default network type to ModularUDP with packet compression. #1212
Fixed
- Fixed a bug where the Deployment Launcher window would accept tags with 33 characters. #1202
- Fixed a small memory leak with command response callbacks using MonoBehaviours. #1205
- Fixed an issue where events would trigger the
OnUpdatecallback on readers and writers. #1211
Internal
- Cleaned up Subscriptions and Callbacks. #1200
- Replaced usage of
GuardedAuthorityCallbackManagerSetwith more genericGuardedCallbackManagerSet. - Removed unused
EntitySubscriptionsclass. - Formatting pass on all Subscriptions and Callbacks files.
- Replaced usage of
- Moved the CompressedQuaternion and FixedPointVector partials to the transform synchronization package. #1201
GDK for Unity Alpha Release 0.2.10
This release comes with the usual assortment of bug fixes. We've also added commands and world command tabs to the Network Analyzer window! 🚀
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
GetComponentId<T>()andGetSnapshotComponentId<T>()methods have been moved fromDynamictoComponentDatabase. #1173
Added
- Added commands and world commands tabs to the Network Analyzer window. #1174
Fixed
- Fixed a bug where the
TransformSynchronizationMonoBehaviour would not reset when disabled. #1169 - Fixed a bug where the
UnlinkGameObjectFromEntitymethod in theEntityGameObjectLinkerwould not cleanup thegameObjectToComponentsAddeddictionary. #1169 - Fixed a bug where the Network Analyzer would not properly render all components/commands in the scroll view. #1175
- Fixed a bug where the code generator would not re-generate files when changes were made to existing schema files. #1181
Internal
GDK for Unity Alpha Release 0.2.9
This release includes a shiny new Unity Editor window that displays live bandwidth usage for your workers running in the Editor! Currently limited to component updates, this will be expanded to commands in a future release along with tools to help you sort and interpret the results. Additionally, we've fixed a few annoying bugs and laid the groundwork for modular codegen! 🚀
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! 🎉
Added
- Added network statistics collection for both sending and receiving messages. #1135
- This adds a single ECS system
NetworkStatisticsSystem. This system will only run when running your workers inside the Unity Editor. - Additionally, there are a set of data types supporting this system which can be found under the
Improbable.Gdk.Core.NetworkStatsnamespace.
- This adds a single ECS system
- Added the Network Analyzer window, which allows you to view live bandwidth usage per component.
SpatialOS->Window->Network Analyzer#1148
Fixed
- Fixed a bug where
MonoBehaviours withWorkerTypeattributes would not be enabled even if the owning worker's type was a match for theWorkerTypeattribute. #1147 - Fixed a bug where the mobile configuration would get reset whenever assembly got reloaded or you entered Playmode. #1157
Internal
- Added test coverage for
WorkerTypeattribute and its interplay with[Require]fields in thetest-project. #1147 - Refactored internals of code generation for modular codegen. #1151.
- Use
dotnet newto generate a skeleton project then link in the various modules from each package. - This project is created in the
build/codegendirectory and is then executed to actually generate the code.
- Use
GDK for Unity Alpha Release 0.2.8
This release includes support for Unity 2019.2.0f1! We've also included a fix for a bug where recursive options in schema types cause a Mono hard crash, and a new Unity Editor window for forwarding a port from a worker that is running in the cloud.
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! 🎉
Added
- Workers will now log their
PlayerConnectionports to SpatialOS after connecting. This port can be used for connecting the Unity profiler to workers running in the cloud. #1128- Note that this will only happen if the worker was built as a "Development Build".
- Added a new Unity Editor window for forwarding a port from a worker that is running in the cloud. #1133
- You can find this window in the Unity Editor menu at: SpatialOS > Port Forwarding.
- This can be used to connect the Unity profile to workers running in the cloud.
Changed
- Upgraded the project to be compatible with
2019.2.0f1. - Upgraded to Worker SDK 14.0.2.
Fixed
- Fixed a bug where recursive options in schema types would cause a Mono hard crash. #1131
- Any fields in a schema type that are a recursive option will now be skipped.
- This is a workaround until full recursive option support is implemented.
Internal
- Work-around for Mac Launcher using wrong executable name. Generating hardcoded
launcher_client_config.jsonfor Mac builds. #1142
GDK for Unity Alpha Release 0.2.7
This release contains better error messages for schema issues, the ability to specify a snapshot to use for local deployments, and an upgrade to Worker SDK 14.0.1!
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 or check out our Upgrade Guide! 🎉
Breaking Changes
- Renamed the public field
AnonymousAuthenticationPorttoLocatorPorton theAlphaLocatorFlowclass and theRuntimeConfigDefaultsstatic class. #1105 - Upgraded to Worker SDK
14.0.1. This brings a number of breaking changes. #1112Vector3fandVector3dare no longer available in the schema standard library.- The
Improbable.Coordinates.ToSpatialVector3d()method has been removed. LocatorFlowandAlphaLocatorFlowhave been merged.- The implementation of the old
LocatorFlowhas been removed. - The
ConnectionService.AlphaLocatorenum value has been removed.
- The
ProjectName,SteamDeploymentTag, andSteamTicketconstants have been removed from theRuntimeConfigNamesstatic class.
Added
- Added the ability to connect to an arbitrary host/port combo for the
AlphaLocatorFlow. #1105 - Added a
SpatialdManagerclass for managing local deployments withSpatialDintoio.improbable.gdk.testutils. #1104 - Added the ability to specify a snapshot to be used when launching a deployment in the Editor. #1098
- Added the ability to select the modular UDP network type as part of the Worker SDK 14.0.1 upgrade. #1112
Changed
- Schema compilation error messages are now concatenated within the
GenerateCodeclass before shown in the Console, creating only one error message instead of several. #1107 - Changed some reactive components for events and commands that were not correctly encapsulated with the
USE_LEGACY_REACTIVE_COMPONENTSsymbol. #1113 - Improved performance in SendComponentSystem through better job handling.
Fixed
- Fixed a bug where
RedirectedProcess.RunAsync()could deadlock if you did not provide aCancellationToken. #1102 - Fixed a bug in the
AlphaLocatorFlowwhere the default implementation ofGetDevelopmentLoginTokensdid not respect the host/port fields. #1105 - Fixed a bug where
AlphaLocatorFlow.CreateAsync()could deadlock. #1108
Internal
- Added tests for the
ReceptionistFlowclass. #1095 - Added tests for the
CommandLineConnectionFlowInitializerclass. #1096 - Added tests for the
CommandLineConnectionParametersInitializerclass. #1103 - Added
spotdownloading toinit.sh&init.psinto theio.improbable.worker.sdkpackage. #1104 - Added tests for the
AlphaLocatorFlowclass. #1108 Option<T>is now explicitly immutable as areadonly struct. #1110- Removed unused arguments from worker configuration files. #1112
GDK for Unity Alpha Release 0.2.6
This release contains an inspector extension for your [Require] fields in your Monobehaviours, some usability improvements in generated standard library and transform types, and an upgrade to Worker SDK 13.8.2!
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 or check out our Upgrade Guide! 🎉
Breaking Changes
- Renamed
Improbable.Gdk.Core.EntityQuerySnapshottoImprobable.Gdk.Core.EntitySnapshot. TheImprobable.Gdk.Core.Commands.WorldCommands.EntityQuery.ReceivedResponsehas been updated accordingly. #1053 DynamicSnapshotandDynamicConverterhave been collapsed intoDynamic. #1053- The delegates from all of these classes are now available in the
Dynamic.VTable<TData, TUpdate, TSnapshot>struct. Dynamic.IHandler.Acceptnow takes aDynamic.Vtable<TData, TUpdate, TSnapshotparameter.
- The delegates from all of these classes are now available in the
- Reactive components are now opt in instead of opt out. Use the scripting define
USE_LEGACY_REACTIVE_COMPONENTSto re-enable them. #1059- Note that these will be removed in a future release.
- Removed the
CreateTransformSnapshot(Coordinates location, Quaternion rotation, Vector3 velocity)method. #1063 - Removed the
WorkerOpFactoryfrom theio.improbable.gdk.testutilspackage. Please use theMockConnectionHandlerin theio.improbable.gdk.corepackage instead. #1085 - Removed the
TestMonoBehaviourfrom theio.improbable.gdk.testutilspackage. #1085
Added
- Added a
bool TryGetComponent<T>(out T component);method to theSpatialOSEntitystruct. This can help reduce boilerplate when writing customIEntityGameObjectCreatorimplementations. #1049 - Added the
void AddComponentSnapshot<T>(T componentSnapshot)andbool TryGetComponent<T>(out T componentSnapshot)methods to theImprobable.Gdk.Core.EntitySnapshotstruct. #1053 - Added a
EntitySnapshot GetEntitySnapshot()method to theImprobable.Gdk.Core.EntityTemplateclass. #1053 - Added methods for conversion of
Coordinates,EdgeLength,FixedPointVector3andCompressedQuaternionto/from native UnityVector3andQuaterniontypes. #1063 - Added basic arithmetic and equality operators for the
EdgeLengthstandard library type. #1063 - Added a new
io.improbable.gdk.debugpackage which contains an inspector extension for viewing[Require]states in the editor #1082
Changed
- Upgraded to Worker SDK 13.8.2. #1052
- The new
Entityschema type is deserialized as anImprobable.Gdk.Core.EntitySnapshot. #1053
- The new
- The conversion methods for
FixedPointVector3andCompressedQuaternionhave been moved fromTransformUtilsto their generated structs and are now public. #1063
Fixed
- The world command sender reactive components and reactive component systems are now properly conditionally compiled. #1059
- Subscribing to the
World,ILogDispatcher,WorkerId, andLinkedGameObjectMaptypes no longer cause different MonoBehaviour/GameObject subscriptions to cross-talk. This previously would result in Monobehaviours disabling unexpectedly. #1071
Internal
- Added extension methods on the
SchemaObjectstruct for easy serializing/deserializing of theEntityschema type. #1053 - Added options and functionality for serialization overrides for schema types only. #1061
- Laid the groundwork for 2D support in the Transform Synchronization Feature Module. #1064
- Removed
core-sdk.pinnedfrom the tools package. - Moved
DisableAutoCreationTestsinto the test project #1085
GDK for Unity Alpha Release 0.2.5
This release is the first release where we are publishing the GDK packages as NPM packages, which means you can install them through the Unity Package Manager! In addition, we've added two objects that you can [Require] to make working in the MonoBehaviour layer simpler.
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 or check out our Upgrade Guide! 🎉
Breaking Changes
- Renamed the
buildTargetcommand line argument tobuildEnvironment. #1012 - All GDK packages now have an
io.improbableprefix instead ofcom.improbable. #894
Added
- Added the
LinkedGameObjectMapclass for finding theGameObject(s) linked with a specifiedEntityId. #1013- This can be used with the
[Require]annotation to inject it into yourMonoBehavioursprovided you are using theGameObjectCreationfeature module. For example:[Require] private LinkedGameObjectMap gameObjectMap;
- This can be used with the
- Added the ability for the build system to build specific targets of a given build environment. #1012
- Use the
buildTargetFiltercommand line argument to pass in a comma delimited list of build targets to filter for. For example,+buildTargetFilter win,macos.
- Use the
- Added two new GDK packages:
io.improbable.worker.sdkandio.improbable.worker.sdk.mobilewhich contain the underlying Worker SDK packages for Windows/MacOS/Linux and Android/iOS respectively. #894 - You may now
[Require]aWorkerIdin MonoBehaviours. For example:[Require] private WorkerId workerId;. #1016 - iOS builds now perform a post processing step on the XCode project to ensure x86_64 and arm libraries from the SpatialOS Worker SDK are separated. #1040
Changed
PlayerLifecycleHelper.IsOwningWorkerwill now return false instead of throwing an exception if the entity is not in your worker's view.
Fixed
- Fixed a bug where
PlayerLifecycleHelper.IsOwningWorkerwould throw an exception if the entity was in your worker's view.
Internal
GDK for Unity Alpha Release 0.2.4
This release contains significant bandwidth savings in the Transform Synchronization feature module and significant changes to how Workers are created in the GDK.
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 or check out our Upgrade Guide! 🎉
Breaking Changes
- The constructor for the
ForwardingDispatchernow accepts aUnityEngine.LogTypeinstead ofImprobable.Worker.CInterop.LogLevelas its parameter. #987 - The schema for the Transform Synchronization feature module has been optimised to reduce bandwidth. If you use this module, please make use of the updated helper methods and regenerate your snapshot. #990
- The
LocationandVelocityschema types have been replaced by theFixedPointVector3type.- The location and velocity fields are now
Q21.10fixed point values.
- The location and velocity fields are now
- The
Quaternionschema type has been replaced by theCompressedQuaterniontype.- Rotation is now compressed from 4 floats to a single uint32.
- The
- The worker abstraction & connectors have been changed significantly. See the Upgrade guide for more details on how to upgrade. #981
- The
DefaultWorkerConnectorandDefaultMobileWorkerConnectorclasses have been removed. - The
WorkerConnectorhas had the following abstract methods removed:ConnectionService GetConnectionService()ConnectionParameters GetConnectionParameters(string workerType, ConnectionService service)LocatorConfig GetLocatorConfig()AlphaLocatorConfig GetAlphaLocatorConfig(string workerType)ReceptionistConfig GetReceptionistConfig(string workerType)
- The
WorkerConnectorhas had the following virtual methods removed:string GetPlayerId()string GetDisplayName()string SelectDeploymentName(DeploymentList deployments)string GetDevAuthToken()string SelectLoginToken(List<LoginTokenDetails> loginTokens)string GetDevelopmentPlayerIdentityToken(string authToken, string playerId, string displayName)List<LoginTokenDetails> GetDevelopmentLoginTokens(string workerType, string playerIdentityToken)
- The
WorkerConnectorhas also had the following changes:- The
public Worker Worker;field is now thepublic WorkerInWorld Worker;field. - The
public async Task Connect(string workerType, ILogDispatcher logger)method is nowprotected async Task Connect(IConnectionHandlerBuilder builder, ILogDispatcher logger).
- The
- The
Workerclass has had the following changes:- The
public Connection Connection { get; private set; }property has been removed. - The
public World World { get; private set; }property has been moved to theWorkerInWorldclass. - The
public static async Task<Worker> CreateWorkerAsync(ReceptionistConfig parameters, ConnectionParameters connectionParameters, ILogDispatcher logger, Vector3 origin)method has been removed. - The
public static async Task<Worker> CreateWorkerAsync(LocatorConfig parameters, ConnectionParameters connectionParameters, ILogDispatcher logger, Vector3 origin)method has been removed. - The
public static async Task<Worker> CreateWorkerAsync(AlphaLocatorConfig parameters, ConnectionParameters connectionParameters, ILogDispatcher logger, Vector3 origin)method has been removed.
- The
- The
ReceptionistConfig,LocatorConfig, andAlphaLocatorConfigstructs have been removed. - The
WorkerSystemno longer has apublic readonly Connection Connection;field
- The
- The
CommandLineUtilitystatic class has been replaced with aCommandLineArgsstateful class. #981 - The
ILogDispatcherinterface now has apublic Worker Worker { get; set; }property instead of apublic Connection Connection { get; set; }property. This of course, propagates down to all implementations of theILogDispatcherinterface. #981
Added
- Added a mobile launcher window containing all the settings and functionality to allow you to launch your apps for iOS and Android. To open it, in the Unity Editor, select SpatialOS > Mobile Launcher.
- Added a
IEnumerable<T> FilterOption<T>(this IEnumerable<Option<T>> enumerable)LINQ extension. #981 - Added a
public readonly string WorkerId;field to theWorkerSystemclass. #981 - Added a
IConnectionFlowinterface which describes how a connection can be created. #981- Added a
ReceptionistFlow,LocatorFlow, andAlphaLocatorFlowwhich implementIConnectionFlow.
- Added a
- Added a
IConnectionFlowInitializer<TConnectionFlow>interface which describes how the parameters for a particular connection flow are initialized. #981- Added a
CommandLineConnectionFlowInitializerwhich implementsIConnectionFlowInitializer<ReceptionistFlow>,IConnectionFlowInitializer<LocatorFlow>, andIConnectionFlowInitializer<AlphaLocatorFlow>. - Added a
MobileConnectionFlowInitializerwhich implementsIConnectionFlowInitializer<ReceptionistFlow>andIConnectionFlowInitializer<AlphaLocatorFlow>.
- Added a
- Added a
IConnectionParameterInitializerwhich describes how the parameters for a worker connector are initialized. #981- Added a
CommandLineConnectionParameterInitializerwhich implementsIConnectionParameterInitializer. - Added a
MobileConnectionParametersInitializerwhich implementsIConnectionParameterInitializer.
- Added a
- The
IConnectionHandlerinterface now has the following methods: #981string GetWorkerId();List<string> GetWorkerAttributes();
- Added a
WorkerInWorldclass which inherits fromWorkerand adds ECS specific implementation details to theWorker. #981
Changed
- Moved the configuration of the Local Runtime IP from the GDK tools configuration window to the mobile launcher window.
Fixed
- Fixed a bug where invalid characters in your PATH elements would throw exceptions and break code generation. #986
- Fixed a regression in the
SetKinematicFromAuthoritySystemthat failed to toggle a rigidbody's kinematic state onTransformInternalauthority changes. #988 - Fixed a regression in the code generator where spaces in your path would cause code generation failures. #991
GDK for Unity Alpha Release 0.2.3
This release contains the upgrade to the latest Entities package and to Unity 2019.1.3. It also contains additional tooling for the development authentication flow and the BlittableBool struct has been removed.
Note: This release contains a breaking change. Our starter projects don't have a schema folder by default anymore. To ensure your own schema gets picked up correctly, open your project inside Unity.
From your Unity Editor menu, select SpatialOS > Gdk tools configuration. In the Schema sources section inside the Gdk tools configuration window, add your path to the list. Then re-generate the code by selecting SpatialOS > Generate code (force).
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
- Upgraded the project to be compatible with
2019.1.3f1(#951). Note that we do not support Unity2018.xanymore. - Schema from packages are no longer copied into the root
schemadirectory. #953- Renamed the
Schemadirectory within packages to.schema, to avoid generating unecessary.metafiles. - Update feature module schema to the correct namespaces and folders within
.schema. - If you use schema that imports from GDK packages, you will need to change how you import GDK schema.
- Schema file Y in package
improbable.gdk.Xis imported usingimport "improbable/gdk/X/Y.schema". - For example,
import "from_gdk_packages/com.improbable.gdk.core/common.schema";now becomesimport "improbable/gdk/core/common.schema";.
- Schema file Y in package
- Renamed the
- Upgraded the Unity Entities package to
preview.33frompreview.21. #963, #966, #967- See the Unity Entities package changelog for more information.
- This has removed several APIs such as
[Inject]andComponentDataArray. - If you use generic
IComponentDatatypes, you must explicitly register them. Please view Unity's example onRegisterGenericComponentTypein the changelog linked above. - System groups API has changed, systems without a group are automatically added to the
SimulationSystemGroupwhich runs onUpdate.- The Unity Editor will print helpful warnings if any systems are not grouped properly.
- Removed
BlittableBool, asboolis now blittable. #965 - Fixed a bug where the generated
ReceivedUpdatescomponent was not correctly wrapped in theDISABLED_REACTIVE_COMPONENTSdefine. #971- This means that if you have
DISABLE_REACTIVE_COMPONENTSset, theReceivedUpdatestypes will no longer be available.
- This means that if you have
Changed
- Moved Runtime IP from the
GdkToolsConfiguration.jsonto the Editor Preferences. #961 - Moved Dev Auth Token to the Player Preferences. #961
- Added a setting in
GdkToolsConfigurationto let users configure whether aDevAuthToken.txtshould be generated or not. - When launching Android cloud clients from the Editor, the DevAuthToken is now passed in as a command line argument.
- Added a setting in
- The schema descriptor is no longer deleted when you select
SpatialOS > Clean all workersfrom the Unity Editor. #969
Fixed
- Fixed a bug where a worker's
Worldcould get disposed multiple times if you stopped the application inside the Editor while the worker is being created. #952
Internal
- Removed the workaround for a schema component update bug (WRK-1031). #962
- All playground launch configuration files now use the
w2_r0500_e5template instead of thesmalltemplate which was deprecated. #968 - Disabled Burst compilation for all platforms except for iOS, because Burst throws benign errors when building workers for other platforms than the one you are currently using. #199
- Enabled Burst compilation for iOS, because disabling results in an invalid XCode project. #197
