I am working on game, that is to be developed simultaneously in Mogre(c# port of ogre) and Unity3d as well. since both uses c# i want to write a generic code that gets complied accordingly in both of those platforms. it was easy to do for unity, just by adding #if UNITY_ENGINE, but i cannot find similar #def's for Mogre. i know it is a silly question, but still i cannot find it in Google. Could someone help me!
问问题
65 次
1 回答
2
Just define your own symbol. Go to your project properties and define OGRE for the build configuration you are interested in (you can create new build configurations and name them). For example create a build config for OGRE and define an OGRE conditional symbol, and #if OGRE should work.
(it is under project properties, build, conditional compilation symbols) Just define as many as you like separated by commas "var1, var2, var3"
于 2012-10-29T07:14:21.983 回答