How would I make this work?

So I’m new to Unity and trying to make two scenes have a button that loads the same save file, the below code doesn’t work but i need help in making it function in that way. How can i make it so that directoryPath could be different depending on what scene it is in?

string directoryPath = WorldController.Instance.FileSaveBasePath() || GameController.Instance.FileSaveBasePath();

Thanks guys

Ben

I would like to help you, but I really do not understand what you are trying to do with this Script. Does it throw any errors?

Something like this?

string directoryPath;
if (inGameplayScene)
    directoryPath = WorldController.Instance.FileSaveBasePath();
else
    directoryPath = GameController.Instance.FileSaveBasePath();