ios - Can I get the Unity3D engine version in Xcode and how to do a conditional compile based on the version? -
I am working on plugins in Unity 3D for iOS. For some reason, I need to specify some code in local code (.xm) to be compiled before Unity 3D 4.1 and the second should be compiled after Unity 3D 4.1 (Containing). Maybe something like this:
#if UNITY_VERSION & lt; UNITY_4_1 // Some of the codes can be compiled before Unity4.1 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # "Compile the Unity Engine version based on Xcode" version? Any suggestions would be appreciated! EDIT: Maybe I two for different version. I can write MM files and delete one of them. But I do not think this is a good idea ...
It is not absolutely clear what you do Are you trying to build your original code by injecting into the XCode project which creates unity? Or are you building your original code in a library which is included by Unity during the building?
There is no way to know about AFAIK XCode, from which time you are using unity without using the version of unity and find a way to determine it.
If you are doing later, that is to create a native code library that is involved in the creation of unity, in which case you will need two different libraries, and include whatever is relevant to the user. Must have instructions to do.
If you are pre-existing, that is, export new country code injection, #defines in XCode project so that you can determine which version of Unity needs to be compiled against your original code.
Comments
Post a Comment