[unity] Added Physics Constraints example scene.

This commit is contained in:
Harald Csaszar 2024-01-26 19:40:57 +01:00
parent b5f6e8066f
commit 06a15e865a
22 changed files with 8426 additions and 1 deletions

View File

@ -54,6 +54,7 @@
* URP Shaders: Added URP "Blend Mode" shader variants for both URP 3D and URP 2D renderers. They are listed under shader name "Universal Render Pipeline/Spine/Blend Modes/" and "Universal Render Pipeline/2D/Spine/Blend Modes/" respectively.
* URP Shaders: Added support for [Tint Black](http://en.esotericsoftware.com/spine-slots#Tint-black) functionality at "Blend Modes" Spine URP shaders (2D and 3D shaders).
* PhysicsConstraints: Skeleton GameObjects now automatically apply Transform translation and rotation to the skeleton's `PhysicsConstraints`. You can disable applying translation or rotation at the Skeleton component Inspector under `Advanced - Physics Constraints` `Transform Translation` and `Transform Rotation`, or by setting the properties `applyTranslationToPhysics` and `applyRotationToPhysics` at the skeleton component via code.
* Added `Physics Constraints` example scene (located in `Spine Examples/Other Examples`) together with `celestial-circus` example skeleton assets. This scene demonstrates Transform movement automatically affecting physics constraints of a skeleton.
* **Breaking changes**
* Changed `SpineShaderWithOutlineGUI` outline related methods from `private` to `protected virtual` to allow for custom shader GUI subclasses to switch to different outline shaders.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e08ce2e2ca315ea4a8e8d3a90681a14c
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,170 @@
celestial-circus-pma.png
size: 1024, 1024
filter: Linear, Linear
pma: true
scale: 0.5
arm-back-down
bounds: 944, 3, 48, 103
arm-front-down
bounds: 241, 56, 45, 98
bench
bounds: 2, 94, 237, 60
body-bottom
bounds: 674, 8, 193, 156
rotate: 90
collar
bounds: 822, 352, 59, 33
ear
bounds: 997, 185, 25, 35
eye-back-shadow
bounds: 1004, 978, 18, 12
eye-front-shadow
bounds: 1004, 992, 30, 18
rotate: 90
eye-reflex-back
bounds: 822, 341, 10, 9
eye-reflex-front
bounds: 525, 699, 13, 9
rotate: 90
eye-white-back
bounds: 956, 963, 16, 20
eye-white-front
bounds: 551, 179, 28, 22
eyelashes-down-back
bounds: 980, 325, 14, 7
rotate: 90
eyelashes-down-front
bounds: 979, 1003, 19, 8
rotate: 90
eyelashes-top-back
bounds: 997, 118, 23, 12
rotate: 90
eyelashes-top-front
bounds: 956, 985, 37, 21
rotate: 90
feathers-front
bounds: 2, 2, 90, 108
rotate: 90
fringe-middle-back
bounds: 980, 222, 42, 65
fringe-side-back
bounds: 944, 222, 34, 117
fringe-side-front
bounds: 989, 289, 33, 116
hair-back-1
bounds: 289, 2, 166, 383
rotate: 90
hair-back-2
bounds: 887, 341, 100, 356
hair-back-4
bounds: 832, 11, 110, 328
hair-hat-shadow
bounds: 944, 108, 112, 51
rotate: 90
hat-front
bounds: 112, 22, 121, 70
leg-front
bounds: 554, 699, 323, 400
rotate: 90
logo-brooch
bounds: 505, 170, 20, 31
mouth
bounds: 279, 26, 28, 8
rotate: 90
nose
bounds: 279, 15, 8, 9
nose-shadow
bounds: 834, 341, 9, 10
rotate: 90
nose.-highlight
bounds: 551, 171, 5, 6
pupil-back
bounds: 505, 699, 13, 18
rotate: 90
pupil-front
bounds: 112, 5, 15, 22
rotate: 90
rope-back
bounds: 989, 407, 13, 615
rope-front
bounds: 989, 407, 13, 615
skirt
bounds: 2, 714, 550, 308
sock-bow
bounds: 235, 14, 42, 40
spine-logo-body
bounds: 997, 143, 16, 40
star-big
bounds: 527, 171, 22, 30
star-medium
bounds: 1015, 173, 7, 10
star-small
bounds: 674, 2, 4, 6
rotate: 90
underskirt
bounds: 2, 156, 556, 285
rotate: 90
underskirt-back
bounds: 289, 170, 542, 214
rotate: 90
wing-back
bounds: 505, 203, 182, 315
rotate: 90
wing-front
bounds: 505, 387, 380, 310
celestial-circus-pma_2.png
size: 1024, 1024
filter: Linear, Linear
pma: true
scale: 0.5
arm-back-up
bounds: 490, 683, 104, 145
rotate: 90
arm-front-up
bounds: 162, 23, 96, 145
body-top
bounds: 2, 2, 158, 166
chest
bounds: 744, 878, 130, 117
cloud-back
bounds: 490, 789, 252, 206
cloud-front
bounds: 2, 170, 406, 245
rotate: 90
face
bounds: 876, 879, 116, 128
rotate: 90
feathers-back
bounds: 266, 578, 57, 57
fringe-middle-front
bounds: 260, 105, 75, 63
glove-bottom-back
bounds: 325, 584, 64, 51
glove-bottom-front
bounds: 391, 585, 59, 61
rotate: 90
hair-back-3
bounds: 249, 241, 87, 335
hair-back-5
bounds: 378, 646, 110, 349
hair-back-6
bounds: 266, 637, 110, 358
hand-back
bounds: 573, 622, 75, 59
hand-front
bounds: 637, 712, 67, 75
hat-back
bounds: 260, 23, 80, 56
rotate: 90
head-back
bounds: 744, 768, 128, 108
jabot
bounds: 249, 170, 88, 69
leg-back
bounds: 2, 578, 262, 417
neck
bounds: 338, 511, 49, 71
rope-front-bottom
bounds: 490, 628, 53, 81
rotate: 90

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9f77b6317f3511f4485d8be1e088ff6c
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 KiB

View File

@ -0,0 +1,112 @@
fileFormatVersion: 2
guid: d5bf0901654cca44d8d54e4b72929593
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 0
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
flipGreenChannel: 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: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 KiB

View File

@ -0,0 +1,112 @@
fileFormatVersion: 2
guid: 8886530b53e6e0b49a44e30b265bbd87
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 0
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
flipGreenChannel: 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: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: a6b194f808b1af6499c93410e504af42, type: 3}
m_Name: celestial-circus-pma_Atlas
m_EditorClassIdentifier:
textureLoadingMode: 0
onDemandTextureLoader: {fileID: 0}
atlasFile: {fileID: 4900000, guid: 9f77b6317f3511f4485d8be1e088ff6c, type: 3}
materials:
- {fileID: 2100000, guid: 00053f6ecd9bd9f4fb767f7d020291c2, type: 2}
- {fileID: 2100000, guid: 81604c53618e19448a03d9a36f922a88, type: 2}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7eaea318921ef93428ded0a3c24125e4
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,53 @@
%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: celestial-circus-pma_celestial-circus-pma-Multiply
m_Shader: {fileID: 4800000, guid: 8bdcdc7ee298e594a9c20c61d25c33b6, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords:
- _USE8NEIGHBOURHOOD_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- <noninit>:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: d5bf0901654cca44d8d54e4b72929593, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- <noninit>: 0
- _Cutoff: 0.1
- _OutlineMipLevel: 0
- _OutlineOpaqueAlpha: 1
- _OutlineReferenceTexWidth: 1024
- _OutlineSmoothness: 1
- _OutlineWidth: 3
- _StencilComp: 8
- _StencilRef: 1
- _StraightAlphaInput: 0
- _ThresholdEnd: 0.25
- _Use8Neighbourhood: 1
m_Colors:
- <noninit>: {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}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 51ea24e83c232c34994854424cd89413
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,46 @@
%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: celestial-circus-pma_celestial-circus-pma
m_Shader: {fileID: 4800000, guid: 1e8a610c9e01c3648bac42585e5fc676, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords:
- _USE8NEIGHBOURHOOD_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: d5bf0901654cca44d8d54e4b72929593, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Cutoff: 0.1
- _OutlineMipLevel: 0
- _OutlineOpaqueAlpha: 1
- _OutlineReferenceTexWidth: 1024
- _OutlineSmoothness: 1
- _OutlineWidth: 3
- _StencilComp: 8
- _StencilRef: 1
- _StraightAlphaInput: 0
- _ThresholdEnd: 0.25
- _Use8Neighbourhood: 1
m_Colors:
- _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 00053f6ecd9bd9f4fb767f7d020291c2
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,46 @@
%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: celestial-circus-pma_celestial-circus-pma_2
m_Shader: {fileID: 4800000, guid: 1e8a610c9e01c3648bac42585e5fc676, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords:
- _USE8NEIGHBOURHOOD_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 8886530b53e6e0b49a44e30b265bbd87, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Cutoff: 0.1
- _OutlineMipLevel: 0
- _OutlineOpaqueAlpha: 1
- _OutlineReferenceTexWidth: 1024
- _OutlineSmoothness: 1
- _OutlineWidth: 3
- _StencilComp: 8
- _StencilRef: 1
- _StraightAlphaInput: 0
- _ThresholdEnd: 0.25
- _Use8Neighbourhood: 1
m_Colors:
- _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 81604c53618e19448a03d9a36f922a88
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 096e0c3bab14ba24580dfb1381b52a86
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,33 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: f1b3b4b945939a54ea0b23d3396115fb, type: 3}
m_Name: celestial-circus-pro_SkeletonData
m_EditorClassIdentifier:
atlasAssets:
- {fileID: 11400000, guid: 7eaea318921ef93428ded0a3c24125e4, type: 2}
scale: 0.01
skeletonJSON: {fileID: 4900000, guid: 096e0c3bab14ba24580dfb1381b52a86, type: 3}
isUpgradingBlendModeMaterials: 0
blendModeMaterials:
requiresBlendModeMaterials: 1
applyAdditiveMaterial: 0
additiveMaterials: []
multiplyMaterials:
- pageName: celestial-circus-pma.png
material: {fileID: 2100000, guid: 51ea24e83c232c34994854424cd89413, type: 2}
screenMaterials: []
skeletonDataModifiers: []
fromAnimation: []
toAnimation: []
duration: []
defaultMix: 0.2
controller: {fileID: 9100000, guid: 23d2fdb02d8005143b7cfe3189ed37f3, type: 2}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 76d3b704a29fb5a45afe9a0060e0a994
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -2,7 +2,7 @@
"name": "com.esotericsoftware.spine.spine-unity-examples",
"displayName": "spine-unity Runtime Examples",
"description": "This plugin provides example scenes and scripts for the spine-unity runtime.",
"version": "4.2.24",
"version": "4.2.25",
"unity": "2018.3",
"author": {
"name": "Esoteric Software",