SpatialOS GDK for Unity
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! 👇
Unity Web Request
built-in package to compile for iOS and Android.Snapshot
class with a duplicate entity ID now throws an exception. #1479
MeansImplicitUse
attribute to RequireAttribute
to reduce warnings in Rider IDE. #1462
Snapshot
class #1479
Contains(EntityId entityId)
method to check if snapshot already contains an EntityId
EntityId
, it will no longer return already used EntityId
s.Snapshot
now auto-adds Persistence
when adding entitiesSnapshot
now implements IDisposable
SystemBase
jobs. #1454
BuildContext
class. #1461
BuildContextSettings
struct, which is required by GetBuildContexts
.BuildConfig
class visibility from internal
to public
.BuildContext
.ComponentUpdateSystem.GetAuthorityChangesReceived()
were returned in order from newest to oldest. #1465
WorldCommandSender
. #1473
TextField
indentation issue in the Worker Inspector due to nested VisualElement
containers. #1480
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! 👇
Authority
field on Readers and Writers has been changed to HasAuthority
. It now returns a bool to indicate whether you have authority over the component it represents. #1364
GetAuthority
, GetComponent
, and HasComponent
. #1364
EntityManager
instead.AuthorityLossImminent
will now be dropped, and callbacks will no longer trigger.AuthoritativeEntityResolver
. The implementation was fundamentally flawed. #1453
MockConnectionHandler
. #1437
14.5.4
. #1446
IndexOutOfRangeException
that could be thrown when editing your 'Build Configuration' asset. #1441
ComponentDataFromEntity
of the WorkerSystem
. #1430
Is Kinematic
option. #1456
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! 👇
GetResponse<T>(CommandRequestId)
method in the IDiffCommandResponseStorage
and CommandSystem
now returns a T?
instead of MessageSpan<T>
#1428
PrefabPreprocessor
will now correctly find and preprocess your prefabs. #1438
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! 👇
IEntityGameObjectCreator.PopulateEntityTypeExpectations
now only needs to specify what SpatialOS components it needs for spawning an entity, such as Position
.GameObjectCreationHelper.EnableStandardGameObjectCreation
now requires a non-null EntityRepresentationMapping
to be passed in.map<k,v>
support to the Worker Inspector window. #1403
Open inspector V2
menu item that opens the new inspector in the browser. #1407
UseExternalIp
using the command line argument +useExternalIp
with the CommandLineConnectionParameterInitializer
. #1409
CommandLineParser
. #1409
Scripting Backend
option dropdown to the Build Configuration UI. #1411
Allow Debug
toggle to the Build Configuration UI. #1413
Authority
type field to IComponentMetaclass
. #1393
Spatial OS
. #1408
CommandSender
objects would not be made valid again after being re-injected. #1429
com.unity.test-framework
and com.unity.test-framework.performance
as dependencies to the io.improbable.gdk.testutils
package. #1416
manifest.json
.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! 👇
Assets/Generated/Editor
.EntityId
now implements IComparable<EntityId>
. #1375
ComponentDatabase
now exposes a non-generic GetComponentId(Type type)
static method. #1379
map<k, v>
fields. (This will come in a future release!) #1387 #1391 #1392 #1396 #1401
EntitySnapshot
objects. #1401
EntitySnapshot.Empty()
to create an empty EntitySnapshot
new EntitySnapshot(params ISpatialComponentSnapshot[] components)
to create and seed the EntitySnapshot
with some data.test-project
no longer contains illegal schema.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! 👇
WorkerConnector.HandleWorkerConnectionFailure
has been removed and WorkerConnector.Connect
now throws exceptions for connection errors instead. #1365
WorkerConnector
no longer destroys itself in Dispose
. #1365
MultiThreadedSpatialOSConnectionHandler
and SpatialOSConnectionHandlerBuilder.SetThreadingMode
have been removed. #1367
CommandRequestID
instead of long
. #1372
EntityTemplate
class which allow you to use ISpatialComponentSnapshot
s directly. #1360
WorldSelector
element. #1316
14.5.2
. #1373
EntityTemplate
class where calling AddComponent
with an EntityAcl.Snapshot
would incorrectly apply its write access #1360
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! 👇
com.unity.entities
packages to 0.9.1-preview.15
. #1339
SharedComponentData
, but instead a tag component.ComponentAuthority
has been renamed to HasAuthority
.HasAuthority
.UpdateInSubSystem
attribute has been removed.Snapshot
utility class. #1338
GetNextEntityId()
returns the next available entity ID.AddEntity(EntityId entityId, EntityTemplate entityTemplate)
adds an entity to the snapshot with a given entity ID.AddComponent
method to the EntityTemplate
class which does not require write-access to be given. #1338
PlayerHeartbeatInitializationSystem
to use the right components for filtering. #1352
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! 👇
DeploymentLauncher
project has an additional required argument runtime_version
. If you invoke this manually through dotnet
, you'll need to provide this argument. #1299
ComponentId
property. #1308
ComponentDatabase.GetComponentId<T>()
instead.CustomSpatialOSSendSystem
is no longer available. #1308
EntityId
in its CreatePlayerEntityTemplate
callback. #1315
(string clientWorkerId, byte[] serializedArguments)
to (EntityId entityId, string clientWorkerId, byte[] serializedArguments)
.PopulateEntityTypeExpectations
method to IEntityGameObjectCreator
. #1333
string entityType
as an argument to IEntityGameObjectCreator.OnEntityCreated
. #1333
Metadata
component to use the GameObject Creation Feature Module.CodeWriter
using just the raw string content. #1275
CodeWriter
API.CodegenJob
model. #1275
14.5.0
.
Dump()
method to CommandLineArgs
to format all the parsed command line arguments into a string. This can aid you in debugging issues relating to command line args. #1312
EntityReservationSystem
which automatically keeps a pool of reserved entity IDs. #1314
TakeAsync(count)
and GetAsync()
API can be used to obtain entity IDs for spawning, without needing callbacks.TryTake(count, out EntityId[])
and TryGet(out EntityId)
version which allows for reservations to fail.Info
to Trace
. #1277
14.5.0
. #1317
14.5.0
#1317
Reader
reference attempting to read data that does not exist in your worker's view anymore.Reader
due to QBI would break the monobehaviour that required it. #1326
CodegenJob
model. #1277
CodegenJob
model. #1276
ImprobableCodegen.marker
file. #1294
ViewDiff
and MessagesToSend
classes. #1290
ComponentDiffStorage
instances. #1290
Improbable.Gdk.Core.EntityId
is now a readonly struct. #1290
MockWorld
and MockBase
classes to the Improbable.Gdk.TestUtils
package. These are designed as a framework for testing Core code. #1305
ProfilerMarker
API. #1311
MockWorld.Options.AdditionalSystems
from Type[]
to Action<World>
. #1330
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! 👇
allow unsafe code
selected to compile. #1255
RedirectedProcess.WithArgs
API will now concatenate arguments, instead of replacing the previously provided arguments. #1260
AndroidLaunchUtils
to AndroidUtils
, and iOSLaunchUtils
to iOSUtils
. #1269
cn-production
environment.RedirectedProcess.Spatial
wrapper for calling the spatial
CLI. This wrapper automatically uses the current project environment. #1260
dotnet
CLI. #1256
Raknet
, Tcp
, and Kcp
network protocols have been deprecated. Please use ModularKcp
and ModularTcp
instead.ModularUdp
has been renamed to ModularKcp
.c-static-fullylinked-arm-clang-ios
to c-static-arm-clang-ios
.c-static-fullylinked-x86_64-clang-ios
to c-static-x86_64-clang-ios
.dotnet new
failing to run. #1262
schema_compiler
errors would be swallowed by the code generator. These should now appear in the Unity Editor and the log file as expected. #1266
CodeGenerationLib
has been migrated to the new CodeWriter
.init.sh
and init.ps1
now support the --china
and -china
flag respectively to download from the cn-production
environment. #1261
--force
flag to the CodeGenerator project to skip the dirty checks and re-generate everything. #1263
targetiOSSdk
commandline argument for CI builds for selecting either device
or simulator
target when building iOS. #1269
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! 👇
IPostprocessBuildWithReport
. #1228
WorkerBuilder.CurrentContext
field which contains all SpatialOS related build information.WithMaxFrequencyHz
method when building an InterestQuery
to define your query's frequency.