Commit 8ccb356a authored by Sylvain Renault's avatar Sylvain Renault
Browse files

- added a to/from object GUI

- added a to/from request button (tbi)
parent 0a8d6c3b
Loading
Loading
Loading
Loading
+45 −2
Original line number Diff line number Diff line
@@ -47,13 +47,21 @@ namespace ETSI.ARF.WorldStorage.UI
        [SerializeField] public List<string> anchors = new List<string>();

        bool groupEnabled;
        private static GUILayoutOption miniButtonWidth = GUILayout.Width(50);

        // World Anchors params
        string UUID = System.Guid.Empty.ToString();
        string customName = "(no name for World Links)";
        string creatorUUID = System.Guid.Empty.ToString();
        // From...
        private bool showListFrom = true;
        string fromName = "(none)";
        string fromUUID = System.Guid.Empty.ToString();
        // To...
        private bool showListTo = true;
        string toName = "(none)";
        string toUUID = System.Guid.Empty.ToString();

        UnitSystem unit = UnitSystem.CM;
        ObjectType fromType = ObjectType.NotIdentified, toType = ObjectType.NotIdentified;
        Vector3 localCRS_pos;
@@ -130,8 +138,43 @@ namespace ETSI.ARF.WorldStorage.UI

            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();
            showListFrom = EditorGUILayout.Foldout(showListFrom, "Parent Object (From)");
            if (showListFrom)
            {
                EditorGUILayout.BeginHorizontal();
                fromUUID = EditorGUILayout.TextField("UUID", fromUUID);
                GUI.backgroundColor = WorldStorageWindow.arfColors[1];
                if (GUILayout.Button("Find", EditorStyles.miniButtonLeft, miniButtonWidth))
                {
                    // TODO Request the object from the server
                    fromName = "(not implemented yet)";
                    fromType = ObjectType.NotIdentified;
                }
                EditorGUILayout.EndHorizontal();
                GUI.backgroundColor = ori;
                fromName = EditorGUILayout.TextField("Name", fromName);
                fromType = (ObjectType)EditorGUILayout.EnumPopup("Type:", fromType);
            }

            EditorGUILayout.Space();
            showListTo = EditorGUILayout.Foldout(showListTo, "Child Object (To)");
            if (showListTo)
            {
                EditorGUILayout.BeginHorizontal();
                toUUID = EditorGUILayout.TextField("UUID", toUUID);
                GUI.backgroundColor = WorldStorageWindow.arfColors[1];
                if (GUILayout.Button("Find", EditorStyles.miniButtonLeft, miniButtonWidth))
                {
                    // TODO Request the object from the server
                    toName = "(not implemented yet)";
                    toType = ObjectType.NotIdentified;
                }
                EditorGUILayout.EndHorizontal();
                GUI.backgroundColor = ori;
                toName = EditorGUILayout.TextField("Name", toName);
                toType = (ObjectType)EditorGUILayout.EnumPopup("Type:", toType);
            }

            EditorGUILayout.Space(10);
            GUILayout.Label("Local CRS:");
+215 −106
Original line number Diff line number Diff line
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &1
MonoBehaviour:
  m_ObjectHideFlags: 52
  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: 12004, guid: 0000000000000000e000000000000000, type: 0}
  m_Name: 
  m_EditorClassIdentifier: 
  m_PixelRect:
    serializedVersion: 2
    x: 464
    y: 157.33333
    width: 696.44446
    height: 876.8889
  m_ShowMode: 0
  m_Title: ETSI ARF - Authoring Editor
  m_RootView: {fileID: 4}
  m_MinSize: {x: 100, y: 121}
  m_MaxSize: {x: 4000, y: 4021}
  m_Maximized: 0
--- !u!114 &2
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -14,17 +38,67 @@ MonoBehaviour:
  m_EditorClassIdentifier: 
  m_PixelRect:
    serializedVersion: 2
    x: 206.22223
    y: 165.77779
    width: 1368
    height: 786.6667
    x: 12.888889
    y: 72
    width: 1365.3334
    height: 935.11115
  m_ShowMode: 4
  m_Title: Console
  m_RootView: {fileID: 8}
  m_RootView: {fileID: 11}
  m_MinSize: {x: 875, y: 300}
  m_MaxSize: {x: 10000, y: 10000}
  m_Maximized: 0
