decentraland / creator-hub

MIT License
1 stars 2 forks source link

Implement getExplorerInformation() to know platform #267

Open nearnshaw opened 4 weeks ago

nearnshaw commented 4 weeks ago

The function getExplorerInformation() returns what explorer is being used. This is implemented on Web and on the alternative clients, but not in E@

This is useful if a scene wants to add some different behavior depending on what explorer the player uses

import { getExplorerInformation } from "~system/Runtime"
(await getExplorerInformation({})).platform

protocol: https://github.com/decentraland/protocol/blob/main/proto/decentraland/kernel/apis/runtime.proto#L48

In the web browser: https://github.com/decentraland/unity-renderer/blob/dev/browser-interface/packages/shared/apis/host/Runtime.ts#L21