Search code examples
c#unity-game-engine2dgame-engineunityscript

Unity: Change code dynamically in 2D game


I would like to use Unity to create a 2D game. I have already read through some tutorials but I couldn't really find an answer to my problem.

As my game should be changeable by an admin (a person should be able to change textboxes and some content of the game before distributing it), I would like to adapt some code of the game outside the unity program to adapt the whole game. Is it possible to do this? If yes, what is the starting point for doing this?

I basically know what to do in Unity but I haven't understand the full structure there yet.

EDIT

Example: I create a game in which a user have to collect items falling down the sky. Those items are words by default. But those items should be adaptable, so that I can change the words' content e.g. outside the engine.


Solution

  • im no Unity Developer neither an Game Developer.
    There are several approaches. First of all, use resources. You shouldn't encode the content of Textboxes in your Code. It could be saved in a Textfile or an XML File. Ingame you load the file and use a collection for the falling words.
    Other approach: Build an interface like "fallingWordGenerator", implement it as DLL, and load the DLL on startup (Loading DLLs at runtime in C#).

    Greetings