Skip to content
Snippets Groups Projects

Merge into graph view

Merged Nathan Chambron requested to merge mergeIntoGraphView into develop
5 files
+ 221
1072
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -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 {
Loading