Exemplo n.º 1
0
    void OnBtnLoad()
    {
        string loadPath = EditorUtility.OpenFilePanel("Open Stage file", "StreamingAssets", "");

        if (loadPath.Length > 0)
        {
            if (targetObject != null)
            {
                if (loadPath.EndsWith(".xml"))
                {
                    targetObject.LoadXML(loadPath);
                }
                else
                {
                    targetObject.Load(loadPath);
                }
            }
        }
    }