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
WorkerSystem
now exposes the underlying Worker'sIsConnected
property. #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
OnUpdate
callback on readers and writers. #1211
Internal
- Cleaned up Subscriptions and Callbacks. #1200
- Replaced usage of
GuardedAuthorityCallbackManagerSet
with more genericGuardedCallbackManagerSet
. - Removed unused
EntitySubscriptions
class. - 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 fromDynamic
toComponentDatabase
. #1173
Added
- Added commands and world commands tabs to the Network Analyzer window. #1174
Fixed
- Fixed a bug where the
TransformSynchronization
MonoBehaviour would not reset when disabled. #1169 - Fixed a bug where the
UnlinkGameObjectFromEntity
method in theEntityGameObjectLinker
would not cleanup thegameObjectToComponentsAdded
dictionary. #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.NetworkStats
namespace.
- 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
MonoBehaviour
s withWorkerType
attributes would not be enabled even if the owning worker's type was a match for theWorkerType
attribute. #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
WorkerType
attribute and its interplay with[Require]
fields in thetest-project
. #1147 - Refactored internals of code generation for modular codegen. #1151.
- Use
dotnet new
to generate a skeleton project then link in the various modules from each package. - This project is created in the
build/codegen
directory 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
PlayerConnection
ports 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.json
for 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
AnonymousAuthenticationPort
toLocatorPort
on theAlphaLocatorFlow
class and theRuntimeConfigDefaults
static class. #1105 - Upgraded to Worker SDK
14.0.1
. This brings a number of breaking changes. #1112Vector3f
andVector3d
are no longer available in the schema standard library.- The
Improbable.Coordinates.ToSpatialVector3d()
method has been removed. LocatorFlow
andAlphaLocatorFlow
have been merged.- The implementation of the old
LocatorFlow
has been removed. - The
ConnectionService.AlphaLocator
enum value has been removed.
- The
ProjectName
,SteamDeploymentTag
, andSteamTicket
constants have been removed from theRuntimeConfigNames
static class.
Added
- Added the ability to connect to an arbitrary host/port combo for the
AlphaLocatorFlow
. #1105 - Added a
SpatialdManager
class for managing local deployments withSpatialD
intoio.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
GenerateCode
class 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_COMPONENTS
symbol. #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
AlphaLocatorFlow
where the default implementation ofGetDevelopmentLoginTokens
did not respect the host/port fields. #1105 - Fixed a bug where
AlphaLocatorFlow.CreateAsync()
could deadlock. #1108
Internal
- Added tests for the
ReceptionistFlow
class. #1095 - Added tests for the
CommandLineConnectionFlowInitializer
class. #1096 - Added tests for the
CommandLineConnectionParametersInitializer
class. #1103 - Added
spot
downloading toinit.sh
&init.ps
into theio.improbable.worker.sdk
package. #1104 - Added tests for the
AlphaLocatorFlow
class. #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.EntityQuerySnapshot
toImprobable.Gdk.Core.EntitySnapshot
. TheImprobable.Gdk.Core.Commands.WorldCommands.EntityQuery.ReceivedResponse
has been updated accordingly. #1053 DynamicSnapshot
andDynamicConverter
have been collapsed intoDynamic
. #1053- The delegates from all of these classes are now available in the
Dynamic.VTable<TData, TUpdate, TSnapshot>
struct. Dynamic.IHandler.Accept
now takes aDynamic.Vtable<TData, TUpdate, TSnapshot
parameter.
- 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_COMPONENTS
to 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
WorkerOpFactory
from theio.improbable.gdk.testutils
package. Please use theMockConnectionHandler
in theio.improbable.gdk.core
package instead. #1085 - Removed the
TestMonoBehaviour
from theio.improbable.gdk.testutils
package. #1085
Added
- Added a
bool TryGetComponent<T>(out T component);
method to theSpatialOSEntity
struct. This can help reduce boilerplate when writing customIEntityGameObjectCreator
implementations. #1049 - Added the
void AddComponentSnapshot<T>(T componentSnapshot)
andbool TryGetComponent<T>(out T componentSnapshot)
methods to theImprobable.Gdk.Core.EntitySnapshot
struct. #1053 - Added a
EntitySnapshot GetEntitySnapshot()
method to theImprobable.Gdk.Core.EntityTemplate
class. #1053 - Added methods for conversion of
Coordinates
,EdgeLength
,FixedPointVector3
andCompressedQuaternion
to/from native UnityVector3
andQuaternion
types. #1063 - Added basic arithmetic and equality operators for the
EdgeLength
standard library type. #1063 - Added a new
io.improbable.gdk.debug
package which contains an inspector extension for viewing[Require]
states in the editor #1082
Changed
- Upgraded to Worker SDK 13.8.2. #1052
- The new
Entity
schema type is deserialized as anImprobable.Gdk.Core.EntitySnapshot
. #1053
- The new
- The conversion methods for
FixedPointVector3
andCompressedQuaternion
have been moved fromTransformUtils
to 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
, andLinkedGameObjectMap
types 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
SchemaObject
struct for easy serializing/deserializing of theEntity
schema 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.pinned
from the tools package. - Moved
DisableAutoCreationTests
into 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
buildTarget
command line argument tobuildEnvironment
. #1012 - All GDK packages now have an
io.improbable
prefix instead ofcom.improbable
. #894
Added
- Added the
LinkedGameObjectMap
class for finding theGameObject
(s) linked with a specifiedEntityId
. #1013- This can be used with the
[Require]
annotation to inject it into yourMonoBehaviours
provided you are using theGameObjectCreation
feature 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
buildTargetFilter
command 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.sdk
andio.improbable.worker.sdk.mobile
which contain the underlying Worker SDK packages for Windows/MacOS/Linux and Android/iOS respectively. #894 - You may now
[Require]
aWorkerId
in 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.IsOwningWorker
will now return false instead of throwing an exception if the entity is not in your worker's view.
Fixed
- Fixed a bug where
PlayerLifecycleHelper.IsOwningWorker
would 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
ForwardingDispatcher
now accepts aUnityEngine.LogType
instead ofImprobable.Worker.CInterop.LogLevel
as 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
Location
andVelocity
schema types have been replaced by theFixedPointVector3
type.- The location and velocity fields are now
Q21.10
fixed point values.
- The location and velocity fields are now
- The
Quaternion
schema type has been replaced by theCompressedQuaternion
type.- 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
DefaultWorkerConnector
andDefaultMobileWorkerConnector
classes have been removed. - The
WorkerConnector
has 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
WorkerConnector
has 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
WorkerConnector
has 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
Worker
class 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 theWorkerInWorld
class. - 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
, andAlphaLocatorConfig
structs have been removed. - The
WorkerSystem
no longer has apublic readonly Connection Connection;
field
- The
- The
CommandLineUtility
static class has been replaced with aCommandLineArgs
stateful class. #981 - The
ILogDispatcher
interface 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 theILogDispatcher
interface. #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 theWorkerSystem
class. #981 - Added a
IConnectionFlow
interface which describes how a connection can be created. #981- Added a
ReceptionistFlow
,LocatorFlow
, andAlphaLocatorFlow
which implementIConnectionFlow
.
- Added a
- Added a
IConnectionFlowInitializer<TConnectionFlow>
interface which describes how the parameters for a particular connection flow are initialized. #981- Added a
CommandLineConnectionFlowInitializer
which implementsIConnectionFlowInitializer<ReceptionistFlow>
,IConnectionFlowInitializer<LocatorFlow>
, andIConnectionFlowInitializer<AlphaLocatorFlow>
. - Added a
MobileConnectionFlowInitializer
which implementsIConnectionFlowInitializer<ReceptionistFlow>
andIConnectionFlowInitializer<AlphaLocatorFlow>
.
- Added a
- Added a
IConnectionParameterInitializer
which describes how the parameters for a worker connector are initialized. #981- Added a
CommandLineConnectionParameterInitializer
which implementsIConnectionParameterInitializer
. - Added a
MobileConnectionParametersInitializer
which implementsIConnectionParameterInitializer
.
- Added a
- The
IConnectionHandler
interface now has the following methods: #981string GetWorkerId();
List<string> GetWorkerAttributes();
- Added a
WorkerInWorld
class which inherits fromWorker
and 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
SetKinematicFromAuthoritySystem
that failed to toggle a rigidbody's kinematic state onTransformInternal
authority 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.x
anymore. - Schema from packages are no longer copied into the root
schema
directory. #953- Renamed the
Schema
directory within packages to.schema
, to avoid generating unecessary.meta
files. - 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.X
is 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.33
frompreview.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
IComponentData
types, you must explicitly register them. Please view Unity's example onRegisterGenericComponentType
in the changelog linked above. - System groups API has changed, systems without a group are automatically added to the
SimulationSystemGroup
which runs onUpdate
.- The Unity Editor will print helpful warnings if any systems are not grouped properly.
- Removed
BlittableBool
, asbool
is now blittable. #965 - Fixed a bug where the generated
ReceivedUpdates
component was not correctly wrapped in theDISABLED_REACTIVE_COMPONENTS
define. #971- This means that if you have
DISABLE_REACTIVE_COMPONENTS
set, theReceivedUpdates
types will no longer be available.
- This means that if you have
Changed
- Moved Runtime IP from the
GdkToolsConfiguration.json
to the Editor Preferences. #961 - Moved Dev Auth Token to the Player Preferences. #961
- Added a setting in
GdkToolsConfiguration
to let users configure whether aDevAuthToken.txt
should 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 workers
from the Unity Editor. #969
Fixed
- Fixed a bug where a worker's
World
could 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_e5
template instead of thesmall
template 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