Skip to content

Commit 355b01d

Browse files
author
Stewart Miles
committed
Fix copy of srcaar to aar files when using mainGradle.template.
After modifing PluginImporter settings, assets need to be reimported for the changes to be applied in some versions of Unity. Reported in firebase/quickstart-unity#377 Bug: 135125825 Change-Id: I6ca17391d3f89f213a8a21bea6613d3321ed7386
1 parent b9fed42 commit 355b01d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

source/PlayServicesResolver/src/GradleTemplateResolver.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ private static bool CopySrcAars(ICollection<Dependency> dependencies) {
129129
}
130130
if (configuredAar) {
131131
aarFiles.Add(targetFilename);
132+
// Some versions of Unity do not mark the asset database as dirty when
133+
// plugin importer settings change so reimport the asset to synchronize
134+
// the state.
135+
AssetDatabase.ImportAsset(targetFilename, ImportAssetOptions.ForceUpdate);
132136
} else {
133137
if (File.Exists(targetFilename)) {
134138
AssetDatabase.DeleteAsset(targetFilename);

0 commit comments

Comments
 (0)