User Tools

Site Tools


besiege:modding:moddevelopment

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
besiege:modding:moddevelopment [2018/06/27 17:07]
spaar [Project Layout]
besiege:modding:moddevelopment [2018/07/07 14:03] (current)
spaar [createassembly]
Line 68: Line 68:
  
 <​code>​ <​code>​
-createassembly <modid | name> <​compiled | script> <​assembly name> <default namespace>​+createassembly <modid | name> <​compiled | script> <​assembly name> <default namespace> ​[noUnityTools]
 </​code>​ </​code>​
  
Line 76: Line 76:
  
 The project contains references to appropriate game assemblies and a post-build action to copy the assembly to the mod directory and is set up in a portable way so that it can be checked in to source control and used from multiple machines. The project contains references to appropriate game assemblies and a post-build action to copy the assembly to the mod directory and is set up in a portable way so that it can be checked in to source control and used from multiple machines.
 +
 +Ideally, the Visual Studio is installed with the Unity Tools for Visual Studio included. They can also be added after Visual Studio was already installed by opening the Visual Studio installer again, modifying the installation and selecting "​Visual Studio Tools for Unity" in the Individual Components.
 +
 +The Unity Tools add a .NET Framework Profile that matches what Unity provides exactly, and by default the created VS project will use this profile. If you don't want to / can't use the Unity Tools, add the ''​noUnityTools''​ argument to the end of the command invocation, the generated project will then target the normal .NET 3.5 profile. This will usually work too but there may be some inconsistencies between what VS thinks is available and what is actually available in Unity.
  
 Note: The references are set up using two environment variables that are set up when the game is first started with mods enabled. If you have not restarted your computer since then, Visual Studio may not immediately be able to find the referenced assemblies. To fix this, restart Visual Studio and make sure to start it through the start menu and not by double-clicking the solution. Alternatively,​ just restart your computer once after executing the ''​createassembly''​ command and the references should work. Note: The references are set up using two environment variables that are set up when the game is first started with mods enabled. If you have not restarted your computer since then, Visual Studio may not immediately be able to find the referenced assemblies. To fix this, restart Visual Studio and make sure to start it through the start menu and not by double-clicking the solution. Alternatively,​ just restart your computer once after executing the ''​createassembly''​ command and the references should work.
besiege/modding/moddevelopment.txt ยท Last modified: 2018/07/07 14:03 by spaar