Skip to content

Support AppCenter in other directories besides Application.dataPath #33

@jasonboukheir

Description

@jasonboukheir

My project keeps external packages in a different folder than Application.dataPath, which breaks this extension. I'd be happy to write a pull request when I'm away from work this weekend. It looks like the issue is just in getting the GUI paths:

private static GUISkin GetUiStyle()
{
    var searchRoot = string.IsNullOrEmpty(EDEX_ROOT) ? Application.dataPath : EDEX_ROOT;
    var guiPaths = Directory.GetFiles(searchRoot, "AppCenterStyles.guiskin", SearchOption.AllDirectories);
    foreach (var eachPath in guiPaths)
    {
        var loadPath = eachPath.Substring(eachPath.LastIndexOf("Assets/"));
        return (GUISkin)AssetDatabase.LoadAssetAtPath(loadPath, typeof(GUISkin));
    }
    return null;
}

(Lines 43-53 in Editor/Scripts/Utils/AppCenterEditorHelper.cs)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions