Skip to content
This repository has been archived by the owner on Dec 5, 2018. It is now read-only.

Commit

Permalink
Upgrade to use Unity SDK 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
oblm committed May 25, 2018
1 parent be1b9a6 commit 1f28b5b
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 15 deletions.
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.

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

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

Binary file modified workers/unity/Improbable/bin/UnityCodeGenerator.exe
Binary file not shown.

0 comments on commit 1f28b5b

Please sign in to comment.