From Unity 2023.1.0a24 onwards a behaviour change to how Unity handles loadable plugin directories has been introduced.
Previously, when importing directories of types .androidlib, .bundle, .framework, and .plugin, .meta files would be created for each asset or directory within them. This caused lots of headaches as it resulted in the introduction of unexpected files into those folders, and multiple workarounds have been implemented in order to remove them for final builds and store submissions.
To address this issue, we have modified the Editor code such that the creation of .meta files in loadable plugin directories is prevented.
Additionally, if those directories already have .meta files in them, the .meta files are ignored when making a game build. We decided on that instead of deleting the files in an upgrade step as that would cause unnecessary version control noise when opening the Editor.
We have tested this behaviour change and have confirmed that the following actions will now work as expected:
Disallowing drag and drop into loadable plugin directories (for single or multiple asset selections)
Not showing plugin folders as folders in the project browser (both one and two column views)
Handling DirectoryMonitor messages correctly when deleting an already existing .meta file in a plugin folder (Windows only)
Importing folders named “bundle”, “framework”, etc. while still allowing assets to be moved into them
Moving loadable plugin folders to another non-loadable plugin directory without importing any of its contents
Reimporting parent folders of loadable plugin directories without importing the contents of the loadable plugin directories
Double clicking loadable plugin directories will open the directory in Finder/Explorer depending on your OS
We hope that this behaviour change will streamline the import process for you all and reduce the number of manual tweaks needed to ship a game. Let us know if you have any questions or concerns.
I do hope to expand on this and detect if a folder is marked as Bundle in macOS, so that in case a Bundle is not named in one of the extensions named in the post. I think doing so would be future-proof, although I’m not sure how practical it is.
There is a planned feature, where you could specify which folders and Assets not to import. Its still being planned out though, but it has an overlap with the loadable plugin directory change we just did.
I know it is not related to this directly, but how about StreamingAssets folder? I think same idea can be applied to it. Currently StreamingAsests folder has redundant meta files (in editor only of course) and importing processes.
i’m updating a project from an older unity version to 2022.3 now that it is lts. but i have a custom build script that change the contents of a file inside a .res folder depending on some parameter
now i cant reference the desired file inside my scriptable object anymore, since the meta files inside .androidlib are being ignored
I think this is gonna be a bit tricky to do, since we didn’t build an “escape hatch” for this behaviour change. That being said, maybe something could be done to improve your situation.
In theory you could do the following to get around this problem:
Figure out where the file in question is located using a combination of Unity & C# APIs
i.e. Find where the .androidlib is, then do something like:
var options = new EnumerationOptions();
options.RecurseSubdirectories = true;
System.IO.Directory.EnumerateFiles("Assets/FolderWithAndroidLib", "*.*", options);
Create a new folder, something like “Assets/MyResFileWorkaround”
Create a symlink inside “MyResFileWorkaround”, which links to the file inside the .res folder
i.e. “Assets/MyResFileWorkarond/my_symlinked_file.some_ext”
Update the reference from your scriptable object to the symlink
I think this should work, though I have not tried it yet.
Is this specific to your machine only, or are there other people in your project? I’m asking, because the symlink is machine specific, so you might have to make a script that automates all of this if it works locally.
what’s if we export .androidlib file from plugin folder with unity latest version but when i import that exported file at this time file not import and not showing in plugin how you can handle it kindly explain.