Search Unity

How to develop a unity project for cross-platform(Windows-Standalone and Android) ?

Discussion in 'General Discussion' started by petergraham003, Feb 23, 2020.

  1. petergraham003

    petergraham003

    Joined:
    May 5, 2018
    Posts:
    14
    I had a project initially developed for Windows platform. When I wanted it for Android platform, for safe-side I made a copy of whole project and switched to Android Platform.

    Due to some performance issues, I had to make some changes in scene in Android platform to reduce drawCalls and polygons count and optimized UI canvases. As few functions in scripts are platform specific, I had used #define directives to achieve Platform dependent compilation. At last I got it working in Android platform with decent performance and added some new features in Android platform.

    Later for few months, I continued to develop in my Windows platform project. Now, I wanted my latest version of project to Android platform as well. I had made a lot of changes in scene as well as scripts in my new version when compared to earlier version. I don't understand on how to convert it now to Android platform. Also each time when I wanted to switch this platform, it's taking me approximately 6 hours of time to build the library because of the change in platform.

    Can anyone please recommend/suggest me a solution for this which can be achieved in less time and with less human-error ?
     
    pmarinr likes this.
  2. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    unity design for cross platform, but sadly no solution exist reliably other than to test android, ios, windows,mac unix other than actual test.

    Also, may need different samsung sizes and tablets. this just how it is. u try to reduce platform spec code as most as possible, but sometime not possible.
     
  3. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,189
    Use a version control system. With a VCS you can check out multiple copies of your project without worry of keeping them synced properly, and with multiple copies you don't have to regenerate the Library folder for each platform.
     
    Last edited: Feb 23, 2020
    Kiwasi likes this.