Coder Social home page Coder Social logo

spatialos / gdk-for-unity Goto Github PK

View Code? Open in Web Editor NEW
355.0 25.0 79.0 72.16 MB

SpatialOS GDK for Unity

Home Page: https://gdk.improbable.io/spatialos-gdk-unity

License: MIT License

Shell 1.22% C# 98.64% PowerShell 0.14%
gdk spatialos unity improbable massive mmo online game game-development unity3d-games

gdk-for-unity's Introduction

The SpatialOS Game Development Kit (GDK) for Unity allows you to quickly and easily build and host Unity multiplayer games. These games can use multiple server-side game engines across one seamless world to create new kinds of gameplay.

This is the repository for the last version of the GDK plugin that is compatible with the SpatialOS legacy platform. The GDK is frozen for users who have not yet migrated their project to SpatialOS running on zeuz.

  • If you have a current project using SpatialOS GDK for Unity and would like to discuss migrating your project to SpatialOS running on zeuz, please contact us at [email protected] before 30th December 2021.

  • If you would like to start development of your game on SpatialOS and would like access to the latest version of the GDK for Unity and are not currently using SpatialOS please contact us at ims.improbable.io/contact with details about your project.

Documentation

Find high-level documentation about SpatialOS and the GDKs at networking.docs.improbable.io. If you wish to get full access to the documentation please contact us at ims.improbable.io/contact with details about your project.


Your access to and use of the Unity Engine is governed by the Unity Engine End User License Agreement. Please ensure that you have agreed to those terms before you access or use the Unity Engine.

© 2021 Improbable

gdk-for-unity's People

Contributors

anne-edwards avatar austinkelmore avatar bryanjy-wong avatar callumlawson avatar danailpenev avatar dgavedissian avatar elleess avatar ernopp avatar gdk-for-unity-bot avatar ivaskovic avatar jamiebrynes7 avatar jared-improbable avatar jayimprobable avatar jessicafalk avatar jonasimprobable avatar martinzlocha avatar mattyoung-improbable avatar oblm avatar paulbalaji avatar paulthomas1 avatar petemounce avatar pmernyei avatar samc-improbable avatar samiwh avatar tenevdev avatar tomhjp avatar zerozshadow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gdk-for-unity's Issues

Removing all schema directories from the GDK Tools Configuration causes hard crashes.

Affects: Release v0.1.5 and up
Internal Ticket: UTY-2044


Description

Removing all schema source directories from the GDK Tools Configuration causes hard crashes on startup and during code generation.

Workaround

If you get yourself into this state, you can manually edit the JSON file that is found at:

workers/<your-unity-project>/Assets/Config/GdkToolsConfiguration.json

such that there is at least 1 element in the SchemaSourceDirs list.

For example:

    
{
    "SchemaStdLibDir": "build/dependencies/schema/standard_library",
    "SchemaSourceDirs": [
        "Assets/.Schema"
    ],
    "CodegenOutputDir": "Assets/Generated/Source"
}

The Mobile Launcher window doesn't find Android devices with hyphens in their name

Affects: Release v0.3.0 and up
Internal Ticket: UTY-2455


Description

If your Android device has a hyphen(-) in the product name, the mobile launcher will not display it as an option to launch to.

You can see the product name by running the following command in any directory with your Android device connected to your machine:

$ adb devices -l

Workaround

Fork the mobile package and fix the regex:

  1. Copy the io.improbable.gdk.mobile directory from https://github.com/spatialos/gdk-for-unity/tree/0.3.3/workers/unity/Packages into your Unity project's Packages directory.
  2. Find the DeviceMatchRegex in the AndroidUtils static class (https://github.com/spatialos/gdk-for-unity/blob/0.3.3/workers/unity/Packages/io.improbable.gdk.mobile/Editor/AndroidUtils.cs#L28)
  3. Replace the entire regex with:
    private static readonly Regex DeviceMatchRegex = new Regex(pattern:
        "(?:(?<id>[\\w\\d_-]+)\\s*device).*" +
        "(?:product:(?<product>[\\w\\d_-]+))\\s*" +
        "(?:model:(?<model>[\\w\\d_-]+))\\s*" +
        "(?:device:(?<device>[\\w\\d_-]+)).*");

NullReferenceException errors within the ComponentUpdated scope give useless stacktraces.

Description

When a regular null reference exception occurs while inside a ComponentUpdated callback, the errors given by the unity console does not point towards where the nullreference exception happened.

Expected behaviour

I should be able to view the stacktrace and see in which file and on which line it happened. I should also be able to double click on the error to view in code where it happened, just like how it works normally.

Current behaviour

A nullreferenceexception outputs this and double clicking on it brings me to the LogEvent struct in the Gdk.Core

NullReferenceException: Object reference not set to an instance of an object
Improbable.Gdk.Core.LogEvent.WithField (System.String key, System.Object value) (at Packages/com.improbable.gdk.core/Logging/LogEvent.cs:52)
Improbable.Gdk.Core.ForwardingDispatcher.HandleLog (UnityEngine.LogType type, Improbable.Gdk.Core.LogEvent logEvent) (at Packages/com.improbable.gdk.core/Logging/ForwardingDispatcher.cs:68)
Improbable.Gdk.GameObjectRepresentation.ReaderWriterBase`2[TSpatialComponentData,TComponentUpdate].OnComponentUpdate (TComponentUpdate update) (at Packages/com.improbable.gdk.core/GameObjectRepresentation/ReadersWriters/ReaderWriterBase.cs:216)
Improbable.Transform.TransformInternal+GameObjectComponentDispatcher.InvokeOnComponentUpdateCallbacks (System.Collections.Generic.Dictionary`2[TKey,TValue] entityToInjectableStore) (at Assets/Generated/Source/improbable/transform/TransformInternalGameObjectComponentDispatcher.cs:172)
Improbable.Gdk.GameObjectRepresentation.GameObjectDispatcherSystem.UpdateMonoBehaviours () (at Packages/com.improbable.gdk.core/GameObjectRepresentation/GameObjectDispatcherSystem.cs:207)
Improbable.Gdk.GameObjectRepresentation.GameObjectDispatcherSystem.OnUpdate () (at Packages/com.improbable.gdk.core/GameObjectRepresentation/GameObjectDispatcherSystem.cs:99)
Unity.Entities.ComponentSystem.InternalUpdate () (at C:/Users/proxy_j9kjt6u/AppData/Local/Unity/cache/packages/staging-packages.unity.com/[email protected]/Unity.Entities/ComponentSystem.cs:324)
Unity.Entities.ScriptBehaviourManager.Update () (at C:/Users/proxy_j9kjt6u/AppData/Local/Unity/cache/packages/staging-packages.unity.com/[email protected]/Unity.Entities/ScriptBehaviourManager.cs:77)
Unity.Entities.ScriptBehaviourUpdateOrder+DummyDelagateWrapper.TriggerUpdate () (at C:/Users/proxy_j9kjt6u/AppData/Local/Unity/cache/packages/staging-packages.unity.com/[email protected]/Unity.Entities/ScriptBehaviourUpdateOrder.cs:703)

