mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-06 10:46:53 +08:00
Merge branch 'EsotericSoftware/3.6' into 3.6
This commit is contained in:
commit
929462de70
@ -387,6 +387,9 @@ namespace Spine.Unity.Editor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
EditorGUILayout.LabelField("Name", " Duration");
|
EditorGUILayout.LabelField("Name", " Duration");
|
||||||
|
bool nonessential = m_skeletonData.ImagesPath != null;
|
||||||
|
float fps = m_skeletonData.Fps;
|
||||||
|
if (nonessential && fps == 0) fps = 30;
|
||||||
foreach (Spine.Animation animation in m_skeletonData.Animations) {
|
foreach (Spine.Animation animation in m_skeletonData.Animations) {
|
||||||
using (new GUILayout.HorizontalScope()) {
|
using (new GUILayout.HorizontalScope()) {
|
||||||
if (m_skeletonAnimation != null && m_skeletonAnimation.state != null) {
|
if (m_skeletonAnimation != null && m_skeletonAnimation.state != null) {
|
||||||
@ -403,7 +406,8 @@ namespace Spine.Unity.Editor {
|
|||||||
} else {
|
} else {
|
||||||
GUILayout.Label("-", GUILayout.Width(24));
|
GUILayout.Label("-", GUILayout.Width(24));
|
||||||
}
|
}
|
||||||
EditorGUILayout.LabelField(new GUIContent(animation.Name, Icons.animation), SpineInspectorUtility.TempContent(animation.Duration.ToString("f3") + "s" + ("(" + (Mathf.RoundToInt(animation.Duration * 30)) + ")").PadLeft(12, ' ')));
|
string frameCountString = (fps > 0) ? ("(" + (Mathf.RoundToInt(animation.Duration * fps)) + ")").PadLeft(12, ' ') : string.Empty;
|
||||||
|
EditorGUILayout.LabelField(new GUIContent(animation.Name, Icons.animation), SpineInspectorUtility.TempContent(animation.Duration.ToString("f3") + "s" + frameCountString));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,15 +74,16 @@ namespace Spine.Unity.Editor {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var dataField = property.FindBaseOrSiblingProperty(TargetAttribute.dataField);
|
SerializedProperty dataField = property.FindBaseOrSiblingProperty(TargetAttribute.dataField);
|
||||||
if (dataField != null) {
|
if (dataField != null) {
|
||||||
if (dataField.objectReferenceValue is SkeletonDataAsset) {
|
var objectReferenceValue = dataField.objectReferenceValue;
|
||||||
skeletonDataAsset = (SkeletonDataAsset)dataField.objectReferenceValue;
|
if (objectReferenceValue is SkeletonDataAsset) {
|
||||||
} else if (dataField.objectReferenceValue is ISkeletonComponent) {
|
skeletonDataAsset = (SkeletonDataAsset)objectReferenceValue;
|
||||||
var skeletonComponent = (ISkeletonComponent)dataField.objectReferenceValue;
|
} else if (objectReferenceValue is ISkeletonComponent) {
|
||||||
|
var skeletonComponent = (ISkeletonComponent)objectReferenceValue;
|
||||||
if (skeletonComponent != null)
|
if (skeletonComponent != null)
|
||||||
skeletonDataAsset = skeletonComponent.SkeletonDataAsset;
|
skeletonDataAsset = skeletonComponent.SkeletonDataAsset;
|
||||||
} else {
|
} else if (objectReferenceValue != null) {
|
||||||
EditorGUI.LabelField(position, "ERROR:", "Invalid reference type");
|
EditorGUI.LabelField(position, "ERROR:", "Invalid reference type");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -95,7 +96,12 @@ namespace Spine.Unity.Editor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (skeletonDataAsset == null) {
|
if (skeletonDataAsset == null) {
|
||||||
EditorGUI.LabelField(position, "ERROR:", "Must have reference to a SkeletonDataAsset");
|
if (TargetAttribute.fallbackToTextField) {
|
||||||
|
EditorGUI.PropertyField(position, property); //EditorGUI.TextField(position, label, property.stringValue);
|
||||||
|
} else {
|
||||||
|
EditorGUI.LabelField(position, "ERROR:", "Must have reference to a SkeletonDataAsset");
|
||||||
|
}
|
||||||
|
|
||||||
skeletonDataAsset = property.serializedObject.targetObject as SkeletonDataAsset;
|
skeletonDataAsset = property.serializedObject.targetObject as SkeletonDataAsset;
|
||||||
if (skeletonDataAsset == null) return;
|
if (skeletonDataAsset == null) return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -345,7 +345,7 @@ VertexOutput vert(VertexInput input)
|
|||||||
output.color = calculateVertexColor(input.color);
|
output.color = calculateVertexColor(input.color);
|
||||||
output.texcoord = float3(calculateTextureCoord(input.texcoord), 0);
|
output.texcoord = float3(calculateTextureCoord(input.texcoord), 0);
|
||||||
|
|
||||||
float3 viewPos = UnityObjectViewPos(input.vertex); //float3 viewPos = mul(UNITY_MATRIX_MV, input.vertex);
|
float3 viewPos = UnityObjectToViewPos(input.vertex); //float3 viewPos = mul(UNITY_MATRIX_MV, input.vertex); //
|
||||||
#if defined(FIXED_NORMALS_BACKFACE_RENDERING) || defined(_RIM_LIGHTING)
|
#if defined(FIXED_NORMALS_BACKFACE_RENDERING) || defined(_RIM_LIGHTING)
|
||||||
float4 powWorld = calculateWorldPos(input.vertex);
|
float4 powWorld = calculateWorldPos(input.vertex);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -10,127 +10,78 @@ Material:
|
|||||||
m_Shader: {fileID: 4800000, guid: fa95b0fb6983c0f40a152e6f9aa82bfb, type: 3}
|
m_Shader: {fileID: 4800000, guid: fa95b0fb6983c0f40a152e6f9aa82bfb, type: 3}
|
||||||
m_ShaderKeywords:
|
m_ShaderKeywords:
|
||||||
m_LightmapFlags: 5
|
m_LightmapFlags: 5
|
||||||
m_CustomRenderQueue: 3000
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
stringTagMap: {}
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
m_SavedProperties:
|
m_SavedProperties:
|
||||||
serializedVersion: 2
|
serializedVersion: 3
|
||||||
m_TexEnvs:
|
m_TexEnvs:
|
||||||
- first:
|
- _AlphaTex:
|
||||||
name: _BumpMap
|
|
||||||
second:
|
|
||||||
m_Texture: {fileID: 0}
|
m_Texture: {fileID: 0}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- first:
|
- _BumpMap:
|
||||||
name: _DetailAlbedoMap
|
|
||||||
second:
|
|
||||||
m_Texture: {fileID: 0}
|
m_Texture: {fileID: 0}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- first:
|
- _DetailAlbedoMap:
|
||||||
name: _DetailMask
|
|
||||||
second:
|
|
||||||
m_Texture: {fileID: 0}
|
m_Texture: {fileID: 0}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- first:
|
- _DetailMask:
|
||||||
name: _DetailNormalMap
|
|
||||||
second:
|
|
||||||
m_Texture: {fileID: 0}
|
m_Texture: {fileID: 0}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- first:
|
- _DetailNormalMap:
|
||||||
name: _EmissionMap
|
|
||||||
second:
|
|
||||||
m_Texture: {fileID: 0}
|
m_Texture: {fileID: 0}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- first:
|
- _EmissionMap:
|
||||||
name: _MainTex
|
|
||||||
second:
|
|
||||||
m_Texture: {fileID: 0}
|
m_Texture: {fileID: 0}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- first:
|
- _MainTex:
|
||||||
name: _MetallicGlossMap
|
|
||||||
second:
|
|
||||||
m_Texture: {fileID: 0}
|
m_Texture: {fileID: 0}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- first:
|
- _MetallicGlossMap:
|
||||||
name: _OcclusionMap
|
|
||||||
second:
|
|
||||||
m_Texture: {fileID: 0}
|
m_Texture: {fileID: 0}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- first:
|
- _OcclusionMap:
|
||||||
name: _ParallaxMap
|
m_Texture: {fileID: 0}
|
||||||
second:
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
m_Texture: {fileID: 0}
|
m_Texture: {fileID: 0}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
m_Floats:
|
m_Floats:
|
||||||
- first:
|
- PixelSnap: 0
|
||||||
name: _BumpScale
|
- _BumpScale: 1
|
||||||
second: 1
|
- _ColorMask: 15
|
||||||
- first:
|
- _Cutoff: 0.5
|
||||||
name: _ColorMask
|
- _DetailNormalMapScale: 1
|
||||||
second: 15
|
- _DstBlend: 0
|
||||||
- first:
|
- _EnableExternalAlpha: 0
|
||||||
name: _Cutoff
|
- _Glossiness: 0.5
|
||||||
second: 0.5
|
- _Metallic: 0
|
||||||
- first:
|
- _Mode: 0
|
||||||
name: _DetailNormalMapScale
|
- _OcclusionStrength: 1
|
||||||
second: 1
|
- _Parallax: 0.02
|
||||||
- first:
|
- _SrcBlend: 1
|
||||||
name: _DstBlend
|
- _Stencil: 0
|
||||||
second: 0
|
- _StencilComp: 8
|
||||||
- first:
|
- _StencilOp: 0
|
||||||
name: _Glossiness
|
- _StencilReadMask: 255
|
||||||
second: 0.5
|
- _StencilWriteMask: 255
|
||||||
- first:
|
- _UVSec: 0
|
||||||
name: _Metallic
|
- _UseUIAlphaClip: 0
|
||||||
second: 0
|
- _ZWrite: 1
|
||||||
- first:
|
|
||||||
name: _Mode
|
|
||||||
second: 0
|
|
||||||
- first:
|
|
||||||
name: _OcclusionStrength
|
|
||||||
second: 1
|
|
||||||
- first:
|
|
||||||
name: _Parallax
|
|
||||||
second: 0.02
|
|
||||||
- first:
|
|
||||||
name: _SrcBlend
|
|
||||||
second: 1
|
|
||||||
- first:
|
|
||||||
name: _Stencil
|
|
||||||
second: 0
|
|
||||||
- first:
|
|
||||||
name: _StencilComp
|
|
||||||
second: 8
|
|
||||||
- first:
|
|
||||||
name: _StencilOp
|
|
||||||
second: 0
|
|
||||||
- first:
|
|
||||||
name: _StencilReadMask
|
|
||||||
second: 255
|
|
||||||
- first:
|
|
||||||
name: _StencilWriteMask
|
|
||||||
second: 255
|
|
||||||
- first:
|
|
||||||
name: _UVSec
|
|
||||||
second: 0
|
|
||||||
- first:
|
|
||||||
name: _UseUIAlphaClip
|
|
||||||
second: 0
|
|
||||||
- first:
|
|
||||||
name: _ZWrite
|
|
||||||
second: 1
|
|
||||||
m_Colors:
|
m_Colors:
|
||||||
- first:
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
name: _Color
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
second: {r: 1, g: 1, b: 1, a: 1}
|
- _Flip: {r: 1, g: 1, b: 1, a: 1}
|
||||||
- first:
|
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
name: _EmissionColor
|
|
||||||
second: {r: 0, g: 0, b: 0, a: 1}
|
|
||||||
|
|||||||
@ -112,4 +112,4 @@ Shader "Spine/SkeletonGraphic (Premultiply Alpha)"
|
|||||||
ENDCG
|
ENDCG
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -41,6 +41,7 @@ namespace Spine.Unity {
|
|||||||
public string dataField = "";
|
public string dataField = "";
|
||||||
public string startsWith = "";
|
public string startsWith = "";
|
||||||
public bool includeNone = true;
|
public bool includeNone = true;
|
||||||
|
public bool fallbackToTextField = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SpineSlot : SpineAttributeBase {
|
public class SpineSlot : SpineAttributeBase {
|
||||||
@ -52,15 +53,17 @@ namespace Spine.Unity {
|
|||||||
/// <param name="startsWith">Filters popup results to elements that begin with supplied string.</param>
|
/// <param name="startsWith">Filters popup results to elements that begin with supplied string.</param>
|
||||||
/// <param name="containsBoundingBoxes">Disables popup results that don't contain bounding box attachments when true.</param>
|
/// <param name="containsBoundingBoxes">Disables popup results that don't contain bounding box attachments when true.</param>
|
||||||
/// <param name = "includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
/// <param name = "includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
||||||
|
/// <param name = "fallbackToTextField">If true, and an animation list source can't be found, the field will fall back to a normal text field. If false, it will show an error.</param>
|
||||||
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
||||||
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives).
|
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives).
|
||||||
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent<SkeletonRenderer>() will be called as a fallback.
|
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent<SkeletonRenderer>() will be called as a fallback.
|
||||||
/// </param>
|
/// </param>
|
||||||
public SpineSlot(string startsWith = "", string dataField = "", bool containsBoundingBoxes = false, bool includeNone = true) {
|
public SpineSlot (string startsWith = "", string dataField = "", bool containsBoundingBoxes = false, bool includeNone = true, bool fallbackToTextField = false) {
|
||||||
this.startsWith = startsWith;
|
this.startsWith = startsWith;
|
||||||
this.dataField = dataField;
|
this.dataField = dataField;
|
||||||
this.containsBoundingBoxes = containsBoundingBoxes;
|
this.containsBoundingBoxes = containsBoundingBoxes;
|
||||||
this.includeNone = includeNone;
|
this.includeNone = includeNone;
|
||||||
|
this.fallbackToTextField = fallbackToTextField;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,12 +75,14 @@ namespace Spine.Unity {
|
|||||||
/// <param name = "includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
/// <param name = "includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
||||||
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
||||||
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives).
|
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives).
|
||||||
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent<SkeletonRenderer>() will be called as a fallback.
|
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent(SkeletonRenderer)() will be called as a fallback.
|
||||||
/// </param>
|
/// </param>
|
||||||
public SpineEvent(string startsWith = "", string dataField = "", bool includeNone = true) {
|
/// <param name="fallbackToTextField">If true, and an animation list source can't be found, the field will fall back to a normal text field. If false, it will show an error.</param>
|
||||||
|
public SpineEvent (string startsWith = "", string dataField = "", bool includeNone = true, bool fallbackToTextField = false) {
|
||||||
this.startsWith = startsWith;
|
this.startsWith = startsWith;
|
||||||
this.dataField = dataField;
|
this.dataField = dataField;
|
||||||
this.includeNone = includeNone;
|
this.includeNone = includeNone;
|
||||||
|
this.fallbackToTextField = fallbackToTextField;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,12 +94,14 @@ namespace Spine.Unity {
|
|||||||
/// <param name = "includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
/// <param name = "includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
||||||
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
||||||
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives).
|
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives).
|
||||||
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent<SkeletonRenderer>() will be called as a fallback.
|
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent(SkeletonRenderer)() will be called as a fallback.
|
||||||
/// </param>
|
/// </param>
|
||||||
public SpineIkConstraint(string startsWith = "", string dataField = "", bool includeNone = true) {
|
/// <param name = "fallbackToTextField">If true, and an animation list source can't be found, the field will fall back to a normal text field. If false, it will show an error.</param>
|
||||||
|
public SpineIkConstraint (string startsWith = "", string dataField = "", bool includeNone = true, bool fallbackToTextField = false) {
|
||||||
this.startsWith = startsWith;
|
this.startsWith = startsWith;
|
||||||
this.dataField = dataField;
|
this.dataField = dataField;
|
||||||
this.includeNone = includeNone;
|
this.includeNone = includeNone;
|
||||||
|
this.fallbackToTextField = fallbackToTextField;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,12 +113,13 @@ namespace Spine.Unity {
|
|||||||
/// <param name = "includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
/// <param name = "includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
||||||
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
||||||
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives).
|
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives).
|
||||||
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent<SkeletonRenderer>() will be called as a fallback.
|
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent(SkeletonRenderer)() will be called as a fallback.
|
||||||
/// </param>
|
/// </param>
|
||||||
public SpinePathConstraint(string startsWith = "", string dataField = "", bool includeNone = true) {
|
public SpinePathConstraint (string startsWith = "", string dataField = "", bool includeNone = true, bool fallbackToTextField = false) {
|
||||||
this.startsWith = startsWith;
|
this.startsWith = startsWith;
|
||||||
this.dataField = dataField;
|
this.dataField = dataField;
|
||||||
this.includeNone = includeNone;
|
this.includeNone = includeNone;
|
||||||
|
this.fallbackToTextField = fallbackToTextField;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,14 +129,16 @@ namespace Spine.Unity {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="startsWith">Filters popup results to elements that begin with supplied string.</param>
|
/// <param name="startsWith">Filters popup results to elements that begin with supplied string.</param>
|
||||||
/// <param name = "includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
/// <param name = "includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
||||||
|
/// <param name = "fallbackToTextField">If true, and an animation list source can't be found, the field will fall back to a normal text field. If false, it will show an error.</param>
|
||||||
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
||||||
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives).
|
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives).
|
||||||
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent<SkeletonRenderer>() will be called as a fallback.
|
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent<SkeletonRenderer>() will be called as a fallback.
|
||||||
/// </param>
|
/// </param>
|
||||||
public SpineTransformConstraint(string startsWith = "", string dataField = "", bool includeNone = true) {
|
public SpineTransformConstraint (string startsWith = "", string dataField = "", bool includeNone = true, bool fallbackToTextField = false) {
|
||||||
this.startsWith = startsWith;
|
this.startsWith = startsWith;
|
||||||
this.dataField = dataField;
|
this.dataField = dataField;
|
||||||
this.includeNone = includeNone;
|
this.includeNone = includeNone;
|
||||||
|
this.fallbackToTextField = fallbackToTextField;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,14 +148,16 @@ namespace Spine.Unity {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="startsWith">Filters popup results to elements that begin with supplied string.</param>
|
/// <param name="startsWith">Filters popup results to elements that begin with supplied string.</param>
|
||||||
/// <param name = "includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
/// <param name = "includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
||||||
|
/// <param name = "fallbackToTextField">If true, and an animation list source can't be found, the field will fall back to a normal text field. If false, it will show an error.</param>
|
||||||
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
||||||
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives)
|
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives)
|
||||||
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent<SkeletonRenderer>() will be called as a fallback.
|
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent<SkeletonRenderer>() will be called as a fallback.
|
||||||
/// </param>
|
/// </param>
|
||||||
public SpineSkin(string startsWith = "", string dataField = "", bool includeNone = true) {
|
public SpineSkin (string startsWith = "", string dataField = "", bool includeNone = true, bool fallbackToTextField = false) {
|
||||||
this.startsWith = startsWith;
|
this.startsWith = startsWith;
|
||||||
this.dataField = dataField;
|
this.dataField = dataField;
|
||||||
this.includeNone = includeNone;
|
this.includeNone = includeNone;
|
||||||
|
this.fallbackToTextField = fallbackToTextField;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class SpineAnimation : SpineAttributeBase {
|
public class SpineAnimation : SpineAttributeBase {
|
||||||
@ -153,15 +165,17 @@ namespace Spine.Unity {
|
|||||||
/// Smart popup menu for Spine Animations
|
/// Smart popup menu for Spine Animations
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="startsWith">Filters popup results to elements that begin with supplied string.</param>
|
/// <param name="startsWith">Filters popup results to elements that begin with supplied string.</param>
|
||||||
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
/// <param name = "fallbackToTextField">If true, and an animation list source can't be found, the field will fall back to a normal text field. If false, it will show an error.</param>
|
||||||
/// <param name="includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
/// <param name="includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
||||||
|
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
||||||
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives)
|
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives)
|
||||||
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent<SkeletonRenderer>() will be called as a fallback.
|
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent<SkeletonRenderer>() will be called as a fallback.
|
||||||
/// </param>
|
/// </param>
|
||||||
public SpineAnimation(string startsWith = "", string dataField = "", bool includeNone = true) {
|
public SpineAnimation (string startsWith = "", string dataField = "", bool includeNone = true, bool fallbackToTextField = false) {
|
||||||
this.startsWith = startsWith;
|
this.startsWith = startsWith;
|
||||||
this.dataField = dataField;
|
this.dataField = dataField;
|
||||||
this.includeNone = includeNone;
|
this.includeNone = includeNone;
|
||||||
|
this.fallbackToTextField = fallbackToTextField;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,11 +195,12 @@ namespace Spine.Unity {
|
|||||||
/// <param name="slotField">If specified, a locally scoped field with the name supplied by in slotField will be used to limit the popup results to children of a named slot</param>
|
/// <param name="slotField">If specified, a locally scoped field with the name supplied by in slotField will be used to limit the popup results to children of a named slot</param>
|
||||||
/// <param name="skinField">If specified, a locally scoped field with the name supplied by in skinField will be used to limit the popup results to entries of the named skin</param>
|
/// <param name="skinField">If specified, a locally scoped field with the name supplied by in skinField will be used to limit the popup results to entries of the named skin</param>
|
||||||
/// <param name="includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
/// <param name="includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
||||||
|
/// <param name = "fallbackToTextField">If true, and an animation list source can't be found, the field will fall back to a normal text field. If false, it will show an error.</param>
|
||||||
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
||||||
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives)
|
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives)
|
||||||
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent<SkeletonRenderer>() will be called as a fallback.
|
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent<SkeletonRenderer>() will be called as a fallback.
|
||||||
/// </param>
|
/// </param>
|
||||||
public SpineAttachment (bool currentSkinOnly = true, bool returnAttachmentPath = false, bool placeholdersOnly = false, string slotField = "", string dataField = "", string skinField = "", bool includeNone = true) {
|
public SpineAttachment (bool currentSkinOnly = true, bool returnAttachmentPath = false, bool placeholdersOnly = false, string slotField = "", string dataField = "", string skinField = "", bool includeNone = true, bool fallbackToTextField = false) {
|
||||||
this.currentSkinOnly = currentSkinOnly;
|
this.currentSkinOnly = currentSkinOnly;
|
||||||
this.returnAttachmentPath = returnAttachmentPath;
|
this.returnAttachmentPath = returnAttachmentPath;
|
||||||
this.placeholdersOnly = placeholdersOnly;
|
this.placeholdersOnly = placeholdersOnly;
|
||||||
@ -193,6 +208,7 @@ namespace Spine.Unity {
|
|||||||
this.dataField = dataField;
|
this.dataField = dataField;
|
||||||
this.skinField = skinField;
|
this.skinField = skinField;
|
||||||
this.includeNone = includeNone;
|
this.includeNone = includeNone;
|
||||||
|
this.fallbackToTextField = fallbackToTextField;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SpineAttachment.Hierarchy GetHierarchy (string fullPath) {
|
public static SpineAttachment.Hierarchy GetHierarchy (string fullPath) {
|
||||||
@ -241,15 +257,17 @@ namespace Spine.Unity {
|
|||||||
/// Smart popup menu for Spine Bones
|
/// Smart popup menu for Spine Bones
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="startsWith">Filters popup results to elements that begin with supplied string.</param>
|
/// <param name="startsWith">Filters popup results to elements that begin with supplied string.</param>
|
||||||
/// /// <param name="includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
/// <param name="includeNone">If true, the dropdown list will include a "none" option which stored as an empty string.</param>
|
||||||
|
/// <param name = "fallbackToTextField">If true, and an animation list source can't be found, the field will fall back to a normal text field. If false, it will show an error.</param>
|
||||||
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
/// <param name="dataField">If specified, a locally scoped field with the name supplied by in dataField will be used to fill the popup results.
|
||||||
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives)
|
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives)
|
||||||
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent<SkeletonRenderer>() will be called as a fallback.
|
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent<SkeletonRenderer>() will be called as a fallback.
|
||||||
/// </param>
|
/// </param>
|
||||||
public SpineBone(string startsWith = "", string dataField = "", bool includeNone = true) {
|
public SpineBone (string startsWith = "", string dataField = "", bool includeNone = true, bool fallbackToTextField = false) {
|
||||||
this.startsWith = startsWith;
|
this.startsWith = startsWith;
|
||||||
this.dataField = dataField;
|
this.dataField = dataField;
|
||||||
this.includeNone = includeNone;
|
this.includeNone = includeNone;
|
||||||
|
this.fallbackToTextField = fallbackToTextField;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Spine.Bone GetBone(string boneName, SkeletonRenderer renderer) {
|
public static Spine.Bone GetBone(string boneName, SkeletonRenderer renderer) {
|
||||||
@ -265,7 +283,7 @@ namespace Spine.Unity {
|
|||||||
public class SpineAtlasRegion : PropertyAttribute {
|
public class SpineAtlasRegion : PropertyAttribute {
|
||||||
public string atlasAssetField;
|
public string atlasAssetField;
|
||||||
|
|
||||||
public SpineAtlasRegion(string atlasAssetField = "") {
|
public SpineAtlasRegion (string atlasAssetField = "") {
|
||||||
this.atlasAssetField = atlasAssetField;
|
this.atlasAssetField = atlasAssetField;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user