How to make Teleport and Player Scale for Unity Games using LGL Mod Menu | Easy Tutorial for Beginners

Modding Unity Games: Player Scale and Teleportation

Modding Unity Games: Player Scale and Teleportation

Requirements:

  • Basic modding knowledge
  • A dump file of the game (Visit this site if you lack basic knowledge or a dump file of the game)
  • Android AIDE (to compile the mod menu source)
  • An app that can open large dump files (MT Manager is recommended)
  • Offset Tester (to test if offsets are working correctly)
  • The game APK itself

Steps to Modify Player Scale in Unity Games:

  1. Open the dump.cs file and search for the class of the object whose size you want to change. For example, to increase the size of NPCs, you might search for "int health" to find the relevant class.
  2. Find the update method within that class, such as Update, FixedUpdate, or LateUpdate.
  3. Access the class transform and modify its set_localscale method. If the object class has a direct transform method, link to it. If not, go to the class component : object.
  4. In the class component : object, locate the Transform get_transform method. Use this method to access the class transform.
  5. Once you have access to the class transform, call the set_localscale method from your update hook.
//Your hooking code should be like this
void *(*get_transform)(void *instance);
void (*set_localscale)(void *transform, Vector3 scale);

void (*old_manaiupdate)(void *instance);
void manaiupdate(void *instance) {
    if (instance != NULL) {
	set_localscale(get_transform(instance), {ManAIScale,ManAIScale,ManAIScale});
    }
    return old_manaiupdate(instance);
}

Steps to Implement Teleportation in Unity Games:

  1. Open the dump.cs file and search for the class of the object you want to teleport. For example, to teleport the player, you might search for "int health" to find the relevant class.
  2. Find the update method within that class, such as Update, FixedUpdate, or LateUpdate.
  3. Access the class transform and modify its set_position method. If the object class has a direct transform method, link to it. If not, go to the class component : object.
  4. In the class component : object, locate the Transform get_transform method. Use this method to access the class transform.
  5. Once you have access to the class transform, call the set_position method from your update hook.
//Your hooking code should be like this
void *(*get_transform)(void *instance);
void (*set_position)(void *transform, Vector3 pos);

void (*old_playercontrollerupdate)(void *instance);
void playercontrollerupdate(void *instance) {
    if (instance != NULL) {
        if (Teleport) { //Custom Teleport
            Teleport = false;
            set_position(get_transform(instance), {PlayerPosX, 1.0f, PlayerPosY});
        } else if (Teleport2) { //Teleport with predefined coordinates
            Teleport2 = false;
            set_position(get_transform(instance), PlayerPos2);
        }
    }
    return old_playercontrollerupdate(instance);
}

Comments

Popular posts from this blog

Among Us v2025.3.28 Fake Impostor Mod Menu Apk v15.1 [ESP, Teleport, Skins Unlocked, Free Chat etc.] || By Aadil Mods

Mini Militia v5.6.0 Aimbot/ESP Mod Menu Apk v5.1 | Speed Hack, Wall Hack, God Mod, Teleport etc.

Easy Mod Menu Tutorial on Android for Beginners | Learn to make mod menu for any Games