Steps to reproduce

Add the following script to the Character prefab in the Playground project. The reference test should be null.

public class ErrorTest : MonoBehaviour
{
    [Require] TransformInternal.Requirable.Reader transformInternalReader;
    public Image test;

    void OnEnable()
    {
        transformInternalReader.ComponentUpdated += OnComponentUpdated;
    }

    void OnDisable()
    {
        transformInternalReader.ComponentUpdated -= OnComponentUpdated;
    }

    private void OnComponentUpdated(TransformInternal.Update updatedata)
    {
        test.sprite = null;
    }

    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Z))
        {
            test.sprite = null;
        }
    }
}

Environment

Unity 2018.2.10f1 Personal

Potential name clash between nested types and fields in schema components

Affects: Release v0.1.0 and up
Internal Ticket: UTY-1416


Description

Given a schema file like the following:

type Foo {
    enum Bar {
        YES= 0;
        NO = 1;
        MAYBE = 2;
    }

    Bar bar = 1;
}

The code generator will generate invalid C# code that does not compile.

Note this occurs when the name of a nested type and the name of an field inside a component are the same.

Workaround

Rename either the nested type or the field.

Release v0.2.3

Hi! I was just wondering what the ballpark is for the release is for 0.2.3 because Unity 2019.1 comes with ECS physics, and I don't want to rewrite all my physics logic.

Add back support for win x86

The SDK supported windows x86 builds but the current GDK does not without some modifications. To fix it the package com.improbable.gdk.tools needs some modifications.

In .DownloadCoreSdk, the program.cs imports needs this line added to pull the right sdk version for x86 machines.

new Package(tempPath, "worker_sdk", "core-dynamic-x86-win32", $"{nativeDependenciesPath}/Windows/x86", new List<string> {"include", "CoreSdkDll.lib"}),

Alongside that, Plugins/PluginPostprocessor.cs needs to be updated to not use the x86 dll in the editor and instead keep using the x86_64 one.

new PluginCompatibilitySetting(
                PluginType.Core,
                BuildTarget.StandaloneWindows,
                CpuType.X86,
                compatibleWithEditor: false
                ),

With this change the x86 windows client will not crash and work as intended! I'd do a pull request myself if allowed.

Module Request - 2d World (library + hard problem solving)

Overview

I would like to make a request for a GDK module that includes code running on SpatialOS handling 2d game worlds, and the hard problems that sometimes crop up while creating them, especially with multiplayer involved.

The 2d-based game has come back to the fore as a highly active section of the overall games industry. It has advantages in the ability to use simpler code to achieve basic game functionality, as well as dramatically reduced budgets for visual assets, allowing small teams, or even solo developers (as was mostly the case with Gungeon), to create amazing experiences based on core gameplay, without the millions of dollars required in a typical AAA game.

However, massive multiplayer (and even simple multiplayer) networking is still an extremely hard problem, especially if the code is written from a publicly available library. Most successful 2d games, especially those created by smaller teams, either do not have a multiplayer component, or rely on (vastly overpriced, imo) simple multiplayer plugins/components usually bought via the assets store.

There is an incredible amount of gameplay, revolving around people working together/against one-another, and building things alongside each-other, that is simply not able to be tapped due to the lack of an easy way to get massive multiplayer going at a reasonable price for a smaller team.

References

Gungeon:
gungeon example

Dungeon Crawl Stone Soup:
dcss example

Dwarf Fortress:
dwarf fortress ex


Requirements

The module should include the following (not an exhaustive list, just the things I can currently come up with):

  • A 2d physics world, set up using the same ECS system used in the 3d GDKs
  • A grid (square, hex, octagon?) overlay for the world, allowing for terrain/entity division in a tile format (may or may not be used by each game - useful for turn-based games, aggressive optimization, region-control, etc..)
    PS: It would be nice if the 3d GDK modules also had support for grids, so that something similar to Final fantasy tactics could be done with more ease)
    fft example
  • Support for Z levels to allow "floors" and different altitudes/heights similar to what is done in dwarf fortress
  • Built-in terrain system that maps/etc.. could be imported/exported from (via photoshop drawings/real-life height maps/etc..) - perhaps focus on the networking side of this? I know that there are various assets in the store that help handle grid/tile based 2d maps... not sure what exactly should be in the GDK..
  • Camera zoom support with the ability to render the world differently based on the zoom level (ie. when zoomed close to a character, perhaps a cliff would look like a black abyss.. but if zoomed out, you would see further down - this would probably include tile/terrain streaming of some kind...)
  • Optimizations specific to 2d (especially if the grid is used to highly simplify combat/movement data traffic/processing)
  • Local 2d physics worlds that can be spun up/down for shared, moving spaces such as airships, boats, floating islands (sonic and knuckles? 👍 ^^)...
  • All applicable optimizations/components/etc.. from the base 3d GDK (smooth movement prediction, etc..)

(All I can think about for now.. would love to hear additional ideas if anyone has them..)

Disabling burst compilation leads to an invalid XCode project

Affects: Release v0.2.3 and up
Internal Ticket: UTY-2083


Description

Burst compilation needs to be enabled for iOS. Building an iOS worker without Burst enabled will produce an invalid XCode project. When trying to build the XCode project, you will encounter errors mentioning that StaticBurstStaticMethodLookup and Staticburst_initialize are missing.

Workaround

Enable Burst compilation for iOS.

The postfix "Data" causes issues when generating code when the name is the same as the component

Description

A component with the name TestComponent using the type TestComponentData will give an error when generating code.

Expected behaviour

It should generate code correctly.

Current behaviour

../../schema\nobody\PlayerInputComponent.schema:38:2: Implicit autogenerated data type 'TestComponentData' for 'component TestComponent' (nobody.TestComponentData) conflicts with 'type TestComponentData' defined at ../../schema\nobody\PlayerInputComponent.schema:30:1.

Steps to reproduce

Generate the following schema code.

type TestComponentData
{
float some_data = 1;
}

component TestComponent
{
id = 50000;
TestComponentData test_data = 1;
}

Environment

Unity 2018.2.10f1
Unity GDK 0.1.2

BlittableBool is not Serializable

We are accepting issues and we want your feedback.


Description

BlittableBool is not serializable. This means I cannot serialize any generated code data in a prefab for ease of configuring templates using the editor.

Expected behaviour

Doing something like

[SerializeField]
BlittableBool Foo;

Should appear in the editor and be editable.

Current behaviour

The field does not appear in the editor.

Possible solution

Adding [Serializable] attribute and making the value field public and non-readonly allows the type to be serialized.

Steps to reproduce

public class CouplingPointsSnapshot : MonoBehaviour {
        [SerializeField]
        private BlittableBool Foo;
    }

Or any type that uses BlittableBool

Environment

