public void SetupLaunchCfg(LaunchCfg cfg) { if (cfg == null) { return; } m_LaunchCfg = new SerializedObject(cfg); }
public void Apply() { LaunchCfg cfg = m_LaunchCfg.targetObject as LaunchCfg; if (cfg != null) { m_LaunchJson.stringValue = GenerateLaunchCfgJson(cfg); string path = AssetDatabase.GetAssetPath(cfg); Debug.Log("Convert LaunchCfg to json:" + path, cfg); EditorPrefs.SetString("Last_LaunchCfg", path); this.serializedObject.ApplyModifiedProperties(); } }
public static string GenerateLaunchCfgJson(LaunchCfg launchCfg) { return(JsonUtility.ToJson(launchCfg, false)); }