diff --git a/unity_package/Runtime/VELConnectManager.cs b/unity_package/Runtime/VELConnectManager.cs index 35937f4..788f3fe 100644 --- a/unity_package/Runtime/VELConnectManager.cs +++ b/unity_package/Runtime/VELConnectManager.cs @@ -171,6 +171,7 @@ namespace VELConnect private void Awake() { + velConnectUrl = velConnectUrl.TrimEnd('/'); if (instance != null) Debug.LogError("VELConnectManager instance already exists", this); instance = this; deviceId = CreateDeviceId(); @@ -259,7 +260,6 @@ namespace VELConnect { state = JsonConvert.DeserializeObject(json); if (state == null) return; - if (state.room == null) return; bool isInitialState = false; @@ -405,7 +405,7 @@ namespace VELConnect } // if (state.room.modified_by != DeviceId && state.room.data != null) - if (state.room.data != null) + if (state.room?.data != null) { foreach (KeyValuePair elem in state.room.data) { @@ -686,6 +686,11 @@ namespace VELConnect ); } + public static void SetUserData(string key, string value) + { + SetUserData(new Dictionary { { key, value } }); + } + /// /// Sets the 'data' object of the Device table /// diff --git a/unity_package/package.json b/unity_package/package.json index 6f33f5b..5473e89 100644 --- a/unity_package/package.json +++ b/unity_package/package.json @@ -1,7 +1,7 @@ { "name": "edu.uga.engr.vel.vel-connect", "displayName": "VEL-Connect", - "version": "4.0.5", + "version": "4.0.6", "unity": "2019.1", "description": "Web-based configuration for VR applications", "keywords": [], @@ -13,6 +13,6 @@ "samples": [], "dependencies": { "com.unity.nuget.newtonsoft-json": "3.0.0", - "edu.uga.engr.vel.velnet": "1.1.8" + "edu.uga.engr.vel.velnet": "1.3.8" } }