- Home /
Multi Platform Best Practices
Hey I'm building a cross platform PC/mobile. It obviously have to use difference resources in the mobile platforms. (smaller textures, models with less poly's, etc.) I've trying several methods of dealing with this like creating different resources folder and loading them dynamycally in the code at runtime. This didn't prove to be the best solution, as i found myself needing to delete some of the resources folders while making the build, and this cause the editor to lose all the meta data (like properties) in the inspector.
i've also trying skins, but that was but combersome, and only applied to certain aspects of the game's GUI.
any suggestions? how do you handle cross platform development?
I'm pretty curious about how other people deal with this, too...
There are a few things that I handle with code at runtime (like turning off lights and swapping the materials used by certain models). The materials I swap in this fashion are all found in a Resources directory. The other assets I'd like to swap are textures that I don't think belong in a Resources directory: they are large and will only be used on one specific platform.
I was planning on writing some scripts that will swap various build specific textures. The textures that will get swapped are assets that have been assigned to my GUI Controller script in the Inspector.
$$anonymous$$y current plan is to create a pre-fab for the object in my scene that has my GUI Controller script attached. I then plan to use AssetPostprocessor to change various properties of the pre-fab after they get re-imported for a new platform.
It would be great to get some feedback about whether or not this is a silly approach before I begin the task....
have you found any solutions to this issue yet? This is beginning to be a major time-sink for us. You'd think simultaneous platform development would be supported already(or at least better integrated at this point)
Answer by Rod-Green · Dec 31, 2011 at 10:28 PM
What we have found works is we create a scene and edit it as usual.. however we have a resolution manager that saves transforms, pixel insets, active status etc per resolution. Then there's a bake process that will export uniquely named versions of the scene into a paired baked directory.
We also utilize a build scene manager that reads a csv file and creates a list of build scenes based on the specified exports.
While this sounds like you're creating multiple scenes to edit / manage. In reality they are transparent to the developers. All they do is export the scene and the build manager handles the bake collection.
There's no reason you couldn't implement a lod system that will change model/texture representations and export the scene to a new version per lod. Giving you PC/Mobile versions..
Your answer
Follow this Question
Related Questions
Simultaneous Multi-Platform Development Workflow and Best Practices 5 Answers
Developing a Universal Unity Game and tips. 0 Answers
tiny Question about WebGl and unity 0 Answers
Targeting multiple OS 1 Answer
Flag between different platform 1 Answer