/// <summary>
		/// Execute the Before Update event
		/// </summary>
		protected override void BeforeUpdate()
		{
			if (_database == null)
				return;

			_database.Refresh ();
		}
Beispiel #2
0
 public void DrawSceneDatabaseExport()
 {
     EditorGUILayout.LabelField("Scenes List Export", GUILayout.Width(120));
     EditorGUILayout.BeginHorizontal();
     {
         if (GUILayout.Button(GetContent("Generate JSON", TooltipSet.GENERATE_JSON_BUTTON_TOOLTIP)))
         {
             _database.Refresh();
             Debug.Log(_database.GenerateJSON());
         }
         if (GUILayout.Button(GetContent("Save to JSON File", TooltipSet.SAVE_JSON_BUTTON_TOOLTIP)))
         {
             var path = EditorUtility.SaveFilePanel("Save scene list", "", "scenes.json", "json");
             if (!string.IsNullOrEmpty(path))
             {
                 _database.Refresh();
             }
             SceneMainPanelUtility.SaveText(_database.GenerateJSON(), path);
         }
     }
     EditorGUILayout.EndHorizontal();
 }