获取启动参数

业务场景

获取小游戏启动的参数,包括场景值,路径参数,媒体来源等

流程图

接口介绍

SDKManager.getLaunchOptions();

调用示例

const launchInfo = SDKManager.getLaunchOptions();

参数说明

出参:LaunchInfo info

参数名称类型说明
fromString游戏启动场景
queryobject启动小游戏的 query 参数

错误码

FAQ

更加详细的说明请参考ks.getLaunchOptionsSync