Skip to content

Commit 9e01192

Browse files
Text now correctly rerolls every time you enter the menu
1 parent cab0646 commit 9e01192

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

Custom Menu Text/CustomMenuTextPlugin.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ namespace CustomMenuText
1212
{
1313
public class CustomMenuTextPlugin : IPlugin
1414
{
15+
public static CustomMenuTextPlugin instance;
16+
1517
// path to the file to load text from
1618
private const string FILE_PATH = "/UserData/CustomMenuText.txt";
1719
// path to load the font prefab from
@@ -24,7 +26,7 @@ public class CustomMenuTextPlugin : IPlugin
2426
public static readonly Color defaultBottomColor = new Color(0, 0.5019608f, 1);
2527

2628
public const string DEFAULT_CONFIG =
27-
@"# Custom Menu Text v3.1.0
29+
@"# Custom Menu Text v3.1.1
2830
# by Arti
2931
# Special Thanks: Kyle1413, Alphie
3032
#
@@ -168,7 +170,7 @@ Ask in <#7289DA>#pc-help
168170
public static List<string[]> allEntries = null;
169171

170172
public string Name => "Custom Menu Text";
171-
public string Version => "3.1.0";
173+
public string Version => "3.1.1";
172174

173175
// Store the text objects so when we leave the menu and come back, we aren't creating a bunch of them
174176
public static TextMeshPro mainText;
@@ -178,13 +180,14 @@ Ask in <#7289DA>#pc-help
178180

179181
public void OnApplicationStart()
180182
{
183+
instance = this;
181184
SceneManager.activeSceneChanged += SceneManagerOnActiveSceneChanged;
182185
SceneManager.sceneLoaded += SceneManager_sceneLoaded;
183186
}
184187

185188
private void SceneManagerOnActiveSceneChanged(Scene arg0, Scene arg1)
186189
{
187-
if (arg0.name == "EmptyTransition" && arg1.name.Contains("Menu")) // Only run in menu scene
190+
if (arg1.name.Contains("Menu")) // Only run in menu scene
188191
{
189192
if (allEntries == null)
190193
{

Custom Menu Text/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("3.1.0.0")]
36-
[assembly: AssemblyFileVersion("3.1.0.0")]
35+
[assembly: AssemblyVersion("3.1.1.0")]
36+
[assembly: AssemblyFileVersion("3.1.1.0")]

0 commit comments

Comments
 (0)