Generically serialize component snapshots in MonoBehaviours so I can use prefabs as entity templates.

n/a

GDK v0.2.1, Unity 2018.3.11f1

Add string data to Player Lifecycle Creation

Description

There needs to be a way to send identifying data to the worker from the client. They way I've been able to get to work is to send string data through the create call and pass to the PlayerEntityTemplate Delegate.

Possible solution

In player_creator.schema

type CreatePlayerRequestType
{
    improbable.Vector3f position = 1;
    string data = 2;
}

Delegate in PlayerLifecycleConfig

public delegate EntityTemplate GetPlayerEntityTemplateDelegate(
        string clientWorkerId,
        Vector3f position, string data);

This way when I want to create the player template, I can pass in this and process the data. In my case, split out the jwt and character id and load the data from my database.

PlayerLifecycleConfig.CreatePlayerEntityTemplate = (clientWorkerId, position, data) =>
{
    //do work
}

Failing to download gdk from unity

We are accepting issues and we want your feedback.


Description

I followed the instructions and tried both the manual git setup as well as downloading the zip. I'm on Unity 2018.3.11.1f

Everytime I open up the project I get this:

Downloading core-dynamic-x86-win32 to C:\Users\vesha\Documents\blah\gdk-for-unity-fps-starter-project-0.2.2\gdk-for-unity-fps-starter-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-dynamic-x86-win32.zip...
Successfully retrieved package type 'worker_sdk' with name 'core-dynamic-x86-win32' and version '13.7.1-gdk-for-unity' to 'C:\Users\vesha\Documents\blah\gdk-for-unity-fps-starter-project-0.2.2\gdk-for-unity-fps-starter-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-dynamic-x86-win32.zip'
Downloading core-dynamic-x86_64-win32 to C:\Users\vesha\Documents\blah\gdk-for-unity-fps-starter-project-0.2.2\gdk-for-unity-fps-starter-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-dynamic-x86_64-win32.zip...
Successfully retrieved package type 'worker_sdk' with name 'core-dynamic-x86_64-win32' and version '13.7.1-gdk-for-unity' to 'C:\Users\vesha\Documents\blah\gdk-for-unity-fps-starter-project-0.2.2\gdk-for-unity-fps-starter-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-dynamic-x86_64-win32.zip'
Downloading core-dynamic-x86_64-linux to C:\Users\vesha\Documents\blah\gdk-for-unity-fps-starter-project-0.2.2\gdk-for-unity-fps-starter-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-dynamic-x86_64-linux.zip...
Successfully retrieved package type 'worker_sdk' with name 'core-dynamic-x86_64-linux' and version '13.7.1-gdk-for-unity' to 'C:\Users\vesha\Documents\blah\gdk-for-unity-fps-starter-project-0.2.2\gdk-for-unity-fps-starter-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-dynamic-x86_64-linux.zip'
Downloading core-bundle-x86_64-macos to C:\Users\vesha\Documents\blah\gdk-for-unity-fps-starter-project-0.2.2\gdk-for-unity-fps-starter-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-bundle-x86_64-macos.zip...
Successfully retrieved package type 'worker_sdk' with name 'core-bundle-x86_64-macos' and version '13.7.1-gdk-for-unity' to 'C:\Users\vesha\Documents\blah\gdk-for-unity-fps-starter-project-0.2.2\gdk-for-unity-fps-starter-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-bundle-x86_64-macos.zip'
Downloading core-static-fullylinked-arm-ios to C:\Users\vesha\Documents\blah\gdk-for-unity-fps-starter-project-0.2.2\gdk-for-unity-fps-starter-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-static-fullylinked-arm-ios.zip...
Downloading...
Encountered an error during command execution.
System.Exception: Exit code 1 while running:
C:\Users\vesha\.improbable\spatial\spatial.exe
	--json_output
	package
	retrieve
	worker_sdk
	core-static-fullylinked-arm-ios
	13.7.1-gdk-for-unity
	"C:\Users\vesha\Documents\blah\gdk-for-unity-fps-starter-project-0.2.2\gdk-for-unity-fps-starter-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-static-fullylinked-arm-ios.zip"
   at Improbable.Common.RunRedirected(String command, String[] arguments) in C:\Users\vesha\Documents\blah\gdk-for-unity-fps-starter-project-0.2.2\gdk-for-unity\workers\unity\Packages\com.improbable.gdk.tools\.DownloadCoreSdk\Common.cs:line 92
   at Improbable.Program.DownloadPackages(IEnumerable`1 packages, String spatialPath, String coreSdkVersion) in C:\Users\vesha\Documents\blah\gdk-for-unity-fps-starter-project-0.2.2\gdk-for-unity\workers\unity\Packages\com.improbable.gdk.tools\.DownloadCoreSdk\Program.cs:line 98
   at Improbable.Program.Main(String[] args) in C:\Users\vesha\Documents\blah\gdk-for-unity-fps-starter-project-0.2.2\gdk-for-unity\workers\unity\Packages\com.improbable.gdk.tools\.DownloadCoreSdk\Program.cs:line 55

UnityEngine.Debug:LogError(Object)
Improbable.Gdk.Tools.RedirectedProcess:Run() (at C:/Users/vesha/Documents/blah/gdk-for-unity-fps-starter-project-0.2.2/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.tools/RedirectedProcess.cs:156)
Improbable.Gdk.Tools.DownloadCoreSdk:Download() (at C:/Users/vesha/Documents/blah/gdk-for-unity-fps-starter-project-0.2.2/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.tools/DownloadCoreSdk.cs:133)
Improbable.Gdk.Tools.DownloadCoreSdk:DownloadForceMenu() (at C:/Users/vesha/Documents/blah/gdk-for-unity-fps-starter-project-0.2.2/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.tools/DownloadCoreSdk.cs:47)

Followed by this error

Failed to download SpatialOS Core Sdk version 13.7.1-gdk-for-unity. You can use SpatialOS -> Download CoreSDK (force) to retry this.
UnityEngine.Debug:LogError(Object)
Improbable.Gdk.Tools.DownloadCoreSdk:Download() (at C:/Users/vesha/Documents/blah/gdk-for-unity-fps-starter-project-0.2.2/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.tools/DownloadCoreSdk.cs:139)
Improbable.Gdk.Tools.DownloadCoreSdk:DownloadForceMenu() (at C:/Users/vesha/Documents/blah/gdk-for-unity-fps-starter-project-0.2.2/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.tools/DownloadCoreSdk.cs:47)

I try force downloading but it's just the same thing over and over again. I checked my firewall permissions and spatial and unity are both clear.

Any idea why this is failing?

Deployment Launcher Editor window throws a NullReferenceException

Affects: Release v0.2.2 and up
Internal Ticket: UTY-2046


Description

The Deployment Launcher Window throws a NRE with a stack trace similar to the following:

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.GameObjectInspector.ClearPreviewCache () (at C:/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:203)
UnityEditor.GameObjectInspector.OnDisable () (at C:/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:191)
UnityEditor.AssetDatabase:SaveAssets()
Improbable.Gdk.DeploymentLauncher.DeploymentLauncherWindow:OnEnable() (at Packages/com.improbable.gdk.deploymentlauncher/DeploymentLauncherWindow.cs:61)

This seemingly can happen randomly, even when not in use, provided that the Editor window is open.

Workaround

This error appears to be harmless and can be ignored.

Warning on play about the `DisableAutoCreation` attribute

Affects: Release v0.2.3 and up
Internal Ticket: UTY-2134


Description

If you have the default ECS world enabled, you will see a warning like the following thrown when you hit Play:

Invalid [DisableAutoCreation] on Improbable.Gdk.Core.CustomSpatialOSSendSystem`1 (only concrete types can be instantiated)
UnityEngine.Debug:LogWarning(Object)
Unity.Debug:LogWarning(String) (at Library/PackageCache/[email protected]/Unity.Entities/Stubs/Unity/Debug.cs:15)
Unity.Entities.<>c__DisplayClass4_2:<GetAllSystems>g__FilterSystemType|1(Type) (at Library/PackageCache/[email protected]/Unity.Entities.Hybrid/Injection/DefaultWorldInitialization.cs:217)
System.Collections.Generic.List`1:AddRange(IEnumerable`1)
Unity.Entities.DefaultWorldInitialization:GetAllSystems(WorldSystemFilterFlags) (at Library/PackageCache/[email protected]/Unity.Entities.Hybrid/Injection/DefaultWorldInitialization.cs:248)
Unity.Entities.DefaultWorldInitialization:Initialize(String, Boolean) (at Library/PackageCache/[email protected]/Unity.Entities.Hybrid/Injection/DefaultWorldInitialization.cs:53)
Unity.Entities.AutomaticWorldBootstrap:Initialize() (at Library/PackageCache/[email protected]/Unity.Entities.Hybrid/Injection/AutomaticWorldBootstrap.cs:11)

