Cocos creator 3. Know in script for what platform project was builded

Hi all, Is it possible to know in script for what platform project was builded, for example:
cc.platform === ‘web-mobile’?
Thanks.

There are many ways to check. Please use one of these:

  • sys.os
  • sys.isBrowser
  • sys.isNative
  • sys.platform

Learn more about sys here

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.