--- !u!114 &2
--- !u!114 &3
MonoBehaviour:
  m_ObjectHideFlags: 52
  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: 12006, guid: 0000000000000000e000000000000000, type: 0}
  m_Name: WorldStorageWindow
  m_EditorClassIdentifier: 
  m_Children: []
  m_Position:
    serializedVersion: 2
    x: 0
    y: 0
    width: 696.44446
    height: 876.8889
  m_MinSize: {x: 100, y: 121}
  m_MaxSize: {x: 4000, y: 4021}
  m_ActualView: {fileID: 17}
  m_Panes:
  - {fileID: 17}
  m_Selected: 0
  m_LastSelected: 0
--- !u!114 &4
MonoBehaviour:
  m_ObjectHideFlags: 52
  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: 12010, guid: 0000000000000000e000000000000000, type: 0}
  m_Name: 
  m_EditorClassIdentifier: 
  m_Children:
  - {fileID: 3}
  m_Position:
    serializedVersion: 2
    x: 0
    y: 0
    width: 696.44446
    height: 876.8889
  m_MinSize: {x: 100, y: 121}
  m_MaxSize: {x: 4000, y: 4021}
  vertical: 0
  controlID: 1081
--- !u!114 &5
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -39,18 +113,18 @@ MonoBehaviour:
  m_Children: []
  m_Position:
    serializedVersion: 2
    x: 547.1111
    x: 469.33334
    y: 0
    width: 627.55554
    height: 291.7778
    width: 534.22217
    height: 350.00006
  m_MinSize: {x: 102, y: 121}
  m_MaxSize: {x: 4002, y: 4021}
  m_ActualView: {fileID: 20}
  m_ActualView: {fileID: 24}
  m_Panes:
  - {fileID: 20}
  - {fileID: 24}
  m_Selected: 0
  m_LastSelected: 0
--- !u!114 &3
--- !u!114 &6
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -63,19 +137,19 @@ MonoBehaviour:
  m_Name: 
  m_EditorClassIdentifier: 
  m_Children:
  - {fileID: 7}
  - {fileID: 2}
  - {fileID: 10}
  - {fileID: 5}
  m_Position:
    serializedVersion: 2
    x: 0
    y: 444.8889
    width: 1174.6666
    height: 291.7778
    y: 535.1111
    width: 1003.55554
    height: 350.00006
  m_MinSize: {x: 200, y: 100}
  m_MaxSize: {x: 16192, y: 8096}
  vertical: 0
  controlID: 173
--- !u!114 &4
  controlID: 17
--- !u!114 &7
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -88,19 +162,19 @@ MonoBehaviour:
  m_Name: 
  m_EditorClassIdentifier: 
  m_Children:
  - {fileID: 11}
  - {fileID: 5}
  - {fileID: 14}
  - {fileID: 8}
  m_Position:
    serializedVersion: 2
    x: 0
    y: 30
    width: 1368
    height: 736.6667
    width: 1365.3334
    height: 885.11115
  m_MinSize: {x: 300, y: 200}
  m_MaxSize: {x: 24288, y: 16192}
  vertical: 0
  controlID: 219
--- !u!114 &5
  controlID: 15
--- !u!114 &8
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -115,18 +189,18 @@ MonoBehaviour:
  m_Children: []
  m_Position:
    serializedVersion: 2
    x: 1174.6666
    x: 1003.55554
    y: 0
    width: 193.33337
    height: 736.6667
  m_MinSize: {x: 275, y: 50}
  m_MaxSize: {x: 4000, y: 4000}
  m_ActualView: {fileID: 16}
    width: 361.77783
    height: 885.11115
  m_MinSize: {x: 276, y: 71}
  m_MaxSize: {x: 4001, y: 4021}
  m_ActualView: {fileID: 20}
  m_Panes:
  - {fileID: 16}
  - {fileID: 20}
  m_Selected: 0
  m_LastSelected: 0
