9 lines
206 B
TypeScript
Raw Normal View History

2021-11-09 15:24:10 +08:00
declare const cc:any;
export function isVersion3() {
if (typeof cc.ENGINE_VERSION === "string") {
const version: string = cc.ENGINE_VERSION;
return version.startsWith("3.")
}
return false;
}