Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit dcb31fa

Browse files
authored
2018.3 Upgrade (#692)
1 parent 9f9b74c commit dcb31fa

File tree

13 files changed

+166
-112
lines changed

13 files changed

+166
-112
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
- `Improbable.Gdk.EntityTemplate` is now mutable and exposes a set of APIs to add, remove, and replace component snapshots
1616
- This replaces the `Improbable.Gdk.Core.EntityBuilder` class.
1717
- These changes also allow you to reuse an `EntityTemplate` more than once.
18+
- Upgraded the project to be compatible with `2018.3.2f1`.
19+
- Upgraded the entities package to `0.0.12-preview.21`
20+
- Disabled protocol logging on Linux workers to prevent crashes. This will be reverted once the underlying issue is fixed.
1821

1922
### Fixed
2023

@@ -27,6 +30,7 @@
2730

2831
- Removed the `Improbable.Gdk.Core.EntityBuilder` class as it was superceded by the updated functionality in `Improbable.Gdk.Core.EntityTemplate`.
2932
- Removed `CreateSchemaComponentData` from each generated component as it is no longer required by the `EntityBuilder`.
33+
- Removed `com.unity.incrementalcompiler` package as a dependency of the `Core` package.
3034

3135
## `0.1.3` - 2018-11-26
3236

ci/UnityEditorHash.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3262fb3b0716
1+
b3c100a4b73a
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"dependencies": {
3+
"com.improbable.gdk.buildsystem": "file:../../workers/unity/Packages/com.improbable.gdk.buildsystem",
34
"com.improbable.gdk.core": "file:../../workers/unity/Packages/com.improbable.gdk.core",
5+
"com.improbable.gdk.dependencytest": "file:com.improbable.gdk.dependencytest",
46
"com.improbable.gdk.testutils": "file:../../workers/unity/Packages/com.improbable.gdk.testutils",
5-
"com.improbable.gdk.tools": "file:../../workers/unity/Packages/com.improbable.gdk.tools",
6-
"com.improbable.gdk.buildsystem": "file:../../workers/unity/Packages/com.improbable.gdk.buildsystem",
7-
"com.improbable.gdk.dependencytest": "file:com.improbable.gdk.dependencytest"
7+
"com.improbable.gdk.tools": "file:../../workers/unity/Packages/com.improbable.gdk.tools"
88
},
99
"registry": "https://staging-packages.unity.com"
1010
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
m_EditorVersion: 2018.2.14f1
1+
m_EditorVersion: 2018.3.2f1
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!937362698 &1
4+
VFXManager:
5+
m_ObjectHideFlags: 0
6+
m_IndirectShader: {fileID: 0}
7+
m_CopyBufferShader: {fileID: 0}
8+
m_SortShader: {fileID: 0}
9+
m_RenderPipeSettingsPath:
10+
m_FixedTimeStep: 0.016666668
11+
m_MaxDeltaTime: 0.05

workers/unity/Packages/com.improbable.gdk.core/Worker/Worker.cs

Lines changed: 80 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
using System;
2-
using System.Collections.Generic;
32
using System.Threading.Tasks;
43
using Improbable.Worker.CInterop;
5-
using AlphaLocator = Improbable.Worker.CInterop.Alpha.Locator;
64
using Unity.Entities;
75
using UnityEngine;
6+
using AlphaLocator = Improbable.Worker.CInterop.Alpha.Locator;
87

98
namespace Improbable.Gdk.Core
109
{
@@ -27,7 +26,7 @@ public class Worker : IDisposable
2726
/// The worker ID.
2827
/// </summary>
2928
/// <remarks>
30-
/// Unique for a given SpatialOS deployment.
29+
/// Unique for a given SpatialOS deployment.
3130
/// </remarks>
3231
public readonly string WorkerId;
3332

@@ -76,13 +75,20 @@ private Worker(string workerType, Connection connection, ILogDispatcher logDispa
7675
}
7776

7877
/// <summary>
79-
/// Tries to connect to the SpatialOS Runtime and creates the worker responsible for the connection upon successfully connecting.
78+
/// Tries to connect to the SpatialOS Runtime and creates the worker responsible for the connection upon successfully
79+
/// connecting.
8080
/// </summary>
81-
/// <param name="connectionFuture">The <see cref="Future{T}"/> of the <see cref="Connection"/> object that we use to connect to the SpatialOS Runtime.</param>
81+
/// <param name="connectionFuture">
82+
/// The <see cref="Future{T}" /> of the <see cref="Connection" /> object that we use to
83+
/// connect to the SpatialOS Runtime.
84+
/// </param>
8285
/// <param name="workerType">The type of the worker.</param>
8386
/// <param name="logger">The logger used by this worker.</param>
8487
/// <param name="origin">The origin of this worker in the local Unity space.</param>
85-
/// <returns>A <see cref="Task{TResult}"/> to run this method asyncally and retrieve the created <see cref="Worker"/> object upon connecting successfully.</returns>
88+
/// <returns>
89+
/// A <see cref="Task{TResult}" /> to run this method asyncally and retrieve the created <see cref="Worker" />
90+
/// object upon connecting successfully.
91+
/// </returns>
8692
private static async Task<Worker> TryToConnectAsync(Future<Connection> connectionFuture,
8793
string workerType,
8894
ILogDispatcher logger,
@@ -110,69 +116,106 @@ private static async Task<Worker> TryToConnectAsync(Future<Connection> connectio
110116
}
111117

112118
/// <summary>
113-
/// Connects to the SpatialOS Runtime via the Receptionist service and creates a <see cref="Worker"/> object asynchronously.
119+
/// Connects to the SpatialOS Runtime via the Receptionist service and creates a <see cref="Worker" /> object
120+
/// asynchronously.
114121
/// </summary>
115-
/// <param name="config">The <see cref="ReceptionistConfig"/> object stores the configuration needed to connect via the Receptionist Service.</param>
116-
/// <param name="connectionParameters">The <see cref="ConnectionParameters"/> storing </param>
122+
/// <param name="config">
123+
/// The <see cref="ReceptionistConfig" /> object stores the configuration needed to connect via the
124+
/// Receptionist Service.
125+
/// </param>
126+
/// <param name="connectionParameters">The <see cref="ConnectionParameters" /> storing </param>
117127
/// <param name="logger">The logger used by this worker.</param>
118128
/// <param name="origin">The origin of this worker in the local Unity space.</param>
119-
/// <returns>A <see cref="Task{TResult}"/> to run this method asynchronously and retrieve the created <see cref="Worker"/> object upon connecting successfully.</returns>
129+
/// <returns>
130+
/// A <see cref="Task{TResult}" /> to run this method asynchronously and retrieve the created
131+
/// <see cref="Worker" /> object upon connecting successfully.
132+
/// </returns>
120133
public static async Task<Worker> CreateWorkerAsync(
121-
ReceptionistConfig config,
134+
ReceptionistConfig config,
122135
ConnectionParameters connectionParameters,
123136
ILogDispatcher logger, Vector3 origin)
124137
{
138+
// TODO: Remove when UTY-1578 is fixed.
139+
#if UNITY_STANDALONE_LINUX
140+
connectionParameters.EnableProtocolLoggingAtStartup = false;
141+
Debug.LogWarning("Automatically disabling protocol logging on Linux workers to prevent crashes.");
142+
#endif
125143
using (var connectionFuture =
126-
Connection.ConnectAsync(config.ReceptionistHost, config.ReceptionistPort, config.WorkerId, connectionParameters))
144+
Connection.ConnectAsync(config.ReceptionistHost, config.ReceptionistPort, config.WorkerId,
145+
connectionParameters))
127146
{
128147
return await TryToConnectAsync(connectionFuture, connectionParameters.WorkerType, logger, origin);
129148
}
130149
}
131150

132151
/// <summary>
133-
/// Connects to the SpatialOS Runtime via the Locator service and creates a <see cref="Worker"/> object asynchronously.
152+
/// Connects to the SpatialOS Runtime via the Locator service and creates a <see cref="Worker" /> object
153+
/// asynchronously.
134154
/// </summary>
135-
/// <param name="config">The <see cref="LocatorConfig"/> object stores the configuration needed to connect via the Receptionist Service.</param>
136-
/// <param name="connectionParameters">The <see cref="ConnectionParameters"/> storing </param>
155+
/// <param name="config">
156+
/// The <see cref="LocatorConfig" /> object stores the configuration needed to connect via the
157+
/// Receptionist Service.
158+
/// </param>
159+
/// <param name="connectionParameters">The <see cref="ConnectionParameters" /> storing </param>
137160
/// <param name="logger">The logger used by this worker.</param>
138161
/// <param name="origin">The origin of this worker in the local Unity space.</param>
139-
/// <returns>A <see cref="Task{TResult}"/> to run this method asynchronously and retrieve the created <see cref="Worker"/> object upon connecting successfully.</returns>
162+
/// <returns>
163+
/// A <see cref="Task{TResult}" /> to run this method asynchronously and retrieve the created
164+
/// <see cref="Worker" /> object upon connecting successfully.
165+
/// </returns>
140166
public static async Task<Worker> CreateWorkerAsync(
141167
LocatorConfig parameters,
142168
ConnectionParameters connectionParameters,
143169
ILogDispatcher logger, Vector3 origin)
144170
{
145-
using (var locator = new Locator(parameters.LocatorHost, parameters.LocatorParameters))
171+
// TODO: Remove when UTY-1578 is fixed.
172+
#if UNITY_STANDALONE_LINUX
173+
connectionParameters.EnableProtocolLoggingAtStartup = false;
174+
Debug.LogWarning("Automatically disabling protocol logging on Linux workers to prevent crashes.");
175+
#endif
176+
using (var locator = new Locator(parameters.LocatorHost, parameters.LocatorParameters))
177+
{
178+
var deploymentList = await GetDeploymentList(locator);
179+
180+
var deploymentName = parameters.DeploymentListCallback(deploymentList);
181+
if (string.IsNullOrEmpty(deploymentName))
146182
{
147-
var deploymentList = await GetDeploymentList(locator);
148-
149-
var deploymentName = parameters.DeploymentListCallback(deploymentList);
150-
if (string.IsNullOrEmpty(deploymentName))
151-
{
152-
throw new ConnectionFailedException("No deployment name chosen",
153-
ConnectionErrorReason.DeploymentNotFound);
154-
}
155-
156-
using (var connectionFuture = locator.ConnectAsync(deploymentName, connectionParameters, (_) => true))
157-
{
158-
return await TryToConnectAsync(connectionFuture, connectionParameters.WorkerType, logger, origin);
183+
throw new ConnectionFailedException("No deployment name chosen",
184+
ConnectionErrorReason.DeploymentNotFound);
185+
}
186+
187+
using (var connectionFuture = locator.ConnectAsync(deploymentName, connectionParameters, (_) => true))
188+
{
189+
return await TryToConnectAsync(connectionFuture, connectionParameters.WorkerType, logger, origin);
159190
}
160191
}
161192
}
162193

163194
/// <summary>
164-
/// Connects to the SpatialOS Runtime via the Alpha Locator service and creates a <see cref="Worker"/> object asynchronously.
195+
/// Connects to the SpatialOS Runtime via the Alpha Locator service and creates a <see cref="Worker" /> object
196+
/// asynchronously.
165197
/// </summary>
166-
/// <param name="config">The <see cref="AlphaLocatorConfig"/> object stores the configuration needed to connect via the Receptionist Service.</param>
167-
/// <param name="connectionParameters">The <see cref="ConnectionParameters"/> storing </param>
198+
/// <param name="config">
199+
/// The <see cref="AlphaLocatorConfig" /> object stores the configuration needed to connect via the
200+
/// Receptionist Service.
201+
/// </param>
202+
/// <param name="connectionParameters">The <see cref="ConnectionParameters" /> storing </param>
168203
/// <param name="logger">The logger used by this worker.</param>
169204
/// <param name="origin">The origin of this worker in the local Unity space.</param>
170-
/// <returns>A <see cref="Task{TResult}"/> to run this method asynchronously and retrieve the created <see cref="Worker"/> object upon connecting successfully.</returns>
205+
/// <returns>
206+
/// A <see cref="Task{TResult}" /> to run this method asynchronously and retrieve the created
207+
/// <see cref="Worker" /> object upon connecting successfully.
208+
/// </returns>
171209
public static async Task<Worker> CreateWorkerAsync(
172210
AlphaLocatorConfig parameters,
173211
ConnectionParameters connectionParameters,
174212
ILogDispatcher logger, Vector3 origin)
175213
{
214+
// TODO: Remove when UTY-1578 is fixed.
215+
#if UNITY_STANDALONE_LINUX
216+
connectionParameters.EnableProtocolLoggingAtStartup = false;
217+
Debug.LogWarning("Automatically disabling protocol logging on Linux workers to prevent crashes.");
218+
#endif
176219
using (var locator = new AlphaLocator(parameters.LocatorHost, parameters.LocatorParameters))
177220
{
178221
using (var connectionFuture = locator.ConnectAsync(connectionParameters))
@@ -190,12 +233,14 @@ private static async Task<DeploymentList> GetDeploymentList(Locator locator)
190233
// Guard against null refs. This shouldn't be triggered.
191234
if (!deploymentList.HasValue)
192235
{
193-
throw new ConnectionFailedException("Deployment list future returned null.", ConnectionErrorReason.DeploymentNotFound);
236+
throw new ConnectionFailedException("Deployment list future returned null.",
237+
ConnectionErrorReason.DeploymentNotFound);
194238
}
195239

196240
if (deploymentList.Value.Error != null)
197241
{
198-
throw new ConnectionFailedException(deploymentList.Value.Error, ConnectionErrorReason.DeploymentNotFound);
242+
throw new ConnectionFailedException(deploymentList.Value.Error,
243+
ConnectionErrorReason.DeploymentNotFound);
199244
}
200245

201246
return deploymentList.Value;

workers/unity/Packages/com.improbable.gdk.core/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"description": "SpatialOS GDK Core Module. Made by Improbable.",
88
"dependencies": {
99
"com.improbable.gdk.tools": "0.1.3",
10-
"com.unity.entities": "0.0.12-preview.18",
11-
"com.unity.incrementalcompiler": "0.0.42-preview.28"
10+
"com.unity.entities": "0.0.12-preview.21"
1211
}
1312
}

workers/unity/Packages/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"com.improbable.gdk.testutils": "file:com.improbable.gdk.testutils",
99
"com.improbable.gdk.tools": "file:com.improbable.gdk.tools",
1010
"com.improbable.gdk.transformsynchronization": "file:com.improbable.gdk.transformsynchronization",
11-
"com.unity.package-manager-ui": "1.9.11",
11+
"com.unity.package-manager-ui": "2.0.3",
1212
"com.unity.modules.imgui": "1.0.0",
1313
"com.unity.modules.physics": "1.0.0",
1414
"com.unity.modules.ui": "1.0.0"

workers/unity/ProjectSettings/GraphicsSettings.asset

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ GraphicsSettings:
3737
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
3838
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
3939
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
40-
- {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0}
4140
m_PreloadedShaders: []
4241
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
4342
type: 0}

0 commit comments

Comments
 (0)