--- !u!114 &6
--- !u!114 &9
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -143,16 +217,16 @@ MonoBehaviour:
    serializedVersion: 2
    x: 0
    y: 0
    width: 281.33334
    height: 444.8889
    width: 239.55556
    height: 535.1111
  m_MinSize: {x: 201, y: 221}
  m_MaxSize: {x: 4001, y: 4021}
  m_ActualView: {fileID: 17}
  m_ActualView: {fileID: 21}
  m_Panes:
  - {fileID: 17}
  - {fileID: 21}
  m_Selected: 0
  m_LastSelected: 0
--- !u!114 &7
--- !u!114 &10
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -169,16 +243,16 @@ MonoBehaviour:
    serializedVersion: 2
    x: 0
    y: 0
    width: 547.1111
    height: 291.7778
    width: 469.33334
    height: 350.00006
  m_MinSize: {x: 231, y: 271}
  m_MaxSize: {x: 10001, y: 10021}
  m_ActualView: {fileID: 15}
  m_ActualView: {fileID: 19}
  m_Panes:
  - {fileID: 15}
  - {fileID: 19}
  m_Selected: 0
  m_LastSelected: 0
--- !u!114 &8
--- !u!114 &11
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -191,22 +265,22 @@ MonoBehaviour:
  m_Name: 
  m_EditorClassIdentifier: 
  m_Children:
  - {fileID: 9}
  - {fileID: 4}
  - {fileID: 10}
  - {fileID: 12}
  - {fileID: 7}
  - {fileID: 13}
  m_Position:
    serializedVersion: 2
    x: 0
    y: 0
    width: 1368
    height: 786.6667
    width: 1365.3334
    height: 935.11115
  m_MinSize: {x: 875, y: 300}
  m_MaxSize: {x: 10000, y: 10000}
  m_UseTopView: 1
  m_TopViewHeight: 30
  m_UseBottomView: 1
  m_BottomViewHeight: 20
--- !u!114 &9
--- !u!114 &12
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -223,12 +297,12 @@ MonoBehaviour:
    serializedVersion: 2
    x: 0
    y: 0
    width: 1368
    width: 1365.3334
    height: 30
  m_MinSize: {x: 0, y: 0}
  m_MaxSize: {x: 0, y: 0}
  m_LastLoadedLayoutName: 
--- !u!114 &10
--- !u!114 &13
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -244,12 +318,12 @@ MonoBehaviour:
  m_Position:
    serializedVersion: 2
    x: 0
    y: 766.6667
    width: 1368
    y: 915.11115
    width: 1365.3334
    height: 20
  m_MinSize: {x: 0, y: 0}
  m_MaxSize: {x: 0, y: 0}
--- !u!114 &11
--- !u!114 &14
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -262,19 +336,19 @@ MonoBehaviour:
  m_Name: 
  m_EditorClassIdentifier: 
  m_Children:
  - {fileID: 12}
  - {fileID: 3}
  - {fileID: 15}
  - {fileID: 6}
  m_Position:
    serializedVersion: 2
    x: 0
    y: 0
    width: 1174.6666
    height: 736.6667
    width: 1003.55554
    height: 885.11115
  m_MinSize: {x: 200, y: 200}
  m_MaxSize: {x: 16192, y: 16192}
  vertical: 1
  controlID: 220
--- !u!114 &12
  controlID: 16
--- !u!114 &15
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -287,19 +361,19 @@ MonoBehaviour:
  m_Name: 
  m_EditorClassIdentifier: 
  m_Children:
  - {fileID: 6}
  - {fileID: 13}
  - {fileID: 9}
  - {fileID: 16}
  m_Position:
    serializedVersion: 2
    x: 0
    y: 0
    width: 1174.6666
    height: 444.8889
    width: 1003.55554
    height: 535.1111
  m_MinSize: {x: 200, y: 100}
  m_MaxSize: {x: 16192, y: 8096}
  vertical: 0
  controlID: 221
