Is "System > Is on platform..." no longer supported?

0 favourites
  • 9 posts
From the Asset Store
Controller Support ,TouchScreen Support , Keyboard Support , Action Platformer, Lots of Animations
  • Noticed that I can copy and paste the System > Is on platform Android/iOS, but I can't find it manually. Is it no longer supported? If not, what is the next best option to determine this?

  • in the c3 runtime there is a platform plugin

  • Saw that before, but it only gives the option to check if it's on mobile. Not if it's Android or iOS. Sounds like you found a way through this plugin? How did you achieve it?

  • I think this was an oversight when we moved a bunch of system stuff to the Platform Info object. The old system "Is on platform" condition was full of defunct platforms anyway. I've added in conditions to check for Windows, macOS, Linux, ChromeOS, Android and iOS for the next release.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think this was an oversight when we moved a bunch of system stuff to the Platform Info object. The old system "Is on platform" condition was full of defunct platforms anyway. I've added in conditions to check for Windows, macOS, Linux, ChromeOS, Android and iOS for the next release.

    You've found a reliable way to check between Ios, and Android from within the runtime?

    If so is there any way we can do that on C2?

    It would save a lot of time, and resources, even if it is just some bit of js code.

  • Thanks Ashley!

  • newt - it's just searching for strings in the browser user agent. You can do this in events too, e.g. test if Browser.UserAgent contains "Android". Anyway, in C2 the system "Is on platform" condition has entries for iOS and Android, so it's already built in there too.

  • Ashley

    Ok thanks.

    The problem is that it doesn't return just Ios, or Android, but a bunch of strings like Ipad, LinuxArm.

    There's no way to know how many different flags there are so parsing them is not really an option.

  • Parsing them is the only option, and it's what all websites do in order to determine the OS. IIRC the variants for iOS are to look for any of "iPad", "iPhone" or "iPod" in the user agent string, and flag that as iOS. Yes, it's a mess, but it's what everyone uses!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)