How to change and save Product name using script in play mode (In Editor)

Hello there,
My game has 2 versions, one for the full version and one for the demo. For this reason, I want to change the product name using a script so that I don’t forget to change the name before building. I tried this:

PlayerSettings.productName = prodName;

But it’s not saving permanently, and reverting back to original name once I am exiting play mode.
How to save this change? Or this code is only supposed to run from editor script?

… Are you running this during play mode?

Any of this core editor stuff should be done outside of play mode.

1 Like

My first instinct would be to write a custom build pipeline that includes/excludes whatever you want to have in the two versions respectively and names them accordingly.

1 Like