Skip to content

Commit c58eb67

Browse files
authored
Make MyPluginInfo internal (#11)
In version 1.0.0 `MyPluginInfo`, formerly `PluginInfo`, was an internal class. However due to the v1.0.0 `PluginInfo` not having a project-specific namespace, which came the next update when the internal class was converted to a public class as well, it's properties were not accessible to the plugin's scope. With the update seen in v1.1.0 to correctly namespace the class, it can be kept as `internal` and still allow it's variables to be accessed by the defining mod. ## Benefits When a library mod is referenced by another plugin, the receiving plugin can scope into the library's namespace and also use BepInEx.PluginInfoProps without any confusion about which `MyPluginInfo` is being referenced.
1 parent c5fac75 commit c58eb67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

BepInEx.PluginInfoProps/BepInEx.PluginInfoProps.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<GeneratedText><![CDATA[
88
namespace $(RootNamespace)
99
{
10-
public static class MyPluginInfo
10+
internal static class MyPluginInfo
1111
{
1212
public const string PLUGIN_GUID = "$(BepInExPluginGuid)"%3B
1313
public const string PLUGIN_NAME = "$(BepInExPluginName)"%3B
@@ -23,4 +23,4 @@ namespace $(RootNamespace)
2323
</ItemGroup>
2424
<WriteLinesToFile Lines="$(GeneratedText)" File="$(GeneratedFilePath)" WriteOnlyWhenDifferent="true" Overwrite="true" />
2525
</Target>
26-
</Project>
26+
</Project>

0 commit comments

Comments
 (0)