--- !u!114 &13
  controlID: 102
--- !u!114 &16
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -314,20 +388,55 @@ MonoBehaviour:
  m_Children: []
  m_Position:
    serializedVersion: 2
    x: 281.33334
    x: 239.55556
    y: 0
    width: 893.33325
    height: 444.8889
    width: 764
    height: 535.1111
  m_MinSize: {x: 202, y: 221}
  m_MaxSize: {x: 4002, y: 4021}
  m_ActualView: {fileID: 18}
  m_ActualView: {fileID: 22}
  m_Panes:
  - {fileID: 22}
  - {fileID: 23}
  - {fileID: 18}
  - {fileID: 19}
  - {fileID: 14}
  m_Selected: 0
  m_LastSelected: 1
--- !u!114 &14
--- !u!114 &17
MonoBehaviour:
  m_ObjectHideFlags: 52
  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: a1647df9b48bf4f49a664a929fff57ff, type: 3}
  m_Name: 
  m_EditorClassIdentifier: 
  m_MinSize: {x: 100, y: 100}
  m_MaxSize: {x: 4000, y: 4000}
  m_TitleContent:
    m_Text: ETSI ARF - Authoring Editor
    m_Image: {fileID: 0}
    m_Tooltip: 
  m_Pos:
    serializedVersion: 2
    x: 464
    y: 157.33333
    width: 696.44446
    height: 855.8889
  m_ViewDataDictionary: {fileID: 0}
  m_OverlayCanvas:
    m_LastAppliedPresetName: Default
    m_SaveData: []
  worldStorageServer: {fileID: 11400000, guid: 4f997253243de534dad12937f1284975, type: 2}
  worldStorageUser: {fileID: 11400000, guid: ce0f40be06008b14283766424922b729, type: 2}
  creators: []
  trackables: []
  anchors: []
  links:
  - c6998f4f-1b8d-460b-9de8-4793b92fae2a
--- !u!114 &18
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -355,7 +464,7 @@ MonoBehaviour:
  m_OverlayCanvas:
    m_LastAppliedPresetName: Default
    m_SaveData: []
--- !u!114 &15
--- !u!114 &19
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -375,10 +484,10 @@ MonoBehaviour:
    m_Tooltip: 
  m_Pos:
    serializedVersion: 2
    x: 206.22223
    y: 640.8889
    width: 546.1111
    height: 270.7778
    x: 12.888889
    y: 637.3333
    width: 468.33334
    height: 329.00006
  m_ViewDataDictionary: {fileID: 0}
  m_OverlayCanvas:
    m_LastAppliedPresetName: Default
@@ -409,9 +518,9 @@ MonoBehaviour:
    m_IsLocked: 0
  m_FolderTreeState:
    scrollPos: {x: 0, y: 0}
    m_SelectedIDs: 724b0000
    m_LastClickedID: 19314
    m_ExpandedIDs: 00000000544b0000564b0000584b00005a4b00005c4b00005e4b0000604b000000ca9a3bffffff7f
    m_SelectedIDs: 5e4b0000
    m_LastClickedID: 19294
    m_ExpandedIDs: 00000000424b0000444b0000464b0000484b00004a4b00004c4b00004e4b000000ca9a3bffffff7f
    m_RenameOverlay:
      m_UserAcceptedRename: 0
      m_Name: 
@@ -427,7 +536,7 @@ MonoBehaviour:
      m_IsRenaming: 0
      m_OriginalEventType: 11
      m_IsRenamingFilename: 1
      m_ClientGUIView: {fileID: 7}
      m_ClientGUIView: {fileID: 10}
    m_SearchString: 
    m_CreateAssetUtility:
      m_EndAction: {fileID: 0}
@@ -439,7 +548,7 @@ MonoBehaviour:
    scrollPos: {x: 0, y: 0}
    m_SelectedIDs: 
    m_LastClickedID: 0
    m_ExpandedIDs: 00000000544b0000564b0000584b00005a4b00005c4b00005e4b0000604b0000
    m_ExpandedIDs: 00000000424b0000444b0000464b0000484b00004a4b00004c4b00004e4b0000
    m_RenameOverlay:
      m_UserAcceptedRename: 0
      m_Name: 
