Skip to content

Commit

Permalink
[unity] Fixed a logic error of loader asset creation from commit 76e8538
Browse files Browse the repository at this point in the history
. See #1890.
  • Loading branch information
HaraldCsaszar committed Sep 8, 2023
1 parent 1f57fb2 commit 51b108f
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -51,11 +51,11 @@ public class AddressablesTextureLoaderInspector : GenericTextureLoaderInspector

public class AddressablesMethodImplementations : StaticMethodImplementations {
public override GenericTextureLoader GetOrCreateLoader (string loaderPath) {
GenericTextureLoader loader = AssetDatabase.LoadAssetAtPath<GenericTextureLoader>(loaderPath);
AddressablesTextureLoader loader = AssetDatabase.LoadAssetAtPath<AddressablesTextureLoader>(loaderPath);
if (loader == null) {
loader = GenericTextureLoader.CreateInstance<GenericTextureLoader>();
loader = AddressablesTextureLoader.CreateInstance<AddressablesTextureLoader>();
AssetDatabase.CreateAsset(loader, loaderPath);
loader = AssetDatabase.LoadAssetAtPath<GenericTextureLoader>(loaderPath);
loader = AssetDatabase.LoadAssetAtPath<AddressablesTextureLoader>(loaderPath);
} else {
loader.Clear(clearAtlasAsset: false);
}
Expand Down

0 comments on commit 51b108f

Please sign in to comment.