-
Notifications
You must be signed in to change notification settings - Fork 368
Plugins (Game modes)
Game can be extended through plugins/game modes. Plugins are created as C# DLL files and must be located inside SanAndreasUnity_Data/SAU_Plugins
folder. When the game starts, it will look inside this folder, load all DLL files, and create an instance of every class which inherits PluginManager.PluginBase
class.
Plugins can register themselves as game modes, after which they will be available for selection from StartGame window or from command line.
When server starts, the selected game mode will be activated.
Plugins have full access to our C# API and to Unity API.
For an example how to create game mode, see Deathmatch game mode.
-
does not work with IL2CPP because IL2CPP does not support loading DLLs at runtime
-
dependency DLLs must always match the ones that are used in a Build or Editor - this means that whenever you change something in Editor, you need to rebuild your plugin
-
no hot reload