I have already finished some unity tutorials. Currently using ‘2D Roguelike’ as a base for some experiments to learn. What boardManager does(creating map, zombies and stuff), making prefabs, addind animations etc. is clear to me, but I wonder how could I be able to to make it in files(like easy modding). For example let’s say I get rid of zombies from my prefabs, and instead I want game to start like:
1.Open file enemies.xml(or any other file type, nevermind).
enemies.xml like:
<enemies>
<zombie1>
<health>10</health>
<spritefile>zombie1</spritefile>
</zombie1>
</enemies>
2.Creates new prefab already containing collider, rigidbody and attached script, making zombie health 10, and loading sprites from files ‘zombie1attack.png’, ‘zombie1idle.png’.
3.Adds all the enemies to boardManager, so it can spawn them around.
And making same thing with floors, walls, load from file, load relevant png and make it a prefab, which boardManager uses.
How hard is it to create a script interpreting file and creating enemy with rigidbody, collider, attached script and animations basing only on that file contents and sprites? I’d be grateful for any advices on how to start it or maybe tutorials about that?
Also a little question, when I should inherit from MonoBehaviour and when I shouldn’t?