You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I'm trying to use this utility to embed a copy of the Addressables package in my project in order to more easily examine the Addressables source code. Based on the description of this project, I thought I could use it for this case. However, when I try to use the "Embed Package" option on Addressables, it appears to be disabled:
This also appears to be the case for all hosted packages in my project.
I'm seeing this in Unity 2019.3.11f1 on Windows 10.
This appears to be an issue with the call to Path.GetDirectoryName() used to determine if the selected directory is a valid. Testing it on my computer, the asset path returned by the call to AssetDatabase.GetAssetPath() will be something like
Packages/com.unity.addressables/package.json
so GetDirectoryName() ends up returning
Packages/com.unity.addressables
This causes the check for folder == "Packages" to return false. It seems like a solution is to repeatedly call GetDirectoryName() to strip the directory names until you get the root directory in the path (at least, I haven't found a cleaner solution for this yet).
I'm working on getting a pull request up to fix this, but please let me know if I'm missing anything or if it's intended that the "Embed Package" button doesn't work in the case I described!
The text was updated successfully, but these errors were encountered:
Hello! I'm trying to use this utility to embed a copy of the Addressables package in my project in order to more easily examine the Addressables source code. Based on the description of this project, I thought I could use it for this case. However, when I try to use the "Embed Package" option on Addressables, it appears to be disabled:
This also appears to be the case for all hosted packages in my project.
I'm seeing this in Unity 2019.3.11f1 on Windows 10.
This appears to be an issue with the call to
Path.GetDirectoryName()
used to determine if the selected directory is a valid. Testing it on my computer, the asset path returned by the call toAssetDatabase.GetAssetPath()
will be something likeso
GetDirectoryName()
ends up returningThis causes the check for
folder == "Packages"
to returnfalse
. It seems like a solution is to repeatedly callGetDirectoryName()
to strip the directory names until you get the root directory in the path (at least, I haven't found a cleaner solution for this yet).I'm working on getting a pull request up to fix this, but please let me know if I'm missing anything or if it's intended that the "Embed Package" button doesn't work in the case I described!
The text was updated successfully, but these errors were encountered: