1
0
mirror of https://github.com/Memorix101/UnityXNA/ synced 2024-12-30 15:25:35 +01:00

patched spritefonts

This commit is contained in:
Memorix101 2023-04-20 03:38:56 +02:00
parent 3e78162361
commit 4af5227792

View File

@ -108,7 +108,9 @@ public class XNATest : MonoBehaviour {
GUI.color = new Color(call.Color.X, call.Color.Y, call.Color.Z, call.Color.W); GUI.color = new Color(call.Color.X, call.Color.Y, call.Color.Z, call.Color.W);
Vector2 size = GUI.skin.label.CalcSize(new GUIContent(call.Value)); Vector2 size = GUI.skin.label.CalcSize(new GUIContent(call.Value));
Font myFont = (Font)UnityEngine.Resources.Load($"Content/{call.Font.FontName.ToString()}", typeof(Font)); string[] x = call.Font.PathTo.Split('/');
string path = $"{call.Font.PathTo.Remove(call.Font.PathTo.Length - 1 - x[x.Length-1].Length)}/{call.Font.FontName.ToString()}";
Font myFont = (Font)UnityEngine.Resources.Load($"{path}", typeof(Font));
//GUI.skin.font = myFont; //GUI.skin.font = myFont;
GUIStyle myStyle = new GUIStyle(); GUIStyle myStyle = new GUIStyle();