- Home /
There's a way to define platform specific assets?
I would like to define low poly count meshes while exporting for iPhone but keep the high poly count ones while exporting for web or desktop. Any advice or workaround to avoid an entire copy of the project is welcome.
Answer by DaveA · Jan 31, 2011 at 05:22 PM
This would be great if built into Unity. Vote for it: http://feedback.unity3d.com/forums/15792-unity/suggestions/378721-editor-preprocessbuildplayer?ref=title
That said, I took to writing scripts that would swap-in the assets I need on Awake. Not pretty, but the alternative is practically unmanageable.
$$anonymous$$aybe you could use compilation directives for this.
Check the documentation here: http://unity3d.com/support/documentation/$$anonymous$$anual/Platform%20Dependent%20Compilation.html
Answer by DoitStudioss · May 24, 2017 at 08:35 AM
Hi, you can define your meshes from code behind. For this you can use platform specific code like this:
#if UNITY_IOS
// Define the low poly count ones
#else
// Define the high poly count ones
#endif
Hope this is what you need :)
Your answer
Follow this Question
Related Questions
Pro Water on the iPhone or Android - Runtime Reflect or Refract possible? 0 Answers
Network Question. Sending value from iPhone Client to Mac Server 1 Answer
Nintendo 3ds platform support 1 Answer
How do I have my first person travel along with a moving object? 1 Answer
Hiring Unity Developer 0 Answers