diff --git a/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/TrackableWindow.cs b/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/TrackableWindow.cs index b37271f9922e56cd8040959088e7177da1a7dbb7..acc8f552afe2a2b033951a349cf5e059aaee81e6 100644 --- a/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/TrackableWindow.cs +++ b/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/TrackableWindow.cs @@ -19,7 +19,7 @@ // #define USING_OPENAPI_GENERATOR // alt. is Swagger -//#define isDEBUG +#define isDEBUG using System.Collections; using System.Collections.Generic; @@ -47,14 +47,19 @@ namespace ETSI.ARF.WorldStorage.UI bool groupEnabled; + // Trackable params string UUID = System.Guid.Empty.ToString(); string customName = "NotDefined"; string creatorUUID = System.Guid.Empty.ToString(); - string type = "Unknow"; - string unit = "Unknow"; - Vector2Int dim; - - private Trackable currentTrackable; + Trackable.TrackableTypeEnum type = Trackable.TrackableTypeEnum.OTHER; + UnitSystem unit = UnitSystem.CM; + Vector3 trackableSize; + Vector3 localCRS_pos; + Vector3 localCRS_rot; + byte[] trackablePayload = new byte[1] { 0 }; + [SerializeField] Dictionary<string, List<string>> keyValueTags = new Dictionary<string, List<string>>(); + + // UI stuffs private Vector2 scrollPos; private Color ori; private GUIStyle gsTest; @@ -69,7 +74,6 @@ namespace ETSI.ARF.WorldStorage.UI public TrackableWindow() { // init somne stuffs - //currentTrackable = new Trackable(); } void OnGUI() @@ -95,7 +99,7 @@ namespace ETSI.ARF.WorldStorage.UI void DrawTrackableStuffs()// Trackable trackable) { - GUILayout.BeginVertical("AR Trackable", gsTest); + GUILayout.BeginVertical("Trackable Editor", gsTest); // GUILayout.Label("Server: " + worldStorageServer.serverName, EditorStyles.whiteLargeLabel); GUILayout.Label("User: " + worldStorageUser.userName, EditorStyles.whiteLargeLabel); @@ -121,59 +125,117 @@ namespace ETSI.ARF.WorldStorage.UI Trackable obj = TrackableRequest.GetTrackable(worldStorageServer, UUID); customName = obj.Name; creatorUUID = obj.CreatorUUID.ToString(); - type = obj.TrackableType.ToString(); - unit = obj.Unit.ToString(); + type = obj.TrackableType; + unit = obj.Unit; + if (obj.TrackableSize.Count == 3) + { + trackableSize = new Vector3((float)obj.TrackableSize[0], (float)obj.TrackableSize[1], (float)obj.TrackableSize[2]); + } + else trackableSize = Vector3.zero; + if (obj.LocalCRS.Count == 16) + { + Matrix4x4 localCRS = new Matrix4x4(); + localCRS.m00 = obj.LocalCRS[0]; localCRS.m01 = obj.LocalCRS[1]; localCRS.m02 = obj.LocalCRS[2]; localCRS.m03 = obj.LocalCRS[3]; + localCRS.m10 = obj.LocalCRS[4]; localCRS.m11 = obj.LocalCRS[5]; localCRS.m12 = obj.LocalCRS[6]; localCRS.m13 = obj.LocalCRS[7]; + localCRS.m20 = obj.LocalCRS[8]; localCRS.m21 = obj.LocalCRS[9]; localCRS.m22 = obj.LocalCRS[10]; localCRS.m23 = obj.LocalCRS[11]; + localCRS.m30 = obj.LocalCRS[12]; localCRS.m31 = obj.LocalCRS[13]; localCRS.m32 = obj.LocalCRS[14]; localCRS.m33 = obj.LocalCRS[15]; + localCRS_pos = localCRS.GetPosition(); + localCRS_rot = localCRS.rotation.eulerAngles; + } + else + { + localCRS_pos = Vector3.zero; + localCRS_rot = Vector3.zero; + } + keyValueTags = obj.KeyvalueTags; + this.Repaint(); // TODO } GUI.backgroundColor = ori; - type = EditorGUILayout.TextField("Trackable Type", type); - unit = EditorGUILayout.TextField("Unit System", unit); + type = (Trackable.TrackableTypeEnum)EditorGUILayout.EnumPopup("Trackable Type:", type); + unit = (UnitSystem)EditorGUILayout.EnumPopup("Unit System:", unit); EditorGUILayout.Space(10); - dim = EditorGUILayout.Vector2IntField("Dimension", dim); + trackableSize = EditorGUILayout.Vector3Field("Trackable Size:", trackableSize); + + EditorGUILayout.Space(10); + GUILayout.Label("Local CRS:"); + localCRS_pos = EditorGUILayout.Vector3Field("Position:", localCRS_pos); + localCRS_rot = EditorGUILayout.Vector3Field("Rotation:", localCRS_rot); EditorGUILayout.Space(); - GUILayout.Button("Payload from Asset..."); + if (GUILayout.Button("Generate Dummy Payload")) + { + // dummy + trackablePayload = new byte[100]; + for (int i = 0; i < trackablePayload.Length; i++) + { + trackablePayload[i] = (byte)i; + } + } EditorGUILayout.Space(); groupEnabled = EditorGUILayout.BeginToggleGroup("Optional Parameters:", groupEnabled); - EditorGUILayout.IntField("Number of KeyValues", 0); - EditorGUILayout.Space(); - EditorGUILayout.TextField("Key", ""); - EditorGUILayout.TextField("Value", ""); + //EditorGUILayout.IntField("Number of KeyValues", 0); + //EditorGUILayout.Space(); + //EditorGUILayout.TextField("Key", ""); + //EditorGUILayout.TextField("Value", ""); + if (GUILayout.Button("Generate Dummy Key Values")) + { + // dummy + keyValueTags.Clear(); + keyValueTags.Add("Location", new List<string> { "Room1" }); + } + // Test + //keyValueTags.Add("1", "a"); + //ScriptableObject target = this; + //SerializedObject so = new SerializedObject(target); + //SerializedProperty stringsProperty = so.FindProperty("trackables"); + //EditorGUILayout.PropertyField(stringsProperty, true); // True means show children + //so.ApplyModifiedProperties(); // Remember to apply modified properties EditorGUILayout.EndToggleGroup(); - // + GUILayout.EndVertical(); // ########################################################### - GUI.backgroundColor = WorldStorageWindow.arfColors[2]; - if (GUILayout.Button("Create/Update Trackable")) + GUI.backgroundColor = WorldStorageWindow.arfColors[1]; + if (GUILayout.Button("Create New Trackable")) { - Debug.Log("PostAddTrackable"); - + Debug.Log("POST Trackable"); + + UUID = "0"; if (string.IsNullOrEmpty(UUID) || UUID == "0") UUID = System.Guid.Empty.ToString(); - Trackable obj = GenerateTrackable(UUID, customName, worldStorageUser.UUID); - TrackableRequest.AddTrackable(worldStorageServer, obj); - WorldStorageWindow.WorldStorageWindowSingleton.UpdateListTrackables(); + Trackable obj = GenerateTrackable(); + UUID = TrackableRequest.AddTrackable(worldStorageServer, obj); + WorldStorageWindow.WorldStorageWindowSingleton.GetTrackables(); WorldStorageWindow.WorldStorageWindowSingleton.Repaint(); + } - UUID = obj.UUID.ToString(); - customName = obj.Name; - type = obj.TrackableType.ToString(); - unit = obj.Unit.ToString(); + GUI.backgroundColor = WorldStorageWindow.arfColors[2]; + if (GUILayout.Button("Modify Trackable")) + { + Debug.Log("PUT Trackable"); + + if (!string.IsNullOrEmpty(UUID) && UUID != "0") + { + Trackable obj = GenerateTrackable(); + UUID = TrackableRequest.UpdateTrackable(worldStorageServer, obj); + } + WorldStorageWindow.WorldStorageWindowSingleton.GetTrackables(); + WorldStorageWindow.WorldStorageWindowSingleton.Repaint(); } // ########################################################### GUI.backgroundColor = WorldStorageWindow.arfColors[3]; if (GUILayout.Button("Delete Trackable")) { - Debug.Log("Deleting Trackable"); + Debug.Log("Delete Trackable"); TrackableRequest.DeleteTrackable(worldStorageServer, UUID); UUID = System.Guid.Empty.ToString(); creatorUUID = System.Guid.Empty.ToString(); - type = ""; - unit = ""; - WorldStorageWindow.WorldStorageWindowSingleton.UpdateListTrackables(); + type = Trackable.TrackableTypeEnum.OTHER; + unit = UnitSystem.CM; + WorldStorageWindow.WorldStorageWindowSingleton.GetTrackables(); WorldStorageWindow.WorldStorageWindowSingleton.Repaint(); } GUI.backgroundColor = ori; @@ -187,52 +249,34 @@ namespace ETSI.ARF.WorldStorage.UI } - static public Trackable GenerateTrackable(string uuid, string name, string creatorUID) + public Trackable GenerateTrackable() { - EncodingInformationStructure trackableEncodingInformation = - new EncodingInformationStructure(EncodingInformationStructure.DataFormatEnum.ARCORE, "1.0"); + EncodingInformationStructure trackableEncodingInformation = new EncodingInformationStructure(EncodingInformationStructure.DataFormatEnum.ARCORE, "1.0"); Debug.Log("Created encoding information"); #if USING_OPENAPI_GENERATOR - List<double> size = new List<double>(); + List<double> _trackableSize = new List<double>(); #else - List<double?> trackableDimension = new List<double?>(); + List<double?> _trackableSize = new List<double?>(); #endif - size.Add(5); - size.Add(5); + _trackableSize.Add(trackableSize.x); + _trackableSize.Add(trackableSize.y); + _trackableSize.Add(trackableSize.z); Debug.Log("Created dimension"); - byte[] bytes = new byte[100]; - - for (int i = 0; i < bytes.Length; i++) - { - bytes[i] = (byte)i; - } - - List<float> crs = new List<float> + Matrix4x4 localCRS = new Matrix4x4(); + localCRS = Matrix4x4.TRS(localCRS_pos, Quaternion.Euler(localCRS_rot), Vector3.one); + List<float> _localCRS = new List<float> { - -2, 1, -3, 4, - 4, 4, 4, 2, - 1, 0, -2, 1, - -1, -2, 0, 0 + localCRS.m00, localCRS.m01, localCRS.m02, localCRS.m03, + localCRS.m10, localCRS.m11, localCRS.m12, localCRS.m13, + localCRS.m20, localCRS.m21, localCRS.m22, localCRS.m23, + localCRS.m30, localCRS.m31, localCRS.m32, localCRS.m33, }; - Dictionary<string, List<string>> kv = new Dictionary<string, List<string>>(); - kv.Add("Scenario", new List<string> { "ETSI Trackable" }); - - System.Guid _uuid = System.Guid.Parse(uuid); - Trackable t = new Trackable( - _uuid, - name, - System.Guid.Parse(creatorUID), - Trackable.TrackableTypeEnum.IMAGEMARKER, - trackableEncodingInformation, - bytes, - crs, - UnitSystem.M, - size, - kv); - t.UUID = _uuid; + System.Guid _uuid = System.Guid.Parse(UUID); + System.Guid _creator = System.Guid.Parse(worldStorageUser.UUID); + Trackable t = new Trackable(_uuid, customName, _creator, type, trackableEncodingInformation, trackablePayload, _localCRS, unit, _trackableSize, keyValueTags); return t; } } diff --git a/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldAnchorWindow.cs b/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldAnchorWindow.cs index e11693188d714c73750229f269a7e63018f7fcf3..84eec85be16da368bf5c02a87dbc1fdc58e00347 100644 --- a/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldAnchorWindow.cs +++ b/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldAnchorWindow.cs @@ -19,7 +19,7 @@ // #define USING_OPENAPI_GENERATOR // alt. is Swagger -//#define isDEBUG +#define isDEBUG using System.Collections; using System.Collections.Generic; @@ -46,12 +46,17 @@ namespace ETSI.ARF.WorldStorage.UI bool groupEnabled; + // World Anchors params string UUID = System.Guid.Empty.ToString(); string customName = "NotDefined"; string creatorUUID = System.Guid.Empty.ToString(); - string unit = "Unknow"; - Vector2Int dim; + UnitSystem unit = UnitSystem.CM; + Vector3 worldAnchorSize; + Vector3 localCRS_pos; + Vector3 localCRS_rot; + [SerializeField] Dictionary<string, List<string>> keyValueTags = new Dictionary<string, List<string>>(); + // UI stuffs private Vector2 scrollPos; private Color ori; private GUIStyle gsTest; @@ -71,6 +76,7 @@ namespace ETSI.ARF.WorldStorage.UI void OnGUI() { ori = GUI.backgroundColor; // remember ori color + gsTest = new GUIStyle("window"); gsTest.normal.textColor = WorldStorageWindow.arfColors[0]; gsTest.fontStyle = FontStyle.Bold; @@ -90,7 +96,7 @@ namespace ETSI.ARF.WorldStorage.UI void DrawAnchorStuffs() { - GUILayout.BeginVertical("AR World Anchor", gsTest); + GUILayout.BeginVertical("World Anchor Editor", gsTest); // GUILayout.Label("Server: " + worldStorageServer.serverName, EditorStyles.whiteLargeLabel); GUILayout.Label("User: " + worldStorageUser.userName, EditorStyles.whiteLargeLabel); @@ -116,53 +122,96 @@ namespace ETSI.ARF.WorldStorage.UI WorldAnchor obj = WorldAnchorRequest.GetWorldAnchor(worldStorageServer, UUID); customName = obj.Name; creatorUUID = obj.CreatorUUID.ToString(); - unit = obj.Unit.ToString(); + unit = obj.Unit; + if (obj.WorldAnchorSize.Count == 3) + { + worldAnchorSize = new Vector3((float)obj.WorldAnchorSize[0], (float)obj.WorldAnchorSize[1], (float)obj.WorldAnchorSize[2]); + } + else worldAnchorSize = Vector3.zero; + if (obj.LocalCRS.Count == 16) + { + Matrix4x4 localCRS = new Matrix4x4(); + localCRS.m00 = obj.LocalCRS[0]; localCRS.m01 = obj.LocalCRS[1]; localCRS.m02 = obj.LocalCRS[2]; localCRS.m03 = obj.LocalCRS[3]; + localCRS.m10 = obj.LocalCRS[4]; localCRS.m11 = obj.LocalCRS[5]; localCRS.m12 = obj.LocalCRS[6]; localCRS.m13 = obj.LocalCRS[7]; + localCRS.m20 = obj.LocalCRS[8]; localCRS.m21 = obj.LocalCRS[9]; localCRS.m22 = obj.LocalCRS[10]; localCRS.m23 = obj.LocalCRS[11]; + localCRS.m30 = obj.LocalCRS[12]; localCRS.m31 = obj.LocalCRS[13]; localCRS.m32 = obj.LocalCRS[14]; localCRS.m33 = obj.LocalCRS[15]; + localCRS_pos = localCRS.GetPosition(); + localCRS_rot = localCRS.rotation.eulerAngles; + } + else + { + localCRS_pos = Vector3.zero; + localCRS_rot = Vector3.zero; + } + keyValueTags = obj.KeyvalueTags; + this.Repaint(); // TODO } GUI.backgroundColor = ori; - //GUILayout.EndHorizontal(); - unit = EditorGUILayout.TextField("Unit System", unit); + unit = (UnitSystem)EditorGUILayout.EnumPopup("Unit System:", unit); + + EditorGUILayout.Space(10); + worldAnchorSize = EditorGUILayout.Vector3Field("Trackable Size:", worldAnchorSize); EditorGUILayout.Space(10); - dim = EditorGUILayout.Vector2IntField("Dimension", dim); + GUILayout.Label("Local CRS:"); + localCRS_pos = EditorGUILayout.Vector3Field("Position:", localCRS_pos); + localCRS_rot = EditorGUILayout.Vector3Field("Rotation:", localCRS_rot); EditorGUILayout.Space(); groupEnabled = EditorGUILayout.BeginToggleGroup("Optional Parameters:", groupEnabled); - EditorGUILayout.IntField("Number of KeyValues", 0); - EditorGUILayout.Space(); - EditorGUILayout.TextField("Key", ""); - EditorGUILayout.TextField("Value", ""); + //EditorGUILayout.IntField("Number of KeyValues", 0); + //EditorGUILayout.Space(); + //EditorGUILayout.TextField("Key", ""); + //EditorGUILayout.TextField("Value", ""); + if (GUILayout.Button("Generate Dummy Key Values")) + { + // dummy + keyValueTags.Clear(); + keyValueTags.Add("Location", new List<string> { "Room1" }); + } EditorGUILayout.EndToggleGroup(); // GUILayout.EndVertical(); // ########################################################### - GUI.backgroundColor = WorldStorageWindow.arfColors[2]; - if (GUILayout.Button("Create/Update World Anchor")) + GUI.backgroundColor = WorldStorageWindow.arfColors[1]; + if (GUILayout.Button("Create New World Anchor")) { - Debug.Log("PostAddWorldAnchor"); + Debug.Log("POST World Anchor"); + UUID = "0"; if (string.IsNullOrEmpty(UUID) || UUID == "0") UUID = System.Guid.Empty.ToString(); - WorldAnchor obj = GenerateWorldAnchor(UUID, customName, worldStorageUser.UUID); - WorldAnchorRequest.AddWorldAnchor(worldStorageServer, obj); - WorldStorageWindow.WorldStorageWindowSingleton.UpdateListWorldAnchors(); + WorldAnchor obj = GenerateWorldAnchor(); + UUID = WorldAnchorRequest.AddWorldAnchor(worldStorageServer, obj); + WorldStorageWindow.WorldStorageWindowSingleton.GetWorldAnchors(); WorldStorageWindow.WorldStorageWindowSingleton.Repaint(); + } - UUID = obj.UUID.ToString(); - customName = obj.Name; - unit = obj.Unit.ToString(); + GUI.backgroundColor = WorldStorageWindow.arfColors[2]; + if (GUILayout.Button("Modify World Anchor")) + { + Debug.Log("PUT World Anchor"); + + if (!string.IsNullOrEmpty(UUID) && UUID != "0") + { + WorldAnchor obj = GenerateWorldAnchor(); + UUID = WorldAnchorRequest.UpdateWorldAnchor(worldStorageServer, obj); + WorldStorageWindow.WorldStorageWindowSingleton.GetWorldAnchors(); + WorldStorageWindow.WorldStorageWindowSingleton.Repaint(); + } } // ########################################################### GUI.backgroundColor = WorldStorageWindow.arfColors[3]; if (GUILayout.Button("Delete World Anchor")) { - Debug.Log("Deleting World Anchor"); + Debug.Log("Delete World Anchor"); WorldAnchorRequest.DeleteWorldAnchor(worldStorageServer, UUID); UUID = System.Guid.Empty.ToString(); creatorUUID = System.Guid.Empty.ToString(); - unit = ""; - WorldStorageWindow.WorldStorageWindowSingleton.UpdateListWorldAnchors(); + unit = UnitSystem.CM; + WorldStorageWindow.WorldStorageWindowSingleton.GetWorldAnchors(); WorldStorageWindow.WorldStorageWindowSingleton.Repaint(); } GUI.backgroundColor = ori; @@ -175,49 +224,31 @@ namespace ETSI.ARF.WorldStorage.UI GUI.backgroundColor = ori; } - static public WorldAnchor GenerateWorldAnchor(string uuid, string name, string creatorUID) + public WorldAnchor GenerateWorldAnchor() { - EncodingInformationStructure trackableEncodingInformation = - new EncodingInformationStructure(EncodingInformationStructure.DataFormatEnum.ARCORE, "1.0"); - Debug.Log("Created encoding information"); - #if USING_OPENAPI_GENERATOR - List<double> size = new List<double>(); + List<double> _worldAnchorSize = new List<double>(); #else List<double?> trackableDimension = new List<double?>(); #endif - size.Add(5); - size.Add(5); + _worldAnchorSize.Add(worldAnchorSize.x); + _worldAnchorSize.Add(worldAnchorSize.x); + _worldAnchorSize.Add(worldAnchorSize.y); Debug.Log("Created dimension"); - byte[] bytes = new byte[100]; - - for (int i = 0; i < bytes.Length; i++) - { - bytes[i] = (byte)i; - } - - List<float> crs = new List<float> + Matrix4x4 localCRS = new Matrix4x4(); + localCRS = Matrix4x4.TRS(localCRS_pos, Quaternion.Euler(localCRS_rot), Vector3.one); + List<float> _localCRS = new List<float> { - -2, 1, -3, 4, - 4, 4, 4, 2, - 1, 0, -2, 1, - -1, -2, 0, 0 + localCRS.m00, localCRS.m01, localCRS.m02, localCRS.m03, + localCRS.m10, localCRS.m11, localCRS.m12, localCRS.m13, + localCRS.m20, localCRS.m21, localCRS.m22, localCRS.m23, + localCRS.m30, localCRS.m31, localCRS.m32, localCRS.m33, }; - Dictionary<string, List<string>> kv = new Dictionary<string, List<string>>(); - kv.Add("Scenario", new List<string> { "ETSI WorldAnchor" }); - - System.Guid _uuid = System.Guid.Parse(uuid); - WorldAnchor t = new WorldAnchor( - _uuid, - name, - System.Guid.Parse(creatorUID), - crs, - UnitSystem.M, - size, - kv); - t.UUID = _uuid; + System.Guid _uuid = System.Guid.Parse(UUID); + System.Guid _creator = System.Guid.Parse(worldStorageUser.UUID); + WorldAnchor t = new WorldAnchor(_uuid, customName, _creator, _localCRS, unit, _worldAnchorSize, keyValueTags); return t; } } diff --git a/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldLinkWindow.cs b/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldLinkWindow.cs new file mode 100644 index 0000000000000000000000000000000000000000..8334534197c9289c1f6fef3cf1d8f0cc638832bc --- /dev/null +++ b/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldLinkWindow.cs @@ -0,0 +1,248 @@ +// +// ARF - Augmented Reality Framework (ETSI ISG ARF) +// +// Copyright 2022 ETSI +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Last change: June 2022 +// + +#define USING_OPENAPI_GENERATOR // alt. is Swagger +#define isDEBUG + +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; +using ETSI.ARF.WorldStorage.REST; + +#if USING_OPENAPI_GENERATOR +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +#else +using IO.Swagger.Api; +using IO.Swagger.Model; +#endif + +namespace ETSI.ARF.WorldStorage.UI +{ + public class WorldLinkWindow : EditorWindow + { + [HideInInspector] public WorldStorageServer worldStorageServer; + [HideInInspector] public WorldStorageUser worldStorageUser; + + [SerializeField] public List<string> anchors = new List<string>(); + + bool groupEnabled; + + // World Anchors params + string UUID = System.Guid.Empty.ToString(); + string customName = "(no name for World Links)"; + string creatorUUID = System.Guid.Empty.ToString(); + string fromUUID = System.Guid.Empty.ToString(); + string toUUID = System.Guid.Empty.ToString(); + UnitSystem unit = UnitSystem.CM; + ObjectType fromType = ObjectType.NotIdentified, toType = ObjectType.NotIdentified; + Vector3 localCRS_pos; + Vector3 localCRS_rot; + [SerializeField] Dictionary<string, List<string>> keyValueTags = new Dictionary<string, List<string>>(); + + // UI stuffs + private Vector2 scrollPos; + private Color ori; + private GUIStyle gsTest; + + public static void ShowWindow(WorldStorageServer ws, WorldStorageUser user) + { + WorldLinkWindow win = EditorWindow.GetWindow(typeof(WorldLinkWindow), false, WorldStorageWindow.winName) as WorldLinkWindow; + win.worldStorageServer = ws; + win.worldStorageUser = user; + } + + public WorldLinkWindow() + { + // init somne stuffs + } + + void OnGUI() + { + ori = GUI.backgroundColor; // remember ori color + + gsTest = new GUIStyle("window"); + gsTest.normal.textColor = WorldStorageWindow.arfColors[0]; + gsTest.fontStyle = FontStyle.Bold; + + scrollPos = EditorGUILayout.BeginScrollView(scrollPos, GUILayout.ExpandWidth(true)); + WorldStorageWindow.DrawCopyright(); + + DrawAnchorStuffs(); + + EditorGUILayout.EndScrollView(); + + if (GUILayout.Button("Close Window")) + { + Close(); + } + } + + void DrawAnchorStuffs() + { + GUILayout.BeginVertical("World Link Editor", gsTest); + // + GUILayout.Label("Server: " + worldStorageServer.serverName, EditorStyles.whiteLargeLabel); + GUILayout.Label("User: " + worldStorageUser.userName, EditorStyles.whiteLargeLabel); + EditorGUILayout.Space(); + + //GUILayout.BeginHorizontal(); + customName = EditorGUILayout.TextField("Name of Link", customName); +#if isDEBUG + GUILayout.Label("UUID: " + UUID, EditorStyles.miniLabel); // readonly + GUILayout.Label("Creator UID: " + creatorUUID, EditorStyles.miniLabel); // readonly +#endif + EditorGUILayout.Space(); + + GUI.backgroundColor = WorldStorageWindow.arfColors[1]; + if (GUILayout.Button("Get Parameters")) + { + if (!customName.Contains("[")) UUID = customName; + else + { + // extract the UUID + UUID = customName.Split('[', ']')[1]; + } + WorldLink obj = WorldLinkRequest.GetWorldLink(worldStorageServer, UUID); + //customName = obj.Name; + creatorUUID = obj.CreatorUUID.ToString(); + fromUUID = obj.UUIDFrom.ToString(); + toUUID = obj.UUIDTo.ToString(); + fromType = obj.TypeFrom; + toType = obj.TypeTo; + unit = obj.Unit; + if (obj.Transform.Count == 16) + { + Matrix4x4 localCRS = new Matrix4x4(); + localCRS.m00 = obj.Transform[0]; localCRS.m01 = obj.Transform[1]; localCRS.m02 = obj.Transform[2]; localCRS.m03 = obj.Transform[3]; + localCRS.m10 = obj.Transform[4]; localCRS.m11 = obj.Transform[5]; localCRS.m12 = obj.Transform[6]; localCRS.m13 = obj.Transform[7]; + localCRS.m20 = obj.Transform[8]; localCRS.m21 = obj.Transform[9]; localCRS.m22 = obj.Transform[10]; localCRS.m23 = obj.Transform[11]; + localCRS.m30 = obj.Transform[12]; localCRS.m31 = obj.Transform[13]; localCRS.m32 = obj.Transform[14]; localCRS.m33 = obj.Transform[15]; + localCRS_pos = localCRS.GetPosition(); + localCRS_rot = localCRS.rotation.eulerAngles; + } + else + { + localCRS_pos = Vector3.zero; + localCRS_rot = Vector3.zero; + } + keyValueTags = obj.KeyvalueTags; + this.Repaint(); // TODO + } + GUI.backgroundColor = ori; + + unit = (UnitSystem)EditorGUILayout.EnumPopup("Unit System:", unit); + + fromType = (ObjectType)EditorGUILayout.EnumPopup("From Object Type:", fromType); + toType = (ObjectType)EditorGUILayout.EnumPopup("To Object Type:", toType); + + EditorGUILayout.Space(10); + GUILayout.Label("Local CRS:"); + localCRS_pos = EditorGUILayout.Vector3Field("Position:", localCRS_pos); + localCRS_rot = EditorGUILayout.Vector3Field("Rotation:", localCRS_rot); + + EditorGUILayout.Space(); + groupEnabled = EditorGUILayout.BeginToggleGroup("Optional Parameters:", groupEnabled); + //EditorGUILayout.IntField("Number of KeyValues", 0); + //EditorGUILayout.Space(); + //EditorGUILayout.TextField("Key", ""); + //EditorGUILayout.TextField("Value", ""); + if (GUILayout.Button("Generate Dummy Key Values")) + { + // dummy + keyValueTags.Clear(); + keyValueTags.Add("Location", new List<string> { "Room1" }); + } + EditorGUILayout.EndToggleGroup(); + // + GUILayout.EndVertical(); + + // ########################################################### + GUI.backgroundColor = WorldStorageWindow.arfColors[1]; + if (GUILayout.Button("Create New World Link")) + { + Debug.Log("POST World Link"); + + UUID = "0"; + if (string.IsNullOrEmpty(UUID) || UUID == "0") UUID = System.Guid.Empty.ToString(); + WorldLink obj = GenerateWorldLink(); + UUID = WorldLinkRequest.AddWorldLink(worldStorageServer, obj); + WorldStorageWindow.WorldStorageWindowSingleton.GetWorldLinks(); + WorldStorageWindow.WorldStorageWindowSingleton.Repaint(); + } + + GUI.backgroundColor = WorldStorageWindow.arfColors[2]; + if (GUILayout.Button("Modify World Link")) + { + Debug.Log("PUT World Link"); + + if (!string.IsNullOrEmpty(UUID) && UUID != "0") + { + WorldLink obj = GenerateWorldLink(); + UUID = WorldLinkRequest.UpdateWorldLink(worldStorageServer, obj); + WorldStorageWindow.WorldStorageWindowSingleton.GetWorldLinks(); + WorldStorageWindow.WorldStorageWindowSingleton.Repaint(); + } + } + + // ########################################################### + GUI.backgroundColor = WorldStorageWindow.arfColors[3]; + if (GUILayout.Button("Delete World Link")) + { + Debug.Log("Delete World Link"); + WorldLinkRequest.DeleteWorldLink(worldStorageServer, UUID); + UUID = System.Guid.Empty.ToString(); + creatorUUID = System.Guid.Empty.ToString(); + unit = UnitSystem.CM; + WorldStorageWindow.WorldStorageWindowSingleton.GetWorldLinks(); + WorldStorageWindow.WorldStorageWindowSingleton.Repaint(); + } + GUI.backgroundColor = ori; + + // ########################################################### + GUI.backgroundColor = WorldStorageWindow.arfColors[5]; + if (GUILayout.Button("Generate GameObject Component")) + { + } + GUI.backgroundColor = ori; + } + + public WorldLink GenerateWorldLink() + { + Matrix4x4 localCRS = new Matrix4x4(); + localCRS = Matrix4x4.TRS(localCRS_pos, Quaternion.Euler(localCRS_rot), Vector3.one); + List<float> _transform3d = new List<float> + { + localCRS.m00, localCRS.m01, localCRS.m02, localCRS.m03, + localCRS.m10, localCRS.m11, localCRS.m12, localCRS.m13, + localCRS.m20, localCRS.m21, localCRS.m22, localCRS.m23, + localCRS.m30, localCRS.m31, localCRS.m32, localCRS.m33, + }; + + System.Guid _uuid = System.Guid.Parse(UUID); + System.Guid _creator = System.Guid.Parse(worldStorageUser.UUID); + System.Guid _from = System.Guid.Parse(fromUUID); + System.Guid _to = System.Guid.Parse(toUUID); + WorldLink t = new WorldLink(_uuid, _creator, _to, _from, fromType, toType, _transform3d, unit, keyValueTags); + return t; + } + } +} \ No newline at end of file diff --git a/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldLinkWindow.cs.meta b/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldLinkWindow.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..6fdeb449c37b137881847fdb1819809eb9dfce05 --- /dev/null +++ b/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldLinkWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f66d40f8781c5784cbe1013328d78ae6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldStorageWindow.cs b/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldStorageWindow.cs index 7bebf6615978eb29a751284aef7cf472412b8e7f..5d353c9587cff336a1e9ed24bbf80b2620a38367 100644 --- a/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldStorageWindow.cs +++ b/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldStorageWindow.cs @@ -19,7 +19,7 @@ // #define USING_OPENAPI_GENERATOR // alt. is Swagger -//#define isDEBUG +#define isDEBUG using System.Collections; using System.Collections.Generic; @@ -49,6 +49,7 @@ namespace ETSI.ARF.WorldStorage.UI [SerializeField] public List<string> creators = new List<string>(); [SerializeField] public List<string> trackables = new List<string>(); [SerializeField] public List<string> anchors = new List<string>(); + [SerializeField] public List<string> links = new List<string>(); string ping = "-"; string state = "Unknow"; @@ -59,7 +60,7 @@ namespace ETSI.ARF.WorldStorage.UI private GUIStyle gsTest; static public string winName = "ARF Authoring Editor"; - static public Color[] arfColors = new Color[] + static public Color[] arfColors = new Color[] { Color.yellow, // paneltext new Color(0.3f, 1f, 1f), // button REST @@ -67,9 +68,9 @@ namespace ETSI.ARF.WorldStorage.UI new Color(1f, 0f, 0f), // button delete (red) new Color(1f, 0f, 1f), // button graph new Color(.7f, .5f, 1f) // button prefab - }; + }; + - //[MenuItem("[ ISG-ARF ]/World Storage Editor")] public static void ShowWindow() { @@ -97,59 +98,7 @@ namespace ETSI.ARF.WorldStorage.UI scrollPos = EditorGUILayout.BeginScrollView(scrollPos, GUILayout.ExpandWidth(true)); WorldStorageWindow.DrawCopyright(); - DrawServerStuffs(); - - GUI.backgroundColor = WorldStorageWindow.arfColors[2]; - if (GUILayout.Button("Create/Edit Trackable...")) - { - Debug.Log("Open Trackable Window"); - TrackableWindow.ShowWindow(worldStorageServer, worldStorageUser); - } - if (GUILayout.Button("Create/Edit World Anchor...")) - { - Debug.Log("Open World Anchor Window"); - WorldAnchorWindow.ShowWindow(worldStorageServer, worldStorageUser); - } - if (GUILayout.Button("Create/Edit Link...")) - { - } - - GUI.backgroundColor = WorldStorageWindow.arfColors[4]; - if (GUILayout.Button("Show Graph...")) - { - GraphWindow.ShowWindow(); - } - EditorGUILayout.EndScrollView(); - } - - public void UpdateListTrackables() - { - // Get all objects - Debug.Log("Get all server objects"); - List<Trackable> res = TrackableRequest.GetAllTrackables(worldStorageServer); - trackables.Clear(); - foreach (var item in res) - { - if (!string.IsNullOrEmpty(item.Name)) trackables.Add(item.Name + " [" + item.UUID.ToString() + "]"); - else trackables.Add(item.UUID.ToString()); - } - } - - public void UpdateListWorldAnchors() - { - // Get all objects - Debug.Log("Get all server objects"); - List<WorldAnchor> res = WorldAnchorRequest.GetAllWorldAnchors(worldStorageServer); - anchors.Clear(); - foreach (var item in res) - { - if (!string.IsNullOrEmpty(item.Name)) anchors.Add(item.Name + " [" + item.UUID.ToString() + "]"); - else anchors.Add(item.UUID.ToString()); - } - } - void DrawServerStuffs() - { // Server info GUILayout.BeginVertical("World Storage Server", gsTest); // @@ -163,9 +112,28 @@ namespace ETSI.ARF.WorldStorage.UI GUILayout.Label("Port: " + worldStorageServer.port); #endif + GUI.backgroundColor = WorldStorageWindow.arfColors[4]; + if (GUILayout.Button("Open World Representation Graph Window...")) + { + GraphWindow.ShowWindow(); + } + GUI.backgroundColor = ori; + + DrawElementStuffs(); + + EditorGUILayout.EndScrollView(); + } + + + void DrawElementStuffs() + { + EditorGUILayout.Space(); -#region Ping + // ########################################################### + // Handle admin + // ########################################################### + #region Ping GUILayout.BeginHorizontal(); ping = EditorGUILayout.TextField("Last Ping", ping); if (GUILayout.Button("Ping")) @@ -174,9 +142,9 @@ namespace ETSI.ARF.WorldStorage.UI } GUI.backgroundColor = ori; GUILayout.EndHorizontal(); -#endregion + #endregion -#region State + #region State GUILayout.BeginHorizontal(); state = EditorGUILayout.TextField("State", state); @@ -186,9 +154,9 @@ namespace ETSI.ARF.WorldStorage.UI } GUI.backgroundColor = ori; GUILayout.EndHorizontal(); -#endregion + #endregion -#region Version + #region Version GUILayout.BeginHorizontal(); vers = EditorGUILayout.TextField("Version", vers); @@ -198,59 +166,62 @@ namespace ETSI.ARF.WorldStorage.UI } GUI.backgroundColor = ori; GUILayout.EndHorizontal(); -#endregion + #endregion ScriptableObject target = this; SerializedObject so = new SerializedObject(target); + // ########################################################### // Get creators -#region Get all creator UUID + // ########################################################### + #region Get all creator UUID EditorGUILayout.Space(10); GUI.backgroundColor = WorldStorageWindow.arfColors[1]; - if (GUILayout.Button("Request all Creator ID")) - { - // Get all objects - Debug.Log("Get all creators id"); - List<Trackable> res = TrackableRequest.GetAllTrackables(worldStorageServer); - creators.Clear(); - foreach (var item in res) - { - if (!creators.Contains(item.CreatorUUID.ToString())) creators.Add(item.CreatorUUID.ToString()); - } - } + if (GUILayout.Button("Request all Creator ID")) GetCreators(); GUI.backgroundColor = ori; SerializedProperty stringsProperty = so.FindProperty("creators"); EditorGUILayout.PropertyField(stringsProperty, true); // True means show children so.ApplyModifiedProperties(); // Remember to apply modified properties -#endregion + #endregion - // - // Get trackables - // -#region Get all trackable objects + // ########################################################### + // Handle trackables + // ########################################################### + #region Get all trackable objects EditorGUILayout.Space(10); - // ########################################################### GUI.backgroundColor = WorldStorageWindow.arfColors[1]; if (GUILayout.Button("Request Trackables")) { - UpdateListTrackables(); + GetTrackables(); + } + + GUI.backgroundColor = WorldStorageWindow.arfColors[2]; + if (GUILayout.Button("Create/Edit Trackable...")) + { + Debug.Log("Open Trackable Window"); + TrackableWindow.ShowWindow(worldStorageServer, worldStorageUser); } - GUI.backgroundColor = ori; - // ########################################################### GUI.backgroundColor = WorldStorageWindow.arfColors[3]; if (GUILayout.Button("Delete all Trackables (3 stay in!!!)")) { Debug.Log("Deleting all Trackable "); int n = 0; - foreach (var item in trackables) + string UUID; + foreach (var customName in trackables) { - if (++n > 3) TrackableRequest.DeleteTrackable(worldStorageServer, item); + if (!customName.Contains("[")) UUID = customName; + else + { + // extract the UUID + UUID = customName.Split('[', ']')[1]; + } + if (++n > 3) TrackableRequest.DeleteTrackable(worldStorageServer, UUID); } - - UpdateListTrackables(); + + GetTrackables(); WorldStorageWindow.WorldStorageWindowSingleton.Repaint(); } GUI.backgroundColor = ori; @@ -259,34 +230,46 @@ namespace ETSI.ARF.WorldStorage.UI stringsProperty = so.FindProperty("trackables"); EditorGUILayout.PropertyField(stringsProperty, /*new GUIContent("Trackbales"),*/ true); // True means show children so.ApplyModifiedProperties(); // Remember to apply modified properties -#endregion - // - // Get anchors - // -#region Get all anchor objects - EditorGUILayout.Space(10); + #endregion // ########################################################### + // Handle anchors + // ########################################################### + #region Get all anchor objects + EditorGUILayout.Space(10); + GUI.backgroundColor = WorldStorageWindow.arfColors[1]; if (GUILayout.Button("Request World Anchors")) { - UpdateListWorldAnchors(); + GetWorldAnchors(); + } + + GUI.backgroundColor = WorldStorageWindow.arfColors[2]; + if (GUILayout.Button("Create/Edit World Anchor...")) + { + Debug.Log("Open World Anchor Window"); + WorldAnchorWindow.ShowWindow(worldStorageServer, worldStorageUser); } - GUI.backgroundColor = ori; - // ########################################################### GUI.backgroundColor = WorldStorageWindow.arfColors[3]; if (GUILayout.Button("Delete all World Anchors (3 stay in!!!)")) { Debug.Log("Deleting all World Anchors "); int n = 0; - foreach (var item in anchors) + string UUID; + foreach (var customName in anchors) { - if (++n > 3) WorldAnchorRequest.DeleteWorldAnchor(worldStorageServer, item); + if (!customName.Contains("[")) UUID = customName; + else + { + // extract the UUID + UUID = customName.Split('[', ']')[1]; + } + if (++n > 3) WorldAnchorRequest.DeleteWorldAnchor(worldStorageServer, UUID); } - UpdateListWorldAnchors(); + GetWorldAnchors(); WorldStorageWindow.WorldStorageWindowSingleton.Repaint(); } GUI.backgroundColor = ori; @@ -295,22 +278,112 @@ namespace ETSI.ARF.WorldStorage.UI stringsProperty = so.FindProperty("anchors"); EditorGUILayout.PropertyField(stringsProperty, /*new GUIContent("Trackbales"),*/ true); // True means show children so.ApplyModifiedProperties(); // Remember to apply modified properties -#endregion + #endregion + + // ########################################################### + // Handle Links + // ########################################################### + #region Get all link objects + EditorGUILayout.Space(10); - // - // Get Links - // -#region Get all link objects GUI.backgroundColor = WorldStorageWindow.arfColors[1]; if (GUILayout.Button("Request World Links")) { + GetWorldLinks(); + } + + GUI.backgroundColor = WorldStorageWindow.arfColors[2]; + if (GUILayout.Button("Create/Edit World Link...")) + { + Debug.Log("Open World Link Window"); + WorldLinkWindow.ShowWindow(worldStorageServer, worldStorageUser); + } + + GUI.backgroundColor = WorldStorageWindow.arfColors[3]; + if (GUILayout.Button("Delete all World Links (3 stay in!!!)")) + { + Debug.Log("Deleting all World Links"); + int n = 0; + string UUID; + foreach (var customName in links) + { + if (!customName.Contains("[")) UUID = customName; + else + { + // extract the UUID + UUID = customName.Split('[', ']')[1]; + } + if (++n > 3) WorldLinkRequest.DeleteWorldLink(worldStorageServer, UUID); + } + GetWorldLinks(); + WorldStorageWindow.WorldStorageWindowSingleton.Repaint(); } GUI.backgroundColor = ori; -#endregion + + // Show list + stringsProperty = so.FindProperty("links"); + EditorGUILayout.PropertyField(stringsProperty, /*new GUIContent("Trackbales"),*/ true); // True means show children + so.ApplyModifiedProperties(); // Remember to apply modified properties + #endregion // GUILayout.EndVertical(); } + + // ########################################################### + // Get elements from current server + // ########################################################### + #region Helpers + public void GetCreators() + { + // Get all objects + Debug.Log("Get all creators id"); + List<Trackable> res = TrackableRequest.GetAllTrackables(worldStorageServer); + creators.Clear(); + foreach (var item in res) + { + if (!creators.Contains(item.CreatorUUID.ToString())) creators.Add(item.CreatorUUID.ToString()); + } + } + + public void GetTrackables() + { + // Get all objects + Debug.Log("Get all server objects"); + List<Trackable> res = TrackableRequest.GetAllTrackables(worldStorageServer); + trackables.Clear(); + foreach (var item in res) + { + if (!string.IsNullOrEmpty(item.Name)) trackables.Add(item.Name + " [" + item.UUID.ToString() + "]"); + else trackables.Add(item.UUID.ToString()); + } + } + + public void GetWorldAnchors() + { + // Get all objects + Debug.Log("Get all server objects"); + List<WorldAnchor> res = WorldAnchorRequest.GetAllWorldAnchors(worldStorageServer); + anchors.Clear(); + foreach (var item in res) + { + if (!string.IsNullOrEmpty(item.Name)) anchors.Add(item.Name + " [" + item.UUID.ToString() + "]"); + else anchors.Add(item.UUID.ToString()); + } + } + + public void GetWorldLinks() + { + // Get all objects + Debug.Log("Get all server objects"); + List<WorldLink> res = WorldLinkRequest.GetAllWorldLinks(worldStorageServer); + links.Clear(); + foreach (var item in res) + { + links.Add(item.UUID.ToString()); + } + } + #endregion } } \ No newline at end of file diff --git a/Assets/ETSI.ARF/ARF World Storage API/Editor/WorldStorageServerEditor.cs b/Assets/ETSI.ARF/ARF World Storage API/Editor/WorldStorageServerEditor.cs index aef63dfa2b3513e45c704cd7a9534040a4664750..20cc3ab4173c9a9fe1e3fb52ecb292b1db49163e 100644 --- a/Assets/ETSI.ARF/ARF World Storage API/Editor/WorldStorageServerEditor.cs +++ b/Assets/ETSI.ARF/ARF World Storage API/Editor/WorldStorageServerEditor.cs @@ -55,7 +55,7 @@ namespace ETSI.ARF.WorldStorage.UI Debug.Log("Open Main ARF Window"); win = EditorWindow.GetWindow(typeof(WorldStorageWindow), false, "ETSI ARF - Authoring Editor") as WorldStorageWindow; win.worldStorageServer = worldStorageServer; - win.worldStorageUser = worldStorageServer.user; + win.worldStorageUser = worldStorageServer.currentUser; } GUI.backgroundColor = ori; } diff --git a/Assets/ETSI.ARF/ARF World Storage API/Scenes/WorldStorageSample.unity b/Assets/ETSI.ARF/ARF World Storage API/Scenes/WorldStorageSample.unity index 51b3ac9e05164713f603cb3dfff4af54aca7a090..3a33138d36e06c1bcaab36b2c91f008868459034 100644 --- a/Assets/ETSI.ARF/ARF World Storage API/Scenes/WorldStorageSample.unity +++ b/Assets/ETSI.ARF/ARF World Storage API/Scenes/WorldStorageSample.unity @@ -212,6 +212,7 @@ Transform: m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -259,6 +260,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -307,6 +309,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 2 @@ -390,6 +393,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 1, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -434,6 +438,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 3 diff --git a/Assets/ETSI.ARF/ARF World Storage API/World Storage/HHI Server - local.asset b/Assets/ETSI.ARF/ARF World Storage API/World Storage/HHI Server - local.asset index b4b6a1d0de3f9cb0a8324ed9c3480c19a4f1b925..770632728014ac4f755db04244998b7e3b45bb1b 100644 --- a/Assets/ETSI.ARF/ARF World Storage API/World Storage/HHI Server - local.asset +++ b/Assets/ETSI.ARF/ARF World Storage API/World Storage/HHI Server - local.asset @@ -13,6 +13,7 @@ MonoBehaviour: m_Name: HHI Server - local m_EditorClassIdentifier: serverName: HHI Server (Detlef) + company: Fraunhofer HHI basePath: http://172.17.132.19 port: 8080 - user: {fileID: 11400000, guid: ce0f40be06008b14283766424922b729, type: 2} + currentUser: {fileID: 11400000, guid: ce0f40be06008b14283766424922b729, type: 2} diff --git a/Assets/ETSI.ARF/ARF World Storage API/World Storage/HHI Server.asset b/Assets/ETSI.ARF/ARF World Storage API/World Storage/HHI Server.asset index a556ade807c0deee3bac9b01c0bdbc84e83e1e5f..34a6f8602d4282df47dc361e3786fe13141bc6f6 100644 --- a/Assets/ETSI.ARF/ARF World Storage API/World Storage/HHI Server.asset +++ b/Assets/ETSI.ARF/ARF World Storage API/World Storage/HHI Server.asset @@ -13,6 +13,7 @@ MonoBehaviour: m_Name: HHI Server m_EditorClassIdentifier: serverName: HHI World Storage Server - basePath: https://ics1.hhi.fraunhofer.de/ + company: Fraunhofer HHI + basePath: https://ics1.hhi.fraunhofer.de port: 8080 - user: {fileID: 11400000, guid: ce0f40be06008b14283766424922b729, type: 2} + currentUser: {fileID: 11400000, guid: ce0f40be06008b14283766424922b729, type: 2} diff --git a/Assets/ETSI.ARF/ARF World Storage API/World Storage/Nathan.asset b/Assets/ETSI.ARF/ARF World Storage API/World Storage/Nathan.asset new file mode 100644 index 0000000000000000000000000000000000000000..7d94f177ece771b91cd5c2459d1e52dc243da63f --- /dev/null +++ b/Assets/ETSI.ARF/ARF World Storage API/World Storage/Nathan.asset @@ -0,0 +1,17 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8a1e3e7961eae84468e6ee20d5b09ffd, type: 3} + m_Name: Nathan + m_EditorClassIdentifier: + userName: Nathan + company: b<>com + UUID: 9b7b144d-f456-46b0-ae03-2cbbf12eaf6a diff --git a/Assets/ETSI.ARF/ARF World Storage API/World Storage/Nathan.asset.meta b/Assets/ETSI.ARF/ARF World Storage API/World Storage/Nathan.asset.meta new file mode 100644 index 0000000000000000000000000000000000000000..1a048ac57e59c4fc003a7551783012cd28bff661 --- /dev/null +++ b/Assets/ETSI.ARF/ARF World Storage API/World Storage/Nathan.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c0696089e4a855b46ad490437919b1e8 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ETSI.ARF/ARF World Storage API/World Storage/Sylvain.asset b/Assets/ETSI.ARF/ARF World Storage API/World Storage/Sylvain.asset index b904326662a8d34184d38e62cb99ba8197e791d6..8dfe29c104787303a42ebbbb57530b053e609e8f 100644 --- a/Assets/ETSI.ARF/ARF World Storage API/World Storage/Sylvain.asset +++ b/Assets/ETSI.ARF/ARF World Storage API/World Storage/Sylvain.asset @@ -12,5 +12,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8a1e3e7961eae84468e6ee20d5b09ffd, type: 3} m_Name: Sylvain m_EditorClassIdentifier: - userName: Sylvain R. + userName: Sylvain + company: Fraunhofer HHI UUID: faee4241-62ac-47d1-92c8-5b4b7a5fbc93 diff --git a/Packages/unity-world-storage-package b/Packages/unity-world-storage-package index 036c4edd918710fe3b17b9ca2b893c40291a4a94..c8406f18a9f789d4cc0eb2ef995d274797ea4051 160000 --- a/Packages/unity-world-storage-package +++ b/Packages/unity-world-storage-package @@ -1 +1 @@ -Subproject commit 036c4edd918710fe3b17b9ca2b893c40291a4a94 +Subproject commit c8406f18a9f789d4cc0eb2ef995d274797ea4051 diff --git a/ProjectSettings/SceneTemplateSettings.json b/ProjectSettings/SceneTemplateSettings.json new file mode 100644 index 0000000000000000000000000000000000000000..6f3e60fd8b7178b90a74640de7a6006d7a2b6565 --- /dev/null +++ b/ProjectSettings/SceneTemplateSettings.json @@ -0,0 +1,167 @@ +{ + "templatePinStates": [], + "dependencyTypeInfos": [ + { + "userAdded": false, + "type": "UnityEngine.AnimationClip", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.Animations.AnimatorController", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.AnimatorOverrideController", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.Audio.AudioMixerController", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.ComputeShader", + "ignore": true, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Cubemap", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.GameObject", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.LightingDataAsset", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": false + }, + { + "userAdded": false, + "type": "UnityEngine.LightingSettings", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Material", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.MonoScript", + "ignore": true, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.PhysicMaterial", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.PhysicsMaterial2D", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.VolumeProfile", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.SceneAsset", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": false + }, + { + "userAdded": false, + "type": "UnityEngine.Shader", + "ignore": true, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.ShaderVariantCollection", + "ignore": true, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Texture", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Texture2D", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Timeline.TimelineAsset", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + } + ], + "defaultDependencyTypeInfo": { + "userAdded": false, + "type": "<default_scene_template_dependencies>", + "ignore": false, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + "newSceneOverride": 0 +} \ No newline at end of file diff --git a/UserSettings/Layouts/default-2021.dwlt b/UserSettings/Layouts/default-2021.dwlt index dc2e7824e7761bbe71e1d01edfbc0516f29f487e..6b993581eb97b3f94815f457f48a585f369dd7c1 100644 --- a/UserSettings/Layouts/default-2021.dwlt +++ b/UserSettings/Layouts/default-2021.dwlt @@ -14,10 +14,10 @@ MonoBehaviour: m_EditorClassIdentifier: m_PixelRect: serializedVersion: 2 - x: 6.2222223 - y: 48.444447 - width: 1694.2223 - height: 972 + x: 96 + y: 157.33333 + width: 1308 + height: 787.11115 m_ShowMode: 4 m_Title: Inspector m_RootView: {fileID: 8} @@ -39,10 +39,10 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 628.44446 + x: 517.7778 y: 0 - width: 722.22217 - height: 364.22223 + width: 522.6667 + height: 291.7778 m_MinSize: {x: 102, y: 121} m_MaxSize: {x: 4002, y: 4021} m_ActualView: {fileID: 20} @@ -68,13 +68,13 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 557.7778 - width: 1350.6666 - height: 364.22223 + y: 445.33334 + width: 1040.4445 + height: 291.7778 m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 113 + controlID: 127 --- !u!114 &4 MonoBehaviour: m_ObjectHideFlags: 52 @@ -94,12 +94,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 30 - width: 1694.2222 - height: 922 + width: 1308 + height: 737.11115 m_MinSize: {x: 300, y: 200} m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: 102 + controlID: 76 --- !u!114 &5 MonoBehaviour: m_ObjectHideFlags: 52 @@ -115,10 +115,10 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 1350.6666 + x: 1040.4445 y: 0 - width: 343.55554 - height: 922 + width: 267.55554 + height: 737.11115 m_MinSize: {x: 276, y: 71} m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 16} @@ -143,8 +143,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 334.22223 - height: 557.7778 + width: 252.88889 + height: 445.33334 m_MinSize: {x: 201, y: 221} m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 17} @@ -169,8 +169,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 628.44446 - height: 364.22223 + width: 517.7778 + height: 291.7778 m_MinSize: {x: 231, y: 271} m_MaxSize: {x: 10001, y: 10021} m_ActualView: {fileID: 15} @@ -198,8 +198,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1694.2222 - height: 972 + width: 1308 + height: 787.11115 m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} m_UseTopView: 1 @@ -223,7 +223,7 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1694.2222 + width: 1308 height: 30 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} @@ -244,8 +244,8 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 952 - width: 1694.2222 + y: 767.11115 + width: 1308 height: 20 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} @@ -268,12 +268,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1350.6666 - height: 922 + width: 1040.4445 + height: 737.11115 m_MinSize: {x: 200, y: 200} m_MaxSize: {x: 16192, y: 16192} vertical: 1 - controlID: 103 + controlID: 65 --- !u!114 &12 MonoBehaviour: m_ObjectHideFlags: 52 @@ -293,12 +293,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1350.6666 - height: 557.7778 + width: 1040.4445 + height: 445.33334 m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 104 + controlID: 66 --- !u!114 &13 MonoBehaviour: m_ObjectHideFlags: 52 @@ -314,10 +314,10 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 334.22223 + x: 252.88889 y: 0 - width: 1016.4444 - height: 557.7778 + width: 787.55554 + height: 445.33334 m_MinSize: {x: 202, y: 221} m_MaxSize: {x: 4002, y: 4021} m_ActualView: {fileID: 18} @@ -375,10 +375,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 6.2222223 - y: 636.44446 - width: 627.44446 - height: 343.22223 + x: 96 + y: 632.8889 + width: 516.7778 + height: 270.7778 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -396,22 +396,22 @@ MonoBehaviour: m_SkipHidden: 0 m_SearchArea: 1 m_Folders: - - Assets/ETSI.ARF/ARF World Storage API/Scenes + - Assets/ETSI.ARF/ARF World Storage API/World Storage m_Globs: [] m_OriginalText: m_ViewMode: 1 m_StartGridSize: 16 m_LastFolders: - - Assets/ETSI.ARF/ARF World Storage API/Scenes + - Assets/ETSI.ARF/ARF World Storage API/World Storage m_LastFoldersGridSize: 16 m_LastProjectPath: D:\Fraunhofer\Projects\ETSI\GitLab (STF)\unity-world-storage-editor m_LockTracker: m_IsLocked: 0 m_FolderTreeState: - scrollPos: {x: 0, y: 79} - m_SelectedIDs: 3a610000 - m_LastClickedID: 24890 - m_ExpandedIDs: 000000002a6100002c6100002e61000000ca9a3bffffff7f + scrollPos: {x: 0, y: 28.356365} + m_SelectedIDs: 664b0000 + m_LastClickedID: 19302 + m_ExpandedIDs: 000000004a4b00004c4b00004e4b0000504b0000524b0000544b0000564b000000ca9a3bffffff7f m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -427,7 +427,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 0} + m_ClientGUIView: {fileID: 7} m_SearchString: m_CreateAssetUtility: m_EndAction: {fileID: 0} @@ -439,7 +439,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 000000002a6100002c6100002e610000 + m_ExpandedIDs: 000000004a4b00004c4b00004e4b0000504b0000524b0000544b0000564b0000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -467,7 +467,7 @@ MonoBehaviour: m_SelectedInstanceIDs: m_LastClickedInstanceID: 0 m_HadKeyboardFocusLastEvent: 1 - m_ExpandedInstanceIDs: c6230000 + m_ExpandedInstanceIDs: c6230000de4b0000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -483,7 +483,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 0} + m_ClientGUIView: {fileID: 7} m_CreateAssetUtility: m_EndAction: {fileID: 0} m_InstanceID: 0 @@ -494,7 +494,7 @@ MonoBehaviour: m_ScrollPosition: {x: 0, y: 0} m_GridSize: 16 m_SkipHiddenPackages: 0 - m_DirectoriesAreaWidth: 334 + m_DirectoriesAreaWidth: 257.8889 --- !u!114 &16 MonoBehaviour: m_ObjectHideFlags: 52 @@ -515,10 +515,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1356.8889 - y: 78.666664 - width: 342.55554 - height: 901 + x: 1136.4445 + y: 187.55556 + width: 266.55554 + height: 716.11115 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -556,10 +556,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 6.2222223 - y: 78.666664 - width: 333.22223 - height: 536.7778 + x: 96 + y: 187.55556 + width: 251.88889 + height: 424.33334 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -567,9 +567,9 @@ MonoBehaviour: m_SceneHierarchy: m_TreeViewState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: c05d0000 + m_SelectedIDs: 444b0000 m_LastClickedID: 0 - m_ExpandedIDs: 06e4ffff + m_ExpandedIDs: 34fbffff m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -613,10 +613,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 340.44446 - y: 78.666664 - width: 1014.4444 - height: 536.7778 + x: 348.8889 + y: 187.55556 + width: 785.55554 + height: 424.33334 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -681,9 +681,9 @@ MonoBehaviour: floating: 0 collapsed: 0 displayed: 1 - snapOffset: {x: 67.5, y: 86} + snapOffset: {x: 67.5, y: -190.44443} snapOffsetDelta: {x: 0, y: 0} - snapCorner: 0 + snapCorner: 2 id: Orientation index: 0 layout: 4 @@ -949,8 +949,8 @@ MonoBehaviour: vZoomLockedByDefault: 0 m_HBaseRangeMin: -766 m_HBaseRangeMax: 766 - m_VBaseRangeMin: -395 - m_VBaseRangeMax: 395 + m_VBaseRangeMin: -384.5 + m_VBaseRangeMax: 384.5 m_HAllowExceedBaseRangeMin: 1 m_HAllowExceedBaseRangeMax: 1 m_VAllowExceedBaseRangeMin: 1 @@ -967,11 +967,11 @@ MonoBehaviour: m_DrawArea: serializedVersion: 2 x: 0 - y: 0 + y: 21 width: 1532 - height: 790 + height: 769 m_Scale: {x: 1, y: 1} - m_Translation: {x: 766, y: 395} + m_Translation: {x: 766, y: 384.5} m_MarginLeft: 0 m_MarginRight: 0 m_MarginTop: 0 @@ -979,9 +979,9 @@ MonoBehaviour: m_LastShownAreaInsideMargins: serializedVersion: 2 x: -766 - y: -395 + y: -384.5 width: 1532 - height: 790 + height: 769 m_MinimalGUI: 1 m_defaultScale: 1 m_LastWindowPixelSize: {x: 3447, y: 1777.5} @@ -1010,10 +1010,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 634.6667 - y: 636.44446 - width: 720.22217 - height: 343.22223 + x: 613.7778 + y: 632.8889 + width: 520.6667 + height: 270.7778 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default