Get SpatialOS

Sites

Menu

Release notes for SpatialOS version 11

Note: SpatialOS 11 is fine for local development and deployments using the small deployment template, but deployments using larger templates may be unstable.

11.0.2

Released on 2017-08-07

New features

Unity SDK

  • Added an optional callback, OnConnectionFailed, which is triggered if SpatialOS.Connect() fails to connect.

    (Previously, OnDisconnected was incorrectly called in this situation; that’s now been fixed.)

Fixes

Unity SDK

  • Fixed a coroutine issue that caused pre-caching to fail when using SpatialOS.AssetsToPrecache.
  • Fixed a configuration issue where UsePrefabPooling had to be true in order to pre-cache or pre-pool prefabs.

  • Previously, when SpatialOS.Connect() failed to connect, OnConnected callbacks were triggered incorrectly. Now, OnConnected callbacks are only triggered when SpatialOS.Connect() successfully connects.

    Note: If you were cleaning up failed connections in an OnConnected callback, you need to move this to an OnFailedConnection callback.

  • Previously, when SpatialOS.Connect() failed to connect, OnDisconnected callbacks were triggered incorrectly.

    Now, OnDisconnected callbacks are only triggered when disconnecting from a connected worker - and no longer when SpatialOS.Connect() fails.

    To register callbacks for when SpatialOS.Connect() fails, use the new optional callback OnConnectionFailed.

    Note: If you were cleaning up failed connections in an OnDisconnected callback, you need to move this to an OnFailedConnection callback.

  • Removed an asset loading bug that causes the following error message in client workers started from the Launcher: Exception: No artifacts found at https://api.spatial.improbable.io/assembly_content/v3/<project>/<assembly>/artifacts.

  • The code generation no longer regenerates files for schemas that already have their output files generated.

Unreal SDK

  • Fixed a memory leak that happened when sending SpatialOS commands.
  • Fixed an issue where it wasn’t possible to find out the reason for an entity creation failure.
  • Fixed an issue where the correct include files were not included in generated USpatialOSComponent files.
  • Implemented a workaround in order to avoid an Unreal Engine bug which causes a compilation error in Blueprint delegates upon hot reload.
  • Previously, when USpatialOS::Connect() failed to connect, OnDisconnected callbacks were triggered incorrectly.

    Now, OnDisconnected callbacks are only triggered when disconnecting from a connected worker - and no longer when USpatialOS::Connect() fails.

    To register callbacks for when USpatialOS::Connect() fails, use the optional callback OnConnectionFailed.

    Note: If you were cleaning up failed connections in an OnDisconnected callback, you need to move this to an OnFailedConnection callback.

  • The code generation no longer regenerates files for schemas that already have their output files generated.

Breaking changes

Unreal SDK

  • Command result delegate types declared in Commander.h are now in global namespace in order to work around a UE4 limitation. Please change any references to these types accordingly. For example, UCommander::FReserveEntityIdResultDelegate needs to be changed to FReserveEntityIdResultDelegate.
  • The delegate signatures for command responses have been changed. Wherever you have a command response delegate, you now need to include "SpatialOSCommandResult.h".
    • Change function signatures that bind to entity creation response delegates from void FunctionName(bool success, const FString& errorMessage, FEntityId reservedEntityId)to void FunctionName (const FSpatialOSCommandResult& Result, FEntityId CreatedEntityId).
    • Change function signatures that bind to reserve entity id response delegates from void FunctionName(bool success, const FString& errorMessage, FEntityId createdEntityId) to void FunctionName (const FSpatialOSCommandResult& Result, FEntityId ReservedEntityId).
    • Change function signatures that bind to delete entity response delegates from void FunctionName (bool success, const FString& errorMessage) to void FunctionName (const FSpatialOSCommandResult& Result).
    • For a command that you define yourself in a schema (e.g. command TestCommandResponse test_command(TestCommandRequest)) make sure to change your delegate function in Unreal from void FunctionName(UTestCommandResult* result) to void FunctionName(const FSpatialOSCommandResult& Result, UTestCommandResponse* Response).
    • You may also need to change the corresponding blueprint nodes if you are using them. Blueprint nodes for command response callbacks now have two output nodes: One for the result object containing info about the status, and one for the response object.
  • SpatialOS no longer generates a separate UCLASS for each command in order to store the result of the operation. This means there are no longer any classes such as UTestCommandResult.h (where Test is the command name). Remove any references and #include statements to such classes and use FSpatialOSCommandResult instead.

