Skip to content

Commit

Permalink
Fix double vision
Browse files Browse the repository at this point in the history
  • Loading branch information
artemiswkearney committed Mar 15, 2019
1 parent c551f63 commit 0599632
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Binary file modified Custom Menu Text/Beon
Binary file not shown.
11 changes: 9 additions & 2 deletions Custom Menu Text/CustomMenuTextPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class CustomMenuTextPlugin : IPlugin
public static readonly Color defaultBottomColor = Color.red;

public const string DEFAULT_CONFIG =
@"# Custom Menu Text v3.0.0
@"# Custom Menu Text v3.0.1
# by Arti
# Special Thanks: Kyle1413
#
Expand Down Expand Up @@ -162,7 +162,7 @@ Ask in <#7289DA>#support
public static List<string[]> allEntries = null;

public string Name => "Custom Menu Text";
public string Version => "3.0.0";
public string Version => "3.0.1";

// Store the text objects so when we leave the menu and come back, we aren't creating a bunch of them
public static TextMeshPro mainText;
Expand Down Expand Up @@ -209,6 +209,10 @@ private void SceneManager_sceneLoaded(Scene arg0, LoadSceneMode arg1)

public static GameObject loadTextPrefab(string path)
{
var oldFonts = GameObject.FindObjectsOfType<TMP_FontAsset>();
var glowFonts = oldFonts.Where(f => !f.name.Contains("No Glow"));
var mat = glowFonts.FirstOrDefault()?.material;

GameObject prefab;
string fontPath = Path.Combine(Environment.CurrentDirectory, path);
if (!File.Exists(fontPath))
Expand All @@ -223,6 +227,9 @@ public static GameObject loadTextPrefab(string path)
AssetBundle beonBundle = AssetBundle.LoadFromMemory(Properties.Resources.Beon);
prefab = beonBundle.LoadAsset<GameObject>("Text");
}

if (mat != null) prefab.GetComponent<TextMeshPro>().font.material = mat;

return prefab;
}

Expand Down
4 changes: 2 additions & 2 deletions Custom Menu Text/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyFileVersion("3.0.0.0")]
[assembly: AssemblyVersion("3.0.1.0")]
[assembly: AssemblyFileVersion("3.0.1.0")]

0 comments on commit 0599632

Please sign in to comment.