Workaround

This warning is benign and can be ignored.

Testing bot integration

We are accepting issues and we want your feedback.


Description

Describe your issue.

Expected behaviour

Current behaviour

Possible solution

Steps to reproduce

Environment

IL2CPP builds broken in v0.1.4

IL2CPP builds are broken in v0.1.4 due to an underlying bug in:
Type.GetCustomAttributes(...). See Unity bug report.

This has been fixed in the Unity 2019.1 alpha, but has not been back ported to any Unity 2018.3 version yet.

Layers in component write access break systems

SnapshotGenerator.zip
default_launch.zip
spatialos.UnityGameLogic.worker.zip

We are accepting issues and we want your feedback.


Description

Specifying a layer as write access for an entity's components makes it not working.

Expected behaviour

Since the "UnityGameLogic" worker is responsible for the "game_logic" layer, components with "game_logic" write access should behave the same as before.

Current behaviour

The inspector shows no "Authoritative Workers" on the entities. The SendCreatePlayerRequestSystem sporadically activates with a chunk (about once per second). The HandleCreatePlayerRequestSystem never activates. Other entities such as the Spinners are never spawned so this might also affect the GameObjectCreation module.

Possible solution

Steps to reproduce

  1. Modify "default_launch.json" and "spatialos.UnityGameLogic.worker.json" with the contents of the attached files.
  2. Modify "SnapshotGererator.cs" so that each "WorkerUtils.UnityGameLogic" write access is replaced with "game_logic" layer (modified file attached for convenience).
  3. Add "game_logic" string to the list "AllWorkerAttributes" in "WorkerUtils.cs".
  4. Generate the snapshot.
  5. Launch locally.
  6. Go in Sample scene and Play.

Environment

Use the new layers to create entities instead of the old approach with specific workers.

Running basic diagnostics suite

Network Access Checks
Google Storage APIs Reachable: PASSED
Spatial Website Reachable: PASSED
Spatial Auth Server Reachable: PASSED
Spatial Maven Reachable: PASSED
Spatial API Reachable: PASSED
Spatial Secure Customer Proxy Reachable: PASSED
Can Bind to Local Port: PASSED
Spatial Proxy Reachable: PASSED
Spatial Website TLS and GRPCTLS Ports Reachable: PASSED
Spatial Auth TLS and GRPCTLS Ports Reachable: PASSED
Spatial Maven TLS and GRPCTLS Ports Reachable: PASSED
Spatial API TLS and GRPCTLS Ports Reachable: PASSED
Spatial Deployments Reachable: PASSED
Spatial Logs Reachable: PASSED
Spatial Monitoring Proxy Reachable: PASSED
Spatial Locator Reachable: PASSED
Maven Central Repo Reachable: PASSED
Sonatype OSS Repo Reachable: PASSED

All checks successful

Windows 10 64 bit, Unity 2018.3.0b10

Code generation fails to run when there are spaces in the path

Affects: Release v0.2.3
Internal Ticket: UTY-2092


Description

If the path to your Unity project has spaces in it (i.e. - C:\Unity Projects\my-project) code generation will fail to run.

Workaround

Move the project to a path which doesn't have spaces in it (i.e. - C:\UnityProjects\my-project)

Feature Request: Serializable structs from generated code

Description

I want to be able to define an entity template in a scriptableobject, making it easy for myself or designers to tweak values of components and creating new entity templates without touching any code.

Expected behaviour

Adding the following code to a script or a scriptable object should make it editable in the inspector. The same should be possible for any component you generate.

public Position.Snapshot positionComponent;

image

Current behaviour

public Position.Snapshot positionComponent;

Does not display anything and can't be serialized.

Possible solution

Adding [Serializable] to the component snapshot struct and all types that can be used and is serializable in a component.

image
image

ECS Workflow usage

Description

Currently there's no example project for ECS workflow, and some important instructions are missing. I have some questions:

  • How does a worker entity comes from? If it's being automatically created, when?
  • It seems Spatial is designed to be 1 worker per program (is it?), however, the doc stated that "you can run multiple workers in Unity Editor", at the same time, it seems there's no way to distinguish what worker is connected by only query for "OnConnected" component.
  • This world contains a worker entity, which can be uniquely identified by the WorkerEntityTag component attached to it Similar to question#2, does this means the worker entity is a SingletonEntity (Relatively new stuff in Unity ECS)?
  • Example project part of the doc still says Burst should be disabled.

Feel free to point out any misunderstanding, thank you.

Schema compiler errors are swallowed by the code generator

Affects: Release v0.3.2 and up
Internal Ticket: UTY-2423


Description

If the schema compiler fails to run, the code generator swallows the error instead of forwarding it to the Unity console.

Workaround

Open the code generator log and run the same command that "failed to run" to view the errors.

Missing exclamation mark on if statement in PlayerLifecycleHelper.cs

Affects: Release v0.2.4


Description

Hi! Sorry if I'm wrong on this, however, in PlayerLifecycleHelper.cs , I saw what should be an error in PlayerLifecycleHelper.IsOwningWorker() (line:36) :