Deprecations

Unity SDK

  • WorkerConfiguration.AppName is now deprecated. Please use WorkerConfiguration.ProjectName instead. Please also start using the +projectName command line argument for starting a Unity worker instead of +appName.

11.0.1

Released on 2017-07-19

New features

Unreal SDK

  • Added a Blueprint function “Get Error Code” that can be used to retrieve error codes from command results.
  • Added an optional parameter commandDelivery for sending entity commands. The default value is ROUNDTRIP, which means the update will send commands over the network. If it’s set to SHORT_CIRCUIT, an Unreal worker will attempt to short-circuit entity commands if possible by not sending them over the network. This will happen only if the receiving entity is on the current worker and the worker is authoritative over the receiving entity. This setting is off by default and can be set on a per function call basis. Short-circuiting commands can lead to performance improvements but comes with weaker delivery guarantees. For more information, please see command properties.
  • The entity registry is now available both from blueprint and C++, enabling calls the functions RegisterEntityBlueprints, AddToRegistry, RemoveFromRegistry, GetEntityIdFromActor and GetActorFromEntityId via your blueprint assets.

Fixes

Spatial CLI tools

  • Removed spurious checks for JAVA_HOME and javac, which are no longer required as of SpatialOS 11.

Unity SDK

  • Fixed a bug in the GameObjectFromAssetBundleLoader which caused asset loading to fail when ‘local asset streaming’ was enabled.

  • You can again assign individual property values to Coordinate types using the accessors .X, .Y, .Z.

  • You can now generate snapshot files without having to build your worker at least once before.

Unreal SDK

  • Fixed a bug where components could be created without their initial data applied.
  • Unreal managed workers for Linux now write logs and crashdumps to /improbable-logs/UnrealWorker/Logs/Epic (accessed via raw logs from the inspector).
  • #include <string> is now added wherever List, Map or Option are using std::string in generated types.
  • List, Map and Option function arguments are now const references where applicable.

C# SDK

  • The snapshot save and load APIs can now handle snapshots larger than 2GiB (uncompressed) in size.

C++ SDK

  • The snapshot save and load APIs can now handle snapshots larger than 2GiB (uncompressed) in size.

Java SDK

  • The snapshot save and load APIs can now handle snapshots larger than 2GiB (uncompressed) in size.

Breaking changes

Unreal SDK

  • Command for Linux managed worker in spatialos.UnrealWorker.worker.json should always be StartServer.sh.
  • The argument list for Linux managed workers has changed and requires the first argument to be ${IMPROBABLE_WORKER_ID} and the second argument to be <projectname>Server. The log=${IMPROBABLE_LOG_FILE} argument should no longer be used in the argument list for Linux managed workers.
  • Unreal types FString and FVector are now passed by const reference into function delegates instead of being passed by value. You may need to update your callback function signatures.

11.0.0

Released on 2017-07-06

New features

General

Improved build times: removing the GSim should significantly speed up the time taken to build, local launch, and cloud launch.

Schema

  • Added several new components to the standard schema library, which you should start using:

    • improbable.Position defines the canonical position of an entity for load-balancing, authority assignment, and spatial query purposes.

      You should use this to replace any user-defined component that stores an entity’s position (using the EntityPosition built-in type).

    • improbable.Persistence gives control over which entities are persisted in snapshots. Entities with this component will be persisted in snapshots; entities without it won’t.

      You should add this component to all entities you want to persist, which is likely to be most or all of them.

      Note that you won’t be able to add an entity to a snapshot (using the snapshot APIs) unless it has this component.

    • improbable.Metadata contains a single string entity_type field. It’s used in the Unity SDK to specify which prefab is associated with an entity, and is also used to categorise entities in the Inspector.

      This replaces the old prefab concept.

