How can I read the ServerData/[build target] folder by script

Hi,

I’m building an auto uploader for sending my addressable bundles up to amazon s3. I tried using the aws sdk but you can only update, there is no built in sync functionality and I unfortunately don’t have time to do hash checks against files on the server.

Instead I’m firing up aws-cli as an external process and this is working like a charm :slight_smile:

So the issue that I’m having is that I need to specify the path that I want to sync explicitly. I could just hard code the paths as strings (per build platform) but this is a bit inflexible and the tool will be used by multiple developers across several different machines. What I was wondering is whether there was a way to read the build path for the current platform target from the addressables system (i.e. the folder where addressable bundles will be built to) via a script.

Thanks,

Rob

Just in case anyone else has this issue, I didn’t manage to get the build directory out of the Addressables system but I did manage to get the path like this:
var sourcePath = $@"""{Application.dataPath}/../ServerData/{EditorUserBuildSettings.activeBuildTarget}/""";