Compiling Scripts based on Platform to save size

Hi,

I am developing a game for both mobile and desktop and have wrote certain scripts which are platform dependent. How can I not compile a whole .cs file on a platform but let it compile it on another. I want to have the least possible size on Mobile. Most of my controller scripts and GUI are different for both mobile and desktop platforms (all in different classes) and it seems inefficient to compile all the unused classes into the game.

Will platform dependent compilation do the job and save size?

Platform dependent compilation will do the job.

But it won’t change the size of your final build in any noticeable fashion.

1 Like

Thanks.