Changes

Jump to navigation Jump to search
Line 75: Line 75:  
You can use a mod-provided API by mapping it to an [https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/interface interface]:
 
You can use a mod-provided API by mapping it to an [https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/interface interface]:
 
<ol>
 
<ol>
<li>Create an interface with only the properties and methods you want to access. (If you directly reference the mod DLL and it provides a public API interface, you can use that instead.)
+
<li>Create an interface with only the properties and methods you want to access. This interface must be public and cannot be an inner interface. (If you directly reference the mod DLL and it provides a public API interface, you can use that instead.)
 
<syntaxhighlight lang="C#">
 
<syntaxhighlight lang="C#">
 
public interface ISomeModApi
 
public interface ISomeModApi
528

edits

Navigation menu