jeudi 12 janvier 2012

Les directives de compilation Unity

Grace aux directives de compilation d'unity on peut prévoir tel ou tel code et ca peut etre extremement pratique.

UNITY_EDITORDefine for calling Unity Editor scripts from your game code.
UNITY_STANDALONE_OSXPlatform define for compiling/executing code specifically for Mac OS (This includes Universal, PPC and Intel architectures).
UNITY_DASHBOARD_WIDGETPlatform define when creating code for Mac OS dashboard widgets.
UNITY_STANDALONE_WINUse this when you want to compile/execute code for Windows stand alone applications.
UNITY_WEBPLAYERPlatform define for web player content (this includes Windows and Mac Web player executables).
UNITY_WIIPlatform define for compiling/executing code for the Wii console.
UNITY_IPHONEPlatform define for compiling/executing code for the iPhone platform.
UNITY_ANDROIDPlatform define for the Android platform.
UNITY_PS3Platform define for running Play Station 3 code.
UNITY_XBOX360Platform define for executing XBbox 360 code.

    #if UNITY_EDITOR
      Debug.Log("Unity Editor");
    #endif
    #if UNITY_IPHONE
      Debug.Log("Iphone");
    #endif
    #if UNITY_STANDALONE_OSX
Debug.Log("Stand Alone OSX");
    #endif
    #if UNITY_STANDALONE_WIN
      Debug.Log("Stand Alone Windows");
    #endif


Elles sont toutes la: http://unity3d.com/support/documentation/Manual/Platform%20Dependent%20Compilation.html

Aucun commentaire:

Enregistrer un commentaire