Releases: spatialos/gdk-for-unity
GDK for Unity Alpha Release 0.4.0
In this release, we've introduced support for Unity 2020.1 and have changed component serialization to use Unity Jobs for that multi-threaded goodness! Along with these changes are the usual quality-of-life improvements and bug fixes!
In addition to code changes a new chapter has been added the Blank Project tutorial, guiding you on how to setup and configure the Transform Synchronization Feature Module. Click here to read more.
As this release has some breaking changes, please read the upgrade guide here.
Keep giving us your feedback and/or suggestions! Check out our Discord, our forums, or here in the Github issues!
See the full release notes below! 👇
Breaking Changes
- The minimum supported version of Unity is now 2020.1. #1459
- Upgraded Unity Entities to 0.14.0-preview.18. #1463
- Projects now require the
Unity Web Requestbuilt-in package to compile for iOS and Android.
- Projects now require the
- Adding an entity to the
Snapshotclass with a duplicate entity ID now throws an exception. #1479
Added
- Added
MeansImplicitUseattribute toRequireAttributeto reduce warnings in Rider IDE. #1462 - Added Event Tracing API. #1452
- Added tooltips to the SpatialOS Project Settings. #1470
- Added new features to the
Snapshotclass #1479- Added the
Contains(EntityId entityId)method to check if snapshot already contains anEntityId - Improved the search for next available
EntityId, it will no longer return already usedEntityIds. Snapshotnow auto-addsPersistencewhen adding entitiesSnapshotnow implementsIDisposable
- Added the
Changed
- Upgrade to Worker SDK v14.8.0. #1458
- Migrated launch configurations to latest game templates. #1457
- Multithreaded component serialization through
SystemBasejobs. #1454 - Upgrade Unity Burst to 1.3.5. #1467
- Removed outline and background around component info button in the Worker Inspector. #1468
- Refactored the
BuildContextclass. #1461- Introduced a
BuildContextSettingsstruct, which is required byGetBuildContexts. - Changed
BuildConfigclass visibility frominternaltopublic. - Added more testing around
BuildContext.
- Introduced a
Fixed
- Fixed an issue where authority changes returned by
ComponentUpdateSystem.GetAuthorityChangesReceived()were returned in order from newest to oldest. #1465 - Fixed a bug where the build system would throw a null reference exception if you don't have a configuration for a worker type. #1461
- Fixed an incorrect callback registration for entity creation/removal in the
WorldCommandSender. #1473 - Fixed the
TextFieldindentation issue in the Worker Inspector due to nestedVisualElementcontainers. #1480
GDK for Unity Alpha Release 0.3.10
In this release, we've removed APIs for AuthorityLossImminent as the feature has been deprecated from SpatialOS. This means all authority changes to AuthorityLossImminent are dropped and relevant callbacks will no longer trigger. The Authority field on Readers and Writers has been changed to a boolean HasAuthority.
The GetAuthority, GetComponent and HasComponent methods have been removed from the ComponentUpdateSystem. You should use the EntityManager instead.
We've also changed the .NET Core dependency to v3.1.3xx (from v2.2.2xx), updated the pinned Runtime version to 14.5.4 and added an assortment of bug fixes to the build configuration asset, the WorkerSystem and the Transform Sync Feature Module.
In addition to code changes, a new chapter has been added the Blank Project tutorial guiding new users on how to create a new type of entity, update a snapshot to spawn entities of this type, and how to dynamically spawn entities at Runtime.
As this release has plenty of breaking changes, please read the upgrade guide here.
Keep giving us your feedback and/or suggestions! Check out our Discord, our forums, or here in the Github issues!
See the full release notes below! 👇
Breaking Changes
- The
Authorityfield on Readers and Writers has been changed toHasAuthority. It now returns a bool to indicate whether you have authority over the component it represents. #1364- This no longer supports AuthorityImminentLoss.
- ComponentUpdateSystem no longer has the API
GetAuthority,GetComponent, andHasComponent. #1364- Use the Unity Entities
EntityManagerinstead.
- Use the Unity Entities
- The GDK now depends on .NET Core v3.1.3xx instead of v2.2.2xx. #1443
- Removed APIs for AuthorityLossImminent. #1451
- All authority changes to
AuthorityLossImminentwill now be dropped, and callbacks will no longer trigger.
- All authority changes to
- Removed the
AuthoritativeEntityResolver. The implementation was fundamentally flawed. #1453
Added
- Added capability to test commands through the
MockConnectionHandler. #1437
Changed
- Updated the pinned Runtime version to
14.5.4. #1446
Fixed
- Fixed an
IndexOutOfRangeExceptionthat could be thrown when editing your 'Build Configuration' asset. #1441 - The 'Build Configuration' Inspector window will no longer report your Android SDK installation as missing if you have a completely fresh Unity installation with the bundled Android SDK. #1441
- Fixed a bug where having spaces in the path to your project would cause the 'Local launch' and 'Launch standalone client' menu options to fail on MacOS. #1442
- Fixed a faulty sync point caused by using
ComponentDataFromEntityof theWorkerSystem. #1430 - Fixed a bug where the Transform Sync Feature Module would not correctly apply the
Is Kinematicoption. #1456
Internal
GDK for Unity Alpha Release 0.3.9
This release fixes a major bug introduced in 0.3.8. We advise users of 0.3.8 to upgrade immediately.
In this release, we've fixed a major bug introduced in 0.3.8 where the PrefabPreprocessor would not find and preprocess your prefabs.
There is a breaking change to the CommandSystem, with the GetResponse<T>(CommandRequestId) method now returning a T? instead of MessageSpan<T>. We've also upgraded to the latest Worker SDK 14.7.0 and improved the code generator's CodeWriter API.
This release also includes some bug fixes to the Worker Inspector and Build System.
Keep giving us your feedback and/or suggestions! Check out our Discord, our forums, or here in the Github issues!
See the full release notes below! 👇
Breaking Changes
- The
GetResponse<T>(CommandRequestId)method in theIDiffCommandResponseStorageandCommandSystemnow returns aT?instead ofMessageSpan<T>#1428
Added
- Added support for multiple annotations in Code Writer API. #1427
- Prevent building workers with Unity Editor compile errors. #1425
Changed
- Upgrade to Worker SDK v14.7.0. #1434
Fixed
- Fixed a bug where the entity list in the Worker Inspector does not refresh when switching to a worker with no entities checked out #1432
- Build targets which are marked as 'Build', but not 'Required' are now properly skipped if build support is not installed. #1435
- The
PrefabPreprocessorwill now correctly find and preprocess your prefabs. #1438
GDK for Unity Alpha Release 0.3.8
In this jam-packed release, we've changed how the GameObject Creation module maps entities to prefabs by introducing asset-based entity representation. This means that you no longer need to edit code to define the mapping between an entity type and the prefab used to represent it.
We've also officially removed Windows x86 support.
The Worker Inspector now supports viewing map<k,v> fields, and a context menu (right-click) option to hide empty collections. This may be useful when browsing complex components such as Interest or EntityAcl.
You can now set the UseExternalIp connection parameter using the +useExternalIp command line argument.
The GDK Tools Configuration has been moved from its own window into a Spatial OS section under the Unity Project Settings. In addition, the Build Configuration UI now allows you to set the Scripting Backend and Allow Debug options.
Alongside the new features above, we've fixed a bug with CommandSenders not being re-validated and solved a minor indentation issue with generated code.
There are a several breaking changes in this release, so please make sure to read the upgrade guide.
Keep giving us your feedback and/or suggestions! Check out our Discord, our forums, or here in the Github issues!
See the full release notes below! 👇
Breaking Changes
- All generated C# enums will now start from 0, being shifted to schema values on serialization and shifted back to C# values on deserialization. #1412
- A warning will be generated when enums defined in schema do not start from 0.
- Removed Windows x86 build support. #1421
- GameObject Creation feature module now links entity types with prefabs through EntityRepresentationMapping assets. #1393
- See the upgrade guide for detailed upgrade instructions for this breaking change.
IEntityGameObjectCreator.PopulateEntityTypeExpectationsnow only needs to specify what SpatialOS components it needs for spawning an entity, such asPosition.GameObjectCreationHelper.EnableStandardGameObjectCreationnow requires a non-nullEntityRepresentationMappingto be passed in.
Added
- Added
map<k,v>support to the Worker Inspector window. #1403 - Added
Open inspector V2menu item that opens the new inspector in the browser. #1407 - Added the option to set
UseExternalIpusing the command line argument+useExternalIpwith theCommandLineConnectionParameterInitializer. #1409 - Added support for flag arguments in
CommandLineParser. #1409 - Added
Scripting Backendoption dropdown to the Build Configuration UI. #1411 - Added
Allow Debugtoggle to the Build Configuration UI. #1413- Enabling the option allows .NET debuggers (Rider/Visual Studio) to use breakpoints while in the Unity Player.
- Added
Authoritytype field toIComponentMetaclass. #1393 - Added info button on the component details in the Worker Inspector Window that prints ComponentID and schema filepath to log #1423
- Added an option to hide empty collections in worker inspector through a context menu (right-click). #1417
Changed
- Moved Gdk Tools Configuration to the Unity "Project Settings" window under
Spatial OS. #1408
Fixed
- Fixed a bug in the Worker Inspector where component foldouts were being rendered too often, causing poor performance when the entity had many components or very complex components. #1403
- Fixed minor indentation issue in generated code caused by newline formatting. #1424
- Fixed a bug where
CommandSenderobjects would not be made valid again after being re-injected. #1429
Internal
- Added
com.unity.test-frameworkandcom.unity.test-framework.performanceas dependencies to theio.improbable.gdk.testutilspackage. #1416- In addition, both packages have been removed from the playground
manifest.json.
- In addition, both packages have been removed from the playground
GDK for Unity Alpha Release 0.3.7
In this release, we've added a new "Worker Inspector" Editor window which displays information such as worker flags, worker ID and worker type. It also shows the entities each worker has checked out as well as the components on said entities.
In addition, the window shows each component's data, with the exception of map<k, v> fields, and whether the worker is authoritative over it.
We've also fixed a memory corruption that occurs in SpatialOS components with more than 16 fields.
Keep giving us your feedback and/or suggestions! Check out our Discord, our forums, or here in the Github issues!
See the full release notes below! 👇
Added
- Added a "C# Editor Output Directory" field to the GDK Tools Configuration. #1376
- This specifies where Editor-only code is generated to.
- This defaults to
Assets/Generated/Editor.
EntityIdnow implementsIComparable<EntityId>. #1375- The
ComponentDatabasenow exposes a non-genericGetComponentId(Type type)static method. #1379 - Added a new "Worker Inspector" Editor window. #1375 #1379 #1382
- This window displays worker information like: worker flags, worker ID, and worker type.
- This window also displays the entities that a worker has checked out.
- For each entity checked out, you can view the components on that entity and whether the worker is authoritative over that component.
- Each component can have an icon associated with it, set through a schema annotation. #1385
- Each component's data will also be rendered in the Worker Inspector, with the exception of
map<k, v>fields. (This will come in a future release!) #1387 #1391 #1392 #1396 #1401
- Added two ways to instantiate valid
EntitySnapshotobjects. #1401EntitySnapshot.Empty()to create an emptyEntitySnapshotnew EntitySnapshot(params ISpatialComponentSnapshot[] components)to create and seed theEntitySnapshotwith some data.
Fixed
- Fixed memory corruption in SpatialOS components with more than 16 fields. #1378
Internal
- Added tests in code generator for name clashes. #1380
- The
test-projectno longer contains illegal schema.
- The
GDK for Unity Alpha Release 0.3.6
In this release we've updated the GDK Tools Configuration window to autosave, and added the ability to select a specific cluster for deployments in the Deployment Launcher.
Invalid JSON is now logged if there is an error parsing codegen output. Alongside this, you can find an assortment of bug fixes to Editor tooling.
We've also made a few breaking changes to the worker connector and command IDs, so please read the upgrade guide.
Keep giving us your feedback and/or suggestions! Check out our Discord, our forums, or here in the Github issues!
See the full release notes below! 👇
Breaking Changes
WorkerConnector.HandleWorkerConnectionFailurehas been removed andWorkerConnector.Connectnow throws exceptions for connection errors instead. #1365WorkerConnectorno longer destroys itself inDispose. #1365MultiThreadedSpatialOSConnectionHandlerandSpatialOSConnectionHandlerBuilder.SetThreadingModehave been removed. #1367- Command request IDs are now typed as
CommandRequestIDinstead oflong. #1372
Added
- Added the ability to select a specific cluster for deployments in the Deployment Launcher. #1357
- You can select either a region or a cluster, but not both!
- Added non-generic overloads for the
EntityTemplateclass which allow you to useISpatialComponentSnapshots directly. #1360 - Extracted the world selection UI element from the Network Analyzer window to a
WorldSelectorelement. #1316
Changed
- GDK Tools Configuration window now autosaves. #1356
- The SpatialOS Runtime version has been updated to
14.5.2. #1373
Fixed
- Invalid JSON is now logged if there is an error parsing the codegen output. #1353
- The Mobile Launcher will no longer break if Android build support is not installed. #1354
- Fixed a bug in the
EntityTemplateclass where callingAddComponentwith anEntityAcl.Snapshotwould incorrectly apply its write access #1360 - The Deployment Launcher will now generate Dev Auth Tokens using the environment specified in the GDK Tools Configuration. #1366
- Fixed a bug where the Network Analyzer window would throw exceptions after being opened. #1316
Internal
GDK for Unity Alpha Release 0.3.5
In this release, we've updated the minimum supported version of Unity to 2019.3 and upgraded the com.unity.entities packages to 0.9.1-preview.15. With this, Burst compilation is now available for all PC platforms.
We've also upgraded to the latest Worker SDK, added a couple of methods to the Snapshot utility class and now allow headless development builds for Linux.
Note that there are a few breaking changes, so please read the upgrade guide.
Keep giving us your feedback and/or suggestions! Check out our Discord, our forums, or here in the Github issues!
See the full release notes below! 👇
Breaking Changes
- The minimum version of Unity that the GDK supports is now 2019.3. You need to upgrade your Unity project. #1336
- Upgraded the
com.unity.entitiespackages to0.9.1-preview.15. #1339- Authority in ECS is no longer a
SharedComponentData, but instead a tag component. ComponentAuthorityhas been renamed toHasAuthority.- No need to filter your ECS query anymore, instead match for
HasAuthority. - The
UpdateInSubSystemattribute has been removed. - Built-in Unity AssetBundle and UI Elements modules are now required.
- Burst is now enabled for all PC platforms.
- Component replication will no longer attempt to replicate components the worker does not have authority over.
- Authority in ECS is no longer a
Added
- Added new methods to
Snapshotutility class. #1338GetNextEntityId()returns the next available entity ID.AddEntity(EntityId entityId, EntityTemplate entityTemplate)adds an entity to the snapshot with a given entity ID.
- Added an additional
AddComponentmethod to theEntityTemplateclass which does not require write-access to be given. #1338- This allows users to add undelegated components on entities.
- Added debug names to entities shown in EntityDebugger. #1342
Changed
Fixed
- Fix
PlayerHeartbeatInitializationSystemto use the right components for filtering. #1352
Internal
GDK for Unity Alpha Release 0.3.4
In this release, we've moved from using chunk-based interest to using query-based interest by default.
To help you with this, we've added an EntityReservationSystem which automatically keeps a pool of reserved entity IDs. The Player Lifecycle module has been integrated with this system, providing the CreatePlayerEntityTemplate callback with the entity ID that the player will have after it is successfully spawned.
This is particularly useful for defining interest queries that are self-referential.
As QBI lets you filter for components a worker should be interested in, the GameObject Creation module has been changed to run for entities that match the minimum component set required by a IEntityGameObjectCreator, instead of any entity that is newly added.
This means that the module no longer cares if an entity is checked out in one frame or across multiple.
In addition, the GDK now lets you pin a runtime version that you wish to use. Initially this has been set to 14.5.0, but you can override this in the GDK Tools Configuration.
We've also included our usual assortment of bug fixes.
Note that this release includes several breaking changes. Please read the upgrade guide here.
Keep giving us your feedback and/or suggestions! Check out our Discord, our forums, or here in the Github issues!
See the full release notes below! 👇
Breaking Changes
- The
DeploymentLauncherproject has an additional required argumentruntime_version. If you invoke this manually throughdotnet, you'll need to provide this argument. #1299 - Schema components in ECS no longer have a
ComponentIdproperty. #1308- You should use
ComponentDatabase.GetComponentId<T>()instead.
- You should use
CustomSpatialOSSendSystemis no longer available. #1308- The Player Lifecycle feature module now provides an
EntityIdin itsCreatePlayerEntityTemplatecallback. #1315- You will have to change your callback from
(string clientWorkerId, byte[] serializedArguments)to(EntityId entityId, string clientWorkerId, byte[] serializedArguments).
- You will have to change your callback from
- Added the
PopulateEntityTypeExpectationsmethod toIEntityGameObjectCreator. #1333- Use this method to define the set of components expected on an entity to be able create GameObjects for a given entity type.
- Added
string entityTypeas an argument toIEntityGameObjectCreator.OnEntityCreated. #1333- This means that your entities must have the
Metadatacomponent to use the GameObject Creation Feature Module.
- This means that your entities must have the
Added
- Added ability to construct a
CodeWriterusing just the raw string content. #1275- This will override anything defined through the ergonomic
CodeWriterAPI.
- This will override anything defined through the ergonomic
- Introduced a new
CodegenJobmodel. #1275 - The SpatialOS Runtime version is now pinned by the GDK. This has been initially set to
14.5.0.- You can override this version in the GDK Tools Configuration. #1289
- This version (or your override) will be used in both local deployments started through the editor and cloud deployments started through the Deployment Launcher.
- The currently selected version will be displayed in the Deployment Launcher. #1302
- Added a
Dump()method toCommandLineArgsto format all the parsed command line arguments into a string. This can aid you in debugging issues relating to command line args. #1312 - Added the
EntityReservationSystemwhich automatically keeps a pool of reserved entity IDs. #1314- The system's
TakeAsync(count)andGetAsync()API can be used to obtain entity IDs for spawning, without needing callbacks. - There is also a non-async
TryTake(count, out EntityId[])andTryGet(out EntityId)version which allows for reservations to fail.
- The system's
Changed
- Downgraded the level of several code generator logs from
InfotoTrace. #1277 - Upgraded the Worker SDK to
14.5.0. #1317 - Upgraded the Platform SDK used by the Deployment Launcher to
14.5.0#1317 - Changed the GameObject Creation module to run for entities that match the minimum component set required by the creator, instead of any entity that is newly added.
- This means that the module no longer cares if an entity is checked out in one frame or across multiple.
Fixed
- Fixed a bug where code generation would happen on every Unity compilation, despite the code generator returning successfully. #1294
- Fixed a bug where dotnet output from the code generator would cause exceptions to be thrown. #1294
- Fixed a bug where the Mobile Launcher window wouldn't find Android devices that contained hyphens in their product name. #1288 #1296
- Fixed a bug where component events were not dropped properly when the entity-component pair was removed from the View. [#1298])(#1298)
- Fixed a bug where Reader/Writer/CommandSender/CommandReceiver fields would not have their state set to invalid when the underlying constraints were not met. #1297
- This bug would manifest itself in situations like a
Readerreference attempting to read data that does not exist in your worker's view anymore.
- This bug would manifest itself in situations like a
- Fixed the Mobile Launcher being unable to find the Android SDK when using the embedded installation. #1319
- Fixed a bug where losing a
Readerdue to QBI would break the monobehaviour that required it. #1326
Removed
- Removed the old
CodegenJobmodel. #1277
Internal
- Ported all modules to the new
CodegenJobmodel. #1276 - Running forced code generation now deletes the
ImprobableCodegen.markerfile. #1294 - Added tests coverage for the interaction between unlinking a GameObject and Reader/Writer/CommandSender/CommandReceiver state. #1295
- Reduce complexity in
ViewDiffandMessagesToSendclasses. #1290 - De-duplicated code for generated
ComponentDiffStorageinstances. #1290 Improbable.Gdk.Core.EntityIdis now a readonly struct. #1290- The Playground project now uses QBI instead of CBI. #1370
- Added
MockWorldandMockBaseclasses to theImprobable.Gdk.TestUtilspackage. These are designed as a framework for testing Core code. #1305 - Switched internal profiling to use new
ProfilerMarkerAPI. #1311 - Changed
MockWorld.Options.AdditionalSystemsfromType[]toAction<World>. #1330
GDK for Unity Alpha Release 0.3.3
In this release, we've added support for the cn-production environment, upgraded to the latest Worker SDK 14.4.1, and introduced a public toolkit for writing code generators.
The GDK will automatically generate valid run configurations for the code generator that work with Jetbrains Rider, Visual Studio, and the dotnet CLI. This means that you no longer need to keep the Unity Editor constantly open to iterate on generators.
We've also fixed a couple of annoying code generator issues, and a bug where build targets not marked as required weren't actually skipped if the user did not have the build support installed.
There are a few breaking changes in this release, so please follow the upgrade guide to resolve any issues.
Keep giving us your feedback and/or suggestions! Check out our Discord, our forums, or here in the Github issues!
See the full release notes below! 👇
Breaking Changes
- Your generated code Assembly Definition file now needs to have
allow unsafe codeselected to compile. #1255 - The
RedirectedProcess.WithArgsAPI will now concatenate arguments, instead of replacing the previously provided arguments. #1260 - Building for Android clients now requires the Android NDK to be installed and configured on your machine. #1265
- Renamed
AndroidLaunchUtilstoAndroidUtils, andiOSLaunchUtilstoiOSUtils. #1269
Added
- Added public toolkit for writing code generators. #1240 #1243 #1244 #1245 #1250
- Added support for the
cn-productionenvironment. - Added
RedirectedProcess.Spatialwrapper for calling thespatialCLI. This wrapper automatically uses the current project environment. #1260 - Added generation of code generator run configurations for Jetbrains Rider, Visual Studio, and the
dotnetCLI. #1256- This means you no longer need to keep the Unity Editor constantly open to iterate on generators.
- The code generator now logs an error when an input schema source directory does not exist. #1256
Changed
- Upgrade to Worker SDK v14.4.0. #1260
- The
Raknet,Tcp, andKcpnetwork protocols have been deprecated. Please useModularKcpandModularTcpinstead. ModularUdphas been renamed toModularKcp.
- The
- Changed the Worker SDK package installed for iOS. #1268
- Changed
c-static-fullylinked-arm-clang-iostoc-static-arm-clang-ios. - Changed
c-static-fullylinked-x86_64-clang-iostoc-static-x86_64-clang-ios.
- Changed
- Upgrade to Worker SDK v14.4.1. #1274
Fixed
- Fixed a bug where build targets which were not marked as required were not skipped if the user did not have the build support installed. #1257
- Fixed a bug where code generation would fail due to
dotnet newfailing to run. #1262 - Fixed a bug where
schema_compilererrors would be swallowed by the code generator. These should now appear in the Unity Editor and the log file as expected. #1266
Internal
- Implemented a new CodeWriter in the code generator which provides a fluent interface for generating C# code. #1237
- The
CodeGenerationLibhas been migrated to the newCodeWriter.
- The
- Added support for defining namespaces, structs, classes, enums and methods in the new CodeWriter. #1239
- Ported test-project to new CodeWriter. #1241
- Ported build system module to new CodeWriter. #1242
- Ported gameobject creation module to new CodeWriter. #1247
- Ported core module to new CodeWriter. #1247 #1248 #1249 #1251 #1252 #1253
- Removed all Text Template Transformation Toolkit (T4) references and dependencies. #1254
- Simplified dirtyBits logic and code generation #1255
- The DeploymentLauncher now uses Platform SDK v14.4.0. #1260
init.shandinit.ps1now support the--chinaand-chinaflag respectively to download from thecn-productionenvironment. #1261- Simplified code generation for Command classes and relevant interfaces. #1263
- Added
--forceflag to the CodeGenerator project to skip the dirty checks and re-generate everything. #1263 - Added the
targetiOSSdkcommandline argument for CI builds for selecting eitherdeviceorsimulatortarget when building iOS. #1269
GDK for Unity Alpha Release 0.3.2
In this release, we've added support for Unity build callbacks such as IPostprocessBuildWithReport, and enabled support for QBI frequency in the QBI Helper Module! 🎉
We've also fixed an issue where empty lists, maps, or options in a component update would not be applied properly. 😅
Keep giving us your feedback and/or suggestions! Check out our Discord, our forums, or here in the Github issues!
See the full release notes below! 👇
Added
- Added support for Unity build callbacks such as
IPostprocessBuildWithReport. #1228- During a build you can now access the
WorkerBuilder.CurrentContextfield which contains all SpatialOS related build information.
- During a build you can now access the
- Enabled support for QBI frequency in the QBI Helper Module. #1231
- Use the
WithMaxFrequencyHzmethod when building anInterestQueryto define your query's frequency.
- Use the


