Пример #1
0
        public void SaveLayout(string path = "")
        {
            // Print filepath if saving to user-input path; default to persistentDataPath
            if (path.Length > 0)
            {
                Debug.Log($"Saved visualizations layout to {path}");
            }
            else
            {
                path = LayoutFilePath;
            }

            HUDLayoutSave saveState = new HUDLayoutSave {
            };

            saveState.AddRules(m_Topics.Values);
            System.IO.File.WriteAllText(path, JsonUtility.ToJson(saveState));
        }