Exemplo n.º 1
0
    void OnBtnSave()
    {
        string savePath = targetObject.StageFile;

        if (savePath.Length == 0)
        {
            savePath = EditorUtility.SaveFilePanel("Save Stage File", "StreamingAssets", "", "");
        }
        if (targetObject != null)
        {
            if (savePath.EndsWith(".xml"))
            {
                targetObject.SaveXML(savePath);
            }
            else
            {
                targetObject.Save(savePath);
            }
        }
    }