if (entitySystem.GetEntitiesInView().Contains(entityId))
{
                throw new InvalidOperationException(
                    $"Entity with SpatialOS Entity ID {entityId.Id} is not in this worker's view");
}

An entityId found will throw the error since HashSet<T>.Contains() return true if something is found :

https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1.contains?view=netframework-4.8#System_Collections_Generic_HashSet_1_Contains__0_

Link of the line :

if (entitySystem.GetEntitiesInView().Contains(entityId))

Workaround

shouldn't it be :
if (!entitySystem.GetEntitiesInView().Contains(entityId))
In other words, adding the missing exclamation mark would simply fix it.

PS: I'm not used to GitHub, and sorry for my english.

Unity 2018.3 support

This issue tracks the progress of updating the GDK for Unity to work with 2018.3.xx

Steps

  • Test upgrade and validate all platforms work.
  • Debug Linux worker crashes.
  • Raise ticket with Unity.
  • Implement workaround for C-level dependencies.
  • Upgrade to Worker SDK 13.5.1
  • Test upgrade again.
  • Merge any changes required for the upgrade.
  • Update documentation. #696
  • Release code and publish documentation.

Internal Ticket References: UTY-1547, WRK-840 (debugging thread)

Batch EntityID reservation

Description

I'm making a spawner which could spawn a lot of entities in 1 OnUpdate(). (I'm not sure if this is acceptable for SpatialOS or not)

EntityReservationSystem.GetAsync().Result of course does not work since that system never get to work after the .Result call.

I tried to loop await entityReservationSystem.GetAsync() up front before the system actual do its works (where involves some native containers and job scheduling that I don't want to await in there), but local launch of spatial runtime throws error like "....MoveNext() should have be converted by codegen" so I guess await in for loop is a no-go.

According your documentations, I can assign my own IDs but that means I have to keep track the IDs and communicates between multiple workers, that'd be kinda annoying... So I'd like to request some way to retrieve multiple EntityId in 1 call, or maybe if there's existing way to achieve this, please let me know, thanks.

Auto define generated classes symbols (Generation Improvement)

Description

Almost any project with code generation relies on extensions code. For example extensions to pack\unpack data from components.

In nature of C# we have a problem with undefined symbols when generated code changes without backward compatibility to our extensions (such as renaming or deletion).

I offer to you add extra logic which will define SYMBOL to check them in extensions code:

#if GEN_PLAYER_INPUT_DATA
    public static class InputDataExtension
    {
        public static Vector3 GetDirection(this PlayerInput.Data input)
        {
            return new Vector3(input.Value.horizontal, input.Value.vertical, 0f);
        }
    }
#endif

I made simple and rough editor code to do that but maybe some better way exists?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEngine;

namespace Playground.Editor
{
    public class ComponentsScriptDefinesHook
    {
        private static Regex pattern = new Regex("Improbable.+Generated", RegexOptions.Multiline | RegexOptions.Compiled);
            
        [UnityEditor.Callbacks.DidReloadScripts]
        private static void OnScriptsReloaded() {
            var defined = PlayerSettings.GetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone).Split(';');
            var definedSet = new HashSet<string>(defined.Where(symbol => symbol.StartsWith("GEN_")));
            var others = defined.Where(symbol => !symbol.StartsWith("GEN_"));
            

            var symbols = new HashSet<string>();
            var assemblies = AppDomain.CurrentDomain.GetAssemblies().Where(assembly => pattern.IsMatch(assembly.FullName));
            var types = assemblies.SelectMany(assembly => assembly.GetTypes());
            foreach (var type in types)
            {
                symbols.Add(ToSymbol(type.Name));
                symbols.Add(ToSymbol(type.FullName));
                symbols.Add(ToSymbol(type.Namespace));
            }

            if (!symbols.SetEquals(definedSet))
            {
                Debug.Log($"Add {definedSet.Count} generators symbols");
                PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone, string.Join(";", others.Concat(symbols)));
            }
        }

        private static string ToSymbol(string assemblyName)
        {
            return "GEN_"+Regex.Replace(Regex.Replace(assemblyName, "[<>+.]", ""), "(?<=[a-z0-9])[A-Z]", m => "_" + m.Value).ToUpper();
        }
    }
}

Local launch errors on MacOS when project path contains spaces

Affects: Release v0.1.0 and up
Internal Ticket: UTY-2380


Description

If your spatial project path contains spaces, attempting a local launch will result in errors in the Unity Editor like below:

Errors occured - For more information, check the spatial local launch logfile: /Users/username/project path with spaces/logs/spatial_20191125T162432.log
UnityEngine.Debug:LogError(Object)
Improbable.Gdk.Tools.<>c__DisplayClass13_0:<LaunchLocalDeployment>b__0(Object, EventArgs) (at Library/PackageCache/[email protected]/LocalLaunch.cs:280)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback()

Workaround

Remove all spaces from your project path.

Automatic API documentation generation

Summary

Automatically generate and publish API documentation for all public & protected classes, structs, and interfaces on https://docs.improbable.io that matches our in-code documentation.

Steps

Unresolved Questions

  • Support for automatically documenting attributes
  • Support for automatically documenting generic constraints
  • How to handle custom CSS within Improbadoc

Internal ticket references: UTY-1485

Schema enums that don't start at 0 can have unexpected behaviour

Affects: Release v0.1.0 and up.
Internal Ticket: UTY-1970


Description

If you have a schema enum like the following:

enum MyEnum {
	FOO = 1;
	BAR = 2;
}

the code generator generates code like the following:

public enum MyEnum : uint {
	Foo = 1;
	Bar = 2;
}

