Editing General modding

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 7: Line 7:
 
Second, only one script can inherit from the IModInterface abstract class. This is because this script acts as an entrance point to all scripting logic in your mod, similar to how the Program class is usually the entrance point in C# projects. The IModInterface has several overridable methods, such as the "OnIngameUpdate" method (similar to Update), which allows you to hook logic to in game events. You can, however, have as many classes in your project as you like. And your entrance point IModInterface script can reference any of these classes.
 
Second, only one script can inherit from the IModInterface abstract class. This is because this script acts as an entrance point to all scripting logic in your mod, similar to how the Program class is usually the entrance point in C# projects. The IModInterface has several overridable methods, such as the "OnIngameUpdate" method (similar to Update), which allows you to hook logic to in game events. You can, however, have as many classes in your project as you like. And your entrance point IModInterface script can reference any of these classes.
  
βˆ’
Another limitation, one that I had trouble with initially, is that scripts attached to GameObjects in Additive scenes will NOT BE CALLED. This limitation is due to the way your mod assembly gets loaded into the game at runtime. But you can always attach a MonoBehaviour derived script to a GameObject.
+
Another limitation, one that I had trouble with initially, is that scripts attached to GameObjects in Additive scenes will NOT BE CALLED. This limitation is due to the way your mod assembly gets loaded into the game at runtime. But you can always attach a MonoBehaviour derived script to a GameObject. You can also create a Prefab, and load it Dynamically into the game.
  
βˆ’
You can also create a Prefab, and load it Dynamically into the game. But just like with additive scenes, scripts that were attached to the prefab won't be called when an instance is instantiated into the scene.
+
I haven't tried attaching a MonoBehaviour to a prefab, and then loading it Dynamically through script. This may be another limitation.
  
 
A temporary limitation, one that the developers hope to fix in the future, is that you can't use DLLs (Dynamically Linked Library) from the Asset Store or from other projects in your mod. All of the code in your mod must be C# Files. Be wary of this when you import Assets from the Unity Asset Store.
 
A temporary limitation, one that the developers hope to fix in the future, is that you can't use DLLs (Dynamically Linked Library) from the Asset Store or from other projects in your mod. All of the code in your mod must be C# Files. Be wary of this when you import Assets from the Unity Asset Store.

Please note that all contributions to Edge Of Eternity - Eternal Forge Modkit Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Eoemodkit:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)