Text wrapping fixed

dev-ali
Ali Sharoz 3 weeks ago
parent b4ff6148ed
commit 9af45d50d5

@ -3735,6 +3735,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: Mismatched Sender localizationKey: Mismatched Sender
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!1001 &48612848 --- !u!1001 &48612848
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -11667,6 +11669,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: compose localizationKey: compose
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!4 &152581993 stripped --- !u!4 &152581993 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 4837329652793204, guid: 88498815dea432045b6eaa9875ec268a, type: 3} m_CorrespondingSourceObject: {fileID: 4837329652793204, guid: 88498815dea432045b6eaa9875ec268a, type: 3}
@ -17472,6 +17476,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: mail localizationKey: mail
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!4 &232780965 stripped --- !u!4 &232780965 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 4245025388696848, guid: d6ede9f320f63de4f8bd9626df44ed6f, type: 3} m_CorrespondingSourceObject: {fileID: 4245025388696848, guid: d6ede9f320f63de4f8bd9626df44ed6f, type: 3}
@ -31803,6 +31809,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: start localizationKey: start
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!4 &426522969 stripped --- !u!4 &426522969 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 4527185568398708, guid: 66924574c80a24a44bdf782e3e7635d0, type: 3} m_CorrespondingSourceObject: {fileID: 4527185568398708, guid: 66924574c80a24a44bdf782e3e7635d0, type: 3}
@ -36334,6 +36342,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: All of the above localizationKey: All of the above
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!1001 &489090763 --- !u!1001 &489090763
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -36774,6 +36784,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: newEmail localizationKey: newEmail
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!1001 &490893920 --- !u!1001 &490893920
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -38459,6 +38471,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: WHY ITS DANGEROUS! localizationKey: WHY ITS DANGEROUS!
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!1001 &520169784 --- !u!1001 &520169784
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -40612,6 +40626,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: Mini Quiz localizationKey: Mini Quiz
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!4 &552026572 stripped --- !u!4 &552026572 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 4270791331071568, guid: f0bfb58546547264682d6066f7947e72, type: 3} m_CorrespondingSourceObject: {fileID: 4270791331071568, guid: f0bfb58546547264682d6066f7947e72, type: 3}
@ -49672,6 +49688,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: Typos in the subject localizationKey: Typos in the subject
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!1001 &662615422 --- !u!1001 &662615422
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -50833,6 +50851,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: draft localizationKey: draft
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!1001 &681179751 --- !u!1001 &681179751
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -54681,6 +54701,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: hacked localizationKey: hacked
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!1 &737073898 --- !u!1 &737073898
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -64717,6 +64739,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: whyphishing localizationKey: whyphishing
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!1001 &876342790 --- !u!1001 &876342790
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -70394,6 +70418,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: poweredby localizationKey: poweredby
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!1001 &936568817 --- !u!1001 &936568817
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -73321,6 +73347,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: How to be safe? localizationKey: How to be safe?
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!1001 &972988250 --- !u!1001 &972988250
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -77488,6 +77516,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: more localizationKey: more
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!4 &1030425952 stripped --- !u!4 &1030425952 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 4270791331071568, guid: f0bfb58546547264682d6066f7947e72, type: 3} m_CorrespondingSourceObject: {fileID: 4270791331071568, guid: f0bfb58546547264682d6066f7947e72, type: 3}
@ -78879,6 +78909,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: starred localizationKey: starred
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!4 &1053586557 stripped --- !u!4 &1053586557 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 4560637100612226, guid: 5d6857de3de39ce469a62ba9dc765d25, type: 3} m_CorrespondingSourceObject: {fileID: 4560637100612226, guid: 5d6857de3de39ce469a62ba9dc765d25, type: 3}
@ -79121,6 +79153,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: What Were The Clues? localizationKey: What Were The Clues?
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!4 &1059813799 stripped --- !u!4 &1059813799 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 4742576163013064, guid: 68acf050fd2a7d7438895bae4b02b1b0, type: 3} m_CorrespondingSourceObject: {fileID: 4742576163013064, guid: 68acf050fd2a7d7438895bae4b02b1b0, type: 3}
@ -88619,6 +88653,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: notsuspicious localizationKey: notsuspicious
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!4 &1197210934 stripped --- !u!4 &1197210934 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 4598856690569718, guid: 3ec74bf586541a64386d798159775c05, type: 3} m_CorrespondingSourceObject: {fileID: 4598856690569718, guid: 3ec74bf586541a64386d798159775c05, type: 3}
@ -97353,9 +97389,9 @@ MonoBehaviour:
m_HorizontalAlignment: 1 m_HorizontalAlignment: 1
m_VerticalAlignment: 256 m_VerticalAlignment: 256
m_textAlignment: 65535 m_textAlignment: 65535
m_characterSpacing: -10 m_characterSpacing: 0
m_wordSpacing: 0 m_wordSpacing: 0
m_lineSpacing: -39.49 m_lineSpacing: 0
m_lineSpacingMax: 0 m_lineSpacingMax: 0
m_paragraphSpacing: 0 m_paragraphSpacing: 0
m_charWidthMaxAdj: 0 m_charWidthMaxAdj: 0
@ -97407,6 +97443,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: whatwerethecluessummary localizationKey: whatwerethecluessummary
forceRightAlignment: 1 forceRightAlignment: 1
forceSpacingBool: 1
charLineSpacing: {x: -10, y: -39.49}
--- !u!1001 &1321965012 --- !u!1001 &1321965012
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -103639,6 +103677,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: phishingawareness localizationKey: phishingawareness
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!4 &1406236233 stripped --- !u!4 &1406236233 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 4598856690569718, guid: 3ec74bf586541a64386d798159775c05, type: 3} m_CorrespondingSourceObject: {fileID: 4598856690569718, guid: 3ec74bf586541a64386d798159775c05, type: 3}
@ -103793,6 +103833,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: sent localizationKey: sent
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!1001 &1407036543 --- !u!1001 &1407036543
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -122464,6 +122506,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: inbox localizationKey: inbox
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!1001 &1665812592 --- !u!1001 &1665812592
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -122941,6 +122985,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: inbox localizationKey: inbox
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!1001 &1674054030 --- !u!1001 &1674054030
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -124796,6 +124842,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: search localizationKey: search
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!4 &1701751480 stripped --- !u!4 &1701751480 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 4204627924666460, guid: 7e3a842bda3e7424e9fede8bc029c9fa, type: 3} m_CorrespondingSourceObject: {fileID: 4204627924666460, guid: 7e3a842bda3e7424e9fede8bc029c9fa, type: 3}
@ -133046,6 +133094,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: alwaysreport localizationKey: alwaysreport
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!4 &1832389832 stripped --- !u!4 &1832389832 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 4808176449061188, guid: 6fcbb7c2744bf764f9c7f6f46767b77f, type: 3} m_CorrespondingSourceObject: {fileID: 4808176449061188, guid: 6fcbb7c2744bf764f9c7f6f46767b77f, type: 3}
@ -139503,6 +139553,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: What was the biggest red flag in this phishing email? localizationKey: What was the biggest red flag in this phishing email?
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!4 &1934084553 stripped --- !u!4 &1934084553 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 4429576471617264, guid: e1b7acc66a1570041b8dee59003c793d, type: 3} m_CorrespondingSourceObject: {fileID: 4429576471617264, guid: e1b7acc66a1570041b8dee59003c793d, type: 3}
@ -148160,6 +148212,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: TIMELINE OF ACTIONS localizationKey: TIMELINE OF ACTIONS
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!1001 &2055927760 --- !u!1001 &2055927760
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -148521,7 +148575,7 @@ MonoBehaviour:
m_textAlignment: 65535 m_textAlignment: 65535
m_characterSpacing: 0 m_characterSpacing: 0
m_wordSpacing: 0 m_wordSpacing: 0
m_lineSpacing: -40 m_lineSpacing: 0
m_lineSpacingMax: 0 m_lineSpacingMax: 0
m_paragraphSpacing: 0 m_paragraphSpacing: 0
m_charWidthMaxAdj: 0 m_charWidthMaxAdj: 0
@ -148573,6 +148627,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: howtobesafesummary localizationKey: howtobesafesummary
forceRightAlignment: 1 forceRightAlignment: 1
forceSpacingBool: 1
charLineSpacing: {x: 0, y: -40}
--- !u!1001 &2060737185 --- !u!1001 &2060737185
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -149508,6 +149564,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
localizationKey: Urgent Language localizationKey: Urgent Language
forceRightAlignment: 0 forceRightAlignment: 0
forceSpacingBool: 0
charLineSpacing: {x: 0, y: 0}
--- !u!4 &2069515845 stripped --- !u!4 &2069515845 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 4285425695655684, guid: f5e290f6142a51a42a0a9b85f2c115a5, type: 3} m_CorrespondingSourceObject: {fileID: 4285425695655684, guid: f5e290f6142a51a42a0a9b85f2c115a5, type: 3}

@ -8,6 +8,8 @@ public class LocalizedTextComponent : MonoBehaviour
public string localizationKey; public string localizationKey;
private TextMeshProUGUI tmp; private TextMeshProUGUI tmp;
public bool forceRightAlignment = false; public bool forceRightAlignment = false;
public bool forceSpacingBool= false;
public Vector2 charLineSpacing;
private void Start() private void Start()
{ {
tmp = GetComponent<TextMeshProUGUI>(); tmp = GetComponent<TextMeshProUGUI>();
@ -70,6 +72,12 @@ public class LocalizedTextComponent : MonoBehaviour
} }
if (forceRightAlignment && isArabic) if (forceRightAlignment && isArabic)
tmp.alignment = TextAlignmentOptions.Right; tmp.alignment = TextAlignmentOptions.Right;
if(forceSpacingBool && isArabic)
{
tmp.characterSpacing = charLineSpacing.x;
tmp.lineSpacing = charLineSpacing.y;
}
tmp.font = LanguageManager.Instance.GetCurrentFont(); tmp.font = LanguageManager.Instance.GetCurrentFont();
tmp.ForceMeshUpdate(); tmp.ForceMeshUpdate();
} }

Loading…
Cancel
Save