Search Unity

Question Import packages at runtime?

Discussion in 'Editor & General Support' started by EthanBarron, Feb 27, 2022.

  1. EthanBarron

    EthanBarron

    Joined:
    Dec 22, 2020
    Posts:
    7
    Saw a mod for Gorilla Tag that allows for custom maps. It exports UnityPackages but with the extension changed to .gtmap

    I know it's a UnityPackage because if you try to open it as a UnityPackage in Unity it works

    You put the .gtmap in the folder and when you boot the game up it appears in the level selection screen. How can I use UnityPackages for custom levels?

    (Extra proof that they're UnityPackages and not AssetBundles is that they save scripts and you can use them)
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    You'll want to first figure out how to get C# to actually compiles on the user's computer because that's not a thing that Unity does for you.

    Perhaps you are speaking of LUA scripts? Those are interpreted by a LUA Interpreter, such a MoonSharp LUA.
     
  3. EthanBarron

    EthanBarron

    Joined:
    Dec 22, 2020
    Posts:
    7
    I just checked through the DLL for the mod and there's nothing that references compiling C#. I can post all the code if you want although it's decompiled code so it's not 100% the same but functions the same