Skip to content

Commit 80c0c42

Browse files
committed
Added "Log Item Font Override" property to optionally change logs' font asset (fixed #104)
1 parent f93fa82 commit 80c0c42

5 files changed

Lines changed: 9 additions & 2 deletions

File tree

Plugins/IngameDebugConsole/IngameDebugConsole.prefab

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,7 @@ MonoBehaviour:
888888
maxExpandedLogLength: 10000
889889
autoFocusOnCommandInputField: 1
890890
logItemPrefab: {fileID: 11408050, guid: 391be5df5ef62f345bb76a1051c04da7, type: 3}
891+
logItemFontOverride: {fileID: 0}
891892
commandSuggestionPrefab: {fileID: 6838696818539158795, guid: 5e66896448428cf46a1854dbdc014914,
892893
type: 3}
893894
infoLog: {fileID: 21300000, guid: 5a97d5afa6254804f81b7ba956296996, type: 3}

Plugins/IngameDebugConsole/README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
= In-game Debug Console (v1.8.1) =
1+
= In-game Debug Console (v1.8.2) =
22

33
Documentation: https://github.com/yasirkula/UnityIngameDebugConsole
44
FAQ: https://github.com/yasirkula/UnityIngameDebugConsole#faq

Plugins/IngameDebugConsole/Scripts/DebugLogItem.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ public void Initialize( DebugLogRecycledListView listView )
6969
logTextOriginalSize = logText.rectTransform.sizeDelta;
7070
copyLogButtonHeight = ( copyLogButton.transform as RectTransform ).anchoredPosition.y + ( copyLogButton.transform as RectTransform ).sizeDelta.y + 2f; // 2f: space between text and button
7171

72+
if (listView.manager.logItemFontOverride != null)
73+
logText.font = listView.manager.logItemFontOverride;
74+
7275
copyLogButton.onClick.AddListener( CopyLog );
7376
#if !UNITY_EDITOR && UNITY_WEBGL
7477
copyLogButton.gameObject.AddComponent<DebugLogItemCopyWebGL>().Initialize( this );

Plugins/IngameDebugConsole/Scripts/DebugLogManager.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ public class DebugLogManager : MonoBehaviour
222222
[SerializeField]
223223
private DebugLogItem logItemPrefab;
224224

225+
[SerializeField]
226+
internal TMP_FontAsset logItemFontOverride;
227+
225228
[SerializeField]
226229
private TextMeshProUGUI commandSuggestionPrefab;
227230

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.yasirkula.ingamedebugconsole",
33
"displayName": "In-game Debug Console",
4-
"version": "1.8.1",
4+
"version": "1.8.2",
55
"documentationUrl": "https://github.com/yasirkula/UnityIngameDebugConsole",
66
"changelogUrl": "https://github.com/yasirkula/UnityIngameDebugConsole/releases",
77
"licensesUrl": "https://github.com/yasirkula/UnityIngameDebugConsole/blob/master/LICENSE.txt",

0 commit comments

Comments
 (0)