Common Features of NML
Last updated
Last updated
BasicMod
provides three static methods to print log with mod name as prefix: LogInfo
, LogWarning
, LogError
.
BasicMod
provides static property to visit your mod instance directly: Instance
.
You can get your mod declaration through BasicMod:GetDeclaration
. Definition of mod declaration is below:
NeoModLoader.services.LogService
provides
Normal: LogInfo
,LogWarning
,LogError
,
Print stack trace: LogStackTraceAsInfo
, LogStackTraceAsWarning
, LogStackTraceAsError
Used in multiple threads: LogInfoConcurrent
, LogWarningConcurrent
, LogErrorConcurrent
.
Create a folder named GameResources
under your mod folder. .png
, .jpg
, .jpeg
files will be explained by sprites.json
or corresponding .meta
files and loaded into game.
Then you can get them through Resources.Load
, SpriteTextureLoader.getSprite
or other related functions.
NeoModLoader.utils.SpriteLoadUtils
provides
LoadSingleSprite(string)
to load a single picture file as a Sprite
LoadSprites(string)
search related .meta
file(parsed into a TextureImporter
, and provides a SpriteSheet
) or sprites.json
to load picture(s) at/under a path.
BasicMod
is a mod providing configuring. You can get instance of ModConfig
with GetConfig
, Detailed see
Create a folder named Locales
, and refers to . Only json and csv files are supported.
Detailed see