- Home /
Conditional game objects / components by platform
I've figured out conditional compilation for scripts based on platform, but I'm wondering if there's any similar support (or planned support) for conditional game objects & components?
This would be very useful for building cross-platform games. For example, I'd like to mark my high-detail models as "Mac only" and the LODs as "iOS only". Or have a depth-of-field image effect for Mac only, etc.
I suppose you could do this by enabling or disabling game objects at runtime using conditional scripting, but then you would still potentially be loading high-detail models into memory first, which I'd like to avoid.
Answer by gtjuggler · Nov 01, 2011 at 04:48 AM
You can load low or high poly versions of a mesh by prefabbing each one and spawning the correct one per-platform.
See an example in this post: http://forum.unity3d.com/threads/108637-MultiPlatform-ToolKit-Multiplatform-development-simplified.?p=727256&viewfull=1#post727256
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Project building with custom file format 0 Answers
what the porblem here when i running my game on device 0 Answers
Addressables.InitializeAsync no work run time 0 Answers
Is it possible to create a game build in unity’s runtime? (I’m making something like terror engine) 0 Answers