Example #1
0
    public void LoadProject()
    {
#if UNITY_EDITOR
        //Get a filename
        string filename = EditorUtility.OpenFilePanel("Choose file", lastSavePath, "mdproj");
        if (filename != "" && File.Exists(filename))
        {
            md.LoadProject(filename);
            lastSavePath = Path.GetDirectoryName(filename);
        }
#endif
    }
    private void OpenProject()
    {
#if UNITY_EDITOR
        if (md)
        {
            //Get a filename
            string filename = EditorUtility.OpenFilePanel("Choose file", lastSavePath, "mdproj");
            if (filename != "" && File.Exists(filename))
            {
                md.LoadProject(filename);
                lastSavePath = Path.GetDirectoryName(filename);
            }
            if (autoPlay)
            {
                md.Play();
            }
        }
#endif
    }