WebgetSafeAreaRect • getSafeAreaRect(): Rect . Returns the safe area of the screen (in design resolution) based on the game view coordinate system. If the screen is not notched, this method returns a Rect of the same size as visibleSize by default. Currently supports Android, iOS and WeChat, ByteDance Mini Game platform. method getSafeAreaRect WebThis file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
sys · Cocos Creator
Webif your device has API lower than API 23, the function getSafeAreaRect() still continues to try to determine without additional permissions whether a device with a non-rectangular screen via another factors like detecting software keys (menu) or via android.max_aspect parameters from AndroidManifest.xml. WebFeb 7, 2024 · Playing animations. You have to tell Axmol which sprite frames should be used in an animation. The easiest way for this is to create a helper method that creates a list from a format string and the number of frames of the animation: For this tutorial, place it at the start of HelloWorldScene.cpp. innogy smarthome forum
Cocos Creator 如何适配手机异形屏 - 掘金
WebJan 12, 2024 · SafeAreaView. The purpose of SafeAreaView is to render content within the safe area boundaries of a device. It is currently only applicable to iOS devices with iOS … WebgetSafeAreaRect const Gets safe area rectangle. var getSafeAreaRect Gets safe area rectangle. local getSafeAreaRect Gets safe area rectangle. virtual void … WebThis component internally uses the API sys.getSafeAreaRect to obtain the safe area of the current iOS or Android device and implements the adaptation by using the Widget component and set anchor. (If there is no Widget component, it will be added automatically) Please refer to the SafeArea API. innogy rokycany