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

Commit a80c79e

Browse files
author
Vincent Cantin
committed
Let the examples run when the UnityEditor does not have the focus.
1 parent c24e254 commit a80c79e

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

unity-project/Assets/example/TestDdpAccount.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public class TestDdpAccount : MonoBehaviour {
3838
private DdpAccount account;
3939

4040
public void Start() {
41+
Application.runInBackground = true; // Let the game run when the editor is not focused.
42+
4143
ddpConnection = new DdpConnection(serverUrl);
4244
ddpConnection.logMessages = logMessages;
4345

unity-project/Assets/example/TestDdpClient.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ public class TestDdpClient : MonoBehaviour {
3434
private DdpConnection ddpConnection;
3535

3636
public void Start() {
37+
Application.runInBackground = true; // Let the game run when the editor is not focused.
38+
3739
ddpConnection = new DdpConnection(serverUrl);
3840
ddpConnection.logMessages = logMessages;
3941

unity-project/Assets/example/TestLocalDB.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ public class TestLocalDB : MonoBehaviour {
3636
private JsonObjectCollection friendCollection;
3737

3838
public void Start() {
39+
Application.runInBackground = true; // Let the game run when the editor is not focused.
40+
3941
ddpConnection = new DdpConnection(serverUrl);
4042
ddpConnection.logMessages = logMessages;
4143

0 commit comments

Comments
 (0)