All of the above components and types are defined in improbable/standard_library.schema. To use them in a schema file, use the line import "improbable/standard_library.schema";.

For more information about the new components, see the standard schema library page.

  • New types improbable.Vector3f and improbable.Vector3d have been added as schema types under the namespace improbable. To include them in a schema file, use the line import "improbable/vector3.schema".

Unity SDK

  • Added a new MergeAcl extension method on the Improbable.Worker.Entity class for merging in changes to an entity’s ACLs. See the Unity SDK ACLs page for more information.
  • Added a new EntityBuilder in Improbable.Unity.Entity which provides a simpler entity creation process. See the Create an entity template page for information about how to use this.

Unreal SDK

  • Introduced the helper class USpatialOSConversionFunctionLibrary which provides functions for converting between SpatialOS types and Unreal types.
  • Introduced the new entity pipeline which replaces the old FEntitySpawner class. This includes an implementation which provides a more robust spawning mechanism out of the box.

  • FEntitySpawner has been replaced by the new Entity Pipeline system that allows for much greater control over how entities are spawned and removed from the world.

  • Added a new UCallbackDispatcher class that greatly improves the efficiency of component update and authority change callbacks.

  • Improved error message when spatial.exe is not found in PATH when trying to build.

  • Blueprints and generated code for EntityId now use the new wrapper type FEntityId instead of int.

  • When you patch Unreal Engine, you no longer need the root user check for Linux.

  • Added a new FEntityBuilder in the improbable::unreal namespace which provides a simpler entity creation process. See the Create an entity page for information about how to use this.

C# SDK

  • A new struct type, Improbable.Worker.Bytes, now represents schema bytes fields. This type properly supports structural equality and hash-code.
  • C# code generation is now more efficient, and in the future won’t depend on protobuf-net. This shouldn’t cause any issues, but if you need to use the old code generation, pass the --language=csharp_deprecated flag (rather than --language=csharp) when running spatial schema.

C++ SDK

  • The spatial schema experimental code generation --language=cpp_dynamic has been promoted to --language=cpp, and no longer depends on protobuf generated code. Protobuf code will no longer be generated along with the SpatialOS generated code. The old --language=cpp backend has been removed.

Fixes

Unity SDK

  • Fixed the worker package naming for the iOSBuildTools editor addons so that it matches the instructions in the documentation.

Unreal SDK

  • Fixed an issue where container classes that store EntityId objects were not generating the right include files.
  • Fixed support for connecting local workers to cloud deployments using external IPs.

Breaking changes

General

  • The GSim (a legacy worker type), which has been deprecated since SpatialOS 9, is no longer supported, and gsim generated build scripts have been removed.
  • TinyClient and TinyEngine have been removed, along with scala_exe generated build scripts.
  • CoreLibrary has been removed, including the CoreLibrary schema, and unity_corelibrary generated build scripts.
  • The WorkerSdkSchema dependency specified in spatialos.json has been renamed to standard_library.
  • The IMPROBABLE_RECEPTIONIST_IP placeholder in worker launch configurations has been renamed to IMPROBABLE_RECEPTIONIST_HOST.

Schema

  • Entities are no longer persisted in snapshots by default. Add the new improbable.Persistence standard library component to all entities you want persisted in snapshots (which should be most of them).
  • The structure of the EntityAcl standard library component has been simplified to remove unnecessary nesting. In particular:
    • The WorkerAttribute type has been removed (and its contents inlined where they were used).
    • The ComponentAcl type has been removed (and its contents inlined where they were used).
    • Redundant option fields have been replaced with singular fields.
  • The built-in EntityPosition type has been removed. Use the new improbable.Position component from the standard library for canonical entity position instead.
  • The synchronized and queryable options, which no longer serve any purpose, have been removed.
  • The Coordinates built-in type has been removed. Use the standard library equivalent improbable.Coordinates instead.
  • The Vector3d and Vector3f built-in types have been removed. Use the new improbable.games.Vector3f and improbable.games.Vector3d under the namespace improbable.games instead.

