# ks.getLaunchOptionsSync

# ks.getLaunchOptionsSync()

获取小游戏冷启动时的参数。热启动参数通过 ks.onShow 接口获取。

# 返回值

属性 类型 说明 最低版本
from string 游戏启动场景
query Object 启动小游戏时传入的参数

# 示例代码

let result = ks.getLaunchOptionsSync()
this.content.string += `\nGetLaunchOptionSync, result: ${JSON.stringify(result)}`