![Smile :)](./images/smilies/icon_e_smile.gif)
Overview
Here's a very shallow look at how the modding system works.
Creating mods is all done in the Unity Editor, with the help of a simple editor window. Anything that Unity recognizes as an asset can be included into mods.
The mods are represented by a single file (a unity asset bundle) with a .dfmod extension.
During the setup scene, any Mod Files in the Mod Directory (currently the Streaming Assets Path) are detected by the ModManager and partially loaded. During this stage you can set the load priority for each mod, and also chose to disable Mods that you don't want to run (these will be unloaded completely and unavailable during the game).
Once the main game scene is loaded, the ModManager will go through all the mods, compile any scripts, and then invoke special functions to begin the setup process. How exactly each mod is setup is currently left entirely for you to decide at this point.
The tutorials will include a few different examples of varying degrees of complexity from a simple "hello world" to loading assets from the mod package and setting them up in the scene, and assume basic knowledge of both Unity and Daggerfall Unity.
For the purposes of these tutorials, please make sure you're starting with the Setup scene, and the ModManager object is in the scene. If you don't have the ModManager in the scene, create a new game object and add the ModManager as a component to it.
Known Issues
enums - scripts with enum types defined will fail to compile. You can still use any of the enum types already in the project. This is an issue with the mcs compiler.
generic functions / classes - similar to the above, due to an issue with the compiler scripts that try to define generic functions will not compile.
Unity Versions - mods created in newer versions of unity might not be compatible with older versions of unity. This is noticeable if the mod is in the mod directory, but doesn't show up in the list of mods.