Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Mod development] Custom scripts

Discussion in 'Scripting' started by spil778, Mar 5, 2015.

  1. spil778

    spil778

    Joined:
    Mar 31, 2013
    Posts:
    57
    Hey guys I am making an RPG game and I thought it could be cool to have the option of modding. I kinda wanna take this choice quite early so I can code it accordingly. I wondered if its possible, after building, to add custom scripts and if so how? I was thinking of something as stupid as having a txt file with custom scripts and have unity loading them and have a system that checks when to exsute them. Any easier way to do this?
     
  2. spil778

    spil778

    Joined:
    Mar 31, 2013
    Posts:
    57
    Nobody?
     
  3. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    You've got the basic idea. Here's a blog post showing a nifty little C# console, though it uses a plugin. I think you could do the same thing without a plugin if you just delve into the runtime compiler.

    Another option is to embed something like a Lua interpreter.

    This is a decision I'm going to have to make soon for High Frontier, so if you make any progress with either of these approaches, please let me know what you find!