Spatial CLI tools

Unity SDK

  • The deprecated ComponentUpdated += and ComponentUpdated -= have been removed. Use ComponentUpdated.AddAndInvoke or ComponentUpdated.Add, and ComponentUpdated.Remove instead.
  • The deprecated PropertyUpdated += and PropertyUpdated -= have been removed. Use PropertyUpdated.AddAndInvoke or PropertyUpdated.Add, and PropertyUpdated.Remove instead.
  • The deprecated CommandRequest += and CommandRequest -= have been removed. Use CommandRequest.RegisterAsyncResponse or CommandRequest.RegisterResponse, and CommandRequest.DeregisterResponse instead.
  • The ISpatialCommunicator.RegisterAssetLoad and ISpatialCommunicator.SendAssetLoadedResponse methods have been removed.
  • The Improbable.Unity.Entity.EntityObject and Improbable.Unity.Entity.EntityVisualizers classes have been removed.
  • The ReserveEntityId, CreateEntity and DeleteEntity methods in Improbable.Unity.Core.IWorldCommander and Improbable.Unity.Core.ICommandSender now return respectively ReserveEntityResult, CreateEntityResult and DeleteEntityResult payloads instead of all returning EntityId. The structs contain the relevant EntityId as ReservedEntityId, CreatedEntityId, and DeletedEntityId properties.
  • The CreateEntity method in Improbable.Unity.Core.IWorldCommander and Improbable.Unity.Core.ICommandSender no longer takes a prefabName parameter.
  • The Metadata option, which no longer serves any purpose, has been removed from the WorkerConfiguration.

Unreal SDK

  • Blueprint nodes that send entity creation and deletion commands now use FEntityId instead of int.
  • The --language=cpp_unreal argument to spatial schema has been removed, since it is no longer any different from --language=cpp.
  • The member function ProcessEvents() on the SpatialOS object has been renamed to ProcessOps() to better match the terminology used in SpatialOS.
  • The old FEntitySpawner class has been replaced with the new entity pipeline, and is no longer available.

C# SDK

  • The SnapshotEntity class has been removed. Use the Entity class instead. If you need to store a prefab name, use the new standard library component Improbable.Metadata’s entity_type property.
  • A number of packages used by spatialos_worker_packages.json have been renamed. If you are not using generated build scripts (ie if in your spatialos.<worker-type>.worker.json files, there’s no generated_build_scripts_type field), update the following package names:
    • Improbable.WorkerSdkCsharp is now csharp
    • windows_x64 is now core-dynamic-x86_64-win32
    • darwin_x64 is now core-dynamic-x86_64-macos
    • linux_x64 is now core-dynamic-x86_64-linux
  • The ConnectionParameters class no longer has a WorkerId field.
  • The Connection.ConnectAsync method now takes an extra workerId argument.
  • The AssetLoadRequestOp struct has been removed.
  • The PrefabName and PrefabContext fields have been removed from AddEntityOp.

    If you need to set a prefab name, use the Improbable.Metadata standard component.

  • The Connection.SendCreateEntityRequest no longer takes a prefabName parameter.

    If you need to set a prefab name, use the Improbable.Metadata standard component.

  • The Connection.SendAssetLoadedResponse method has been removed.

  • The Dispatcher.OnAssetLoad method has been removed.

  • The ConnectionParameters.EnableAssetLoadRequestCallbacks andDefaults.EnableAssetLoadRequestCallbacks properties has been removed.

  • The Coordinates, Vector3d and Vector3f types in the Improbable.Math namespace corresponding to the removed built-in schema types have been removed. A replacement Improbable.Coordinates type is available in the standard library generated code, but it no longer has any special mathematical functionality.

  • Generated code for schema types now uses Improbable.Worker.Bytes rather than raw byte[] arrays to represent schema bytes fields.

  • The deprecated SendInterestedComponents API has been removed. Use SendComponentInterest instead.

  • The Metadata option, which no longer serves any purpose, has been removed from the Worker.ConnectionParameters.

