unity 判断是安卓还是IOS平台

功能概述

储值功能,点击一个按钮(mSprites["Recharge"]),实现储值功能,在IOS平台上,该按钮下的功能全部隐藏,在安卓平台上正常显示按钮,实现相应功能

#if UNITY_IOS

mSprites["Recharge"].gameObject.SetActive(false);

#elif UNITY_ANDROID

bool isOpen = Util.Verification.Verify(CONDITION_OPEN.VietnamRecahrge,PLAYER.CurrentActor);

mSprites["Recharge"].gameObject.SetActive(isOpen);

#endif

原文地址:https://www.cnblogs.com/kangpingfei/p/6732708.html