Update
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 54e59d6a92d4ce240885f52dd8ec5e08
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,41 @@
|
||||
using DA_Assets.DAI;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
public class ButtonSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
[SerializeField] ButtonComponent buttonComponent = ButtonComponent.UnityButton;
|
||||
[FcuInspectorProperty(ComponentType.EnumField, FcuLocKey.label_button_type, FcuLocKey.tooltip_button_type)]
|
||||
public ButtonComponent ButtonComponent
|
||||
{
|
||||
get => buttonComponent;
|
||||
set
|
||||
{
|
||||
/*switch (value)
|
||||
{
|
||||
case ButtonComponent.DAButton:
|
||||
#if DABUTTON_EXISTS == false
|
||||
DALogger.LogError(FcuLocKey.log_asset_not_imported.Localize(nameof(ButtonComponent.DAButton)));
|
||||
buttonComponent = ButtonComponent.UnityButton;
|
||||
return;
|
||||
#endif
|
||||
break;
|
||||
}*/
|
||||
|
||||
SetValue(ref buttonComponent, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[SerializeField] UnityButtonSettings unityButtonSettings;
|
||||
[SerializeProperty(nameof(unityButtonSettings))]
|
||||
public UnityButtonSettings UnityButtonSettings => monoBeh.Link(ref unityButtonSettings);
|
||||
|
||||
[SerializeField] DAButtonSettings dabSettings;
|
||||
[SerializeProperty(nameof(dabSettings))]
|
||||
public DAButtonSettings DabSettings => monoBeh.Link(ref dabSettings);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b10579a8228b53245a2226df364e174d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,40 @@
|
||||
using DA_Assets.DAG;
|
||||
using DA_Assets.DAI;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using DA_Assets.Extensions;
|
||||
|
||||
#if DABUTTON_EXISTS
|
||||
using DA_Assets.DAB;
|
||||
#endif
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
public class DAButtonSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
[SerializeField] DAColorBlendMode blendMode = DAColorBlendMode.Overlay;
|
||||
public DAColorBlendMode BlendMode { get => blendMode; set => blendMode = value; }
|
||||
|
||||
[SerializeField] float blendIntensity = 1f;
|
||||
public float BlendIntensity { get => blendIntensity; set => blendIntensity = value; }
|
||||
|
||||
#if DABUTTON_EXISTS
|
||||
[SerializeField] DATargetGraphic defaultTargetGraphic;
|
||||
[SerializeProperty(nameof(defaultTargetGraphic))]
|
||||
public DATargetGraphic DefaultTargetGraphic
|
||||
{
|
||||
get
|
||||
{
|
||||
if (defaultTargetGraphic.IsDefault())
|
||||
{
|
||||
// defaultTargetGraphic = DAButtonDefaults.Instance.CopyTargetGraphic(DAButtonDefaults.Instance.DefaultTargetGraphic);
|
||||
}
|
||||
|
||||
return defaultTargetGraphic;
|
||||
}
|
||||
set => defaultTargetGraphic = value;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 81cfce8924a1ab146a3438b7d14f71aa
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,39 @@
|
||||
using DA_Assets.DAI;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
[FcuPropertyHeader(FcuLocKey.label_button_settings, FcuLocKey.tooltip_button_settings)]
|
||||
public class UnityButtonSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
[SerializeField] Color normalColor = new Color32(255, 255, 255, 255);
|
||||
[FcuInspectorProperty(ComponentType.ColorField, FcuLocKey.label_normal_color, FcuLocKey.tooltip_normal_color)]
|
||||
public Color NormalColor { get => normalColor; set => SetValue(ref normalColor, value); }
|
||||
|
||||
[SerializeField] Color highlightedColor = new Color32(245, 245, 245, 255);
|
||||
[FcuInspectorProperty(ComponentType.ColorField, FcuLocKey.label_highlighted_color, FcuLocKey.tooltip_highlighted_color)]
|
||||
public Color HighlightedColor { get => highlightedColor; set => SetValue(ref highlightedColor, value); }
|
||||
|
||||
[SerializeField] Color pressedColor = new Color32(200, 200, 200, 255);
|
||||
[FcuInspectorProperty(ComponentType.ColorField, FcuLocKey.label_pressed_color, FcuLocKey.tooltip_pressed_color)]
|
||||
public Color PressedColor { get => pressedColor; set => SetValue(ref pressedColor, value); }
|
||||
|
||||
[SerializeField] Color selectedColor = new Color32(245, 245, 245, 255);
|
||||
[FcuInspectorProperty(ComponentType.ColorField, FcuLocKey.label_selected_color, FcuLocKey.tooltip_selected_color)]
|
||||
public Color SelectedColor { get => selectedColor; set => SetValue(ref selectedColor, value); }
|
||||
|
||||
[SerializeField] Color disabledColor = new Color32(200, 200, 200, 128);
|
||||
[FcuInspectorProperty(ComponentType.ColorField, FcuLocKey.label_disabled_color, FcuLocKey.tooltip_disabled_color)]
|
||||
public Color DisabledColor { get => disabledColor; set => SetValue(ref disabledColor, value); }
|
||||
|
||||
[SerializeField] float colorMultiplier = 1f;
|
||||
[FcuInspectorProperty(ComponentType.FloatField, FcuLocKey.label_color_multiplier, FcuLocKey.tooltip_color_multiplier)]
|
||||
public float ColorMultiplier { get => colorMultiplier; set => SetValue(ref colorMultiplier, value); }
|
||||
|
||||
[SerializeField] float fadeDuration = 0.1f;
|
||||
[FcuInspectorProperty(ComponentType.FloatField, FcuLocKey.label_fade_duration, FcuLocKey.tooltip_fade_duration)]
|
||||
public float FadeDuration { get => fadeDuration; set => SetValue(ref fadeDuration, value); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2d944031ca8f68d48819245371c1e9ac
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 54534a92961905749902b51fcb4a63d3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,30 @@
|
||||
using DA_Assets.DAI;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
public class BaseImageSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
[SerializeField] UnityEngine.UI.Image.Type type = UnityEngine.UI.Image.Type.Simple;
|
||||
[FcuInspectorProperty(ComponentType.EnumField, FcuLocKey.label_image_type, FcuLocKey.tooltip_image_type)]
|
||||
public UnityEngine.UI.Image.Type Type { get => type; set => SetValue(ref type, value); }
|
||||
|
||||
[SerializeField] bool raycastTarget = true;
|
||||
[FcuInspectorProperty(ComponentType.Toggle, FcuLocKey.label_raycast_target, FcuLocKey.tooltip_raycast_target)]
|
||||
public bool RaycastTarget { get => raycastTarget; set => SetValue(ref raycastTarget, value); }
|
||||
|
||||
[SerializeField] bool preserveAspect = true;
|
||||
[FcuInspectorProperty(ComponentType.Toggle, FcuLocKey.label_preserve_aspect, FcuLocKey.tooltip_preserve_aspect)]
|
||||
public bool PreserveAspect { get => preserveAspect; set => SetValue(ref preserveAspect, value); }
|
||||
|
||||
[SerializeField] Vector4 raycastPadding = new Vector4(0, 0, 0, 0);
|
||||
[FcuInspectorProperty(ComponentType.Vector4Field, FcuLocKey.label_raycast_padding, FcuLocKey.tooltip_raycast_padding)]
|
||||
public Vector4 RaycastPadding { get => raycastPadding; set => SetValue(ref raycastPadding, value); }
|
||||
|
||||
[SerializeField] bool maskable = true;
|
||||
[FcuInspectorProperty(ComponentType.Toggle, FcuLocKey.label_maskable, FcuLocKey.tooltip_maskable)]
|
||||
public bool Maskable { get => maskable; set => SetValue(ref maskable, value); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fec720cc0904fa348a5c6464c0c415d4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
using DA_Assets.DAI;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
[FcuPropertyHeader(FcuLocKey.label_procedural_ui_settings, FcuLocKey.tooltip_procedural_ui_settings)]
|
||||
public class DttPuiSettings : BaseImageSettings
|
||||
{
|
||||
[SerializeField] float falloffDistance = 1f;
|
||||
[FcuInspectorProperty(ComponentType.FloatField, FcuLocKey.label_pui_falloff_distance, FcuLocKey.tooltip_pui_falloff_distance)]
|
||||
public float FalloffDistance { get => falloffDistance; set => SetValue(ref falloffDistance, value); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 073b34b33e794de41a155daf088a1465
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,207 @@
|
||||
using DA_Assets.DAI;
|
||||
using DA_Assets.Logging;
|
||||
using System;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
public class ImageSpritesSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
[SerializeField] ProceduralCondition proceduralCondition = ProceduralCondition.Sprite | ProceduralCondition.RectangleNoRoundedCorners;
|
||||
[SerializeProperty(nameof(proceduralCondition))]
|
||||
public ProceduralCondition ProceduralCondition { get => proceduralCondition; set => SetValue(ref proceduralCondition, value); }
|
||||
|
||||
|
||||
[Tooltip(@"The VectorGraphics 2.0.0 asset does not support displaying SVG images with effects.
|
||||
|
||||
I also noticed that it doesn’t render objects that use an image as a fill in Figma.
|
||||
|
||||
By default, the asset will download objects that meet these conditions as PNG sprites and use the UI.Image component to draw them.
|
||||
|
||||
You can disable these options, but these components may not display correctly in Unity.")]
|
||||
[SerializeField] SvgCondition svgCondition = SvgCondition.ImageOrVideo | SvgCondition.AnyEffect;
|
||||
[SerializeProperty(nameof(svgCondition))]
|
||||
public SvgCondition SvgCondition { get => svgCondition; set => SetValue(ref svgCondition, value); }
|
||||
|
||||
[SerializeField] ImageComponent imageComponent = ImageComponent.UnityImage;
|
||||
public ImageComponent ImageComponent
|
||||
{
|
||||
get => imageComponent;
|
||||
set
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case ImageComponent.SubcShape:
|
||||
#if SUBC_SHAPES_EXISTS == false
|
||||
DALogger.LogError(FcuLocKey.log_asset_not_imported.Localize(nameof(ImageComponent.SubcShape)));
|
||||
SetValue(ref imageComponent, ImageComponent.UnityImage);
|
||||
return;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
case ImageComponent.MPImage:
|
||||
#if MPUIKIT_EXISTS == false
|
||||
DALogger.LogError(FcuLocKey.log_asset_not_imported.Localize(nameof(ImageComponent.MPImage)));
|
||||
SetValue(ref imageComponent, ImageComponent.UnityImage);
|
||||
return;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
case ImageComponent.ProceduralImage:
|
||||
#if JOSH_PUI_EXISTS == false
|
||||
DALogger.LogError(FcuLocKey.log_asset_not_imported.Localize(nameof(ImageComponent.ProceduralImage)));
|
||||
SetValue(ref imageComponent, ImageComponent.UnityImage);
|
||||
return;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
case ImageComponent.RoundedImage:
|
||||
#if PROCEDURAL_UI_ASSET_STORE_RELEASE == false
|
||||
DALogger.LogError(FcuLocKey.log_asset_not_imported.Localize(nameof(ImageComponent.RoundedImage)));
|
||||
SetValue(ref imageComponent, ImageComponent.UnityImage);
|
||||
return;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
case ImageComponent.SvgImage:
|
||||
#if VECTOR_GRAPHICS_EXISTS == false
|
||||
DALogger.LogError(FcuLocKey.log_asset_not_imported.Localize(nameof(ImageComponent.SvgImage)));
|
||||
SetValue(ref imageComponent, ImageComponent.UnityImage);
|
||||
return;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
SetValue(ref imageComponent, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[SerializeField] bool downloadMultipleFills = true;
|
||||
public bool DownloadMultipleFills { get => downloadMultipleFills; set => SetValue(ref downloadMultipleFills, value); }
|
||||
|
||||
[SerializeField] bool downloadUnsupportedGradients = true;
|
||||
public bool DownloadUnsupportedGradients { get => downloadUnsupportedGradients; set => SetValue(ref downloadUnsupportedGradients, value); }
|
||||
|
||||
[SerializeField] bool redownloadSprites = false;
|
||||
public bool RedownloadSprites { get => redownloadSprites; set => SetValue(ref redownloadSprites, value); }
|
||||
|
||||
[SerializeField] string spritesPath = Path.Combine("Assets", "Sprites");
|
||||
public string SpritesPath { get => spritesPath; set => SetValue(ref spritesPath, value); }
|
||||
|
||||
[SerializeField] ImageFormat imageFormat = ImageFormat.PNG;
|
||||
public ImageFormat ImageFormat
|
||||
{
|
||||
get => imageFormat;
|
||||
set
|
||||
{
|
||||
switch (imageFormat)
|
||||
{
|
||||
case ImageFormat.SVG:
|
||||
#if VECTOR_GRAPHICS_EXISTS == false
|
||||
DALogger.LogError(FcuLocKey.log_asset_not_imported.Localize(nameof(ImageFormat.SVG)));
|
||||
SetValue(ref imageFormat, ImageFormat.PNG);
|
||||
return;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
SetValue(ref imageFormat, value);
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField] float imageScale = FcuConfig.IMAGE_SCALE_MAX;
|
||||
public float ImageScale
|
||||
{
|
||||
get
|
||||
{
|
||||
if (imageFormat == ImageFormat.SVG && imageScale != 1f)
|
||||
{
|
||||
DALogger.Log(FcuLocKey.log_svg_scale_1.Localize());
|
||||
imageScale = 1f;
|
||||
}
|
||||
|
||||
return imageScale;
|
||||
}
|
||||
set => SetValue(ref imageScale, value);
|
||||
}
|
||||
|
||||
public Vector2Int maxSpriteSize = new Vector2Int(4096, 4096);
|
||||
public Vector2Int MaxSpriteSize
|
||||
{
|
||||
get => maxSpriteSize;
|
||||
set
|
||||
{
|
||||
Vector2Int val = value;
|
||||
|
||||
if (val.x > 4096)
|
||||
{
|
||||
val.x = 4096;
|
||||
}
|
||||
else if (val.x < 32)
|
||||
{
|
||||
val.x = 32;
|
||||
}
|
||||
|
||||
if (val.y > 4096)
|
||||
{
|
||||
val.y = 4096;
|
||||
}
|
||||
else if (val.y < 32)
|
||||
{
|
||||
val.y = 32;
|
||||
}
|
||||
|
||||
SetValue(ref maxSpriteSize, val);
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField] PreserveRatioMode preserveRatioMode = PreserveRatioMode.None;
|
||||
public PreserveRatioMode PreserveRatioMode { get => preserveRatioMode; set => SetValue(ref preserveRatioMode, value); }
|
||||
|
||||
[SerializeField] float pixelsPerUnit = 100;
|
||||
public float PixelsPerUnit { get => pixelsPerUnit; set => SetValue(ref pixelsPerUnit, value); }
|
||||
|
||||
[SerializeField] bool useImageLinearMaterial = true;
|
||||
public bool UseImageLinearMaterial { get => useImageLinearMaterial; set => SetValue(ref useImageLinearMaterial, value); }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
[FcuPropertyHeader(FcuLocKey.label_texture_importer_settings, FcuLocKey.tooltip_texture_importer_settings)]
|
||||
public class TextureImporterSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
[SerializeField] bool crunchedCompression = false;
|
||||
[FcuInspectorProperty(ComponentType.Toggle, FcuLocKey.label_crunched_compression, FcuLocKey.tooltip_crunched_compression)]
|
||||
public bool CrunchedCompression { get => crunchedCompression; set => SetValue(ref crunchedCompression, value); }
|
||||
|
||||
[SerializeField] int compressionQuality = 100;
|
||||
[FcuInspectorProperty(ComponentType.SliderField, FcuLocKey.label_compression_quality, FcuLocKey.tooltip_compression_quality, minValue: 0f, maxValue: 100f)]
|
||||
public int CompressionQuality { get => compressionQuality; set => SetValue(ref compressionQuality, value); }
|
||||
|
||||
[SerializeField] bool isReadable = true;
|
||||
[FcuInspectorProperty(ComponentType.Toggle, FcuLocKey.label_is_readable, FcuLocKey.tooltip_is_readable)]
|
||||
public bool IsReadable { get => isReadable; set => SetValue(ref isReadable, value); }
|
||||
|
||||
[SerializeField] bool mipmapEnabled = false;
|
||||
[FcuInspectorProperty(ComponentType.Toggle, FcuLocKey.label_mipmap_enabled, FcuLocKey.tooltip_mipmap_enabled)]
|
||||
public bool MipmapEnabled { get => mipmapEnabled; set => SetValue(ref mipmapEnabled, value); }
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[SerializeField] UnityEditor.TextureImporterType textureType = UnityEditor.TextureImporterType.Sprite;
|
||||
[FcuInspectorProperty(ComponentType.EnumField, FcuLocKey.label_texture_type, FcuLocKey.tooltip_texture_type)]
|
||||
public UnityEditor.TextureImporterType TextureType { get => textureType; set => SetValue(ref textureType, value); }
|
||||
|
||||
[SerializeField] UnityEditor.TextureImporterCompression textureCompression = UnityEditor.TextureImporterCompression.Uncompressed;
|
||||
[FcuInspectorProperty(ComponentType.EnumField, FcuLocKey.label_texture_compression, FcuLocKey.tooltip_texture_compression)]
|
||||
public UnityEditor.TextureImporterCompression TextureCompression { get => textureCompression; set => SetValue(ref textureCompression, value); }
|
||||
|
||||
[SerializeField] UnityEditor.SpriteImportMode spriteImportMode = UnityEditor.SpriteImportMode.Single;
|
||||
[FcuInspectorProperty(ComponentType.EnumField, FcuLocKey.label_sprite_import_mode, FcuLocKey.tooltip_sprite_import_mode)]
|
||||
public UnityEditor.SpriteImportMode SpriteImportMode { get => spriteImportMode; set => SetValue(ref spriteImportMode, value); }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dca68ceb48ea34245a94b98b17020576
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
using DA_Assets.DAI;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
[FcuPropertyHeader(FcuLocKey.label_pui_settings, FcuLocKey.tooltip_pui_settings)]
|
||||
public class JoshPuiSettings : BaseImageSettings
|
||||
{
|
||||
[SerializeField] float falloffDistance = 1f;
|
||||
[FcuInspectorProperty(ComponentType.FloatField, FcuLocKey.label_pui_falloff_distance, FcuLocKey.tooltip_pui_falloff_distance)]
|
||||
public float FalloffDistance { get => falloffDistance; set => SetValue(ref falloffDistance, value); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6161774de28bc4f42bc440c77bd96f01
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
using DA_Assets.DAI;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
[FcuPropertyHeader(FcuLocKey.label_mpuikit_settings, FcuLocKey.tooltip_mpuikit_settings)]
|
||||
public class MPUIKitSettings : BaseImageSettings
|
||||
{
|
||||
[SerializeField] float falloffDistance = 0.5f;
|
||||
[FcuInspectorProperty(ComponentType.FloatField, FcuLocKey.label_pui_falloff_distance, FcuLocKey.tooltip_pui_falloff_distance)]
|
||||
public float FalloffDistance { get => falloffDistance; set => SetValue(ref falloffDistance, value); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2985a858b327f36448d443a8f78c1e89
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
using System;
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
public class RawImageSettings : BaseImageSettings { }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe358f96e89bc3a4d963e873775c80bd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
using System;
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
public class Shapes2DSettings : BaseImageSettings { }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f24d21092e6aac4b96352e509ae87bd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,35 @@
|
||||
using DA_Assets.DAI;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
[FcuPropertyHeader(FcuLocKey.label_sr_settings, FcuLocKey.tooltip_sr_settings)]
|
||||
public class SpriteRendererSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
[SerializeField] bool flipX = false;
|
||||
[FcuInspectorProperty(ComponentType.Toggle, FcuLocKey.label_flip_x, FcuLocKey.tooltip_flip_x)]
|
||||
public bool FlipX { get => flipX; set => SetValue(ref flipX, value); }
|
||||
|
||||
[SerializeField] bool flipY = false;
|
||||
[FcuInspectorProperty(ComponentType.Toggle, FcuLocKey.label_flip_y, FcuLocKey.tooltip_flip_y)]
|
||||
public bool FlipY { get => flipY; set => SetValue(ref flipY, value); }
|
||||
|
||||
[SerializeField] SpriteMaskInteraction maskInteraction = SpriteMaskInteraction.None;
|
||||
[FcuInspectorProperty(ComponentType.EnumField, FcuLocKey.label_mask_interaction, FcuLocKey.tooltip_mask_interaction)]
|
||||
public SpriteMaskInteraction MaskInteraction { get => maskInteraction; set => SetValue(ref maskInteraction, value); }
|
||||
|
||||
[SerializeField] SpriteSortPoint sortPoint = SpriteSortPoint.Center;
|
||||
[FcuInspectorProperty(ComponentType.EnumField, FcuLocKey.label_sort_point, FcuLocKey.tooltip_sort_point)]
|
||||
public SpriteSortPoint SortPoint { get => sortPoint; set => SetValue(ref sortPoint, value); }
|
||||
|
||||
[SerializeField] string sortingLayer = "Default";
|
||||
[FcuInspectorProperty(ComponentType.TextField, FcuLocKey.label_sorting_layer, FcuLocKey.tooltip_sorting_layer)]
|
||||
public string SortingLayer { get => sortingLayer; set => SetValue(ref sortingLayer, value); }
|
||||
|
||||
[SerializeField] int nextOrderStep = 10;
|
||||
[FcuInspectorProperty(ComponentType.IntField, FcuLocKey.label_next_order_step, FcuLocKey.tooltip_next_order_step)]
|
||||
public int NextOrderStep { get => nextOrderStep; set => SetValue(ref nextOrderStep, value); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d53843fa1315ac45a139bf11d004c76
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,88 @@
|
||||
using DA_Assets.DAI;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
#if VECTOR_GRAPHICS_EXISTS
|
||||
using Unity.VectorGraphics;
|
||||
#endif
|
||||
|
||||
#if VECTOR_GRAPHICS_EXISTS && UNITY_EDITOR
|
||||
using Unity.VectorGraphics.Editor;
|
||||
#endif
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
[FcuPropertyHeader(FcuLocKey.label_svg_image_settings, FcuLocKey.tooltip_svg_image_settings)]
|
||||
public class SvgImageSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
[SerializeField] bool raycastTarget = true;
|
||||
[FcuInspectorProperty(ComponentType.Toggle, FcuLocKey.label_raycast_target, FcuLocKey.tooltip_raycast_target)]
|
||||
public bool RaycastTarget { get => raycastTarget; set => SetValue(ref raycastTarget, value); }
|
||||
|
||||
[SerializeField] bool preserveAspect = true;
|
||||
[FcuInspectorProperty(ComponentType.Toggle, FcuLocKey.label_preserve_aspect, FcuLocKey.tooltip_preserve_aspect)]
|
||||
public bool PreserveAspect { get => preserveAspect; set => SetValue(ref preserveAspect, value); }
|
||||
|
||||
[SerializeField] Vector4 raycastPadding = new Vector4(0, 0, 0, 0);
|
||||
[FcuInspectorProperty(ComponentType.Vector4Field, FcuLocKey.label_raycast_padding, FcuLocKey.tooltip_raycast_padding)]
|
||||
public Vector4 RaycastPadding { get => raycastPadding; set => SetValue(ref raycastPadding, value); }
|
||||
}
|
||||
|
||||
|
||||
[Serializable]
|
||||
[FcuPropertyHeader(FcuLocKey.label_svg_importer_settings, FcuLocKey.tooltip_svg_importer_settings)]
|
||||
public class SVGImporterSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
#if VECTOR_GRAPHICS_EXISTS && UNITY_EDITOR
|
||||
[SerializeField] SVGType svgType = SVGType.VectorSprite;
|
||||
[FcuInspectorProperty(ComponentType.EnumField, FcuLocKey.label_svg_type, FcuLocKey.tooltip_svg_type)]
|
||||
public SVGType SvgType { get => svgType; set => SetValue(ref svgType, value); }
|
||||
#endif
|
||||
[SerializeField] int gradientResolution = 64;
|
||||
[FcuInspectorProperty(ComponentType.IntField, FcuLocKey.label_gradient_resolution, FcuLocKey.tooltip_gradient_resolution)]
|
||||
public int GradientResolution { get => gradientResolution; set => SetValue(ref gradientResolution, value); }
|
||||
|
||||
[SerializeField] Vector2 customPivot = new Vector2(0.5f, 0.5f);
|
||||
[FcuInspectorProperty(ComponentType.Vector2Field, FcuLocKey.label_custom_pivot, FcuLocKey.tooltip_custom_pivot)]
|
||||
public Vector2 CustomPivot { get => customPivot; set => SetValue(ref customPivot, value); }
|
||||
|
||||
[SerializeField] bool generatePhysicsShape = false;
|
||||
[FcuInspectorProperty(ComponentType.Toggle, FcuLocKey.label_generate_physics_shape, FcuLocKey.tooltip_generate_physics_shape)]
|
||||
public bool GeneratePhysicsShape { get => generatePhysicsShape; set => SetValue(ref generatePhysicsShape, value); }
|
||||
|
||||
#if UNITY_EDITOR && VECTOR_GRAPHICS_EXISTS
|
||||
[SerializeField] Unity.VectorGraphics.ViewportOptions viewportOptions = Unity.VectorGraphics.ViewportOptions.DontPreserve;
|
||||
[FcuInspectorProperty(ComponentType.EnumField, FcuLocKey.label_viewport_options, FcuLocKey.tooltip_viewport_options)]
|
||||
public ViewportOptions ViewportOptions { get => viewportOptions; set => SetValue(ref viewportOptions, value); }
|
||||
#endif
|
||||
|
||||
[SerializeField] float stepDistance = 1f;
|
||||
[FcuInspectorProperty(ComponentType.FloatField, FcuLocKey.label_step_distance, FcuLocKey.tooltip_step_distance)]
|
||||
public float StepDistance { get => stepDistance; set => SetValue(ref stepDistance, value); }
|
||||
|
||||
[SerializeField] float samplingSteps = 3;
|
||||
[FcuInspectorProperty(ComponentType.FloatField, FcuLocKey.label_sampling_steps, FcuLocKey.tooltip_sampling_steps)]
|
||||
public float SamplingSteps { get => samplingSteps; set => SetValue(ref samplingSteps, value); }
|
||||
|
||||
[SerializeField] bool advancedMode = true;
|
||||
[FcuInspectorProperty(ComponentType.Toggle, FcuLocKey.label_advanced_mode, FcuLocKey.tooltip_advanced_mode)]
|
||||
public bool AdvancedMode { get => advancedMode; set => SetValue(ref advancedMode, value); }
|
||||
|
||||
[SerializeField] bool maxCordDeviationEnabled = false;
|
||||
[FcuInspectorProperty(ComponentType.Toggle, FcuLocKey.label_max_cord_deviation_enabled, FcuLocKey.tooltip_max_cord_deviation_enabled)]
|
||||
public bool MaxCordDeviationEnabled { get => maxCordDeviationEnabled; set => SetValue(ref maxCordDeviationEnabled, value); }
|
||||
|
||||
[SerializeField] float maxCordDeviation = 1;
|
||||
[FcuInspectorProperty(ComponentType.FloatField, FcuLocKey.label_max_cord_deviation, FcuLocKey.tooltip_max_cord_deviation)]
|
||||
public float MaxCordDeviation { get => maxCordDeviation; set => SetValue(ref maxCordDeviation, value); }
|
||||
|
||||
[SerializeField] bool maxTangentAngleEnabled = false;
|
||||
[FcuInspectorProperty(ComponentType.Toggle, FcuLocKey.label_max_tangent_angle_enabled, FcuLocKey.tooltip_max_tangent_angle_enabled)]
|
||||
public bool MaxTangentAngleEnabled { get => maxTangentAngleEnabled; set => SetValue(ref maxTangentAngleEnabled, value); }
|
||||
|
||||
[SerializeField] float maxTangentAngle = 5;
|
||||
[FcuInspectorProperty(ComponentType.FloatField, FcuLocKey.label_max_tangent_angle, FcuLocKey.tooltip_max_tangent_angle)]
|
||||
public float MaxTangentAngle { get => maxTangentAngle; set => SetValue(ref maxTangentAngle, value); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 989c4e1605c5c6f4db44ae0ecd86f933
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
using System;
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
public class UnityImageSettings : BaseImageSettings { }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a305c45d1d6dbf49beb838144039eb1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,67 @@
|
||||
using DA_Assets.DAI;
|
||||
using DA_Assets.Logging;
|
||||
using DA_Assets.Tools;
|
||||
using System;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
#pragma warning disable CS0649
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
public class LocalizationSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
[SerializeField] LocalizationComponent locComponent = LocalizationComponent.None;
|
||||
public LocalizationComponent LocalizationComponent
|
||||
{
|
||||
get => locComponent;
|
||||
set
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case LocalizationComponent.DALocalizator:
|
||||
#if DALOC_EXISTS == false
|
||||
DALogger.LogError(FcuLocKey.log_asset_not_imported.Localize(nameof(LocalizationComponent.DALocalizator)));
|
||||
locComponent = LocalizationComponent.None;
|
||||
return;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
case LocalizationComponent.I2Localization:
|
||||
#if I2LOC_EXISTS == false
|
||||
DALogger.LogError(FcuLocKey.log_asset_not_imported.Localize(nameof(LocalizationComponent.I2Localization)));
|
||||
locComponent = LocalizationComponent.None;
|
||||
return;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
SetValue(ref locComponent, value);
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField] LocalizationKeyCaseType locKeyCaseType = LocalizationKeyCaseType.snake_case;
|
||||
[SerializeProperty(nameof(locKeyCaseType))]
|
||||
public LocalizationKeyCaseType LocKeyCaseType { get => locKeyCaseType; set => SetValue(ref locKeyCaseType, value); }
|
||||
|
||||
[SerializeField] string currentFigmaLayoutCulture = FcuConfig.DefaultLocalizationCulture;
|
||||
public string CurrentFigmaLayoutCulture { get => currentFigmaLayoutCulture; set => SetValue(ref currentFigmaLayoutCulture, value); }
|
||||
|
||||
[SerializeField] int locKeyMaxLenght = 24;
|
||||
public int LocKeyMaxLenght { get => locKeyMaxLenght; set => SetValue(ref locKeyMaxLenght, value); }
|
||||
|
||||
[SerializeField] ScriptableObject localizator;
|
||||
public ScriptableObject Localizator { get => localizator; set => SetValue(ref localizator, value); }
|
||||
|
||||
[SerializeField] string locFolderPath = Path.Combine("Assets", "Resources", "Localizations");
|
||||
public string LocFolderPath { get => locFolderPath; set => SetValue(ref locFolderPath, value); }
|
||||
|
||||
[SerializeField] string locFileName = "Localization.csv";
|
||||
public string LocFileName { get => locFileName; set => SetValue(ref locFileName, value); }
|
||||
|
||||
[SerializeField] CsvSeparator csvSeparator = CsvSeparator.Semicolon;
|
||||
public CsvSeparator CsvSeparator { get => csvSeparator; set => SetValue(ref csvSeparator, value); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aee65f2a4a8f4934bad23eaef6701056
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,124 @@
|
||||
using DA_Assets.DAI;
|
||||
using DA_Assets.Extensions;
|
||||
using DA_Assets.Logging;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
public class MainSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
[SerializeField] UIFramework uiFramework = UIFramework.UGUI;
|
||||
public UIFramework UIFramework
|
||||
{
|
||||
get => uiFramework;
|
||||
set
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case UIFramework.UITK:
|
||||
#if FCU_UITK_EXT_EXISTS == false
|
||||
DALogger.LogError(FcuLocKey.log_asset_not_imported.Localize(nameof(UIFramework.UITK)));
|
||||
uiFramework = UIFramework.UGUI;
|
||||
return;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
case UIFramework.NOVA:
|
||||
#if NOVA_UI_EXISTS == false
|
||||
DALogger.LogError(FcuLocKey.log_asset_not_imported.Localize(nameof(UIFramework.NOVA)));
|
||||
uiFramework = UIFramework.UGUI;
|
||||
return;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
SetValue(ref uiFramework, value);
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField] PositioningMode positioningMode = PositioningMode.Absolute;
|
||||
public PositioningMode PositioningMode { get => positioningMode; set => SetValue(ref positioningMode, value); }
|
||||
|
||||
[SerializeField] PivotType pivotType = PivotType.MiddleCenter;
|
||||
public PivotType PivotType { get => pivotType; set => SetValue(ref pivotType, value); }
|
||||
|
||||
[SerializeField] int goLayer = 5;
|
||||
public int GameObjectLayer { get => goLayer; set => SetValue(ref goLayer, value); }
|
||||
|
||||
[SerializeField] bool rawImport = false;
|
||||
public bool RawImport
|
||||
{
|
||||
get => rawImport;
|
||||
set
|
||||
{
|
||||
if (value && value != rawImport)
|
||||
{
|
||||
DALogger.LogError(FcuLocKey.log_dev_function_enabled.Localize(FcuLocKey.label_raw_import.Localize()));
|
||||
}
|
||||
|
||||
SetValue(ref rawImport, value);
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField] bool https = true;
|
||||
public bool Https { get => https; set => SetValue(ref https, value); }
|
||||
|
||||
[SerializeField] int gameObjectNameMaxLength = 32;
|
||||
public int GameObjectNameMaxLenght { get => gameObjectNameMaxLength; set => SetValue(ref gameObjectNameMaxLength, value); }
|
||||
|
||||
[SerializeField] int textObjectNameMaxLength = 16;
|
||||
public int TextObjectNameMaxLenght { get => textObjectNameMaxLength; set => SetValue(ref textObjectNameMaxLength, value); }
|
||||
|
||||
[Tooltip(@"Characters, aside from Latin letters and numbers, that may appear in GameObject names.
|
||||
|
||||
Some characters will be ignored in certain cases, such as when a backslash is used in a sprite name.
|
||||
|
||||
If you add new characters to this list, the stable operation of the asset cannot be guaranteed.")]
|
||||
[SerializeField] char[] allowedNameChars = new char[] { '_', ' ', '(', ')', '=', '.', '-', '[', ']', '+'};
|
||||
[SerializeProperty(nameof(allowedNameChars))]
|
||||
public char[] AllowedNameChars { get => allowedNameChars; set => SetValue(ref allowedNameChars, value); }
|
||||
|
||||
[SerializeField] bool windowMode = false;
|
||||
public bool WindowMode { get => windowMode; set => SetValue(ref windowMode, value); }
|
||||
|
||||
[SerializeField] string projectUrl;
|
||||
|
||||
public string ProjectUrl
|
||||
{
|
||||
get => projectUrl;
|
||||
set
|
||||
{
|
||||
string _value = value;
|
||||
|
||||
try
|
||||
{
|
||||
string fileTag = "/file/";
|
||||
char del = '/';
|
||||
|
||||
if (_value.IsEmpty())
|
||||
{
|
||||
|
||||
}
|
||||
else if (_value.Contains(fileTag))
|
||||
{
|
||||
_value = _value.GetBetween(fileTag, del.ToString());
|
||||
}
|
||||
else if (_value.Contains(del.ToString()))
|
||||
{
|
||||
string[] splited = value.Split(del);
|
||||
_value = splited[4];
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Debug.LogError(FcuLocKey.log_incorrent_project_url.Localize());
|
||||
}
|
||||
|
||||
SetValue(ref projectUrl, _value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a2a6d2cbd8eaaa2488826f06f75abaad
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,14 @@
|
||||
using DA_Assets.DAI;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
public class NovaSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
[SerializeField] Texture inputTexture;
|
||||
[SerializeProperty(nameof(inputTexture))]
|
||||
public Texture InputTexture { get => inputTexture; set => SetValue(ref inputTexture, value); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b05cd47d1167e004f9baf9f91ceb5493
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,24 @@
|
||||
using DA_Assets.DAI;
|
||||
using System;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
public class PrefabSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
[SerializeField] string prefabsPath = Path.Combine("Assets", "Prefabs");
|
||||
public string PrefabsPath { get => prefabsPath; set => SetValue(ref prefabsPath, value); }
|
||||
|
||||
[SerializeField] TextPrefabNameType textPrefabNameType = TextPrefabNameType.HumanizedColorString;
|
||||
public TextPrefabNameType TextPrefabNameType { get => textPrefabNameType; set => SetValue(ref textPrefabNameType, value); }
|
||||
}
|
||||
|
||||
public enum TextPrefabNameType
|
||||
{
|
||||
HumanizedColorString,
|
||||
HumanizedColorHEX,
|
||||
Figma,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29be42c27de962041bcfddd4242c9fca
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,39 @@
|
||||
using DA_Assets.DAI;
|
||||
using System;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
public class ScriptGeneratorSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
[SerializeField] FieldSerializationMode serializationMode = FieldSerializationMode.SyncHelpers;
|
||||
public FieldSerializationMode SerializationMode { get => serializationMode; set => SetValue(ref serializationMode, value); }
|
||||
|
||||
[SerializeField] string @namespace = "MyNamespace";
|
||||
public string Namespace { get => @namespace; set => SetValue(ref @namespace, value); }
|
||||
|
||||
[SerializeField] string baseClass = nameof(MonoBehaviour);
|
||||
public string BaseClass { get => baseClass; set => SetValue(ref baseClass, value); }
|
||||
|
||||
[SerializeField] string outputPath = Path.Combine("Assets", "GeneratedScripts");
|
||||
public string OutputPath { get => outputPath; set => SetValue(ref outputPath, value); }
|
||||
|
||||
[SerializeField] int fieldNameMaxLenght = 16;
|
||||
public int FieldNameMaxLenght { get => fieldNameMaxLenght; set => SetValue(ref fieldNameMaxLenght, value); }
|
||||
|
||||
[SerializeField] int methodNameMaxLenght = 16;
|
||||
public int MethodNameMaxLenght { get => methodNameMaxLenght; set => SetValue(ref methodNameMaxLenght, value); }
|
||||
|
||||
[SerializeField] int classNameMaxLenght = 16;
|
||||
public int ClassNameMaxLenght { get => classNameMaxLenght; set => SetValue(ref classNameMaxLenght, value); }
|
||||
}
|
||||
|
||||
public enum FieldSerializationMode
|
||||
{
|
||||
SyncHelpers = 0,
|
||||
Attributes = 1,
|
||||
GameObjectNames = 2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: da688c155c018bc4c9ef517a2698ace1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,36 @@
|
||||
using DA_Assets.DAI;
|
||||
using DA_Assets.Logging;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
#pragma warning disable CS0162
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
public class ShadowSettings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
|
||||
[SerializeField] ShadowComponent shadowComponent = ShadowComponent.Figma;
|
||||
public ShadowComponent ShadowComponent
|
||||
{
|
||||
get => shadowComponent;
|
||||
set
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case ShadowComponent.TrueShadow:
|
||||
#if TRUESHADOW_EXISTS == false
|
||||
DALogger.LogError(FcuLocKey.log_asset_not_imported.Localize(nameof(ShadowComponent.TrueShadow)));
|
||||
SetValue(ref shadowComponent, ShadowComponent.Figma);
|
||||
return;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
SetValue(ref shadowComponent, value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c474a80e37e9ef4b8883d2fea74beea
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f5d0ee2b8958c745af21d258203e4fd
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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:
|
||||
@@ -0,0 +1,41 @@
|
||||
using DA_Assets.DAI;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using System.IO;
|
||||
using DA_Assets.Logging;
|
||||
|
||||
#if UITK_LINKER_EXISTS
|
||||
using DA_Assets.UEL;
|
||||
#endif
|
||||
|
||||
namespace DA_Assets.FCU.Model
|
||||
{
|
||||
[Serializable]
|
||||
public class UITK_Settings : MonoBehaviourLinkerRuntime<FigmaConverterUnity>
|
||||
{
|
||||
#if UITK_LINKER_EXISTS
|
||||
[SerializeField] UitkLinkingMode uitkLinkingMode = UitkLinkingMode.IndexNames;
|
||||
public UitkLinkingMode UitkLinkingMode
|
||||
{
|
||||
get => uitkLinkingMode;
|
||||
set
|
||||
{
|
||||
if (value != uitkLinkingMode)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case UitkLinkingMode.Name:
|
||||
DALogger.LogError(FcuLocKey.log_name_linking_not_recommended.Localize(FcuLocKey.label_uitk_linking_mode.Localize(), nameof(UitkLinkingMode.Name)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SetValue(ref uitkLinkingMode, value);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[SerializeField] string uitkOutputPath = Path.Combine("Assets", "UITK Output");
|
||||
public string UitkOutputPath { get => uitkOutputPath; set => SetValue(ref uitkOutputPath, value); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 77096d487abffe64ca6b9ed327cc1d9d
|
||||
Reference in New Issue
Block a user