favoyang / unity-addressable-importer

A rule based addressable asset importer
MIT License
885 stars 124 forks source link

Addressables Reimport API #21

Closed Mefodei closed 4 years ago

Mefodei commented 4 years ago

Hello there. I try to call package API "Reimport Addressable Group (Check Folders)" on Project Build Execution step. But all general static functions is private. Could you allow use Common method of your package as public API?

favoyang commented 4 years ago

Hi @Mefodei,

I assume you mean to make "Assets/AddressablesImporter: Check Folder(s)" publicly available? That method only works for the current selection. Is that suitable for your case?

Mefodei commented 4 years ago

Hi I'm looking for API method, that takes project folder as parameters and apply reimport action. For example it can be all rules folders from asset Addressables Import Settings Rules.

favoyang commented 4 years ago

That makes sense to me.

I have prepared a branch with a reimport API, which requires an array of folder asset paths. An asset path is a string starts with "Assets". E.g. to process the whole Assets folder (this can be slow depends on the number of assets).

AddressableImporter.FolderImporter.ReimportFolders(new string[] { "Assets" });

To test it, switch your lib to this Git URL.

{
    "dependencies": {
        "com.littlebigfun.addressable-importer": "https://github.com/favoyang/unity-addressable-importer.git#reimport-api"
    }
}

Let me know if this works for you, then I will merge back to the master branch.

Mefodei commented 4 years ago

Thx, i will try

Mefodei commented 4 years ago

Works fine :)

github-actions[bot] commented 4 years ago

:tada: This issue has been resolved in version 0.7.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

favoyang commented 4 years ago

@Mefodei, merged to master and released v0.7.0. The reimport-api branch is deleted.