Modding:Modding Efficiently: Difference between revisions
From Vintage Story Wiki
No edit summary |
|||
Line 29: | Line 29: | ||
* If you are working with shaders, you can reload them with <code>.reload shaders</code> | * If you are working with shaders, you can reload them with <code>.reload shaders</code> | ||
* Do not hold static references unless its primitive data. Static references are not garbage collected when the player leaves a server / game world. Example: Holding a static reference of a <code>Block</code> will keep that block in memory, which in turn keeps the API Instance in memory, which in turn keeps the entire game world in memory. | * Do not hold static references unless its primitive data. Static references are not garbage collected when the player leaves a server / game world. Example: Holding a static reference of a <code>Block</code> will keep that block in memory, which in turn keeps the API Instance in memory, which in turn keeps the entire game world in memory. | ||
* Use the [https://devblogs.microsoft.com/dotnet/introducing-net-hot-reload/ Hot reload] feature of Visual Studio to edit your game code without restarting. | |||
=== Efficient Search Methods === | === Efficient Search Methods === |