添加unity容器类,允许使用泛型控制界面上的值。
目前添加了一次最多三个项目的属性。
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27922b2ba2514fb58c60420c4dee6618
|
||||
timeCreated: 1753252613
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 41e64720c91340eaa285a8d1a227184c
|
||||
timeCreated: 1753253334
|
||||
@@ -0,0 +1,89 @@
|
||||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XericLibrary.Runtime.MacroLibrary;
|
||||
using XericUI.Core.Vessel;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace XericUIEditor.Core.Vessel
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(ObjectVessel<,>))]
|
||||
public class ObjectVessel2Property : ObjectVesselPropertyBase
|
||||
{
|
||||
private Type property0Type = typeof(Object);
|
||||
private Type property1Type = typeof(Object);
|
||||
private string originTooltip = null;
|
||||
private const float horizontalSpacing = 2f;
|
||||
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
EditorGUI.BeginProperty(position, label, property);
|
||||
|
||||
var targetProperty0 = property.FindPropertyRelative("target0");
|
||||
var targetProperty1 = property.FindPropertyRelative("target1");
|
||||
|
||||
if (targetProperty0 == null || targetProperty1 == null)
|
||||
{
|
||||
EditorGUI.HelpBox(position, "[PROPERTY ERROR: target0/target1 not found]", MessageType.Error);
|
||||
EditorGUI.EndProperty();
|
||||
return;
|
||||
}
|
||||
|
||||
Type genericType = GetActualGenericType(fieldInfo.FieldType, typeof(ObjectVessel<,>));
|
||||
if (genericType != null && genericType.IsGenericType)
|
||||
{
|
||||
Type[] typeArgs = genericType.GetGenericArguments();
|
||||
if (typeArgs.Length >= 1) property0Type = typeArgs[0];
|
||||
if (typeArgs.Length >= 2) property1Type = typeArgs[1];
|
||||
|
||||
// 更新Tooltip
|
||||
if (string.IsNullOrEmpty(originTooltip))
|
||||
{
|
||||
originTooltip = $"<{property0Type?.Name}, {property1Type?.Name}>\n{label.tooltip}";
|
||||
label.tooltip = originTooltip;
|
||||
}
|
||||
}
|
||||
|
||||
// 布局计算(保持原有逻辑不变)
|
||||
float labelWidth = EditorGUIUtility.labelWidth;
|
||||
float indentOffset = EditorGUI.indentLevel * 15f;
|
||||
float totalFieldWidth = position.width - labelWidth - indentOffset;
|
||||
float singleFieldWidth = (totalFieldWidth - horizontalSpacing) / 2;
|
||||
|
||||
Rect leftFieldRect = new Rect(
|
||||
position.x + labelWidth + indentOffset,
|
||||
position.y,
|
||||
singleFieldWidth,
|
||||
EditorGUIUtility.singleLineHeight
|
||||
);
|
||||
|
||||
Rect rightFieldRect = new Rect(
|
||||
leftFieldRect.x + singleFieldWidth + horizontalSpacing,
|
||||
position.y,
|
||||
singleFieldWidth,
|
||||
EditorGUIUtility.singleLineHeight
|
||||
);
|
||||
|
||||
// 绘制标签和属性(保持原有逻辑不变)
|
||||
EditorGUI.PrefixLabel(
|
||||
new Rect(position.x + indentOffset, position.y, labelWidth, position.height),
|
||||
label
|
||||
);
|
||||
|
||||
targetProperty0.objectReferenceValue = EditorGUI.ObjectField(
|
||||
leftFieldRect, GUIContent.none, targetProperty0.objectReferenceValue, property0Type, true
|
||||
);
|
||||
|
||||
targetProperty1.objectReferenceValue = EditorGUI.ObjectField(
|
||||
rightFieldRect, GUIContent.none, targetProperty1.objectReferenceValue, property1Type, true
|
||||
);
|
||||
|
||||
EditorGUI.EndProperty();
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4b6688946bd24f47b4ddfe5435d4a06a
|
||||
timeCreated: 1753260952
|
||||
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XericLibrary.Runtime.MacroLibrary;
|
||||
using XericUI.Core.Vessel;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace XericUIEditor.Core.Vessel
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(ObjectVessel<,,>))]
|
||||
public class ObjectVessel3Property : ObjectVesselPropertyBase
|
||||
{
|
||||
private Type property0Type = typeof(Object);
|
||||
private Type property1Type = typeof(Object);
|
||||
private Type property2Type = typeof(Object);
|
||||
private string originTooltip = null;
|
||||
private const float horizontalSpacing = 2f;
|
||||
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
EditorGUI.BeginProperty(position, label, property);
|
||||
|
||||
var targetProperty0 = property.FindPropertyRelative("target0");
|
||||
var targetProperty1 = property.FindPropertyRelative("target1");
|
||||
var targetProperty2 = property.FindPropertyRelative("target2");
|
||||
|
||||
if (targetProperty0 == null || targetProperty1 == null || targetProperty2 == null)
|
||||
{
|
||||
EditorGUI.HelpBox(position, "[PROPERTY ERROR: target0/target1/target2 not found]", MessageType.Error);
|
||||
EditorGUI.EndProperty();
|
||||
return;
|
||||
}
|
||||
|
||||
Type genericType = GetActualGenericType(fieldInfo.FieldType, typeof(ObjectVessel<,,>));
|
||||
if (genericType != null && genericType.IsGenericType)
|
||||
{
|
||||
Type[] typeArgs = genericType.GetGenericArguments();
|
||||
if (typeArgs.Length >= 1) property0Type = typeArgs[0];
|
||||
if (typeArgs.Length >= 2) property1Type = typeArgs[1];
|
||||
if (typeArgs.Length >= 3) property2Type = typeArgs[2];
|
||||
|
||||
// 更新Tooltip
|
||||
if (string.IsNullOrEmpty(originTooltip))
|
||||
{
|
||||
originTooltip =
|
||||
$"<{property0Type.Name}, {property1Type.Name}, {property2Type.Name}>\n{label.tooltip}";
|
||||
label.tooltip = originTooltip;
|
||||
}
|
||||
}
|
||||
|
||||
// 布局计算(三个属性等分剩余空间)
|
||||
float labelWidth = EditorGUIUtility.labelWidth;
|
||||
float indentOffset = EditorGUI.indentLevel * 15f;
|
||||
float totalFieldWidth = position.width - labelWidth - indentOffset;
|
||||
float singleFieldWidth = (totalFieldWidth - horizontalSpacing * 2) / 3; // 三个属性,两个间距
|
||||
|
||||
// 计算三个属性框的位置
|
||||
Rect fieldRect0 = new Rect(
|
||||
position.x + labelWidth + indentOffset,
|
||||
position.y,
|
||||
singleFieldWidth,
|
||||
EditorGUIUtility.singleLineHeight
|
||||
);
|
||||
|
||||
Rect fieldRect1 = new Rect(
|
||||
fieldRect0.x + singleFieldWidth + horizontalSpacing,
|
||||
position.y,
|
||||
singleFieldWidth,
|
||||
EditorGUIUtility.singleLineHeight
|
||||
);
|
||||
|
||||
Rect fieldRect2 = new Rect(
|
||||
fieldRect1.x + singleFieldWidth + horizontalSpacing,
|
||||
position.y,
|
||||
singleFieldWidth,
|
||||
EditorGUIUtility.singleLineHeight
|
||||
);
|
||||
|
||||
// 绘制标签
|
||||
EditorGUI.PrefixLabel(
|
||||
new Rect(position.x + indentOffset, position.y, labelWidth, position.height),
|
||||
label
|
||||
);
|
||||
|
||||
targetProperty0.objectReferenceValue = EditorGUI.ObjectField(
|
||||
fieldRect0, GUIContent.none, targetProperty0.objectReferenceValue, property0Type, true
|
||||
);
|
||||
|
||||
targetProperty1.objectReferenceValue = EditorGUI.ObjectField(
|
||||
fieldRect1, GUIContent.none, targetProperty1.objectReferenceValue, property1Type, true
|
||||
);
|
||||
|
||||
targetProperty2.objectReferenceValue = EditorGUI.ObjectField(
|
||||
fieldRect2, GUIContent.none, targetProperty2.objectReferenceValue, property2Type, true
|
||||
);
|
||||
|
||||
EditorGUI.EndProperty();
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad305cdce04a4b80ba0a061a630911da
|
||||
timeCreated: 1753263774
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XericUI.Core.Vessel;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace XericUIEditor.Core.Vessel
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(ObjectVessel<>))]
|
||||
public class ObjectVesselProperty : ObjectVesselPropertyBase
|
||||
{
|
||||
private Type property0Type = typeof(Object);
|
||||
private string originTooltip = null;
|
||||
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
EditorGUI.BeginProperty(position, label, property);
|
||||
|
||||
var targetProperty0 = property.FindPropertyRelative("target");
|
||||
|
||||
if (targetProperty0 == null)
|
||||
{
|
||||
// 如果找不到字段,显示错误信息
|
||||
EditorGUI.HelpBox(position, "[PROPERTY ERROR]", MessageType.Error);
|
||||
EditorGUI.EndProperty();
|
||||
return;
|
||||
}
|
||||
|
||||
Type genericType = GetActualGenericType(fieldInfo.FieldType, typeof(ObjectVessel<>));
|
||||
if (genericType != null && genericType.IsGenericType)
|
||||
{
|
||||
Type[] typeArgs = genericType.GetGenericArguments();
|
||||
if (typeArgs.Length >= 1) property0Type = typeArgs[0];
|
||||
|
||||
// 更新Tooltip
|
||||
if (string.IsNullOrEmpty(originTooltip))
|
||||
{
|
||||
originTooltip = $"<{property0Type?.Name}>\n{label.tooltip}";
|
||||
label.tooltip = originTooltip;
|
||||
}
|
||||
}
|
||||
|
||||
targetProperty0.objectReferenceValue = EditorGUI.ObjectField(
|
||||
position,
|
||||
label,
|
||||
targetProperty0.objectReferenceValue,
|
||||
property0Type,
|
||||
true
|
||||
);
|
||||
|
||||
EditorGUI.EndProperty();
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e26331650e84011aab1e2ebc4a39821
|
||||
timeCreated: 1753253349
|
||||
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using XericUI.Core.Vessel;
|
||||
|
||||
namespace XericUIEditor.Core.Vessel
|
||||
{
|
||||
public class ObjectVesselPropertyBase : PropertyDrawer
|
||||
{
|
||||
/// <summary>
|
||||
/// 递归获取实际的泛型类型(处理嵌套情况)
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="currentGenericDefinition"></param>
|
||||
/// <returns></returns>
|
||||
protected Type GetActualGenericType(Type type, Type currentGenericDefinition)
|
||||
{
|
||||
// 如果是泛型类型,检查是否为ObjectVessel<,>或继续递归
|
||||
if (type.IsGenericType)
|
||||
{
|
||||
// 检查是否为ObjectVessel<,>的实例
|
||||
Type genericDefinition = type.GetGenericTypeDefinition();
|
||||
if (genericDefinition == currentGenericDefinition)
|
||||
{
|
||||
return type; // 找到目标类型
|
||||
}
|
||||
|
||||
// 处理嵌套泛型(如List<ObjectVessel<,>>)
|
||||
foreach (Type argType in type.GetGenericArguments())
|
||||
{
|
||||
Type nestedType = GetActualGenericType(argType, currentGenericDefinition);
|
||||
if (nestedType != null)
|
||||
{
|
||||
return nestedType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 处理数组或其他可能的容器类型
|
||||
if (type.IsArray)
|
||||
{
|
||||
return GetActualGenericType(type.GetElementType(), currentGenericDefinition);
|
||||
}
|
||||
|
||||
// 检查基类
|
||||
if (type.BaseType != null && type.BaseType != typeof(object))
|
||||
{
|
||||
return GetActualGenericType(type.BaseType, currentGenericDefinition);
|
||||
}
|
||||
|
||||
return null; // 未找到
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89ddf50a12de4506b000fee0b00edd4a
|
||||
timeCreated: 1753261075
|
||||
@@ -1,9 +1,13 @@
|
||||
{
|
||||
"name": "Lrss3.Xericuiactionvessel",
|
||||
"name": "Lrss3.Xericuiactionvessel.Editor",
|
||||
"rootNamespace": "XericUIEditor",
|
||||
"references": [
|
||||
"Lrss3.Xericuiactionvessel",
|
||||
"Lrss3.SesothoLine.Editor"
|
||||
"Lrss3.SesothoLine.Editor",
|
||||
"Lrss3.Deconstruction",
|
||||
"UnityEngine.UI",
|
||||
"Unity.TextMeshPro",
|
||||
"Unity.TextMeshPro.Editor"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8c708a987fab422883d5b2bb7183440b
|
||||
timeCreated: 1753237323
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8214816258e04879be55e0e4bbfc6e71
|
||||
timeCreated: 1753256011
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
namespace XericUI.Core.Base
|
||||
{
|
||||
public class XericUIBehaciour : UIBehaviour
|
||||
{
|
||||
[InfoBox("脚本属性存在空引用!请检查开放属性后再试", InfoMessageType.Error, VisibleIf = "PublicFieldNullReference")]
|
||||
[HideLabel, DisplayAsString]
|
||||
string __EMPTYFIELD;
|
||||
|
||||
|
||||
protected bool PublicFieldNullReference;
|
||||
|
||||
protected bool AlreadyAwake { get; private set; }
|
||||
protected bool AlreadyStart { get; private set; }
|
||||
protected bool AlreadyOnEnable { get; private set; }
|
||||
protected bool AlreadyOnDisable { get; private set; }
|
||||
protected bool FirstUpdate { get; private set; }
|
||||
protected bool FirstFixUpdate { get; private set; }
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
AlreadyAwake = true;
|
||||
base.Awake();
|
||||
}
|
||||
|
||||
protected override void Start()
|
||||
{
|
||||
AlreadyStart = true;
|
||||
base.Start();
|
||||
}
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
AlreadyOnEnable = true;
|
||||
base.OnEnable();
|
||||
}
|
||||
|
||||
protected override void OnDisable()
|
||||
{
|
||||
AlreadyOnDisable = true;
|
||||
base.OnDisable();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c86649055e4243d69a945bf7f6a4d474
|
||||
timeCreated: 1753256057
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4c397c88f8834566bf6ba98d579f4db1
|
||||
timeCreated: 1753253292
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace XericUI.Core.Vessel
|
||||
{
|
||||
/// <summary>
|
||||
/// 组件界面泛型容器
|
||||
/// 详情参阅Xeric Library本体库Wiki中关于组件容器的说明。
|
||||
/// </summary>
|
||||
/// <typeparam name="T0"></typeparam>
|
||||
[Serializable]
|
||||
public class ObjectVessel<T0> : VesselBase
|
||||
where T0 : Object
|
||||
{
|
||||
[SerializeField]
|
||||
private Object target = default(T0);
|
||||
|
||||
/// <summary>
|
||||
/// 获取此包裹器中的
|
||||
/// </summary>
|
||||
public T0 Target
|
||||
{
|
||||
get => target as T0;
|
||||
set => target = value;
|
||||
}
|
||||
|
||||
public ObjectVessel()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ObjectVessel(Object target)
|
||||
{
|
||||
this.target = target;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 00f4d38097bf40e99b75ab7d431ec126
|
||||
timeCreated: 1753253311
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace XericUI.Core.Vessel
|
||||
{
|
||||
[Serializable]
|
||||
public class ObjectVessel<T0, T1> : VesselBase
|
||||
where T0 : Object
|
||||
where T1 : Object
|
||||
{
|
||||
[SerializeField] private Object target0 = default(T0);
|
||||
[SerializeField] private Object target1 = default(T1);
|
||||
|
||||
public T0 Target0
|
||||
{
|
||||
get => target0 as T0;
|
||||
set => target0 = value;
|
||||
}
|
||||
public T1 Target1
|
||||
{
|
||||
get => target1 as T1;
|
||||
set => target1 = value;
|
||||
}
|
||||
|
||||
|
||||
public ObjectVessel()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ObjectVessel(Object target0, Object target1)
|
||||
{
|
||||
this.target0 = target0;
|
||||
this.target1 = target1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3f9ea9e74d6c4f8ea55cda5d419fa6f0
|
||||
timeCreated: 1753260697
|
||||
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace XericUI.Core.Vessel
|
||||
{
|
||||
[Serializable]
|
||||
public class ObjectVessel<T0, T1, T2> : VesselBase
|
||||
where T0 : Object
|
||||
where T1 : Object
|
||||
where T2 : Object
|
||||
{
|
||||
[SerializeField] private Object target0 = default(T0);
|
||||
[SerializeField] private Object target1 = default(T1);
|
||||
[SerializeField] private Object target2 = default(T2);
|
||||
|
||||
public T0 Target0
|
||||
{
|
||||
get => target0 as T0;
|
||||
set => target0 = value;
|
||||
}
|
||||
public T1 Target1
|
||||
{
|
||||
get => target1 as T1;
|
||||
set => target1 = value;
|
||||
}
|
||||
public T2 Target2
|
||||
{
|
||||
get => target2 as T2;
|
||||
set => target2 = value;
|
||||
}
|
||||
|
||||
|
||||
public ObjectVessel()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ObjectVessel(Object target0, Object target1, Object target2)
|
||||
{
|
||||
this.target0 = target0;
|
||||
this.target1 = target1;
|
||||
this.target2 = target2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd442520699543d4a376fff5bb1c7779
|
||||
timeCreated: 1753263701
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace XericUI.Core.Vessel
|
||||
{
|
||||
public class VesselBase
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c1ebb22ea2ec4d32b41608c8c1777ada
|
||||
timeCreated: 1753254327
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using XericUI.Core.Vessel;
|
||||
#if dUI_TextMeshPro
|
||||
using TMPro;
|
||||
#endif
|
||||
|
||||
namespace XericUI.Core.Text
|
||||
{
|
||||
public static partial class XericUIExtendHelper
|
||||
{
|
||||
public static string DebugSelfName => "<TextMeshPro>";
|
||||
|
||||
#region TMP_Text
|
||||
|
||||
/// <summary>
|
||||
/// 获取文本容器中的字符串内容
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetStringContext<T>(this ObjectVessel<T> obj)
|
||||
where T : TMP_Text
|
||||
=> obj != null ? obj.Target.text : string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取文本容器中的字符串内容
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static void SetStringContext<T>(this ObjectVessel<T> obj, string value)
|
||||
where T : TMP_Text
|
||||
{
|
||||
if (obj != null)
|
||||
obj.Target.text = value;
|
||||
else
|
||||
Debug.LogError($"正在向空{DebugSelfName}对象赋值");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1739fa9e30fc4e0a80b97feea7d930b5
|
||||
timeCreated: 1753242867
|
||||
@@ -0,0 +1,41 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace XericUI.Core.Vessel
|
||||
{
|
||||
public static partial class XericUIExtendHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 检查容器有效
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <typeparam name="T0"></typeparam>
|
||||
/// <returns></returns>
|
||||
public static bool IsValid<T0>(this ObjectVessel<T0> obj)
|
||||
where T0 : Object
|
||||
=> obj != null && obj.Target != null;
|
||||
/// <summary>
|
||||
/// 检查容器有效
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <typeparam name="T0"></typeparam>
|
||||
/// <typeparam name="T1"></typeparam>
|
||||
/// <returns></returns>
|
||||
public static bool IsValid<T0, T1>(this ObjectVessel<T0, T1> obj)
|
||||
where T0 : Object
|
||||
where T1 : Object
|
||||
=> obj != null && obj.Target0 != null && obj.Target1 != null;
|
||||
/// <summary>
|
||||
/// 检查容器有效
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <typeparam name="T0"></typeparam>
|
||||
/// <typeparam name="T1"></typeparam>
|
||||
/// <typeparam name="T2"></typeparam>
|
||||
/// <returns></returns>
|
||||
public static bool IsValid<T0, T1, T2>(this ObjectVessel<T0, T1, T2> obj)
|
||||
where T0 : Object
|
||||
where T1 : Object
|
||||
where T2 : Object
|
||||
=> obj != null && obj.Target0 != null && obj.Target1 != null && obj.Target2 != null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ee4993e0572478d8c7b5e62baacf30c
|
||||
timeCreated: 1753265877
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4dc89cfe2b554a04d8704bc672cc0666
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,151 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using XericUI.Core.Vessel;
|
||||
|
||||
namespace XericUI.FlipPage
|
||||
{
|
||||
/// <summary>
|
||||
/// 翻页组件管理器
|
||||
///
|
||||
/// 对翻页组件的管理
|
||||
/// </summary>
|
||||
public class FlipPageComponentManager : XericFlipPageIndexVesselBase
|
||||
{
|
||||
#region 界面属性
|
||||
|
||||
/// <summary>
|
||||
/// 首页按钮
|
||||
/// </summary>
|
||||
#if ODIN_INSPECTOR
|
||||
[LabelText("首页按钮")] [BoxGroup("组件", centerLabel: true)]
|
||||
#endif
|
||||
public ObjectVessel<Button> buttonStartPage;
|
||||
|
||||
/// <summary>
|
||||
/// 上一页按钮
|
||||
/// </summary>
|
||||
#if ODIN_INSPECTOR
|
||||
[LabelText("上一页按钮")] [BoxGroup("组件")]
|
||||
#endif
|
||||
public ObjectVessel<Button> buttonPreviousPage;
|
||||
|
||||
/// <summary>
|
||||
/// 下一页按钮
|
||||
/// </summary>
|
||||
#if ODIN_INSPECTOR
|
||||
[LabelText("下一页按钮")] [BoxGroup("组件")]
|
||||
#endif
|
||||
public ObjectVessel<Button> buttonNextPage;
|
||||
|
||||
/// <summary>
|
||||
/// 下一页按钮
|
||||
/// </summary>
|
||||
#if ODIN_INSPECTOR
|
||||
[LabelText("尾页按钮")] [BoxGroup("组件")]
|
||||
#endif
|
||||
public ObjectVessel<Button> buttoneEndPage;
|
||||
|
||||
/// <summary>
|
||||
/// 总页面数量文本
|
||||
/// </summary>
|
||||
#if ODIN_INSPECTOR
|
||||
[LabelText("总页面数量文本")] [BoxGroup("组件")]
|
||||
#endif
|
||||
public ObjectVessel<TMPro.TMP_Text> labelTextTotalPageCount =
|
||||
new ObjectVessel<TMPro.TMP_Text>();
|
||||
|
||||
/// <summary>
|
||||
/// 总页面数量文本
|
||||
/// </summary>
|
||||
#if ODIN_INSPECTOR
|
||||
[LabelText("总页面数量文本")] [BoxGroup("组件")]
|
||||
// [ListDrawerSettings(ShowIndexLabels = true)]
|
||||
#endif
|
||||
public List<ObjectVessel<Button, TMPro.TMP_Text>> pageSelectButton =
|
||||
new List<ObjectVessel<Button, TMPro.TMP_Text>>();
|
||||
|
||||
/// <summary>
|
||||
/// 页面跳转输入框
|
||||
/// </summary>
|
||||
#if ODIN_INSPECTOR
|
||||
[LabelText("页面跳转输入框")] [BoxGroup("组件")]
|
||||
#endif
|
||||
public ObjectVessel<TMPro.TMP_InputField> inputFieldFlipPageIndex =
|
||||
new ObjectVessel<TMPro.TMP_InputField>();
|
||||
|
||||
/// <summary>
|
||||
/// 翻页到索引按钮池
|
||||
/// </summary>
|
||||
#if ODIN_INSPECTOR
|
||||
[LabelText("翻页到索引按钮池")] [BoxGroup("组件")]
|
||||
#endif
|
||||
public XericLibrary.Runtime.MacroLibrary.MacroPool.UnionSet pageButtonPool = new XericLibrary.Runtime.MacroLibrary.MacroPool.UnionSet();
|
||||
|
||||
#endregion
|
||||
|
||||
#region 生命周期
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
if (buttonStartPage.IsValid()) // 翻到开头
|
||||
buttonStartPage.Target.onClick.AddListener(FlipPageToStart);
|
||||
if (buttonPreviousPage.IsValid()) // 翻到上一页
|
||||
buttonPreviousPage.Target.onClick.AddListener(FlipPageToPrevious);
|
||||
if (buttonNextPage.IsValid()) // 翻到下一页
|
||||
buttonNextPage.Target.onClick.AddListener(FlipPageToNext);
|
||||
if (buttoneEndPage.IsValid()) // 翻到结尾
|
||||
buttoneEndPage.Target.onClick.AddListener(FlipPageToEnd);
|
||||
pageButtonPool.Init();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (labelTextTotalPageCount.IsValid()) // 页数
|
||||
labelTextTotalPageCount.Target.text = PageInfos.Count.ToString();
|
||||
}
|
||||
|
||||
public override void FlipPage(int pageIndex, bool forceRefresh = false)
|
||||
{
|
||||
base.FlipPage(pageIndex, forceRefresh);
|
||||
|
||||
}
|
||||
|
||||
public override void AddPage(PageInfo pageInfo)
|
||||
{
|
||||
base.AddPage(pageInfo);
|
||||
pageSelectButton.Add(GetPageIndexButton());
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 组件方法
|
||||
|
||||
/// <summary>
|
||||
/// 获取页面索引按钮
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected virtual ObjectVessel<Button, TMPro.TMP_Text> GetPageIndexButton()
|
||||
{
|
||||
var obj = pageButtonPool.Get();
|
||||
var button = obj.GetComponent<Button>() ?? obj.GetComponentInChildren<Button>();
|
||||
var text = obj.GetComponent<TMPro.TMP_Text>() ?? obj.GetComponentInChildren<TMPro.TMP_Text>();
|
||||
// var vessel = new ObjectVessel<Button, TMPro.TMP_Text>(button, text);
|
||||
// return vessel;
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 释放页面索引按钮
|
||||
/// </summary>
|
||||
protected virtual void ReleasePageIndexButton(Component comp)
|
||||
{
|
||||
pageButtonPool.IndirectRelease(comp);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b34975b4d49d413dbb194031b7db92f3
|
||||
timeCreated: 1753254951
|
||||
@@ -0,0 +1,221 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
using XericLibrary.Runtime.MacroLibrary;
|
||||
using XericUI.Core.Base;
|
||||
using XericUI.Core.Vessel;
|
||||
|
||||
namespace XericUI.FlipPage
|
||||
{
|
||||
public delegate void PageIndexAction(int pageIndex, int pageOffset, int totalPageCount);
|
||||
|
||||
/// <summary>
|
||||
/// 翻页管理器
|
||||
/// </summary>
|
||||
public class XericFlipPageIndexVesselBase : XericUIBehaciour
|
||||
{
|
||||
#region 委托事件
|
||||
|
||||
public event PageIndexAction OnPageFlip;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 设定参数
|
||||
|
||||
/// <summary>
|
||||
/// 候选页数量
|
||||
/// </summary>
|
||||
#if ODIN_INSPECTOR
|
||||
[LabelText("候选页数量")]
|
||||
[BoxGroup("设定", centerLabel: true)]
|
||||
#endif
|
||||
[SerializeField]
|
||||
private int candidatesNumber = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 翻页可以跨越索引边接(循环索引)
|
||||
/// </summary>
|
||||
#if ODIN_INSPECTOR
|
||||
[LabelText("翻页时允许跨越索引循环")]
|
||||
[BoxGroup("设定", centerLabel: true)]
|
||||
#endif
|
||||
[SerializeField]
|
||||
private bool canPassIndexBoundary;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 类内类型
|
||||
|
||||
[Serializable]
|
||||
public class PageInfo
|
||||
{
|
||||
#if ODIN_INSPECTOR
|
||||
[LabelText("页面名称")]
|
||||
#endif
|
||||
public string Name = DateTime.Now.Ticks.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 字段属性
|
||||
|
||||
/// <summary>
|
||||
/// 当前页面
|
||||
/// </summary>
|
||||
private int _currentPageIndex = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 所有页面
|
||||
/// </summary>
|
||||
private LinkedList<PageInfo> _pageInfos = new LinkedList<PageInfo>();
|
||||
|
||||
|
||||
|
||||
public LinkedList<PageInfo> PageInfos => _pageInfos;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 生命周期
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
}
|
||||
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
FlipPage(_currentPageIndex);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 翻页管理
|
||||
|
||||
/// <summary>
|
||||
/// 翻到指定页
|
||||
/// </summary>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <param name="forceRefresh"></param>
|
||||
public virtual void FlipPage(int pageIndex, bool forceRefresh = false)
|
||||
{
|
||||
// 检查翻页索引有效
|
||||
if (!canPassIndexBoundary &&
|
||||
(pageIndex < 0 || pageIndex >= _pageInfos.Count))
|
||||
pageIndex = Mathf.Clamp(pageIndex, 0, _pageInfos.Count - 1);
|
||||
else
|
||||
pageIndex = MacroMath.PMod(pageIndex, _pageInfos.Count - 1);
|
||||
// 检查翻页数量有效
|
||||
if (!forceRefresh && _currentPageIndex == pageIndex)
|
||||
return;
|
||||
// 翻页计算
|
||||
var pageIndexOffset = _currentPageIndex - pageIndex;
|
||||
var lastPageIndex = _currentPageIndex;
|
||||
_currentPageIndex = pageIndex;
|
||||
try
|
||||
{
|
||||
// 翻页事件委托
|
||||
OnPageFlip?.Invoke(pageIndex, pageIndexOffset, _pageInfos.Count);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"翻页时委托错误已捕获\n{e.Message}\n{e.Data}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 翻到开头
|
||||
/// </summary>
|
||||
#if ODIN_INSPECTOR
|
||||
[HorizontalGroup("翻页"), Button("翻到开头")]
|
||||
#endif
|
||||
public void FlipPageToStart()
|
||||
=> FlipPage(0);
|
||||
|
||||
/// <summary>
|
||||
/// 翻到上一页
|
||||
/// </summary>
|
||||
#if ODIN_INSPECTOR
|
||||
[HorizontalGroup("翻页"), Button("翻到上一页")]
|
||||
#endif
|
||||
public void FlipPageToPrevious()
|
||||
=> FlipPage(_currentPageIndex - 1);
|
||||
|
||||
/// <summary>
|
||||
/// 翻到下一页
|
||||
/// </summary>
|
||||
#if ODIN_INSPECTOR
|
||||
[HorizontalGroup("翻页"), Button("翻到下一页")]
|
||||
#endif
|
||||
public void FlipPageToNext()
|
||||
=> FlipPage(_currentPageIndex + 1);
|
||||
|
||||
/// <summary>
|
||||
/// 翻到结尾
|
||||
/// </summary>
|
||||
#if ODIN_INSPECTOR
|
||||
[HorizontalGroup("翻页"), Button("翻到结尾")]
|
||||
#endif
|
||||
public void FlipPageToEnd()
|
||||
=> FlipPage(_pageInfos.Count - 1);
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加页面
|
||||
/// </summary>
|
||||
public virtual void AddPage(PageInfo pageInfo)
|
||||
{
|
||||
_pageInfos.AddLast(pageInfo);
|
||||
// 刷新页面
|
||||
FlipPage(_currentPageIndex, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 移除页面
|
||||
/// </summary>
|
||||
public void RemovePage(int pageIndex)
|
||||
{
|
||||
RemovePage(IndexOfPage(pageIndex));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 移除页面
|
||||
/// </summary>
|
||||
/// <param name="pageRef"></param>
|
||||
public void RemovePage(PageInfo pageRef)
|
||||
{
|
||||
_pageInfos.Remove(pageRef);
|
||||
// 刷新页面
|
||||
FlipPage(_currentPageIndex, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 交换AB页面
|
||||
/// </summary>
|
||||
public void SwapPages(int pageIndexA, int pageIndexB)
|
||||
{
|
||||
var a = _pageInfos.GetOrderNode().LandedIndex(pageIndexA);
|
||||
var b = _pageInfos.GetOrderNode().LandedIndex(pageIndexB);
|
||||
|
||||
_pageInfos.SwapNodes(a, b);
|
||||
// 刷新页面
|
||||
FlipPage(_currentPageIndex, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 选择索引下的页面
|
||||
/// </summary>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <returns></returns>
|
||||
public PageInfo IndexOfPage(int pageIndex)
|
||||
{
|
||||
return _pageInfos.LandedIndex(pageIndex);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2ebd655eef6355d44a67e9b8aef1b8f4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Pool;
|
||||
using XericLibrary.Runtime.Type;
|
||||
|
||||
namespace XericUI.InfiniteVessel
|
||||
@@ -10,11 +11,69 @@ namespace XericUI.InfiniteVessel
|
||||
/// </summary>
|
||||
public abstract class XericInfiniteVesselBase : WeaklyMonoBase
|
||||
{
|
||||
#region 字段属性
|
||||
|
||||
public GameObject mainItemPrefab;
|
||||
|
||||
private ObjectPool<GameObject> _itemPool = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 生命周期
|
||||
|
||||
protected virtual void Awake()
|
||||
{
|
||||
AwakeInitItemPool();
|
||||
}
|
||||
|
||||
protected virtual void AwakeInitItemPool()
|
||||
{
|
||||
_itemPool = new ObjectPool<GameObject>(
|
||||
CreatItem, GetItemManager, ReleaseItem, DestroyItem);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 对象池操作
|
||||
|
||||
/// <summary>
|
||||
/// 创建对象
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public virtual GameObject CreatItem()
|
||||
{
|
||||
|
||||
return Object.Instantiate(mainItemPrefab);
|
||||
}
|
||||
|
||||
// public virtual
|
||||
|
||||
/// <summary>
|
||||
/// 获取对象,并获取管理器
|
||||
/// </summary>
|
||||
/// <param name="target"></param>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <returns></returns>
|
||||
public virtual void GetItemManager(GameObject target)
|
||||
{
|
||||
target.SetActive(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 释放对象
|
||||
/// </summary>
|
||||
/// <param name="target"></param>
|
||||
public virtual void ReleaseItem(GameObject target)
|
||||
{
|
||||
target.SetActive(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 销毁对象
|
||||
/// </summary>
|
||||
/// <param name="target"></param>
|
||||
public virtual void DestroyItem(GameObject target)
|
||||
{
|
||||
Object.Destroy(target);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,9 @@
|
||||
"name": "Lrss3.Xericuiactionvessel",
|
||||
"rootNamespace": "XericUI",
|
||||
"references": [
|
||||
"GUID:b1727b829ae4f0641acc8ad28ed624c2"
|
||||
"GUID:b1727b829ae4f0641acc8ad28ed624c2",
|
||||
"GUID:2bafac87e7f4b9b418d9448d219b01ab",
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 74b8e1cd95eb2474c8f79caa97bf419f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b3d06f27afef5c44b16656783a94cc6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,48 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: MELC_HorizontalCenterLinearBar120A0
|
||||
m_Shader: {fileID: 4800000, guid: 3948f6fd339e2a04b994a926fd4471a1, type: 3}
|
||||
m_ValidKeywords:
|
||||
- _EASEMODE_LINEAR
|
||||
- _REVERSELINEAR_ON
|
||||
m_InvalidKeywords:
|
||||
- _KEYWORD0_ON
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ColorMask: 15
|
||||
- _EaseMode: 0
|
||||
- _Exp: 1
|
||||
- _Keyword0: 1
|
||||
- _OriginReference: 0.5
|
||||
- _ReverseLInear: 1
|
||||
- _Rotation: 0
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UseUIAlphaClip: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _ZeroColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6eb2c39f147a778408931914ff8cb197
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,48 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: MELC_HorizontalCenterLinearBar120A1
|
||||
m_Shader: {fileID: 4800000, guid: 3948f6fd339e2a04b994a926fd4471a1, type: 3}
|
||||
m_ValidKeywords:
|
||||
- _EASEMODE_LINEAR
|
||||
- _REVERSELINEAR_ON
|
||||
m_InvalidKeywords:
|
||||
- _KEYWORD0_ON
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ColorMask: 15
|
||||
- _EaseMode: 0
|
||||
- _Exp: 1
|
||||
- _Keyword0: 1
|
||||
- _OriginReference: 0.5
|
||||
- _ReverseLInear: 1
|
||||
- _Rotation: 0
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UseUIAlphaClip: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _ZeroColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8fe4019b09398842814a9334d210992
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,48 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: MELC_HorizontalLeftLinearBar120A0
|
||||
m_Shader: {fileID: 4800000, guid: 3948f6fd339e2a04b994a926fd4471a1, type: 3}
|
||||
m_ValidKeywords:
|
||||
- _EASEMODE_LINEAR
|
||||
- _REVERSELINEAR_ON
|
||||
m_InvalidKeywords:
|
||||
- _KEYWORD0_ON
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ColorMask: 15
|
||||
- _EaseMode: 0
|
||||
- _Exp: 1
|
||||
- _Keyword0: 1
|
||||
- _OriginReference: 1
|
||||
- _ReverseLInear: 1
|
||||
- _Rotation: 180
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UseUIAlphaClip: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _ZeroColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9250f5b74ae8ab4c9a4e85e27fa032a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,48 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: MELC_HorizontalRightLinearBar120A0
|
||||
m_Shader: {fileID: 4800000, guid: 3948f6fd339e2a04b994a926fd4471a1, type: 3}
|
||||
m_ValidKeywords:
|
||||
- _EASEMODE_LINEAR
|
||||
- _REVERSELINEAR_ON
|
||||
m_InvalidKeywords:
|
||||
- _KEYWORD0_ON
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ColorMask: 15
|
||||
- _EaseMode: 0
|
||||
- _Exp: 1
|
||||
- _Keyword0: 1
|
||||
- _OriginReference: 1
|
||||
- _ReverseLInear: 1
|
||||
- _Rotation: 0
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UseUIAlphaClip: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _ZeroColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ee5ccd08bff84e54aa222313ec9f0074
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac7126c23fdd21744837331b5b75ef69
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,256 @@
|
||||
// Made with Amplify Shader Editor v1.9.9.1
|
||||
// Available at the Unity Asset Store - http://u3d.as/y3X
|
||||
Shader "LiRuochen/UI/MonotonicallyExcessiveLinearColor"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,1)
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
|
||||
_ZeroColor( "Zero Color", Color ) = ( 0, 0, 0, 1 )
|
||||
_OriginReference( "Origin Reference", Range( 0, 1 ) ) = 0.5
|
||||
_Rotation( "Rotation", Float ) = 0
|
||||
[KeywordEnum( Linear,Exp,Sine,Cose )] _EaseMode( "EaseMode", Float ) = 0
|
||||
[Toggle( _REVERSELINEAR_ON )] _ReverseLInear( "ReverseLInear", Float ) = 0
|
||||
_Exp( "Exp", Range( 0, 1 ) ) = 1
|
||||
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
LOD 0
|
||||
|
||||
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" "CanUseSpriteAtlas"="True" }
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
}
|
||||
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend One OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
CGPROGRAM
|
||||
#define ASE_VERSION 19901
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 3.5
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
||||
|
||||
#define ASE_NEEDS_FRAG_COLOR
|
||||
#define ASE_NEEDS_TEXTURE_COORDINATES0
|
||||
#define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0
|
||||
#pragma shader_feature_local _REVERSELINEAR_ON
|
||||
#pragma shader_feature_local _EASEMODE_LINEAR _EASEMODE_EXP _EASEMODE_SINE _EASEMODE_COSE
|
||||
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
float4 mask : TEXCOORD2;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
float4 _MainTex_ST;
|
||||
float _UIMaskSoftnessX;
|
||||
float _UIMaskSoftnessY;
|
||||
|
||||
uniform float4 _ZeroColor;
|
||||
uniform float _Rotation;
|
||||
uniform float _OriginReference;
|
||||
uniform float _Exp;
|
||||
|
||||
|
||||
v2f vert(appdata_t v )
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
|
||||
|
||||
|
||||
v.vertex.xyz += float3( 0, 0, 0 ) ;
|
||||
|
||||
float4 vPosition = UnityObjectToClipPos(v.vertex);
|
||||
OUT.worldPosition = v.vertex;
|
||||
OUT.vertex = vPosition;
|
||||
|
||||
float2 pixelSize = vPosition.w;
|
||||
pixelSize /= float2(1, 1) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
|
||||
|
||||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
float2 maskUV = (v.vertex.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
|
||||
OUT.texcoord = v.texcoord;
|
||||
OUT.mask = float4(v.vertex.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_UIMaskSoftnessX, _UIMaskSoftnessY) + abs(pixelSize.xy)));
|
||||
|
||||
OUT.color = v.color * _Color;
|
||||
return OUT;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN ) : SV_Target
|
||||
{
|
||||
//Round up the alpha color coming from the interpolator (to 1.0/256.0 steps)
|
||||
//The incoming alpha could have numerical instability, which makes it very sensible to
|
||||
//HDR color transparency blend, when it blends with the world's texture.
|
||||
const half alphaPrecision = half(0xff);
|
||||
const half invAlphaPrecision = half(1.0/alphaPrecision);
|
||||
IN.color.a = round(IN.color.a * alphaPrecision)*invAlphaPrecision;
|
||||
|
||||
float2 uv_MainTex = IN.texcoord.xy * _MainTex_ST.xy + _MainTex_ST.zw;
|
||||
float cos6 = cos( radians( _Rotation ) );
|
||||
float sin6 = sin( radians( _Rotation ) );
|
||||
float2 rotator6 = mul( uv_MainTex - float2( 0.5,0.5 ) , float2x2( cos6 , -sin6 , sin6 , cos6 )) + float2( 0.5,0.5 );
|
||||
float temp_output_22_0 = ( abs( ( rotator6.x - _OriginReference ) ) / _OriginReference );
|
||||
float temp_output_34_0 = sin( temp_output_22_0 );
|
||||
#if defined( _EASEMODE_LINEAR )
|
||||
float staticSwitch33 = temp_output_22_0;
|
||||
#elif defined( _EASEMODE_EXP )
|
||||
float staticSwitch33 = pow( temp_output_22_0 , _Exp );
|
||||
#elif defined( _EASEMODE_SINE )
|
||||
float staticSwitch33 = temp_output_34_0;
|
||||
#elif defined( _EASEMODE_COSE )
|
||||
float staticSwitch33 = cos( temp_output_22_0 );
|
||||
#else
|
||||
float staticSwitch33 = temp_output_22_0;
|
||||
#endif
|
||||
float temp_output_26_0 = saturate( staticSwitch33 );
|
||||
#ifdef _REVERSELINEAR_ON
|
||||
float staticSwitch18 = ( 1.0 - temp_output_26_0 );
|
||||
#else
|
||||
float staticSwitch18 = temp_output_26_0;
|
||||
#endif
|
||||
float4 lerpResult31 = lerp( _ZeroColor , IN.color , staticSwitch18);
|
||||
|
||||
|
||||
half4 color = lerpResult31;
|
||||
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
|
||||
color.a *= m.x * m.y;
|
||||
#endif
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip (color.a - 0.001);
|
||||
#endif
|
||||
|
||||
color.rgb *= color.a;
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
CustomEditor "AmplifyShaderEditor.MaterialInspector"
|
||||
|
||||
Fallback Off
|
||||
}
|
||||
/*ASEBEGIN
|
||||
Version=19901
|
||||
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;15;-624,144;Inherit;False;Property;_Rotation;Rotation;4;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.FunctionNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;9;-896,-128;Inherit;False;GetMainTexture;0;;50;26056daae94e0bf4dad317a2d834fb45;0;1;3;FLOAT2;0,0;False;6;FLOAT2;10;COLOR;0;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9
|
||||
Node;AmplifyShaderEditor.RadiansOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;47;-480,128;Inherit;False;1;0;FLOAT;90;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.Vector2Node, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;14;-640,0;Inherit;False;Constant;_Vector0;Vector 0;2;0;Create;True;0;0;0;False;0;False;0.5,0.5;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
|
||||
Node;AmplifyShaderEditor.RotatorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;6;-384,-128;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;1;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.BreakToComponentsNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;13;-128,-128;Inherit;False;FLOAT2;1;0;FLOAT2;0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15
|
||||
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;10;-288,0;Inherit;False;Property;_OriginReference;Origin Reference;3;0;Create;True;0;0;0;False;0;False;0.5;0.5;0;1;0;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleSubtractOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;16;32,-128;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.AbsOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;17;224,-128;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleDivideOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;22;384,-128;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;27;-288,96;Inherit;False;Property;_Exp;Exp;7;0;Create;True;0;0;0;False;0;False;1;1;0;1;0;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.PowerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;23;544,-64;Inherit;False;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SinOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;34;544,64;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.CosOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;46;544,160;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.StaticSwitch, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;33;768,-128;Inherit;False;Property;_EaseMode;EaseMode;5;0;Create;True;0;0;0;False;0;False;0;0;0;True;;KeywordEnum;4;Linear;Exp;Sine;Cose;Create;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SaturateNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;26;992,-128;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.OneMinusNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;19;1152,-64;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.StaticSwitch, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;18;1312,-128;Inherit;False;Property;_ReverseLInear;ReverseLInear;6;0;Create;True;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Create;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;32;1312,-384;Inherit;False;Property;_ZeroColor;Zero Color;2;0;Create;True;0;0;0;False;0;False;0,0,0,1;0,0,0,1;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
|
||||
Node;AmplifyShaderEditor.VertexColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;38;1376,0;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.LerpOp, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;31;1600,-128;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
|
||||
Node;AmplifyShaderEditor.SignOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;40;1296,224;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleDivideOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;35;832,128;Inherit;True;2;0;FLOAT;0;False;1;FLOAT;0.89;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.DegreesOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;45;819.4379,580.575;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.CosOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;42;623.3982,473.2541;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleSubtractOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;41;1072,128;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0.59;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.PiNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;36;416,512;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.RadiansOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;44;800,432;Inherit;False;1;0;FLOAT;90;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;0;1792,-128;Float;False;True;-1;3;AmplifyShaderEditor.MaterialInspector;0;3;LiRuochen/UI/MonotonicallyExcessiveLinearColor;5056123faa0c79b47ab6ad7e8bf059a4;True;Default;0;0;Default;2;False;True;3;1;False;;10;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;True;True;True;True;True;0;True;_ColorMask;False;False;False;False;False;False;False;True;True;0;True;_Stencil;255;True;_StencilReadMask;255;True;_StencilWriteMask;0;True;_StencilComp;0;True;_StencilOp;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;0;True;unity_GUIZTestMode;False;True;5;Queue=Transparent=Queue=0;IgnoreProjector=True;RenderType=Transparent=RenderType;PreviewType=Plane;CanUseSpriteAtlas=True;False;False;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;False;0;;0;0;Standard;0;0;1;True;False;;False;0
|
||||
WireConnection;47;0;15;0
|
||||
WireConnection;6;0;9;10
|
||||
WireConnection;6;1;14;0
|
||||
WireConnection;6;2;47;0
|
||||
WireConnection;13;0;6;0
|
||||
WireConnection;16;0;13;0
|
||||
WireConnection;16;1;10;0
|
||||
WireConnection;17;0;16;0
|
||||
WireConnection;22;0;17;0
|
||||
WireConnection;22;1;10;0
|
||||
WireConnection;23;0;22;0
|
||||
WireConnection;23;1;27;0
|
||||
WireConnection;34;0;22;0
|
||||
WireConnection;46;0;22;0
|
||||
WireConnection;33;1;22;0
|
||||
WireConnection;33;0;23;0
|
||||
WireConnection;33;2;34;0
|
||||
WireConnection;33;3;46;0
|
||||
WireConnection;26;0;33;0
|
||||
WireConnection;19;0;26;0
|
||||
WireConnection;18;1;26;0
|
||||
WireConnection;18;0;19;0
|
||||
WireConnection;31;0;32;0
|
||||
WireConnection;31;1;38;0
|
||||
WireConnection;31;2;18;0
|
||||
WireConnection;40;0;41;0
|
||||
WireConnection;35;0;34;0
|
||||
WireConnection;35;1;44;0
|
||||
WireConnection;45;0;42;0
|
||||
WireConnection;41;0;35;0
|
||||
WireConnection;0;0;31;0
|
||||
ASEEND*/
|
||||
//CHKSM=C7F9D5EB8C7353607AF510A0D7F04A4A642557F0
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3948f6fd339e2a04b994a926fd4471a1
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,329 @@
|
||||
// Made with Amplify Shader Editor v1.9.9.1
|
||||
// Available at the Unity Asset Store - http://u3d.as/y3X
|
||||
Shader "LinRuochen/UI/RoundPolygon"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,1)
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
|
||||
[IntRange] _Sides( "Sides", Range( 3, 10 ) ) = 4
|
||||
_Roundness( "Roundness", Range( 0, 1 ) ) = 0.32
|
||||
_Width( "Width", Range( 0, 1.5 ) ) = 0.5
|
||||
_Height( "Height", Range( 0, 1.5 ) ) = 0.5
|
||||
_Rotation( "Rotation", Range( 0, 360 ) ) = 0
|
||||
_ZeroColor( "Zero Color", Color ) = ( 0, 0, 0, 0 )
|
||||
[Toggle( _ENABLEBORDER_ON )] _EnableBorder( "Enable Border", Float ) = 0
|
||||
_DeltaWidth( "Delta Width", Range( 0, 0.75 ) ) = 0.5
|
||||
_DeltaHeight( "Delta Height", Range( 0, 0.75 ) ) = 0.5
|
||||
_BorderColor( "Border Color", Color ) = ( 1, 1, 1, 1 )
|
||||
_Transform( "Transform", Vector ) = ( 1, 1, 0, 0 )
|
||||
_TransformBorder( "Transform Border", Vector ) = ( 1, 1, 0, -0.2 )
|
||||
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
LOD 0
|
||||
|
||||
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" "CanUseSpriteAtlas"="True" }
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
}
|
||||
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend One OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
CGPROGRAM
|
||||
#define ASE_VERSION 19901
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 3.5
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
||||
|
||||
#define ASE_NEEDS_FRAG_COLOR
|
||||
#define ASE_NEEDS_TEXTURE_COORDINATES0
|
||||
#define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0
|
||||
#pragma shader_feature_local _ENABLEBORDER_ON
|
||||
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
float4 mask : TEXCOORD2;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
float4 _MainTex_ST;
|
||||
float _UIMaskSoftnessX;
|
||||
float _UIMaskSoftnessY;
|
||||
|
||||
uniform float4 _ZeroColor;
|
||||
uniform float4 _Transform;
|
||||
uniform float _Rotation;
|
||||
uniform float _Width;
|
||||
uniform float _Height;
|
||||
uniform float _Sides;
|
||||
uniform float _Roundness;
|
||||
uniform float4 _BorderColor;
|
||||
uniform float4 _TransformBorder;
|
||||
uniform float _DeltaWidth;
|
||||
uniform float _DeltaHeight;
|
||||
|
||||
|
||||
v2f vert(appdata_t v )
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
|
||||
|
||||
|
||||
v.vertex.xyz += float3( 0, 0, 0 ) ;
|
||||
|
||||
float4 vPosition = UnityObjectToClipPos(v.vertex);
|
||||
OUT.worldPosition = v.vertex;
|
||||
OUT.vertex = vPosition;
|
||||
|
||||
float2 pixelSize = vPosition.w;
|
||||
pixelSize /= float2(1, 1) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
|
||||
|
||||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
float2 maskUV = (v.vertex.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
|
||||
OUT.texcoord = v.texcoord;
|
||||
OUT.mask = float4(v.vertex.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_UIMaskSoftnessX, _UIMaskSoftnessY) + abs(pixelSize.xy)));
|
||||
|
||||
OUT.color = v.color * _Color;
|
||||
return OUT;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN ) : SV_Target
|
||||
{
|
||||
//Round up the alpha color coming from the interpolator (to 1.0/256.0 steps)
|
||||
//The incoming alpha could have numerical instability, which makes it very sensible to
|
||||
//HDR color transparency blend, when it blends with the world's texture.
|
||||
const half alphaPrecision = half(0xff);
|
||||
const half invAlphaPrecision = half(1.0/alphaPrecision);
|
||||
IN.color.a = round(IN.color.a * alphaPrecision)*invAlphaPrecision;
|
||||
|
||||
float2 texCoord7 = IN.texcoord.xy * (_Transform).xy + (_Transform).zw;
|
||||
float temp_output_11_0 = radians( _Rotation );
|
||||
float cos8 = cos( temp_output_11_0 );
|
||||
float sin8 = sin( temp_output_11_0 );
|
||||
float2 rotator8 = mul( texCoord7 - float2( 0.5,0.5 ) , float2x2( cos8 , -sin8 , sin8 , cos8 )) + float2( 0.5,0.5 );
|
||||
float2 break188_g2 = ( ( rotator8 * float2( 2,2 ) ) - float2( 1,1 ) );
|
||||
float temp_output_197_0_g2 = _Width;
|
||||
float temp_output_191_0_g2 = _Height;
|
||||
float2 appendResult181_g2 = (float2(( break188_g2.x / ( temp_output_197_0_g2 + ( temp_output_197_0_g2 * 1E-06 ) ) ) , ( break188_g2.y / ( temp_output_191_0_g2 + ( temp_output_191_0_g2 * 1E-06 ) ) )));
|
||||
float fullAngle201_g2 = ( 6.28318548202515 / floor( abs( _Sides ) ) );
|
||||
float temp_output_122_0_g2 = ( fullAngle201_g2 / 2.0 );
|
||||
float temp_output_120_0_g2 = cos( temp_output_122_0_g2 );
|
||||
#if ( SHADER_TARGET >= 50 )
|
||||
float recip118_g2 = rcp( temp_output_120_0_g2 );
|
||||
#else
|
||||
float recip118_g2 = 1.0 / temp_output_120_0_g2;
|
||||
#endif
|
||||
float diagonal182_g2 = recip118_g2;
|
||||
float2 temp_output_180_0_g2 = ( appendResult181_g2 * diagonal182_g2 );
|
||||
float2 break179_g2 = temp_output_180_0_g2;
|
||||
float2 appendResult103_g2 = (float2(atan2( break179_g2.y , break179_g2.x ) , length( temp_output_180_0_g2 )));
|
||||
float2 break104_g2 = appendResult103_g2;
|
||||
float Half_Angle135_g2 = temp_output_122_0_g2;
|
||||
float polaruvx170_g2 = abs( ( ( ( ( ( ( UNITY_PI * 0.5 ) + UNITY_PI ) + break104_g2.x ) + Half_Angle135_g2 ) % fullAngle201_g2 ) - Half_Angle135_g2 ) );
|
||||
float clampResult130_g2 = clamp( _Roundness , 1E-06 , 1.0 );
|
||||
float chamferAngle172_g2 = ( clampResult130_g2 * Half_Angle135_g2 );
|
||||
float remainingAngle175_g2 = ( Half_Angle135_g2 - chamferAngle172_g2 );
|
||||
float2 appendResult121_g2 = (float2(temp_output_120_0_g2 , sin( Half_Angle135_g2 )));
|
||||
float2 temp_output_112_0_g2 = ( ( tan( remainingAngle175_g2 ) / tan( Half_Angle135_g2 ) ) * ( diagonal182_g2 * appendResult121_g2 ) );
|
||||
float temp_output_111_0_g2 = length( temp_output_112_0_g2 );
|
||||
float temp_output_90_0_g2 = ( 1.0 - temp_output_112_0_g2.x );
|
||||
float lerpResult71_g2 = lerp( ( cos( polaruvx170_g2 ) * break104_g2.y ) , ( break104_g2.y / sqrt( ( ( ( temp_output_111_0_g2 * temp_output_111_0_g2 ) + ( temp_output_90_0_g2 * temp_output_90_0_g2 ) ) - ( ( ( cos( ( UNITY_PI - ( ( 1.0 - ( ( polaruvx170_g2 - remainingAngle175_g2 ) / chamferAngle172_g2 ) ) * Half_Angle135_g2 ) ) ) * temp_output_111_0_g2 ) * temp_output_90_0_g2 ) * 2.0 ) ) ) ) , ( ( Half_Angle135_g2 - polaruvx170_g2 ) < chamferAngle172_g2 ? 1.0 : 0.0 ));
|
||||
float temp_output_2_0 = saturate( ( ( 1.0 - lerpResult71_g2 ) / fwidth( lerpResult71_g2 ) ) );
|
||||
float4 lerpResult12 = lerp( _ZeroColor , IN.color , temp_output_2_0);
|
||||
float2 texCoord36 = IN.texcoord.xy * (_TransformBorder).xy + (_TransformBorder).zw;
|
||||
float cos37 = cos( temp_output_11_0 );
|
||||
float sin37 = sin( temp_output_11_0 );
|
||||
float2 rotator37 = mul( texCoord36 - float2( 0.5,0.5 ) , float2x2( cos37 , -sin37 , sin37 , cos37 )) + float2( 0.5,0.5 );
|
||||
float2 break188_g3 = ( ( rotator37 * float2( 2,2 ) ) - float2( 1,1 ) );
|
||||
float temp_output_197_0_g3 = ( _Width - ( _DeltaWidth * 0.5 ) );
|
||||
float temp_output_191_0_g3 = ( _Height - ( _DeltaHeight * 0.5 ) );
|
||||
float2 appendResult181_g3 = (float2(( break188_g3.x / ( temp_output_197_0_g3 + ( temp_output_197_0_g3 * 1E-06 ) ) ) , ( break188_g3.y / ( temp_output_191_0_g3 + ( temp_output_191_0_g3 * 1E-06 ) ) )));
|
||||
float fullAngle201_g3 = ( 6.28318548202515 / floor( abs( _Sides ) ) );
|
||||
float temp_output_122_0_g3 = ( fullAngle201_g3 / 2.0 );
|
||||
float temp_output_120_0_g3 = cos( temp_output_122_0_g3 );
|
||||
#if ( SHADER_TARGET >= 50 )
|
||||
float recip118_g3 = rcp( temp_output_120_0_g3 );
|
||||
#else
|
||||
float recip118_g3 = 1.0 / temp_output_120_0_g3;
|
||||
#endif
|
||||
float diagonal182_g3 = recip118_g3;
|
||||
float2 temp_output_180_0_g3 = ( appendResult181_g3 * diagonal182_g3 );
|
||||
float2 break179_g3 = temp_output_180_0_g3;
|
||||
float2 appendResult103_g3 = (float2(atan2( break179_g3.y , break179_g3.x ) , length( temp_output_180_0_g3 )));
|
||||
float2 break104_g3 = appendResult103_g3;
|
||||
float Half_Angle135_g3 = temp_output_122_0_g3;
|
||||
float polaruvx170_g3 = abs( ( ( ( ( ( ( UNITY_PI * 0.5 ) + UNITY_PI ) + break104_g3.x ) + Half_Angle135_g3 ) % fullAngle201_g3 ) - Half_Angle135_g3 ) );
|
||||
float clampResult130_g3 = clamp( _Roundness , 1E-06 , 1.0 );
|
||||
float chamferAngle172_g3 = ( clampResult130_g3 * Half_Angle135_g3 );
|
||||
float remainingAngle175_g3 = ( Half_Angle135_g3 - chamferAngle172_g3 );
|
||||
float2 appendResult121_g3 = (float2(temp_output_120_0_g3 , sin( Half_Angle135_g3 )));
|
||||
float2 temp_output_112_0_g3 = ( ( tan( remainingAngle175_g3 ) / tan( Half_Angle135_g3 ) ) * ( diagonal182_g3 * appendResult121_g3 ) );
|
||||
float temp_output_111_0_g3 = length( temp_output_112_0_g3 );
|
||||
float temp_output_90_0_g3 = ( 1.0 - temp_output_112_0_g3.x );
|
||||
float lerpResult71_g3 = lerp( ( cos( polaruvx170_g3 ) * break104_g3.y ) , ( break104_g3.y / sqrt( ( ( ( temp_output_111_0_g3 * temp_output_111_0_g3 ) + ( temp_output_90_0_g3 * temp_output_90_0_g3 ) ) - ( ( ( cos( ( UNITY_PI - ( ( 1.0 - ( ( polaruvx170_g3 - remainingAngle175_g3 ) / chamferAngle172_g3 ) ) * Half_Angle135_g3 ) ) ) * temp_output_111_0_g3 ) * temp_output_90_0_g3 ) * 2.0 ) ) ) ) , ( ( Half_Angle135_g3 - polaruvx170_g3 ) < chamferAngle172_g3 ? 1.0 : 0.0 ));
|
||||
float4 lerpResult29 = lerp( lerpResult12 , _BorderColor , saturate( ( temp_output_2_0 - saturate( ( ( 1.0 - lerpResult71_g3 ) / fwidth( lerpResult71_g3 ) ) ) ) ));
|
||||
#ifdef _ENABLEBORDER_ON
|
||||
float4 staticSwitch24 = lerpResult29;
|
||||
#else
|
||||
float4 staticSwitch24 = lerpResult12;
|
||||
#endif
|
||||
|
||||
|
||||
half4 color = staticSwitch24;
|
||||
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
|
||||
color.a *= m.x * m.y;
|
||||
#endif
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip (color.a - 0.001);
|
||||
#endif
|
||||
|
||||
color.rgb *= color.a;
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
CustomEditor "AmplifyShaderEditor.MaterialInspector"
|
||||
|
||||
Fallback Off
|
||||
}
|
||||
/*ASEBEGIN
|
||||
Version=19901
|
||||
Node;AmplifyShaderEditor.Vector4Node, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;30;-1536,-512;Inherit;False;Property;_Transform;Transform;10;0;Create;True;0;0;0;False;0;False;1,1,0,0;1,1,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.Vector4Node, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;33;-1536,-256;Inherit;False;Property;_TransformBorder;Transform Border;11;0;Create;True;0;0;0;False;0;False;1,1,0,-0.2;1,1,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;18;-1024,448;Inherit;False;Property;_DeltaHeight;Delta Height;8;0;Create;True;0;0;0;False;0;False;0.5;0.5;0;0.75;0;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;10;-1280,-368;Inherit;False;Property;_Rotation;Rotation;4;0;Create;True;0;0;0;False;0;False;0;0;0;360;0;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.ComponentMaskNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;32;-1280,-448;Inherit;False;False;False;True;True;1;0;FLOAT4;0,0,0,0;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.ComponentMaskNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;31;-1280,-512;Inherit;False;True;True;False;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;17;-1024,352;Inherit;False;Property;_DeltaWidth;Delta Width;7;0;Create;True;0;0;0;False;0;False;0.5;0.5;0;0.75;0;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.ComponentMaskNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;34;-1280,-192;Inherit;False;False;False;True;True;1;0;FLOAT4;0,0,0,0;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.ComponentMaskNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;35;-1280,-256;Inherit;False;True;True;False;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;4;-768,64;Inherit;False;Property;_Width;Width;2;0;Create;True;0;0;0;False;0;False;0.5;0;0;1.5;0;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;5;-768,144;Inherit;False;Property;_Height;Height;3;0;Create;True;0;0;0;False;0;False;0.5;0.5;0;1.5;0;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;21;-768,352;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0.5;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;23;-768,448;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0.5;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.RadiansOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;11;-992,-368;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.TextureCoordinatesNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;7;-1024,-512;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.TextureCoordinatesNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;36;-1024,-256;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;3;-768,0;Inherit;False;Property;_Sides;Sides;0;1;[IntRange];Create;True;0;0;0;False;0;False;4;0;3;10;0;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;6;-768,224;Inherit;False;Property;_Roundness;Roundness;1;0;Create;True;0;0;0;False;0;False;0.32;0.32;0;1;0;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleSubtractOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;19;-576,320;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SimpleSubtractOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;22;-576,416;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.RotatorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;8;-768,-512;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;2;FLOAT;1;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.RotatorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;37;-768,-256;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;2;FLOAT;1;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.FunctionNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;2;-384,0;Inherit;False;Rounded Polygon;-1;;2;fecbb830e021088498d67321a21209fa;0;5;36;FLOAT2;0,0;False;126;FLOAT;4;False;197;FLOAT;0.5;False;191;FLOAT;0.5;False;128;FLOAT;0.32;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.FunctionNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;16;-384,240;Inherit;False;Rounded Polygon;-1;;3;fecbb830e021088498d67321a21209fa;0;5;36;FLOAT2;0,0;False;126;FLOAT;4;False;197;FLOAT;0.5;False;191;FLOAT;0.5;False;128;FLOAT;0.32;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.VertexColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;13;-128,96;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;14;-128,-128;Inherit;False;Property;_ZeroColor;Zero Color;5;0;Create;True;0;0;0;False;0;False;0,0,0,0;0,0,0,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
|
||||
Node;AmplifyShaderEditor.SimpleSubtractOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;27;-128,304;Inherit;True;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.LerpOp, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;12;128,0;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
|
||||
Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;25;128,272;Inherit;False;Property;_BorderColor;Border Color;9;0;Create;True;0;0;0;False;0;False;1,1,1,1;0,0,0,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
|
||||
Node;AmplifyShaderEditor.SaturateNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;38;144.1035,530.6523;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.LerpOp, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;29;384,96;Inherit;True;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
|
||||
Node;AmplifyShaderEditor.StaticSwitch, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;24;640,0;Inherit;False;Property;_EnableBorder;Enable Border;6;0;Create;True;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Create;True;True;All;9;1;COLOR;0,0,0,0;False;0;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;4;COLOR;0,0,0,0;False;5;COLOR;0,0,0,0;False;6;COLOR;0,0,0,0;False;7;COLOR;0,0,0,0;False;8;COLOR;0,0,0,0;False;1;COLOR;0
|
||||
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;0;960,0;Float;False;True;-1;3;AmplifyShaderEditor.MaterialInspector;0;3;LinRuochen/UI/RoundPolygon;5056123faa0c79b47ab6ad7e8bf059a4;True;Default;0;0;Default;2;False;True;3;1;False;;10;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;True;True;True;True;True;0;True;_ColorMask;False;False;False;False;False;False;False;True;True;0;True;_Stencil;255;True;_StencilReadMask;255;True;_StencilWriteMask;0;True;_StencilComp;0;True;_StencilOp;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;0;True;unity_GUIZTestMode;False;True;5;Queue=Transparent=Queue=0;IgnoreProjector=True;RenderType=Transparent=RenderType;PreviewType=Plane;CanUseSpriteAtlas=True;False;False;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;False;0;;0;0;Standard;0;0;1;True;False;;False;0
|
||||
WireConnection;32;0;30;0
|
||||
WireConnection;31;0;30;0
|
||||
WireConnection;34;0;33;0
|
||||
WireConnection;35;0;33;0
|
||||
WireConnection;21;0;17;0
|
||||
WireConnection;23;0;18;0
|
||||
WireConnection;11;0;10;0
|
||||
WireConnection;7;0;31;0
|
||||
WireConnection;7;1;32;0
|
||||
WireConnection;36;0;35;0
|
||||
WireConnection;36;1;34;0
|
||||
WireConnection;19;0;4;0
|
||||
WireConnection;19;1;21;0
|
||||
WireConnection;22;0;5;0
|
||||
WireConnection;22;1;23;0
|
||||
WireConnection;8;0;7;0
|
||||
WireConnection;8;2;11;0
|
||||
WireConnection;37;0;36;0
|
||||
WireConnection;37;2;11;0
|
||||
WireConnection;2;36;8;0
|
||||
WireConnection;2;126;3;0
|
||||
WireConnection;2;197;4;0
|
||||
WireConnection;2;191;5;0
|
||||
WireConnection;2;128;6;0
|
||||
WireConnection;16;36;37;0
|
||||
WireConnection;16;126;3;0
|
||||
WireConnection;16;197;19;0
|
||||
WireConnection;16;191;22;0
|
||||
WireConnection;16;128;6;0
|
||||
WireConnection;27;0;2;0
|
||||
WireConnection;27;1;16;0
|
||||
WireConnection;12;0;14;0
|
||||
WireConnection;12;1;13;0
|
||||
WireConnection;12;2;2;0
|
||||
WireConnection;38;0;27;0
|
||||
WireConnection;29;0;12;0
|
||||
WireConnection;29;1;25;0
|
||||
WireConnection;29;2;38;0
|
||||
WireConnection;24;1;12;0
|
||||
WireConnection;24;0;29;0
|
||||
WireConnection;0;0;24;0
|
||||
ASEEND*/
|
||||
//CHKSM=433F3A80DC4479B363CCE115625C4C9858BF5EBF
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b73bb549fe548394597489c9a7bf6778
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,134 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: TextBackgroundSprite
|
||||
m_Shader: {fileID: 4800000, guid: cf81c85f95fe47e1a27f6ae460cf182c, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 2450
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AlphaClip: 0
|
||||
- _Blend: 0
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _ColorMask: 15
|
||||
- _Cull: 2
|
||||
- _CullMode: 0
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _Surface: 0
|
||||
- _UseUIAlphaClip: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!114 &6139851175057723697
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 5
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ddf4e3f6bffb1094788a76d35fb52353
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,48 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: XRoundPureRectR15Full
|
||||
m_Shader: {fileID: 4800000, guid: b73bb549fe548394597489c9a7bf6778, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ColorMask: 15
|
||||
- _DeltaHeight: 0.2
|
||||
- _DeltaWidth: 0.2
|
||||
- _EnableBorder: 0
|
||||
- _Height: 1.4156
|
||||
- _Rotation: 0
|
||||
- _Roundness: 0.15
|
||||
- _Sides: 4
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UseUIAlphaClip: 0
|
||||
- _Width: 1.4156
|
||||
m_Colors:
|
||||
- _BorderColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _ZeroColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac6d239d833004241a213c0e3c3aa715
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,51 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: XRoundPureRectR15HollowArrow
|
||||
m_Shader: {fileID: 4800000, guid: b73bb549fe548394597489c9a7bf6778, type: 3}
|
||||
m_ValidKeywords:
|
||||
- _ENABLEBORDER_ON
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ColorMask: 15
|
||||
- _DeltaHeight: 0.2
|
||||
- _DeltaWidth: 0.2
|
||||
- _EnableBorder: 1
|
||||
- _Height: 0.603
|
||||
- _Rotation: 270
|
||||
- _Roundness: 0.1
|
||||
- _Sides: 3
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UseUIAlphaClip: 0
|
||||
- _Width: 1
|
||||
m_Colors:
|
||||
- _BorderColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Transform: {r: 1, g: 1, b: 0, a: 0}
|
||||
- _TransformBorder: {r: 1, g: 1, b: -0.09, a: 0}
|
||||
- _ZeroColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e17f56054a9b7bc41bdbe4649cd3454e
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 10f13e653f633a74084c0959dc05590f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 154 B |
@@ -0,0 +1,134 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 50a137844878a8b48ad4b64a79a8c0d3
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 4, y: 4, z: 4, w: 4}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 1537655665
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 437166bed1b6f7f42b736890cc261560
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,229 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1940454555551541799
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8368682339573524350}
|
||||
- component: {fileID: 6758899940237920035}
|
||||
- component: {fileID: 1351179006692931988}
|
||||
- component: {fileID: 8064263650240701585}
|
||||
m_Layer: 5
|
||||
m_Name: AutoSizeText-TMP_Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8368682339573524350
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1940454555551541799}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1447950929319107596}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6758899940237920035
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1940454555551541799}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1351179006692931988
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1940454555551541799}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: New Text
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 20
|
||||
m_fontSizeBase: 20
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 10, y: 0, z: 10, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!114 &8064263650240701585
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1940454555551541799}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 2
|
||||
m_VerticalFit: 2
|
||||
--- !u!1 &6282608548495320411
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1447950929319107596}
|
||||
- component: {fileID: 1107746675923935926}
|
||||
- component: {fileID: 6512311995528754557}
|
||||
m_Layer: 5
|
||||
m_Name: background
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1447950929319107596
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6282608548495320411}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8368682339573524350}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1107746675923935926
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6282608548495320411}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6512311995528754557
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6282608548495320411}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 2100000, guid: ddf4e3f6bffb1094788a76d35fb52353, type: 2}
|
||||
m_Color: {r: 0.3584906, g: 0.3584906, b: 0.3584906, a: 0.8}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 50a137844878a8b48ad4b64a79a8c0d3, type: 3}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 0.3
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 949de04130ce65644be463ff89a150d1
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user