Update Setup
parent
00314f9439
commit
20c8d3f92a
20
Setup.md
20
Setup.md
|
@ -1,7 +1,25 @@
|
|||
### How to add the DungeonGenerationPlus mod to your interior Unity project
|
||||
### Setting up the plugin in your Unity project
|
||||
|
||||
Download the `DunGenPlus.dll` through Thunderstore or through this Github repository. Drag and drop the `.dll` file into your interior Unity project. This mod also requires the LethalLevelLoader plugin to be installed in your Unity project. With just those simple steps, the mod is installed. You can now setup and use this mod's features.
|
||||
|
||||
This goes without saying, this mod also requires the DungeonGenerationPlus mod to be installed in your Lethal Company mod pack.
|
||||
|
||||
If you'd like to use this mod's API and callback features, reference the same `DunGenPlus.dll` file in your code project thing what do you call that?
|
||||
|
||||
### Setting up the DunGenExtender asset
|
||||
|
||||
Inside the Project tab, right click to open the Assets tab. Select `Create/DunGenExtender` to create the `DunGenExtender` asset. Inside that asset, reference the `DungeonFlow` that will be linked to this Extender asset. Finally, set it's AssetBundle name to the same one as your interior's asset, `DungeonFlow` or `ExtendedDungeonFlow` whichever it may be.
|
||||
|
||||
If you are creating a `.lethalbundle` asset to be automatically handled by LethalLevelLoader, then that's it. The DungeonGenerationPlus mod will automatically extract and read the `DunGenExtender` asset from the `.lethalbundle` asset when the game runs.
|
||||
|
||||
If you are loading the asset manually, you must register the 'DunGenExtender' asset manually through the API. The following is a code example of how you may want to do it.
|
||||
```cs
|
||||
var dungeon = YOUR_ASSET_BUNDLE.LoadAsset<DungeonFlow>("YOUR_DUNGEONFLOW_ASSET_NAME");
|
||||
var extender = YOUR_ASSET_BUNDLE.LoadAsset<DunGenExtender>("YOUR_EXTENDER_ASSET_NAME");
|
||||
DunGenPlus.API.AddDunGenExtender(dungeon, extender);
|
||||
```
|
||||
After any of the two previous steps, verify that the Extender was registered by finding this message in the logs.
|
||||
|
||||
### Setting up the API Callbacks
|
||||
|
||||
Inside the Project tab, right click to open the Assets tab. Select `Create/DunGenExtender` to create the `DunGenExtender` asset. Inside that asset, reference the `DungeonFlow` that will be linked to this Extender asset. Finally, set it's AssetBundle name to the same one as your interior's asset, `DungeonFlow` or `ExtendedDungeonFlow` whichever it may be. If it's I'm not sure if the extension must be `.lethalbundle` or if Unity automatically fixes it; either way set the extension as `.lethalbundle` to be safe.
|
Loading…
Reference in New Issue