C++ SDK

  • A number of packages used by spatialos_worker_packages.json have been renamed as of SpatialOS 10.3, but the previous names were still usable with a warning. These have now been removed. If you haven’t already, update the following package names:
    • windows_x86 is now cpp-static-x86-msvc_md-win32
    • windows_x64 is now cpp-static-x86_64-msvc_md-win32
    • darwin_x64 is now cpp-static-x86_64-clang_libcpp-macos
    • linux_x64 is now cpp-static-x86_64-gcc_libstdcpp-linux
    • linux_x64_unreal is now cpp-static-x86_64-clang_libstdcpp-linux
  • The ConnectionParameters struct no longer has a WorkerId field.
  • The Connection::ConnectAsync method now takes an extra worker_id argument.
  • Since protobuf .pb.cc and .pb.h files are no longer necessary or generated as part of spatial schema --language=cpp, custom builds that rely on the presence of these files might break.
  • The PrefabName and PrefabContext fields have been removed from AddEntityOp.

    If you need to set a prefab name, use the Improbable.Metadata standard component.

  • The Connection::SendCreateEntityRequest no longer takes a prefab_name parameter.

    If you need to set a prefab name, use the Improbable.Metadata standard component.

  • The SnapshotEntity struct has been removed. Use the Entity struct instead.

  • The Coordinates, Vector3d and Vector3f types in the improbable::math namespace corresponding to the removed built-in schema types have been removed. A replacement improbable::Coordinates type is available in the standard library generated code.

  • The deprecated SendInterestedComponents API has been removed. Use SendComponentInterest instead.

  • The Metadata option, which no longer serves any purpose, has been removed from the worker::ConnectionParameters.

Java SDK

  • A number of packages used by spatialos_worker_packages.json have been renamed. If you are not using generated build scripts (ie if in your spatialos.<worker-type>.worker.json files, there’s no generated_build_scripts_type field), change the java_sdk and java_sdk_native package types to worker_sdk, and update the following package names:
    • java_sdk is now java
    • windows_x64 is now java_native-dynamic-x86_64-win32
    • darwin_x64 is now java_native-dynamic-x86_64-macos
    • linux_x64 is now java_native-dynamic-x86_64-linux
  • The ConnectionParameters class no longer has a WorkerId field.
  • The Connection.connectAsync method now takes an extra workerId argument.
  • The AssetLoadRequest class has been removed.
  • The prefabName and prefabContext fields have been removed from AddEntity.

    If you need to set a prefab name, use the Improbable.Metadata standard component.

  • The Connection.sendCreateEntityRequest no longer takes a prefabName parameter.

    If you need to set a prefab name, use the Improbable.Metadata standard component.

  • The Dispatcher.onAssetLoad method has been removed.

  • The DefaultConfiguration.ENABLE_ASSET_LOAD_REQUEST_CALLBACKS constant has been removed.

  • The SnapshotEntity class has been removed. The Entity class should be used instead. If you need to store a prefab name, use the new standard library component Improbable.Metadata’s entity_type property.

  • The Coordinates, Vector3d and Vector3f types in the improbable.math package corresponding to the removed built-in schema types have also been removed. A replacement improbable.Coordinates type is available in the standard library generated code.

  • The deprecated SendInterestedComponents API has been removed. Use SendComponentInterest instead.

  • The metadata option, which no longer serves any purpose, has been removed from the worker.ConnectionParameters.

JavaScript SDK

  • A number of packages used by spatialos_worker_packages.json have been renamed. If you are not using generated build scripts, then please change the package type from javascript_sdk to worker_sdk, and change the package name from javascript_sdk to javascript.
  • The prefabName and prefabContext fields have been removed from AddEntityOp.
  • The Connection.sendCreateEntityRequest no longer takes a prefabName parameter.
  • The Coordinates, Vector3d and Vector3f types in the improbable/math package corresponding to the removed built-in schema types have also been removed. A replacement Coordinates type is available in the standard library generated code.

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums