Skip to content

Commit

Permalink
Make MyPluginInfo internal (#11)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wwwDayDream committed Feb 20, 2024
1 parent c5fac75 commit c58eb67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BepInEx.PluginInfoProps/BepInEx.PluginInfoProps.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<GeneratedText><![CDATA[
namespace $(RootNamespace)
{
public static class MyPluginInfo
internal static class MyPluginInfo
{
public const string PLUGIN_GUID = "$(BepInExPluginGuid)"%3B
public const string PLUGIN_NAME = "$(BepInExPluginName)"%3B
Expand All @@ -23,4 +23,4 @@ namespace $(RootNamespace)
</ItemGroup>
<WriteLinesToFile Lines="$(GeneratedText)" File="$(GeneratedFilePath)" WriteOnlyWhenDifferent="true" Overwrite="true" />
</Target>
</Project>
</Project>

0 comments on commit c58eb67

Please sign in to comment.