类型 函数 库 gamecircle.* 返回值 字符串 版本 版本2024.3703 关键字 Whispersync、GameData、Path、Current
返回包含当前DataMap节点父级的字符串,以“|”分隔。以“|”结尾的字符串中会列出当前节点名称。如果用户位于GameData树的根目录,则返回的字符串将为“root|”
gamecircle.Whispersync.CurrentDataMapGetPath()
local gamecircle = require("plugin.gamecircle") gamecircle.Init(false, false, true) gamecircle.Whispersync.GameDataStepDownTo("Level 1") print("Level 1 Path: " .. gamecircle.Whispersync.CurrentDataMapGetPath()) gamecircle.Whispersync.GameDataStepDownTo("Treasures") gamecircle.Whispersync.GameDataStepUp() gamecircle.Whispersync.GameDataStepDownTo("Secrets") print("Secrets Path: " .. gamecircle.Whispersync.CurrentDataGetPath()) gamecircle.Whispersync.GameDataStepUp() print("Level 1 Children: ") local keys = gamecircle.Whispersync.CurrentDataMapChildKeys() for i,key in ipairs(keys) print("-" .. key) end gamecircle.Whispersync.GameDataReturnToRoot()