@@ -483,7 +592,7 @@ MonoBehaviour:
      m_IsRenaming: 0
      m_OriginalEventType: 11
      m_IsRenamingFilename: 1
      m_ClientGUIView: {fileID: 7}
      m_ClientGUIView: {fileID: 10}
    m_CreateAssetUtility:
      m_EndAction: {fileID: 0}
      m_InstanceID: 0
@@ -495,7 +604,7 @@ MonoBehaviour:
    m_GridSize: 16
  m_SkipHiddenPackages: 0
  m_DirectoriesAreaWidth: 248.11111
--- !u!114 &16
--- !u!114 &20
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -515,10 +624,10 @@ MonoBehaviour:
    m_Tooltip: 
  m_Pos:
    serializedVersion: 2
    x: 1380.8889
    y: 196
    width: 192.33337
    height: 715.6667
    x: 1016.44446
    y: 102.22222
    width: 360.77783
    height: 864.11115
  m_ViewDataDictionary: {fileID: 0}
  m_OverlayCanvas:
    m_LastAppliedPresetName: Default
@@ -536,7 +645,7 @@ MonoBehaviour:
  m_LockTracker:
    m_IsLocked: 0
  m_PreviewWindow: {fileID: 0}
--- !u!114 &17
--- !u!114 &21
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -556,10 +665,10 @@ MonoBehaviour:
    m_Tooltip: 
  m_Pos:
    serializedVersion: 2
    x: 206.22223
    y: 196
    width: 280.33334
    height: 423.8889
    x: 12.888889
    y: 102.22222
    width: 238.55556
    height: 514.1111
  m_ViewDataDictionary: {fileID: 0}
  m_OverlayCanvas:
    m_LastAppliedPresetName: Default
@@ -567,7 +676,7 @@ MonoBehaviour:
  m_SceneHierarchy:
    m_TreeViewState:
      scrollPos: {x: 0, y: 0}
      m_SelectedIDs: 
      m_SelectedIDs: 844b0000
      m_LastClickedID: 0
      m_ExpandedIDs: 34fbffff
      m_RenameOverlay:
@@ -593,7 +702,7 @@ MonoBehaviour:
      m_IsLocked: 0
    m_CurrentSortingName: TransformSorting
  m_WindowGUID: 26d3cc4a749ad3148bdaac8cbfc0727d
--- !u!114 &18
--- !u!114 &22
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -613,10 +722,10 @@ MonoBehaviour:
    m_Tooltip: 
  m_Pos:
    serializedVersion: 2
    x: 487.55557
    y: 196
    width: 891.33325
    height: 423.8889
    x: 252.44444
    y: 102.22222
    width: 762
    height: 514.1111
  m_ViewDataDictionary: {fileID: 0}
  m_OverlayCanvas:
    m_LastAppliedPresetName: Default
@@ -898,7 +1007,7 @@ MonoBehaviour:
  m_SceneVisActive: 1
  m_LastLockedObject: {fileID: 0}
  m_ViewIsLockedToObject: 0
--- !u!114 &19
--- !u!114 &23
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -990,7 +1099,7 @@ MonoBehaviour:
  m_LowResolutionForAspectRatios: 00000000000000000000
  m_XRRenderMode: 0
  m_RenderTexture: {fileID: 0}
--- !u!114 &20
--- !u!114 &24
MonoBehaviour:
  m_ObjectHideFlags: 52
  m_CorrespondingSourceObject: {fileID: 0}
@@ -1010,10 +1119,10 @@ MonoBehaviour:
    m_Tooltip: 
  m_Pos:
    serializedVersion: 2
    x: 753.3333
    y: 640.8889
    width: 625.55554
    height: 270.7778
    x: 482.22223
    y: 637.3333
    width: 532.22217
    height: 329.00006
  m_ViewDataDictionary: {fileID: 0}
  m_OverlayCanvas:
    m_LastAppliedPresetName: Default