Hi, I’ve got a shell script running which is meant to copy the compiled updated Addressable assets and upload them to S3. My script was working but in Cloud Build it can no longer seem to find the compiled Addressable assets in the Post Build.
I was using the details provided in the “Copying Addressables content with a post-build script” section here: Unity Build Automation
Could you tell me if the path has changed or if I am missing something?
# set the path based on the first argument
path="${WORKSPACE}/.build/last/${BUILD_TARGET}/extra_data/addrs/"
# loop through the folder path and upload each file
for f in "$path"/*
do
# get the file
file="${f##*/}"
# build the file path
filePath="$path/$file"
echo "Uploading File: $file"
// $file is .../.build/last/iOS/extra_data/addrs//*
done
Did you update your version of Unity or the Addressables package? As far as I know, nothing has changed on our side - particularly due to the code freeze over the holiday period.
From taking a quick look it seems as if this change was triggered by switching to Xcode 12.2.0 in your new project - I guess that’s not entirely surprising though it is a little confusing and frustrating. I’ll talk to the Addressables and Documentation team about this.
Not currently, no. Although in this case it wouldn’t really help since the only part we control is the /extra_data/addrs part, the extra stuff on the end is being added by processes outside of our direct control and we’re just using **/* to pick up those files for upload anyway.
Are the Addressable not compiled with the Unity compiler? The addressable path for Android is the same structure: {WORKSPACE}/.build/last/{BUILD_TARGET}/extra_data/addrs/ServerData/Android
The Unity compiler is only a small part of the UCB build process and it’s the part which we don’t have direct control over since it’s reliant on which Unity version and Addressables package you are using. We do have some improvements planned for how we structure the build process and artifact manifest but it will probably be several months before those are available.
What were you comparing against, actually? I just had a look at your projects and as far as I can see your projects have always copied the addressables data into subfolders of the extra_data/addrs path. As well as the ServerData there’s also the Library folder in there which stores your content state.