This means that if this enum is used in a struct which is default constructed, the default value of that enum is invalid. For example:

	public struct MyStruct 
	{
		public MyEnum Example;
	}

	public static void DoThing() 
	{
		var thing = new MyStruct();
		Debug.Log($"{thing.Example}"; // Prints "0"! This isn't a valid value for a type of "MyEnum"
	}

Workaround

Ensure that all schema enums start at 0:

enum MyEnum {
	FOO = 0;
	BAR = 1;
}

Mono crash when using recursive options in schema

Affects: Release v0.2.3 and up (observed in Unity 2019.1.3)
Internal Ticket: UTY-2091


Description

Schema that attempts to use an option recursively:

type TypeA {
	option<TypeA> test = 1;
}

Will cause a Mono crash like the following:

* Assertion at ..\mono\metadata\class.c:1998, condition `image_is_dynamic (klass->image) || field_offsets [i] > 0' not met

Workaround

There is no workaround to allow recursive options, you can emulate this with a list with 0 or 1 elements. Support for reference-semantic options will enable this.


To get yourself back to a good state:

  1. Remove the problematic schema entry.
  2. Delete the Assets/Generated/Source directory.
  3. Re-open Unity.

Feature Request: Make TransformSynchronizationStrategy Apply function public

Description

When writing a custom ECS system for which TransformSynchronization is wanted, one can setup all the needed Components on the correct entities, however, the TransformSynchronization strategy cannot currently be set from ECS because the Apply function on TransformSynchronizationSendStrategy and TransformSynchronizationReceiveStrategy is internal.
Could this API be made public ?

Expected behaviour

Our own could should be able to call TransformSynchronizationReceiveStrategy.Apply and TransformSynchronizationSendStrategy.Apply

Current behaviour

Function is internal and only accessible within the transformSynchronization module

Possible solution

Make the Apply function public

Steps to reproduce

Write an ECS system that sets up transformSynchronization, for example, in my top-down game, we use server side pathing for the player and only receive the destination coordinates for the client, then do all the pathing server side and sync it back to the client with TransformSynchronization, see snippet here for details if needed: https://gist.github.com/luna-duclos/dc06674a877be04cece8788d3d3bae82

NavInitializationSystem.cs:82 is where the call to apply resides that is currently impossible to do.

Logfile location for parsing port incorrect on MacOS

Description

FPS Starter Project can't connect to a deployment because it can't find a port in a logfile on MacOS.

EDIT: Was a red herring, see below - #1226 (comment)

I found in the code that the log file is being searched like this:

case RuntimePlatform.OSXPlayer:
                    // On MacOS it always goes in the Unity folder regardless of what companyName and productName are set to.
                    logPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Library", "Logs", "Unity", "Player.log");
                    break;

Which is:

/Users/username/Library/Logs/Unity/Player.log

However Launcher opens a completely different directory if you click on a "Open Log File" button:

/Users/username/Library/Logs/Improbable/FPS Starter Project/Player.log"

Expected behaviour

GDK should use the same directory for a log file as SpatialOS Launcher to find a correct port.

Current behaviour

GDK uses wrong directory for a log file and couldn't find a port.

Possible solution

I couldn't find a launcher code, is it open source?

Steps to reproduce

Follow https://docs.improbable.io/unity/alpha/projects/fps/get-started/get-started on macOS Mojave

Environment

I was trying to start with FPS Starter Project on macOS.
Unity 2019.2.6f1
macOS Mojave 10.14.6 (18G87

Welcome to the Unity GDK Repo!

Welcome! We're excited to have you here discovering our Unity GDK.

We'd love to get to know you & hear your thoughts. Here are a few useful places to join us if you want to chat and stay in the loop on our progress:

  • The SpatialOS Discord: we are quite active on here and have a growing community - it is a great place to get quick answers and hear what people are working on. We recommend specifically the #unity channel.
  • Our Unity GDK email newsletter: this is a dedicated newsletter for the Unity GDK community, through which we will send updates on the GDK progress, eg the launch of new feature modules or new starter projects.
  • The SpatialOS forums: these forums have a lot of useful questions and answers from people over the years, and we post all releases across SpatialOS in the announcements section.

And of course feel free to raise issues in this repo too!

Best,
The Unity GDK dev team

Minor bug: ForwardingDispatcher accepts the CInterop LogLevel instead of UnityEngine.LogType

We are accepting issues and we want your feedback.


Description

A minor aesthethical issue mostly: The GDK's logging system normally does its best to abstract away CInterop stuff away from the end user. However, for the ForwardingDispatcher's constructor, it expects a CInterop.LogLevel as an argument

Expected behaviour

I'd expect it to accept a UnityEngine.LogType instead, like the rest of the log API

Current behaviour

It expects a CInterop.LogLevel instead, forcing me to reference that assembly.

Possible solution

Change it and translate between the two via the already existing LogTypeMapping dict

Steps to reproduce

N/A

Environment

N/A

Windows fails on bash prepare-workspace.sh

When I run the prepare-workspace script, I'm getting an error

bash prepare-workspace.sh
: invalid option name line 2: set: pipefail

This is this spatial diagnose output

spatial diagnose
A newer version of spatial is available. Run 'spatial update' to get the latest version.
For more information, see https://docs.improbable.io/reference/latest/shared/release-policy#spatial-cli-releases
Microsoft Visual C++ (MSVC) Redistributable
[SUCCESS]

  • Found version 14.13.26020.
    Network access
    [SUCCESS]
  • All checks passed
  • Installed at 'C:\Users\Admin.improbable\spatial\spatial.exe'.
    Project's SpatialOS SDK
    [SUCCESS]
  • Found version 13.0.1.
    Spatial CLI SDK plugin
    [SUCCESS]
  • Installed at 'C:\Users\Admin\AppData\Local.improbable\bin\plugins\sdk\13.0.1\sdk.exe'.
  • Found version 13.0.1.
    Spatial CLI tool
    [SUCCESS]
  • Installed at 'C:\Users\Admin.improbable\spatial\spatial.exe'.
  • Found version 20180611.121722.

Results
All diagnostic checks passed successfully.
'spatial diagnose' succeeded (4.8s)

IL2CPP builds on Windows may fail

Affects: Release v0.2.3 and up
Internal Ticket: UTY-2049


Description

IL2CPP builds on Windows might fail when building your worker for Windows. This happens when your project and Unity installation on the same drive and the path between those two is too long when il2cpp tries to resolve it.

Workaround

Either have your project in a different drive than your Unity installation or change the location of both the project and the Unity installation so that their paths become shorter.

Potential name clash between components and events/commands in generated code

Affects: Release v0.1.0 and up
Internal Ticket: UTY-1962


Description

Given a schema file like one of the following:

package name;

type Foo {
    float test_field = 1;
}

component Bar
{
    id = 200;
    event Foo bar;
}
package name;

type Foo {
    float test_field = 1;
}

component Bar
{
    id = 200;
    command Foo bar(Foo);
}

The code generator will generate invalid C# code that does not compile.

Note this occurs when the name of a component and the name of an event/command inside that component are the same

Workaround

Rename either the component or the event/command.

Burst throws warnings during runtime when running an iOS worker

Affects: Release v0.2.3 and up
Internal Ticket: UTY-2082


Description

Running an iOS client-worker will result in Burst throwing warnings about missing internal functions. However, Burst can not be disabled due to issue #985.

Workaround

These warnings are benign and can be ignored. Your iOS client-worker will still be able to connect to your deployment.

Space character in path will cause sdk download failure

We are accepting issues and we want your feedback.


Description

can not retrieve worker sdk when starter kit in a path which have space in folder name.

Expected behaviour

retrieve worker

Current behaviour

only a tip from unity log: "Failed to download SpatialOS Core Sdk version XXX..."

Possible solution

  1. make target saving path encoding right
  2. suggestion: more readable error msg from process output (i can't see any stdout msg form unity's console, this make my debugging so hard)

Steps to reproduce

download the starterkit in a path with space in it (like D:\game dev), then open unity editor.

Environment

windows 10

[Code Generation] Using "value" as an identifier for a component field.

Description

The generated code has a bug if you use the identifier value for a component field.

For example, in tick.schema:

package game;

component Tick {
    id = 15000;
    uint32 value = 1;
}

Will generate in Tick.cs:

private uint value;

public uint Value
{
     get => value;
     set
     {
          MarkDataDirty(0);
          value = value;
     }
}

And the private value field will never be updated.

Possible solution

Use in the setter the this keyword, so the generated code will be like:

private uint value;

public uint Value
{
     get => value;
     set
     {
          MarkDataDirty(0);
          this.value = value;
     }
}

Steps to reproduce

  1. Create a component with a field named value.
  2. Regenerate code.
  3. Try to update the component Value.
  4. It will never be updated.

Environment

SpatialOS Blank Project 0.1.2 and Unity 2018.2.14f1

Protocol logging on Linux automatically disabled on v0.1.4

Protocol logging is automatically disabled on Linux workers on 0.1.4

Due to a bug in upgrading to Unity 2018.3 (seen in #676) we had to implement a workaround in our C level dependencies. This came at the cost of protocol logging on Linux workers. We decided that delivering 2018.3 support was more important than protocol logging on Linux.

When the underlying linking bug is fixed in Unity, the ability to use protocol logging on Linux will be restored.

spatial clean on windows fails in cmd and powershell

Description

Running spatial clean in cmd or powershell on windows outputs an error because it can't find the program "rm"

Expected behaviour

spatial clean should function without issues on windows without using git-bash

Current behaviour

Running task 'clean' for 'UnityClient'
[1/1] > Clean Codegen
[1/1] x Clean Codegen (10ms)
error: exec: "rm": executable file not found in %PATH%
failed (10ms)
'spatial clean' failed (0.0s)
Encountered an error during command execution.
exit status 1

Steps to reproduce

  1. Open up a Windows Powershell or cmd in the UnityGDK directory
  2. Run spatial clean

Environment

PS C:\Unity Projects\UnityGDK> spatial diagnose
Microsoft Visual C++ (MSVC) Redistributable
[SUCCESS]

  • Found version 14.12.25810.
    Network access
    [SUCCESS]
  • All checks passed
  • Installed at 'C:\Users\TRON.improbable\spatial\spatial.exe'.
    P roject's SpatialOS SDK
    [SUCCESS]
  • Found version 13.0.1.
    Spatial CLI SDK plugin
    [SUCCESS]
  • Installed at 'C:\Users\TRON\AppData\Local.improbable\bin\plugins\sdk\13.0.1\sdk.exe'.
  • Found version 13.0.1.
    Spatial CLI tool
    [SUCCESS]
  • Installed at 'C:\Users\TRON.improbable\spatial\spatial.exe'.
  • Found version 20180628.171450.

Results
All diagnostic checks passed successfully.
'spatial diagnose' succeeded (8.2s)

MonoBehaviours with a WorkerType annotation, but no requirables, do not get enabled

Affects: Release v0.2.0 and up
Internal Ticket: UTY-2163


Description

A MonoBehaviour with a WorkerType attribute will not be enabled if there are no requirables in the script.

For example, the following will not be enabled on a client, even though it has the client WorkerType and does not depend on any requirables to be satisfied.

using Improbable.Gdk.Subscriptions;
using UnityEngine;

namespace Scripts.Sphere
{
    [WorkerType("UnityClient")]
    public class ObjectColorBehaviour : MonoBehaviour
    {
        private void Update()
        {
            Debug.Log("Test");
        }
    }
}

Workaround

There are two potential workarounds for this issue.

1 - Ensure there is a requirable that is valid for the given WorkerType.
2 - Define your prefabs based on the WorkerType.

Make methods in GameObjectCreatorFromMetadata virtual

Description

To allow developers to modify the default pipeline for creating and destroying linked game objects, we should make the add a filter method in the GameObjectCreatorFromMetadata and make it virtual. This allows you to add your own custom logic on top of it by inheriting from the class and overriding that one method.

Failed to download SpatialOS Core Sdk version 13.7.1-gdk-for-unity

We are accepting issues and we want your feedback.


Description

Failing to install Core SDK version 13.7.1-gdk-for-unity. When I open the FPS starter project or the Blank project it fails to download and install Core SDK version 13.7.1-gdk-for-unity.

Expected behaviour

Download and install the SDK during/after opening the projects.

Current behaviour

I open the project to set it up but it fails downloading SDK.

Possible solution

Steps to reproduce

  1. Follow the steps on the official docs: https://docs.improbable.io/unity/alpha/projects/fps/get-started/set-up for Windows 10 64bit
  2. Clone the projects using SSH
  3. Both folders are under same parent
  4. Opening the project fails to download the SDK

Environment

Install and setup the blank project available on GitHub.

`Downloading core-dynamic-x86-win32 to H:\dev\game\Unity\gdk-for-unity-blank-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-dynamic-x86-win32.zip...

Successfully retrieved package type 'worker_sdk' with name 'core-dynamic-x86-win32' and version '13.7.1-gdk-for-unity' to 'H:\dev\game\Unity\gdk-for-unity-blank-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-dynamic-x86-win32.zip'

Downloading core-dynamic-x86_64-win32 to H:\dev\game\Unity\gdk-for-unity-blank-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-dynamic-x86_64-win32.zip...

Successfully retrieved package type 'worker_sdk' with name 'core-dynamic-x86_64-win32' and version '13.7.1-gdk-for-unity' to 'H:\dev\game\Unity\gdk-for-unity-blank-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-dynamic-x86_64-win32.zip'

Downloading core-dynamic-x86_64-linux to H:\dev\game\Unity\gdk-for-unity-blank-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-dynamic-x86_64-linux.zip...

Successfully retrieved package type 'worker_sdk' with name 'core-dynamic-x86_64-linux' and version '13.7.1-gdk-for-unity' to 'H:\dev\game\Unity\gdk-for-unity-blank-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-dynamic-x86_64-linux.zip'

Downloading core-bundle-x86_64-macos to H:\dev\game\Unity\gdk-for-unity-blank-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-bundle-x86_64-macos.zip...

Successfully retrieved package type 'worker_sdk' with name 'core-bundle-x86_64-macos' and version '13.7.1-gdk-for-unity' to 'H:\dev\game\Unity\gdk-for-unity-blank-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-bundle-x86_64-macos.zip'

Downloading core-static-fullylinked-arm-ios to H:\dev\game\Unity\gdk-for-unity-blank-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-static-fullylinked-arm-ios.zip...

Downloading...

Encountered an error during command execution.

System.Exception: Exit code 1 while running:

H:\dev\programs.improbable\spatial\spatial.exe

--json_output

package

retrieve

worker_sdk

core-static-fullylinked-arm-ios

13.7.1-gdk-for-unity

"H:\dev\game\Unity\gdk-for-unity-blank-project\workers\unity\build\CoreSdk\13.7.1-gdk-for-unity\core-static-fullylinked-arm-ios.zip"

at Improbable.Common.RunRedirected(String command, String[] arguments) in H:\dev\game\Unity\gdk-for-unity\workers\unity\Packages\com.improbable.gdk.tools\.DownloadCoreSdk\Common.cs:line 92

at Improbable.Program.DownloadPackages(IEnumerable`1 packages, String spatialPath, String coreSdkVersion) in H:\dev\game\Unity\gdk-for-unity\workers\unity\Packages\com.improbable.gdk.tools\.DownloadCoreSdk\Program.cs:line 98

at Improbable.Program.Main(String[] args) in H:\dev\game\Unity\gdk-for-unity\workers\unity\Packages\com.improbable.gdk.tools\.DownloadCoreSdk\Program.cs:line 55

UnityEngine.Debug:LogError(Object)
Improbable.Gdk.Tools.RedirectedProcess:Run() (at H:/dev/game/Unity/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.tools/RedirectedProcess.cs:156)
Improbable.Gdk.Tools.DownloadCoreSdk:Download() (at H:/dev/game/Unity/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.tools/DownloadCoreSdk.cs:133)
Improbable.Gdk.Tools.DownloadCoreSdk:TryDownload() (at H:/dev/game/Unity/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.tools/DownloadCoreSdk.cs:111)
Improbable.Gdk.Tools.GenerateCode:Generate() (at H:/dev/game/Unity/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.tools/GenerateCode.cs:76)
Improbable.Gdk.Tools.GenerateCode:InitializeOnLoad() (at H:/dev/game/Unity/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.tools/GenerateCode.cs:49)
`

Failed to download SpatialOS Core Sdk version 13.7.1-gdk-for-unity. You can use SpatialOS -> Download CoreSDK (force) to retry this. UnityEngine.Debug:LogError(Object) Improbable.Gdk.Tools.DownloadCoreSdk:Download() (at H:/dev/game/Unity/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.tools/DownloadCoreSdk.cs:139) Improbable.Gdk.Tools.DownloadCoreSdk:TryDownload() (at H:/dev/game/Unity/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.tools/DownloadCoreSdk.cs:111) Improbable.Gdk.Tools.GenerateCode:Generate() (at H:/dev/game/Unity/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.tools/GenerateCode.cs:76) Improbable.Gdk.Tools.GenerateCode:InitializeOnLoad() (at H:/dev/game/Unity/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.tools/GenerateCode.cs:49)

Windows 10 64bit, Unity 2019.1.3f1 (as installation guide say)

Windows Unable to use Local Launch

We are accepting issues and we want your feedback.


Description

Describe your issue.
Whenever I run the the local launch its immediately closes the terminal and i cant go to the inspector.

Logs

info SpatialOS starting. [cli-version: 20191125.203150.3993fbd64a] [timestamp: 2020-03-01T02:11:02-05:00]
debug starting fabric node master [cli-version: 20191125.203150.3993fbd64a] [timestamp: 2020-03-01T02:11:02-05:00]
debug Will invoke java binary at C:\Users\King\AppData\Local\Temp\improbable_extracted_packages\87f6ffea625d605fb00b9f17d59d350f/bin/java.exe [cli-version: 20191125.203150.3993fbd64a] [timestamp: 2020-03-01T02:11:02-05:00]
debug Registered fabric nanny dns entries [cli-version: 20191125.203150.3993fbd64a] [timestamp: 2020-03-01T02:11:02-05:00]
debug master node elected with ip(127.0.0.1) current node ip(127.0.0.1) [cli-version: 20191125.203150.3993fbd64a] [timestamp: 2020-03-01T02:11:02-05:00]
debug fetched java params from etcd [cli-version: 20191125.203150.3993fbd64a] [timestamp: 2020-03-01T02:11:02-05:00]
debug fabric classpath size: 1 [cli-version: 20191125.203150.3993fbd64a] [timestamp: 2020-03-01T02:11:02-05:00]
debug Starting fabric with args [C:\Users\King\AppData\Local\Temp\improbable_extracted_packages\87f6ffea625d605fb00b9f17d59d350f/bin/java.exe -XX:+PreserveFramePointer -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=25 -XX:G1MaxNewSizePercent=75 -XX:MaxGCPauseMillis=10 -Xmx13355M -Xms2225M -DFABRIC_LOG_LEVEL=WARN -DNET_IMPROBABLE_ASSETS_DIR=C:\Projects\gdk-for-unity-blank-project\build\assembly -DSERVICE_ACCOUNT_REFRESH_TOKEN=some_refresh_token -Dlogback.configurationFile=/improbable/logs/log_config.xml -DAPPDATA=/improbable/logs/fsim -DPROPERTY_EXTERNAL_IP=127.0.0.1 -DPROPERTY_INTERNAL_IP=127.0.0.1 -DPROPERTY_ASSET_DATABASE_URL=http://127.0.0.1:1238 -DLOGSINK_ADDRESS=http://localhost:22000 -DMANAGED_WORKER_LOGFILE_DIRECTORY=C:\Projects\gdk-for-unity-blank-project\logs\2020-03-01_02-11-01\workers -DFABRIC_LOG_DIRECTORY=C:\Projects\gdk-for-unity-blank-project\logs\2020-03-01_02-11-01 -classpath C:\Users\King\AppData\Local\Temp\fabric_bundles\14.4.0/runtime_deploy.jar improbable.deployment.GameLauncher --controller_grpc_port=22000 --fabric_public_ip=127.0.0.1 --deployment_node=master --deployment_project=unity_gdk --node_name=master --deployment_assembly_name=local_assembly --controller_grpc_host=127.0.0.1 --auth_server_base_url=http://127.0.0.1:21000 --deployment_name=local --thor_grpc_tls_host=127.0.0.1 --thor_grpc_tls_port=22000 --thor_grpc_use_tls=false] [cli-version: 20191125.203150.3993fbd64a] [timestamp: 2020-03-01T02:11:02-05:00]
debug JVM process id: 6676 [cli-version: 20191125.203150.3993fbd64a] [timestamp: 2020-03-01T02:11:02-05:00]
debug JVM did not exit cleanly [cli-version: 20191125.203150.3993fbd64a] [timestamp: 2020-03-01T02:11:02-05:00]
debug Cleaning up local services [cli-version: 20191125.203150.3993fbd64a] [timestamp: 2020-03-01T02:11:02-05:00]
debug Cleaning up local worker nanny service. [cli-version: 20191125.203150.3993fbd64a] [timestamp: 2020-03-01T02:11:02-05:00]
info SpatialOS terminated. [cli-version: 20191125.203150.3993fbd64a] [timestamp: 2020-03-01T02:11:02-05:00]
debug wrapper services endpoint shut down gracefully [cli-version: 20191125.203150.3993fbd64a] [timestamp: 2020-03-01T02:11:02-05:00]

Expected behaviour

Current behaviour

Possible solution

Steps to reproduce

  1. Download Blank Project
  2. Run Powershell setup script
  3. Open in Unity
  4. Run Local

Environment

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.