Share data across instances but only for same project

Hey there,

I am building a plugin that needs to save some files which have to be accessible from different instances in the same project. The easiest solution would be if the path to the project folder used by the DAW could some be retrieved but as I read in this thread it is not possible.

My first solution was now to let the user specify a folder in the first instance of the plugin which is opened. I then used SharedResourcePointer to have other instances directly use the same path. This generally works well.

However, if the user now opens different projects at once the SharedResourcePointer will obviously be shared across all instances which would mess up the whole thing.

Is it maybe possible to get the project name or some kind of unique identifier for a project from the DAW that my SharedResourcePointer class can differentiate between different projects?
or is there any other approach to achieve the desired behaviour?