Ejemplo n.º 1
0
        private static string LocateRootAssetFolder <T>(string urdfFileName) where T : UnityEngine.Object
        {
            string newAssetPath = RuntimeUrdf.EditorUtility_OpenFolderPanel(
                "Locate package root folder",
                Path.Combine(Path.GetDirectoryName(Application.dataPath), "Assets"),
                "");

            if (UrdfAssetPathHandler.IsValidAssetPath(newAssetPath))
            {
                UrdfAssetPathHandler.SetPackageRoot(newAssetPath, true);
            }
            else
            {
                Debug.LogWarning("Selected package root " + newAssetPath + " is not within the Assets folder.");
            }
            return(UrdfAssetPathHandler.GetRelativeAssetPathFromUrdfPath(urdfFileName));
        }