예제 #1
0
    public void SetupLaunchCfg(LaunchCfg cfg)
    {
        if (cfg == null)
        {
            return;
        }

        m_LaunchCfg = new SerializedObject(cfg);
    }
예제 #2
0
    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();
        }
    }
예제 #3
0
 public static string GenerateLaunchCfgJson(LaunchCfg launchCfg)
 {
     return(JsonUtility.ToJson(launchCfg, false));
 }