Skip to content
This repository was archived by the owner on Dec 5, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ private IEnumerator Connect()
var connect = WorkerConnection.ConnectAsync(parameters, Deployment, AttachConnection);
yield return connect;

SpatialOS.ConnectionWasSuccesful = Connection.IsConnected;
if (SpatialOS.ConnectionWasSuccesful)
SpatialOS.ConnectionWasSuccessful = Connection.IsConnected;
if (SpatialOS.ConnectionWasSuccessful)
{
logger = new LogSender(() => SpatialOS.IsConnected, Connection.SendLogMessage, SpatialOS.Configuration, SpatialOS.LogFilter);
SetupComponents();
Expand Down Expand Up @@ -200,6 +200,7 @@ private void Update()
// before calling the first OnDestroy).
private void OnApplicationQuit()
{
SpatialOS.SignalApplicationQuit();
Dispose();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static SpatialOS()
};
}

internal static bool ConnectionWasSuccesful { get; set; }
internal static bool ConnectionWasSuccessful { get; set; }

/// <summary>
/// A callback that will be invoked when the deployment list has been retrieved from the Locator.
Expand Down Expand Up @@ -691,10 +691,21 @@ internal static void Disconnected(DisconnectOp disconnectOp)
receivedDisconnectOp = disconnectOp;
Disconnecting = true;
}

internal static void SignalApplicationQuit()
{
if (!ConnectionWasSuccessful)
{
receivedDisconnectOp = new DisconnectOp
{
Reason = "An application quit signal was received."
};
}
}

internal static void SignalDisconnection()
{
if (!ConnectionWasSuccesful)
if (!ConnectionWasSuccessful)
{
OnConnectionFailedInternal();
OnConnectionFailedWithReasonInternal();
Expand Down
Binary file modified workers/unity/Improbable/bin/UnityCodeGenerator.exe
Binary file not shown.