Unity 常用编辑宏

  1. using UnityEngine;  
  2. using System.Collections;  
  3.   
  4. public class Recompile : MonoBehaviour  
  5. {  
  6.   
  7.     private string platform = string.Empty;  
  8.     // Use this for initialization  
  9.     void Start()  
  10.     {  
  11.         DebugPlatformMesaage();  
  12.     }  
  13.   
  14.     void DebugPlatformMesaage()  
  15.     {  
  16.  
  17. #if UNITY_EDITOR  
  18.         platform = "hi,大家好,我是在unity编辑模式下";  
  19. #elif UNITY_XBOX360  
  20.        platform="hi,大家好,我在XBOX360平台";  
  21. #elif UNITY_IPHONE  
  22.        platform="hi,大家好,我是IPHONE平台";  
  23. #elif UNITY_ANDROID  
  24.        platform="hi,大家好,我是ANDROID平台";  
  25. #elif UNITY_STANDALONE_OSX  
  26.        platform="hi,大家好,我是OSX平台";  
  27. #elif UNITY_STANDALONE_WIN  
  28.        platform="hi,大家好,我是Windows平台";  
  29. #endif  
  30.         Debug.Log("Current Platform:" + platform);  
  31.     }  
  32. }  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值