subplatform | The name of the subplatform to check. Supports "WeChat", "DouYin", and "MiniHost" (case-insensitive). |
bool Returns true if the subplatform is active and valid; otherwise, returns false.
Checks whether the specified MiniGame subplatform is active and valid.
If the subplatform is unknown, an error is logged, and false is returned. Otherwise, the function verifies whether the subplatform is active.
Only one subplatform can be active at a time. When a subplatform is activated, its corresponding code will be included in compilation, and the associated macro will take effect.
The currently supported subplatform macros are:
* Macro of "WeChat" subplatform: "MINIGAME_SUBPLATFORM_WEIXIN"
* Macro of "DouYin" subplatform: "MINIGAME_SUBPLATFORM_DOUYIN"
* Macro of "MiniHost" subplatform: "MINIGAME_SUBPLATFORM_MINIHOST"