Api

PathutilsGamepathbyenv

OpenAPI > PathUtils > gamePathByEnv

OpenAPI.PathUtils.gamePathByEnv property

根据当前游戏环境获取当前游戏根路径

如果是PC版本则返回相对路径,实际是返回空。WEB版本则返回绝对路径

Signature:

static get gamePathByEnv(): string | undefined;

Example

const gamePathByEnv = OpenAPI.PathUtils.gamePathByEnv // 返回当前游戏根路径

Copyright © 2021 - 2025