Update
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
using DA_Assets.DAI;
|
||||
using DA_Assets.Logging;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
public class TextFontsSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
|
||||
[SerializeField] TextComponent textComponent = TextComponent.UnityText;
|
||||
public TextComponent TextComponent
|
||||
{
|
||||
get => textComponent;
|
||||
set
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case TextComponent.TextMeshPro:
|
||||
#if TextMeshPro == false
|
||||
DALogger.LogError(FcuLocKey.log_asset_not_imported.Localize(nameof(TextComponent.TextMeshPro)));
|
||||
textComponent = TextComponent.UnityText;
|
||||
return;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
SetValue(ref textComponent, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[SerializeField] bool overrideLetterSpacing = false;
|
||||
public bool OverrideLetterSpacing { get => overrideLetterSpacing; set => SetValue(ref overrideLetterSpacing, value); }
|
||||
|
||||
[SerializeField] bool overrideLineSpacing = false;
|
||||
public bool OverrideLineSpacingPx { get => overrideLineSpacing; set => SetValue(ref overrideLineSpacing, value); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d605fce23eb202848bb8825d9a1d8506
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,78 @@
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using DA_Assets.DAI;
|
||||
|
||||
#if TextMeshPro
|
||||
using TMPro;
|
||||
#endif
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
public class TextMeshSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
[SerializeField] bool autoSize = true;
|
||||
public bool AutoSize { get => autoSize; set => SetValue(ref autoSize, value); }
|
||||
|
||||
[SerializeField] bool overrideTags = false;
|
||||
public bool OverrideTags { get => overrideTags; set => SetValue(ref overrideTags, value); }
|
||||
|
||||
[SerializeField] bool wrapping = true;
|
||||
public bool Wrapping { get => wrapping; set => SetValue(ref wrapping, value); }
|
||||
|
||||
[SerializeField] bool orthographicMode = true;
|
||||
/// <summary>
|
||||
/// For NOVA only.
|
||||
/// </summary>
|
||||
public bool OrthographicMode { get => orthographicMode; set => SetValue(ref orthographicMode, value); }
|
||||
|
||||
[SerializeField] bool richText = true;
|
||||
public bool RichText { get => richText; set => SetValue(ref richText, value); }
|
||||
|
||||
[SerializeField] bool raycastTarget = true;
|
||||
public bool RaycastTarget { get => raycastTarget; set => SetValue(ref raycastTarget, value); }
|
||||
|
||||
[SerializeField] bool parseEscapeCharacters = true;
|
||||
public bool ParseEscapeCharacters { get => parseEscapeCharacters; set => SetValue(ref parseEscapeCharacters, value); }
|
||||
|
||||
[SerializeField] bool visibleDescender = true;
|
||||
public bool VisibleDescender { get => visibleDescender; set => SetValue(ref visibleDescender, value); }
|
||||
|
||||
[SerializeField] bool kerning = true;
|
||||
public bool Kerning { get => kerning; set => SetValue(ref kerning, value); }
|
||||
|
||||
[SerializeField] bool extraPadding = false;
|
||||
public bool ExtraPadding { get => extraPadding; set => SetValue(ref extraPadding, value); }
|
||||
|
||||
#if TextMeshPro
|
||||
[SerializeField] TextOverflowModes overflow = TextOverflowModes.Overflow;
|
||||
public TextOverflowModes Overflow { get => overflow; set => SetValue(ref overflow, value); }
|
||||
|
||||
[SerializeField] TextureMappingOptions horizontalMapping = TextureMappingOptions.Character;
|
||||
public TextureMappingOptions HorizontalMapping { get => horizontalMapping; set => SetValue(ref horizontalMapping, value); }
|
||||
|
||||
[SerializeField] TextureMappingOptions verticalMapping = TextureMappingOptions.Character;
|
||||
public TextureMappingOptions VerticalMapping { get => verticalMapping; set => SetValue(ref verticalMapping, value); }
|
||||
|
||||
[SerializeField] VertexSortingOrder geometrySorting = VertexSortingOrder.Normal;
|
||||
public VertexSortingOrder GeometrySorting { get => geometrySorting; set => SetValue(ref geometrySorting, value); }
|
||||
|
||||
#if RTLTMP_EXISTS
|
||||
[SerializeField] bool farsi = true;
|
||||
public bool Farsi { get => farsi; set => SetValue(ref farsi, value); }
|
||||
|
||||
[SerializeField] bool forceFix = false;
|
||||
public bool ForceFix { get => forceFix; set => SetValue(ref forceFix, value); }
|
||||
|
||||
[SerializeField] bool preserveNumbers = false;
|
||||
public bool PreserveNumbers { get => preserveNumbers; set => SetValue(ref preserveNumbers, value); }
|
||||
|
||||
[SerializeField] bool fixTags = true;
|
||||
public bool FixTags { get => fixTags; set => SetValue(ref fixTags, value); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
[SerializeField] Shader shader;
|
||||
public Shader Shader { get => shader; set => SetValue(ref shader, value); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 01f55d768fd763e47808a63a6c023225
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,27 @@
|
||||
using DA_Assets.DAI;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
[FcuPropertyHeader(FcuLocKey.label_unity_text_settings, FcuLocKey.tooltip_unity_text_settings)]
|
||||
public class UnityTextSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
[SerializeField] bool bestFit = true;
|
||||
[FcuInspectorProperty(ComponentType.Toggle, FcuLocKey.label_best_fit, FcuLocKey.tooltip_best_fit)]
|
||||
public bool BestFit { get => bestFit; set => SetValue(ref bestFit, value); }
|
||||
|
||||
[SerializeField] float fontLineSpacing = 1.0f;
|
||||
[FcuInspectorProperty(ComponentType.FloatField, FcuLocKey.label_line_spacing, FcuLocKey.tooltip_line_spacing)]
|
||||
public float FontLineSpacing { get => fontLineSpacing; set => SetValue(ref fontLineSpacing, value); }
|
||||
|
||||
[SerializeField] HorizontalWrapMode horizontalWrapMode = HorizontalWrapMode.Wrap;
|
||||
[FcuInspectorProperty(ComponentType.EnumField, FcuLocKey.label_horizontal_overflow, FcuLocKey.tooltip_horizontal_overflow)]
|
||||
public HorizontalWrapMode HorizontalWrapMode { get => horizontalWrapMode; set => SetValue(ref horizontalWrapMode, value); }
|
||||
|
||||
[SerializeField] VerticalWrapMode verticalWrapMode = VerticalWrapMode.Truncate;
|
||||
[FcuInspectorProperty(ComponentType.EnumField, FcuLocKey.label_vertical_overflow, FcuLocKey.tooltip_vertical_overflow)]
|
||||
public VerticalWrapMode VerticalWrapMode { get => verticalWrapMode; set => SetValue(ref verticalWrapMode, value); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b39d8bad86bf1414fa8da1a4ff69058f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user