Browser Game Engine Detector (+ Version)

Detects current game engine

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Browser Game Engine Detector (+ Version)
// @description Detects current game engine
// @match        *://*/*
// @grant        none
// @license MIT
// @version 0.0.1.20260321154450
// @namespace https://greasyfork.org/users/1492052
// ==/UserScript==

(function() {

    function detectEngine() {
        let engine = "Unknown";
        let version = "Unknown";

        // Phaser
        if (window.Phaser) {
            engine = "Phaser";
            version = window.Phaser.VERSION || version;
        }

        else if (window.cc) {
            engine = "Cocos Creator";
            version = window.cc.ENGINE_VERSION || version;
        }

        else if (window.createUnityInstance) {
            engine = "Unity WebGL";
            if (window.Module && window.Module.unityVersion) {
                version = window.Module.unityVersion;
            } else {
                version = "Check UnityLoader.js filename";
            }
        }

        else if (window.THREE) {
            engine = "Three.js";
            version = window.THREE.REVISION || version;
        }

        else if (window.ex) {
            engine = "Excaliber.js";
            version = "Unknown";
        }

        else if (window.pc) {
            engine = "PlayCanvas";
            version = window.pc.version || version;
        }

        else if (window.BABYLON) {
            engine = "Babylon.js";
            version = window.BABYLON.Engine ? window.BABYLON.Engine.Version : version;
        }

        else if (window.Engine) {
            engine = "Godot Web";
            version = window.Engine.VERSION || version;
        }

        else if (window.gdjs) {
            engine = "GDevelop";
            version = window.gdjs.VERSION || version;
        }

        else if (window.C3 || window.runtime) {
            engine = "Construct 3";
            if (window.C3 && window.C3.version) version = window.C3.version;
        }
        else {
            const scripts = Array.from(document.scripts).map(s => s.src);
            for (let src of scripts) {
                if (/c3runtime.*\.js/i.test(src)) {
                    engine = "Construct 3";
                    const match = src.match(/c3runtime[-.]([0-9]+)\.js/i);
                    if (match) version = match[1];
                    break;
                }
                if (/c2runtime.*\.js/i.test(src)) {
                    engine = "Construct 2";
                    const match = src.match(/c2runtime[-.]([0-9]+)\.js/i);
                    if (match) version = match[1];
                    break;
                }
                if (/UnityLoader.*\.js/i.test(src)) {
                    engine = "Unity WebGL";
                    const match = src.match(/UnityLoader[-.]([0-9.]+)\.js/i);
                    if (match) version = match[1];
                    break;
                }
            }
        }

        return { engine, version };
    }

    setTimeout(() => {
        const detected = detectEngine();

        if (detected.engine !== "Unknown") {
            const badge = document.createElement("div");
            badge.innerText = `Engine: ${detected.engine} | Version: ${detected.version}`;
            badge.style.position = "fixed";
            badge.style.bottom = "10px";
            badge.style.right = "10px";
            badge.style.background = "black";
            badge.style.color = "white";
            badge.style.padding = "6px 10px";
            badge.style.fontSize = "12px";
            badge.style.zIndex = 999999;
            badge.style.borderRadius = "5px";
            badge.style.fontFamily = "monospace";
            document.body.appendChild(badge);
        }
    }, 2000);

})();