diff --git a/spine-c/spine-c/src/spine/SkeletonJson.c b/spine-c/spine-c/src/spine/SkeletonJson.c index bb75cca90..c0a0aa8fd 100644 --- a/spine-c/spine-c/src/spine/SkeletonJson.c +++ b/spine-c/spine-c/src/spine/SkeletonJson.c @@ -1202,6 +1202,7 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char data->offsetScaleY = Json_getFloat(constraintMap, "scaleY", 0); data->offsetShearY = Json_getFloat(constraintMap, "shearY", 0); + data->mixRotate = Json_getFloat(constraintMap, "mixRotate", 1); data->mixX = Json_getFloat(constraintMap, "mixX", 1); data->mixY = Json_getFloat(constraintMap, "mixY", data->mixX); data->mixScaleX = Json_getFloat(constraintMap, "mixScaleX", 1); diff --git a/spine-ts/spine-player/example/example.html b/spine-ts/spine-player/example/example.html index b0834b019..4f88a86f1 100644 --- a/spine-ts/spine-player/example/example.html +++ b/spine-ts/spine-player/example/example.html @@ -22,7 +22,9 @@ + + diff --git a/spine-ts/spine-player/src/Player.ts b/spine-ts/spine-player/src/Player.ts index 43e0dbb5e..37474cf32 100644 --- a/spine-ts/spine-player/src/Player.ts +++ b/spine-ts/spine-player/src/Player.ts @@ -114,6 +114,9 @@ export interface SpinePlayerConfig { backgroundColor alpha is < ff. Default: false */ alpha?: boolean + /* Optional: Whether to preserve the drawing buffer. This is needed if you want to take a screenshot via canvas.getDataURL(), Default: false */ + preserveDrawingBuffer: boolean + /* Optional: The canvas background color, given in the format #rrggbb or #rrggbbaa. Default: #000000ff (black) or when alpha is true #00000000 (transparent) */ backgroundColor?: string @@ -283,6 +286,7 @@ export class SpinePlayer implements Disposable { if (!config.fullScreenBackgroundColor) config.fullScreenBackgroundColor = config.backgroundColor; if (config.backgroundImage && !config.backgroundImage.url) config.backgroundImage = undefined; if (config.premultipliedAlpha === void 0) config.premultipliedAlpha = true; + if (config.preserveDrawingBuffer === void 0) config.preserveDrawingBuffer = false; if (config.mipmaps === void 0) config.mipmaps = true; if (!config.debug) config.debug = { bones: false, @@ -319,7 +323,7 @@ export class SpinePlayer implements Disposable { try { // Setup the OpenGL context. this.canvas = findWithClass(dom, "spine-player-canvas") as HTMLCanvasElement; - this.context = new ManagedWebGLRenderingContext(this.canvas, { alpha: config.alpha }); + this.context = new ManagedWebGLRenderingContext(this.canvas, { alpha: config.alpha, preserveDrawingBuffer: config.preserveDrawingBuffer }); // Setup the scene renderer and loading screen. this.sceneRenderer = new SceneRenderer(this.canvas, this.context, true); diff --git a/spine-unity/Assets/Spine Examples/Getting Started/4 Object Oriented Sample.unity b/spine-unity/Assets/Spine Examples/Getting Started/4 Object Oriented Sample.unity index 919ac22f6..3a46c70cf 100644 --- a/spine-unity/Assets/Spine Examples/Getting Started/4 Object Oriented Sample.unity +++ b/spine-unity/Assets/Spine Examples/Getting Started/4 Object Oriented Sample.unity @@ -193,7 +193,7 @@ TextMesh: m_Text: 'Enter PLAY MODE in Unity to see Spineboy animate. Try moving, jumping, aiming and shooting. (WASD+Spacebar+Left&Right Click, or - XBOX Controller)' + Gamepad)' m_OffsetZ: 0 m_CharacterSize: 0.12 m_LineSpacing: 1 diff --git a/spine-unity/Assets/Spine Examples/Getting Started/5 Basic Platformer.unity b/spine-unity/Assets/Spine Examples/Getting Started/5 Basic Platformer.unity index 685e4bc01..35d8ee44d 100644 --- a/spine-unity/Assets/Spine Examples/Getting Started/5 Basic Platformer.unity +++ b/spine-unity/Assets/Spine Examples/Getting Started/5 Basic Platformer.unity @@ -873,7 +873,7 @@ TextMesh: m_GameObject: {fileID: 522034802} m_Text: 'Enter PLAY MODE in Unity to see bearded hero guy animate. - Try moving and jumping. (WASD+Spacebar, or XBOX Controller)' + Try moving and jumping. (WASD+Spacebar, or Gamepad)' m_OffsetZ: 0 m_CharacterSize: 0.1 m_LineSpacing: 1 diff --git a/spine-unity/Assets/Spine Examples/Other Examples/SkeletonUtility Platformer HingeChain Physics.unity b/spine-unity/Assets/Spine Examples/Other Examples/SkeletonUtility Platformer HingeChain Physics.unity index cd97cdc6c..6b3a44201 100644 --- a/spine-unity/Assets/Spine Examples/Other Examples/SkeletonUtility Platformer HingeChain Physics.unity +++ b/spine-unity/Assets/Spine Examples/Other Examples/SkeletonUtility Platformer HingeChain Physics.unity @@ -1421,7 +1421,7 @@ TextMesh: animated via physics. - Try moving and jumping. (WASD+Spacebar, or XBOX Controller)' + Try moving and jumping. (WASD+Spacebar, or Gamepad)' m_OffsetZ: 0 m_CharacterSize: 0.1 m_LineSpacing: 1 diff --git a/spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineboyBeginnerView.cs b/spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineboyBeginnerView.cs index a0fbff024..0c0e61fcc 100644 --- a/spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineboyBeginnerView.cs +++ b/spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineboyBeginnerView.cs @@ -126,15 +126,13 @@ namespace Spine.Unity.Examples { var shootTrack = skeletonAnimation.AnimationState.SetAnimation(1, shoot, false); shootTrack.AttachmentThreshold = 1f; shootTrack.MixDuration = 0f; - var empty1 = skeletonAnimation.state.AddEmptyAnimation(1, 0.5f, 0.1f); - empty1.AttachmentThreshold = 1f; + skeletonAnimation.state.AddEmptyAnimation(1, 0.5f, 0.1f); // Play the aim animation on track 2 to aim at the mouse target. var aimTrack = skeletonAnimation.AnimationState.SetAnimation(2, aim, false); aimTrack.AttachmentThreshold = 1f; aimTrack.MixDuration = 0f; - var empty2 = skeletonAnimation.state.AddEmptyAnimation(2, 0.5f, 0.1f); - empty2.AttachmentThreshold = 1f; + skeletonAnimation.state.AddEmptyAnimation(2, 0.5f, 0.1f); gunSource.pitch = GetRandomPitch(gunsoundPitchOffset); gunSource.Play(); @@ -150,8 +148,7 @@ namespace Spine.Unity.Examples { } public void StopPlayingAim () { - var empty2 = skeletonAnimation.state.AddEmptyAnimation(2, 0.5f, 0.1f); - empty2.AttachmentThreshold = 1f; + skeletonAnimation.state.AddEmptyAnimation(2, 0.5f, 0.1f); } public void Turn (bool facingLeft) { diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs index db0a0112e..8b68b516d 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs @@ -620,22 +620,28 @@ namespace Spine.Unity.Editor { pageName = "Material"; string materialPath = assetPath + "/" + primaryName + "_" + pageName + ".mat"; - Material mat = (Material)AssetDatabase.LoadAssetAtPath(materialPath, typeof(Material)); + Material material = (Material)AssetDatabase.LoadAssetAtPath(materialPath, typeof(Material)); - if (mat == null) { - mat = new Material(Shader.Find(SpineEditorUtilities.Preferences.defaultShader)); - ApplyPMAOrStraightAlphaSettings(mat, SpineEditorUtilities.Preferences.textureSettingsReference); - AssetDatabase.CreateAsset(mat, materialPath); + if (material == null) { + Shader defaultShader = Shader.Find(SpineEditorUtilities.Preferences.DefaultShader); + material = defaultShader != null ? new Material(defaultShader) : null; + if (material) { + ApplyPMAOrStraightAlphaSettings(material, SpineEditorUtilities.Preferences.textureSettingsReference); + if (texture != null) + material.mainTexture = texture; + AssetDatabase.CreateAsset(material, materialPath); + } } else { - vestigialMaterials.Remove(mat); + vestigialMaterials.Remove(material); + if (texture != null) + material.mainTexture = texture; + EditorUtility.SetDirty(material); + // note: don't call AssetDatabase.SaveAssets() since this would trigger OnPostprocessAllAssets() every time unnecessarily. } - if (texture != null) - mat.mainTexture = texture; - - EditorUtility.SetDirty(mat); - // note: don't call AssetDatabase.SaveAssets() since this would trigger OnPostprocessAllAssets() every time unnecessarily. - populatingMaterials.Add(mat); //atlasAsset.materials[i] = mat; + if (material != null) { + populatingMaterials.Add(material); + } } atlasAsset.materials = populatingMaterials.ToArray(); diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/Instantiation.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/Instantiation.cs index 2da3bbcbf..06e675785 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/Instantiation.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/Instantiation.cs @@ -48,6 +48,7 @@ namespace Spine.Unity.Editor { public struct SpawnMenuData { public Vector3 spawnPoint; public Transform parent; + public int siblingIndex; public SkeletonDataAsset skeletonDataAsset; public EditorInstantiation.InstantiateDelegate instantiateDelegate; public bool isUI; @@ -82,7 +83,7 @@ namespace Spine.Unity.Editor { RectTransform rectTransform = (Selection.activeGameObject == null) ? null : Selection.activeGameObject.GetComponent(); Plane plane = (rectTransform == null) ? new Plane(Vector3.back, Vector3.zero) : new Plane(-rectTransform.forward, rectTransform.position); Vector3 spawnPoint = MousePointToWorldPoint2D(mousePos, sceneview.camera, plane); - ShowInstantiateContextMenu(skeletonDataAsset, spawnPoint, null); + ShowInstantiateContextMenu(skeletonDataAsset, spawnPoint, null, 0); DragAndDrop.AcceptDrag(); current.Use(); } @@ -91,7 +92,8 @@ namespace Spine.Unity.Editor { } } - public static void ShowInstantiateContextMenu (SkeletonDataAsset skeletonDataAsset, Vector3 spawnPoint, Transform parent) { + public static void ShowInstantiateContextMenu (SkeletonDataAsset skeletonDataAsset, Vector3 spawnPoint, + Transform parent, int siblingIndex = 0) { var menu = new GenericMenu(); // SkeletonAnimation @@ -99,6 +101,7 @@ namespace Spine.Unity.Editor { skeletonDataAsset = skeletonDataAsset, spawnPoint = spawnPoint, parent = parent, + siblingIndex = siblingIndex, instantiateDelegate = (data) => EditorInstantiation.InstantiateSkeletonAnimation(data), isUI = false }); @@ -112,6 +115,7 @@ namespace Spine.Unity.Editor { skeletonDataAsset = skeletonDataAsset, spawnPoint = spawnPoint, parent = parent, + siblingIndex = siblingIndex, instantiateDelegate = System.Delegate.CreateDelegate(typeof(EditorInstantiation.InstantiateDelegate), graphicInstantiateDelegate) as EditorInstantiation.InstantiateDelegate, isUI = true }); @@ -124,6 +128,7 @@ namespace Spine.Unity.Editor { skeletonDataAsset = skeletonDataAsset, spawnPoint = spawnPoint, parent = parent, + siblingIndex = siblingIndex, instantiateDelegate = (data) => EditorInstantiation.InstantiateSkeletonMecanim(data), isUI = false }); @@ -149,6 +154,8 @@ namespace Spine.Unity.Editor { var usedParent = data.parent != null ? data.parent.gameObject : isUI ? Selection.activeGameObject : null; if (usedParent) newTransform.SetParent(usedParent.transform, false); + if (data.siblingIndex != 0) + newTransform.SetSiblingIndex(data.siblingIndex); newTransform.position = isUI ? data.spawnPoint : RoundVector(data.spawnPoint, 2); diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/Preferences.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/Preferences.cs index 458355d6f..2ba3acf23 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/Preferences.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/Preferences.cs @@ -56,16 +56,12 @@ namespace Spine.Unity.Editor { public partial class SpineEditorUtilities { #if NEW_PREFERENCES_SETTINGS_PROVIDER - static class SpineSettingsProviderRegistration - { + static class SpineSettingsProviderRegistration { [SettingsProvider] - public static SettingsProvider CreateSpineSettingsProvider() - { - var provider = new SettingsProvider("Spine", SettingsScope.User) - { + public static SettingsProvider CreateSpineSettingsProvider () { + var provider = new SettingsProvider("Spine", SettingsScope.User) { label = "Spine", - guiHandler = (searchContext) => - { + guiHandler = (searchContext) => { var settings = SpinePreferences.GetOrCreateSettings(); var serializedSettings = new SerializedObject(settings); SpinePreferences.HandlePreferencesGUI(serializedSettings); @@ -108,6 +104,10 @@ namespace Spine.Unity.Editor { const string DEFAULT_SHADER_KEY = "SPINE_DEFAULT_SHADER"; public static string defaultShader = SpinePreferences.DEFAULT_DEFAULT_SHADER; + public static string DefaultShader { + get { return !string.IsNullOrEmpty(defaultShader) ? defaultShader : SpinePreferences.DEFAULT_DEFAULT_SHADER; } + set { defaultShader = value; } + } const string DEFAULT_ZSPACING_KEY = "SPINE_DEFAULT_ZSPACING"; public static float defaultZSpacing = SpinePreferences.DEFAULT_DEFAULT_ZSPACING; @@ -201,7 +201,7 @@ namespace Spine.Unity.Editor { } #if NEW_PREFERENCES_SETTINGS_PROVIDER - public static void CopyOldToNewPreferences(ref SpinePreferences newPreferences) { + public static void CopyOldToNewPreferences (ref SpinePreferences newPreferences) { newPreferences.defaultMix = EditorPrefs.GetFloat(DEFAULT_MIX_KEY, SpinePreferences.DEFAULT_DEFAULT_MIX); newPreferences.defaultScale = EditorPrefs.GetFloat(DEFAULT_SCALE_KEY, SpinePreferences.DEFAULT_DEFAULT_SCALE); newPreferences.defaultZSpacing = EditorPrefs.GetFloat(DEFAULT_ZSPACING_KEY, SpinePreferences.DEFAULT_DEFAULT_ZSPACING); @@ -218,7 +218,7 @@ namespace Spine.Unity.Editor { newPreferences.handleScale = EditorPrefs.GetFloat(SCENE_ICONS_SCALE_KEY, SpinePreferences.DEFAULT_SCENE_ICONS_SCALE); } - public static void SaveToEditorPrefs(SpinePreferences preferences) { + public static void SaveToEditorPrefs (SpinePreferences preferences) { EditorPrefs.SetFloat(DEFAULT_MIX_KEY, preferences.defaultMix); EditorPrefs.SetFloat(DEFAULT_SCALE_KEY, preferences.defaultScale); EditorPrefs.SetFloat(DEFAULT_ZSPACING_KEY, preferences.defaultZSpacing); diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs index ad0f488f4..cbaffaa51 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs @@ -194,9 +194,13 @@ namespace Spine.Unity.Editor { SceneView.onSceneGUIDelegate += DragAndDropInstantiation.SceneViewDragAndDrop; #endif +#if UNITY_2021_2_OR_NEWER + DragAndDrop.RemoveDropHandler(HierarchyHandler.HandleDragAndDrop); + DragAndDrop.AddDropHandler(HierarchyHandler.HandleDragAndDrop); +#else EditorApplication.hierarchyWindowItemOnGUI -= HierarchyHandler.HandleDragAndDrop; EditorApplication.hierarchyWindowItemOnGUI += HierarchyHandler.HandleDragAndDrop; - +#endif // Hierarchy Icons #if NEWPLAYMODECALLBACKS EditorApplication.playModeStateChanged -= HierarchyHandler.IconsOnPlaymodeStateChanged; @@ -440,6 +444,32 @@ namespace Spine.Unity.Editor { } } +#if UNITY_2021_2_OR_NEWER + internal static DragAndDropVisualMode HandleDragAndDrop (int dropTargetInstanceID, HierarchyDropFlags dropMode, Transform parentForDraggedObjects, bool perform) { + SkeletonDataAsset skeletonDataAsset = DragAndDrop.objectReferences.Length == 0 ? null : + DragAndDrop.objectReferences[0] as SkeletonDataAsset; + if (skeletonDataAsset == null) + return DragAndDropVisualMode.None; + if (!perform) + return DragAndDropVisualMode.Copy; + + GameObject dropTargetObject = UnityEditor.EditorUtility.InstanceIDToObject(dropTargetInstanceID) as GameObject; + Transform dropTarget = dropTargetObject != null ? dropTargetObject.transform : null; + Transform parent = dropTarget; + int siblingIndex = 0; + if (parent != null) { + if (dropMode == HierarchyDropFlags.DropBetween) { + parent = dropTarget.parent; + siblingIndex = dropTarget ? dropTarget.GetSiblingIndex() + 1 : 0; + } else if (dropMode == HierarchyDropFlags.DropAbove) { + parent = dropTarget.parent; + siblingIndex = dropTarget ? dropTarget.GetSiblingIndex() : 0; + } + } + DragAndDropInstantiation.ShowInstantiateContextMenu(skeletonDataAsset, Vector3.zero, parent, siblingIndex); + return DragAndDropVisualMode.Copy; + } +#else internal static void HandleDragAndDrop (int instanceId, Rect selectionRect) { // HACK: Uses EditorApplication.hierarchyWindowItemOnGUI. // Only works when there is at least one item in the scene. @@ -475,7 +505,7 @@ namespace Spine.Unity.Editor { // when dragging into empty space in hierarchy below last node, last node would be parent. if (IsLastNodeInHierarchy(parent)) parent = null; - DragAndDropInstantiation.ShowInstantiateContextMenu(skeletonDataAsset, Vector3.zero, parent); + DragAndDropInstantiation.ShowInstantiateContextMenu(skeletonDataAsset, Vector3.zero, parent, 0); UnityEditor.DragAndDrop.AcceptDrag(); current.Use(); return; @@ -501,6 +531,7 @@ namespace Spine.Unity.Editor { bool isLastNode = (rootNodes.Length > 0 && rootNodes[rootNodes.Length - 1].transform == node); return isLastNode; } +#endif } } diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpinePreferences.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpinePreferences.cs index 1b78cdebc..fb2cb5bf4 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpinePreferences.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Windows/SpinePreferences.cs @@ -66,6 +66,10 @@ namespace Spine.Unity.Editor { internal const string DEFAULT_DEFAULT_SHADER = "Spine/Skeleton"; public string defaultShader = DEFAULT_DEFAULT_SHADER; + public string DefaultShader { + get { return !string.IsNullOrEmpty(defaultShader) ? defaultShader : DEFAULT_DEFAULT_SHADER; } + set { defaultShader = value; } + } internal const float DEFAULT_DEFAULT_ZSPACING = 0f; public float defaultZSpacing = DEFAULT_DEFAULT_ZSPACING; diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRendererCustomMaterials/SkeletonRendererCustomMaterials.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRendererCustomMaterials/SkeletonRendererCustomMaterials.cs index b79b1cce1..9c6d445db 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRendererCustomMaterials/SkeletonRendererCustomMaterials.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRendererCustomMaterials/SkeletonRendererCustomMaterials.cs @@ -90,7 +90,8 @@ namespace Spine.Unity { continue; Slot slotObject = skeletonRenderer.skeleton.FindSlot(slotMaterialOverride.slotName); - skeletonRenderer.CustomSlotMaterials[slotObject] = slotMaterialOverride.material; + if (slotObject != null) + skeletonRenderer.CustomSlotMaterials[slotObject] = slotMaterialOverride.material; } } @@ -106,7 +107,8 @@ namespace Spine.Unity { continue; Slot slotObject = skeletonRenderer.skeleton.FindSlot(slotMaterialOverride.slotName); - + if (slotObject == null) + continue; Material currentMaterial; if (!skeletonRenderer.CustomSlotMaterials.TryGetValue(slotObject, out currentMaterial)) continue; diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/SkeletonDataModifierAssets/BlendModeMaterials/SkeletonStraightAdditive.mat b/spine-unity/Assets/Spine/Runtime/spine-unity/SkeletonDataModifierAssets/BlendModeMaterials/SkeletonStraightAdditive.mat index f40488ba7..42aa41d38 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/SkeletonDataModifierAssets/BlendModeMaterials/SkeletonStraightAdditive.mat +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/SkeletonDataModifierAssets/BlendModeMaterials/SkeletonStraightAdditive.mat @@ -6,9 +6,9 @@ Material: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_Name: SkeletonPMAAdditive + m_Name: SkeletonStraightAdditive m_Shader: {fileID: 4800000, guid: 53efa1d97f5d9f74285d4330cda14e36, type: 3} - m_ShaderKeywords: + m_ShaderKeywords: _STRAIGHT_ALPHA_INPUT m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -29,7 +29,16 @@ Material: m_Floats: - : 0 - _Cutoff: 0.1 - - _StraightAlphaInput: 0 + - _OutlineMipLevel: 0 + - _OutlineReferenceTexWidth: 1024 + - _OutlineSmoothness: 1 + - _OutlineWidth: 3 + - _StencilComp: 8 + - _StencilRef: 1 + - _StraightAlphaInput: 1 + - _ThresholdEnd: 0.25 + - _Use8Neighbourhood: 1 m_Colors: - : {r: 0, g: 2.018574, b: 1e-45, a: 0.000007110106} - _Color: {r: 1, g: 1, b: 1, a: 1} + - _OutlineColor: {r: 1, g: 1, b: 0, a: 1} diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/SkeletonDataModifierAssets/BlendModeMaterials/SkeletonStraightMultiply.mat b/spine-unity/Assets/Spine/Runtime/spine-unity/SkeletonDataModifierAssets/BlendModeMaterials/SkeletonStraightMultiply.mat index 28c90c143..cf62057cc 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/SkeletonDataModifierAssets/BlendModeMaterials/SkeletonStraightMultiply.mat +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/SkeletonDataModifierAssets/BlendModeMaterials/SkeletonStraightMultiply.mat @@ -6,38 +6,39 @@ Material: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_Name: SkeletonPMAMultiply + m_Name: SkeletonStraightMultiply m_Shader: {fileID: 4800000, guid: 8bdcdc7ee298e594a9c20c61d25c33b6, type: 3} - m_ShaderKeywords: + m_ShaderKeywords: _STRAIGHT_ALPHA_INPUT m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} + disabledShaderPasses: [] m_SavedProperties: - serializedVersion: 2 + serializedVersion: 3 m_TexEnvs: - - first: - name: - second: + - : m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - first: - name: _MainTex - second: + - _MainTex: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} m_Floats: - - first: - name: - second: 0 - - first: - name: _Cutoff - second: 0.1 + - : 0 + - _Cutoff: 0.1 + - _OutlineMipLevel: 0 + - _OutlineReferenceTexWidth: 1024 + - _OutlineSmoothness: 1 + - _OutlineWidth: 3 + - _StencilComp: 8 + - _StencilRef: 1 + - _StraightAlphaInput: 1 + - _ThresholdEnd: 0.25 + - _Use8Neighbourhood: 1 m_Colors: - - first: - name: - second: {r: 0, g: 2.018574, b: 1e-45, a: 0.000007110106} - - first: - name: _Color - second: {r: 1, g: 1, b: 1, a: 1} + - : {r: 0, g: 2.018574, b: 1e-45, a: 0.000007110106} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _OutlineColor: {r: 1, g: 1, b: 0, a: 1} diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/SkeletonDataModifierAssets/BlendModeMaterials/SkeletonStraightScreen.mat b/spine-unity/Assets/Spine/Runtime/spine-unity/SkeletonDataModifierAssets/BlendModeMaterials/SkeletonStraightScreen.mat index 601f987ed..60200fdd7 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/SkeletonDataModifierAssets/BlendModeMaterials/SkeletonStraightScreen.mat +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/SkeletonDataModifierAssets/BlendModeMaterials/SkeletonStraightScreen.mat @@ -6,38 +6,39 @@ Material: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_Name: SkeletonPMAScreen + m_Name: SkeletonStraightScreen m_Shader: {fileID: 4800000, guid: 4e8caa36c07aacf4ab270da00784e4d9, type: 3} - m_ShaderKeywords: + m_ShaderKeywords: _STRAIGHT_ALPHA_INPUT m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} + disabledShaderPasses: [] m_SavedProperties: - serializedVersion: 2 + serializedVersion: 3 m_TexEnvs: - - first: - name: - second: + - : m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - first: - name: _MainTex - second: + - _MainTex: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} m_Floats: - - first: - name: - second: 0 - - first: - name: _Cutoff - second: 0.1 + - : 0 + - _Cutoff: 0.1 + - _OutlineMipLevel: 0 + - _OutlineReferenceTexWidth: 1024 + - _OutlineSmoothness: 1 + - _OutlineWidth: 3 + - _StencilComp: 8 + - _StencilRef: 1 + - _StraightAlphaInput: 1 + - _ThresholdEnd: 0.25 + - _Use8Neighbourhood: 1 m_Colors: - - first: - name: - second: {r: 0, g: 2.018574, b: 1e-45, a: 0.000007121922} - - first: - name: _Color - second: {r: 1, g: 1, b: 1, a: 1} + - : {r: 0, g: 2.018574, b: 1e-45, a: 0.000007121922} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _OutlineColor: {r: 1, g: 1, b: 0, a: 1} diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Examples/2D/Example 2D URP Asset.asset b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Examples/2D/Example 2D URP Asset.asset index 778ebcfba..61a197342 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Examples/2D/Example 2D URP Asset.asset +++ b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Examples/2D/Example 2D URP Asset.asset @@ -10,7 +10,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} - m_Name: Demo 2D URP Asset + m_Name: Example 2D URP Asset m_EditorClassIdentifier: k_AssetVersion: 5 k_AssetPreviousVersion: 5 diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Examples/2D/Example 2D URP Renderer Data.asset b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Examples/2D/Example 2D URP Renderer Data.asset index 807b17a74..4102af777 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Examples/2D/Example 2D URP Renderer Data.asset +++ b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Examples/2D/Example 2D URP Renderer Data.asset @@ -10,7 +10,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 11145981673336645838492a2d98e247, type: 3} - m_Name: Demo 2D URP Renderer Data + m_Name: Example 2D URP Renderer Data m_EditorClassIdentifier: m_RendererFeatures: [] m_HDREmulationScale: 1 diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Examples/3D/Example URP Asset.asset b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Examples/3D/Example URP Asset.asset index 4cb3b67fe..2e16a17a2 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Examples/3D/Example URP Asset.asset +++ b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Examples/3D/Example URP Asset.asset @@ -10,7 +10,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} - m_Name: Demo URP Asset + m_Name: Example URP Asset m_EditorClassIdentifier: k_AssetVersion: 5 k_AssetPreviousVersion: 5 diff --git a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Examples/3D/Example URP Asset_Renderer.asset b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Examples/3D/Example URP Asset_Renderer.asset index d8cfbdf57..f77fda628 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Examples/3D/Example URP Asset_Renderer.asset +++ b/spine-unity/Modules/com.esotericsoftware.spine.urp-shaders/Examples/3D/Example URP Asset_Renderer.asset @@ -10,7 +10,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} - m_Name: Demo URP Asset_Renderer + m_Name: Example URP Asset_Renderer m_EditorClassIdentifier: m_RendererFeatures: [] postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}