unity macro 分平台处理

https://docs.unity3d.com/ScriptReference/SystemInfo.html

https://docs.unity3d.com/Manual/PlatformDependentCompilation.html

https://docs.unity3d.com/Manual/SL-BuiltinMacros.html

opengl这种宏只有shader能拿到

c#里面拿到的只是平台比如ios这样很尴尬 因为mac pc iphone都可以是ios平台但是 比如uv反这种 

所以 需要别的方法 

在systenInfo里面啥都有

systemInfo.graphicsUVStartsAtTop

这样cpu可以直接传不同数据了

或者systemInfo.GraphicsDeviceType  ogl dx metal里面都有

enjoy

猜你喜欢

转载自www.cnblogs.com/minggoddess/p/10289060.html
今日推荐