Skip to content
Snippets Groups Projects
Commit ff10d30b authored by Nathan Chambron's avatar Nathan Chambron
Browse files

Merge branch 'mergeIntoGraphView' into 'develop'

Merge into graph view

See merge request !5
parents aa225982 76b27192
No related branches found
No related tags found
2 merge requests!5Merge into graph view,!4Add GraphView module & the World Storage inspector window into the main branch
# This .gitignore file should be placed at the root of your Unity project directory # Modified from:
# # https://github.com/github/gitignore/blob/master/Unity.gitignore
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
#
/[Ll]ibrary/ /[Ll]ibrary/
/[Tt]emp/ /[Uu]serSettings/
/[Oo]bj/ [Tt]emp/
[Oo]bj/
/[Bb]uild/ /[Bb]uild/
/[Bb]uilds/ /[Bb]uilds/
/[Ll]ogs/ /[Ll]ogs/
/[Mm]emoryCaptures/ /[Mm]emoryCaptures/
# Fraunhofer HHI / IMC / Unity settings
#/[Aa]ssets/Fraunhofer
/[Aa]pp
/[Bb]in
/[Ee]xe
# Never ignore Asset meta data
!/[Aa]ssets/**/*.meta
# Uncomment this line if you wish to ignore the asset store tools plugin # Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools* # [Aa]ssets/AssetStoreTools*
# TextMesh Pro files
#[Aa]ssets/TextMesh*Pro/
# Autogenerated Jetbrains Rider plugin
[Aa]ssets/Plugins/Editor/JetBrains*
# Visual Studio cache directory # Visual Studio cache directory
.vs/ .vs/
...@@ -65,4 +50,14 @@ sysinfo.txt ...@@ -65,4 +50,14 @@ sysinfo.txt
*.unitypackage *.unitypackage
# Crashlytics generated file # Crashlytics generated file
crashlytics-build.properties crashlytics-build.properties
\ No newline at end of file
# Windows
Thumbs.db
Thumbs.db.meta
# MacOS
*.DS_Store
# VS Code
*.vscode
\ No newline at end of file
...@@ -44,6 +44,24 @@ namespace Assets.ETSI.ARF.ARF_World_Storage_API.Editor.Windows ...@@ -44,6 +44,24 @@ namespace Assets.ETSI.ARF.ARF_World_Storage_API.Editor.Windows
//to delay the reframe (otherwise it reframes when the graph isn't built yet) //to delay the reframe (otherwise it reframes when the graph isn't built yet)
int twoFrames = 0; int twoFrames = 0;
public static void ShowWindowFromWorldStorageWindow(WorldStorageServer server, WorldStorageUser user)
{
var window = GetWindow<WorldGraphWindow>("Graph Editor", true, typeof(SceneView));
if (window.myGraph != null)
{
if (window.myGraph.ServerAndLocalDifferent() && EditorUtility.DisplayDialog("Saving node positions", "The World Graph has been modified. \nWould you like to push the modifications to the server ?", "Yes", "No"))
{
window.myGraph.SaveInServer();
}
window.rootVisualElement.Remove(window.myGraph);
}
GraphEditorWindow.ResetWindow();
window.worldStorageServer = server;
window.worldStorageUser = user;
SaveInfo.instance.nodePositions = null;
window.OnEnable();
}
[MenuItem("ARFWorldStorage/Edit Graph...")] [MenuItem("ARFWorldStorage/Edit Graph...")]
public static void ShowWindow() public static void ShowWindow()
{ {
...@@ -52,7 +70,6 @@ namespace Assets.ETSI.ARF.ARF_World_Storage_API.Editor.Windows ...@@ -52,7 +70,6 @@ namespace Assets.ETSI.ARF.ARF_World_Storage_API.Editor.Windows
public void OnEnable() public void OnEnable()
{ {
//rootVisualElement.Add(GenerateToolbar());
if (worldStorageServer != null) if (worldStorageServer != null)
{ {
try { try {
......
...@@ -5,7 +5,7 @@ MonoImporter: ...@@ -5,7 +5,7 @@ MonoImporter:
serializedVersion: 2 serializedVersion: 2
defaultReferences: defaultReferences:
- m_ViewDataDictionary: {instanceID: 0} - m_ViewDataDictionary: {instanceID: 0}
- worldStorageServer: {fileID: 11400000, guid: 3a9ba82f4e8dd124ca2b005861c64d01, type: 2} - worldStorageServer: {instanceID: 0}
- worldStorageUser: {fileID: 11400000, guid: c0696089e4a855b46ad490437919b1e8, type: 2} - worldStorageUser: {fileID: 11400000, guid: c0696089e4a855b46ad490437919b1e8, type: 2}
executionOrder: 0 executionOrder: 0
icon: {instanceID: 0} icon: {instanceID: 0}
......
...@@ -27,7 +27,8 @@ using UnityEngine; ...@@ -27,7 +27,8 @@ using UnityEngine;
using UnityEditor; using UnityEditor;
using ETSI.ARF.WorldStorage; using ETSI.ARF.WorldStorage;
using ETSI.ARF.WorldStorage.REST; using ETSI.ARF.WorldStorage.REST;
using Assets.ETSI.ARF.ARF_World_Storage_API.Editor.Windows;
#if USING_OPENAPI_GENERATOR #if USING_OPENAPI_GENERATOR
using Org.OpenAPITools.Api; using Org.OpenAPITools.Api;
using Org.OpenAPITools.Model; using Org.OpenAPITools.Model;
...@@ -133,6 +134,7 @@ namespace ETSI.ARF.WorldStorage.UI ...@@ -133,6 +134,7 @@ namespace ETSI.ARF.WorldStorage.UI
GUI.backgroundColor = WorldStorageWindow.arfColors[4]; GUI.backgroundColor = WorldStorageWindow.arfColors[4];
if (GUILayout.Button("Open World Representation Graph Window...")) if (GUILayout.Button("Open World Representation Graph Window..."))
{ {
WorldGraphWindow.ShowWindowFromWorldStorageWindow(worldStorageServer, worldStorageUser);
} }
GUI.backgroundColor = ori; GUI.backgroundColor = ori;
...@@ -194,12 +196,6 @@ namespace ETSI.ARF.WorldStorage.UI ...@@ -194,12 +196,6 @@ namespace ETSI.ARF.WorldStorage.UI
ScriptableObject target = this; ScriptableObject target = this;
SerializedObject so = new SerializedObject(target); SerializedObject so = new SerializedObject(target);
GUI.backgroundColor = WorldStorageWindow.arfColors[4];
if (GUILayout.Button("Open World Graph Window..."))
{
}
GUI.backgroundColor = ori;
// ########################################################### // ###########################################################
// Get creators // Get creators
// ########################################################### // ###########################################################
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment