[unity] Updated Mix and Match API, examples, and old sample scripts.

This commit is contained in:
pharan 2017-05-20 10:17:14 +08:00
parent 439c8e8e22
commit 0bdd3d52e3
35 changed files with 2671 additions and 1082 deletions

View File

@ -120,7 +120,6 @@ GameObject:
- component: {fileID: 139638500} - component: {fileID: 139638500}
- component: {fileID: 139638499} - component: {fileID: 139638499}
- component: {fileID: 139638503} - component: {fileID: 139638503}
- component: {fileID: 139638504}
m_Layer: 0 m_Layer: 0
m_Name: Spine GameObject (SpineUnityGirl) m_Name: Spine GameObject (SpineUnityGirl)
m_TagString: Untagged m_TagString: Untagged
@ -224,17 +223,6 @@ MonoBehaviour:
blinkAnimation: blink blinkAnimation: blink
minimumDelay: 0.15 minimumDelay: 0.15
maximumDelay: 3 maximumDelay: 3
--- !u!114 &139638504
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 139638498}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7b337e07bc016684dabf04793dd00ea3, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &199409354 --- !u!1 &199409354
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -1,19 +1,19 @@
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!29 &1 --- !u!29 &1
SceneSettings: OcclusionCullingSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PVSData: serializedVersion: 2
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings: m_OcclusionBakeSettings:
smallestOccluder: 5 smallestOccluder: 5
smallestHole: 0.25 smallestHole: 0.25
backfaceThreshold: 100 backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2 --- !u!104 &2
RenderSettings: RenderSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 6 serializedVersion: 8
m_Fog: 0 m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3 m_FogMode: 3
@ -25,6 +25,7 @@ RenderSettings:
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1 m_AmbientIntensity: 1
m_AmbientMode: 3 m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0} m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5 m_HaloStrength: 0.5
m_FlareStrength: 1 m_FlareStrength: 1
@ -37,12 +38,12 @@ RenderSettings:
m_ReflectionIntensity: 1 m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0} m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0} m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
--- !u!157 &3 --- !u!157 &3
LightmapSettings: LightmapSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 6 serializedVersion: 9
m_GIWorkflowMode: 1 m_GIWorkflowMode: 1
m_LightmapsMode: 1
m_GISettings: m_GISettings:
serializedVersion: 2 serializedVersion: 2
m_BounceScale: 1 m_BounceScale: 1
@ -53,48 +54,70 @@ LightmapSettings:
m_EnableBakedLightmaps: 0 m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0 m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings: m_LightmapEditorSettings:
serializedVersion: 3 serializedVersion: 8
m_Resolution: 2 m_Resolution: 2
m_BakeResolution: 40 m_BakeResolution: 40
m_TextureWidth: 1024 m_TextureWidth: 1024
m_TextureHeight: 1024 m_TextureHeight: 1024
m_AO: 0
m_AOMaxDistance: 1 m_AOMaxDistance: 1
m_Padding: 2
m_CompAOExponent: 0 m_CompAOExponent: 0
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1 m_TextureCompression: 1
m_FinalGather: 0 m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 1024 m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2 m_ReflectionCompression: 2
m_MixedBakeMode: 1
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVRFiltering: 0
m_PVRFilteringMode: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousColorSigma: 1
m_PVRFilteringAtrousNormalSigma: 1
m_PVRFilteringAtrousPositionSigma: 1
m_LightingDataAsset: {fileID: 0} m_LightingDataAsset: {fileID: 0}
m_RuntimeCPUUsage: 25 m_ShadowMaskMode: 2
--- !u!196 &4 --- !u!196 &4
NavMeshSettings: NavMeshSettings:
serializedVersion: 2 serializedVersion: 2
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_BuildSettings: m_BuildSettings:
serializedVersion: 2 serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5 agentRadius: 0.5
agentHeight: 2 agentHeight: 2
agentSlope: 45 agentSlope: 45
agentClimb: 0.4 agentClimb: 0.4
ledgeDropHeight: 0 ledgeDropHeight: 0
maxJumpAcrossDistance: 0 maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2 minRegionArea: 2
cellSize: 0.16666667
manualCellSize: 0 manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
m_NavMeshData: {fileID: 0} m_NavMeshData: {fileID: 0}
--- !u!1 &199409354 --- !u!1 &199409354
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
serializedVersion: 4 serializedVersion: 5
m_Component: m_Component:
- 4: {fileID: 199409355} - component: {fileID: 199409355}
- 23: {fileID: 199409357} - component: {fileID: 199409357}
- 102: {fileID: 199409356} - component: {fileID: 199409356}
m_Layer: 0 m_Layer: 0
m_Name: Description m_Name: Description
m_TagString: Untagged m_TagString: Untagged
@ -114,6 +137,7 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 926099112} m_Father: {fileID: 926099112}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!102 &199409356 --- !u!102 &199409356
TextMesh: TextMesh:
serializedVersion: 3 serializedVersion: 3
@ -151,35 +175,41 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials: m_Materials:
- {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0}
m_SubsetIndices: m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0} m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 1
m_ReflectionProbeUsage: 1
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 0
--- !u!1 &611702901 --- !u!1 &611702901
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
serializedVersion: 4 serializedVersion: 5
m_Component: m_Component:
- 4: {fileID: 611702906} - component: {fileID: 611702906}
- 20: {fileID: 611702905} - component: {fileID: 611702905}
- 92: {fileID: 611702904} - component: {fileID: 611702904}
- 124: {fileID: 611702903} - component: {fileID: 611702903}
- 81: {fileID: 611702902} - component: {fileID: 611702902}
m_Layer: 0 m_Layer: 0
m_Name: Main Camera m_Name: Main Camera
m_TagString: MainCamera m_TagString: MainCamera
@ -238,6 +268,8 @@ Camera:
m_TargetDisplay: 0 m_TargetDisplay: 0
m_TargetEye: 3 m_TargetEye: 3
m_HDR: 0 m_HDR: 0
m_AllowMSAA: 1
m_ForceIntoRT: 0
m_OcclusionCulling: 1 m_OcclusionCulling: 1
m_StereoConvergence: 10 m_StereoConvergence: 10
m_StereoSeparation: 0.022 m_StereoSeparation: 0.022
@ -254,18 +286,19 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &816033309 --- !u!1 &816033309
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
serializedVersion: 4 serializedVersion: 5
m_Component: m_Component:
- 4: {fileID: 816033313} - component: {fileID: 816033313}
- 33: {fileID: 816033312} - component: {fileID: 816033312}
- 23: {fileID: 816033311} - component: {fileID: 816033311}
- 114: {fileID: 816033310} - component: {fileID: 816033310}
- 114: {fileID: 816033314} - component: {fileID: 816033314}
m_Layer: 0 m_Layer: 0
m_Name: spineboy m_Name: spineboy
m_TagString: Untagged m_TagString: Untagged
@ -284,16 +317,20 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d247ba06193faa74d9335f5481b2b56c, type: 3} m_Script: {fileID: 11500000, guid: d247ba06193faa74d9335f5481b2b56c, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: 44691b56ed7d1f04da0cbc2a52a91b8d, type: 2} skeletonDataAsset: {fileID: 11400000, guid: a467507a4ffb1d542a558739b2fede77, type: 2}
initialSkinName: default initialSkinName: base
initialFlipX: 0
initialFlipY: 0
separatorSlotNames: [] separatorSlotNames: []
zSpacing: 0 zSpacing: 0
renderMeshes: 1 useClipping: 1
immutableTriangles: 0 immutableTriangles: 0
pmaVertexColors: 1 pmaVertexColors: 1
calculateNormals: 0 clearStateOnDisable: 0
tintBlack: 0
singleSubmesh: 0
addNormals: 0
calculateTangents: 0 calculateTangents: 0
frontFacing: 0
logErrors: 0 logErrors: 0
disableRenderingOnOverride: 1 disableRenderingOnOverride: 1
_animationName: idle _animationName: idle
@ -308,22 +345,28 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_Materials: m_MotionVectors: 1
- {fileID: 2100000, guid: 4083cd422558e2540a62bbafb94f57b5, type: 2} m_LightProbeUsage: 1
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 0
--- !u!33 &816033312 --- !u!33 &816033312
MeshFilter: MeshFilter:
@ -344,6 +387,7 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &816033314 --- !u!114 &816033314
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -364,9 +408,9 @@ GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
serializedVersion: 4 serializedVersion: 5
m_Component: m_Component:
- 4: {fileID: 926099112} - component: {fileID: 926099112}
m_Layer: 0 m_Layer: 0
m_Name: LABELS m_Name: LABELS
m_TagString: Untagged m_TagString: Untagged
@ -388,16 +432,17 @@ Transform:
- {fileID: 1945923979} - {fileID: 1945923979}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 2 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1945923976 --- !u!1 &1945923976
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
serializedVersion: 4 serializedVersion: 5
m_Component: m_Component:
- 4: {fileID: 1945923979} - component: {fileID: 1945923979}
- 23: {fileID: 1945923978} - component: {fileID: 1945923978}
- 102: {fileID: 1945923977} - component: {fileID: 1945923977}
m_Layer: 0 m_Layer: 0
m_Name: play mode m_Name: play mode
m_TagString: Untagged m_TagString: Untagged
@ -435,22 +480,28 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials: m_Materials:
- {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0}
m_SubsetIndices: m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0} m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 1
m_ReflectionProbeUsage: 1
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 0
--- !u!4 &1945923979 --- !u!4 &1945923979
Transform: Transform:
@ -464,3 +515,4 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 926099112} m_Father: {fileID: 926099112}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

View File

@ -427,8 +427,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d247ba06193faa74d9335f5481b2b56c, type: 3} m_Script: {fileID: 11500000, guid: d247ba06193faa74d9335f5481b2b56c, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: 44691b56ed7d1f04da0cbc2a52a91b8d, type: 2} skeletonDataAsset: {fileID: 11400000, guid: a467507a4ffb1d542a558739b2fede77, type: 2}
initialSkinName: default initialSkinName: base
initialFlipX: 0 initialFlipX: 0
initialFlipY: 0 initialFlipY: 0
separatorSlotNames: [] separatorSlotNames: []

View File

@ -651,7 +651,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
groundMask: groundMask:
serializedVersion: 2 serializedVersion: 2
m_Bits: 1024 m_Bits: 1025
use2D: 0 use2D: 0
useRadius: 1 useRadius: 1
castRadius: 0.22 castRadius: 0.22
@ -1833,7 +1833,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
groundMask: groundMask:
serializedVersion: 2 serializedVersion: 2
m_Bits: 1024 m_Bits: 1025
use2D: 0 use2D: 0
useRadius: 1 useRadius: 1
castRadius: 0.22 castRadius: 0.22

View File

@ -938,8 +938,8 @@ MonoBehaviour:
m_Calls: [] m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
skeletonDataAsset: {fileID: 11400000, guid: 44691b56ed7d1f04da0cbc2a52a91b8d, type: 2} skeletonDataAsset: {fileID: 11400000, guid: a467507a4ffb1d542a558739b2fede77, type: 2}
initialSkinName: default initialSkinName: base
startingAnimation: run startingAnimation: run
startingLoop: 1 startingLoop: 1
timeScale: 1 timeScale: 1

View File

@ -210,7 +210,6 @@ GameObject:
- component: {fileID: 1263080511} - component: {fileID: 1263080511}
- component: {fileID: 1263080510} - component: {fileID: 1263080510}
- component: {fileID: 1263080509} - component: {fileID: 1263080509}
- component: {fileID: 1263080515}
m_Layer: 0 m_Layer: 0
m_Name: FootSoldier m_Name: FootSoldier
m_TagString: Untagged m_TagString: Untagged
@ -340,16 +339,3 @@ Transform:
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1263080515
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1263080508}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7f726fb798ad621458c431cb9966d91d, type: 3}
m_Name:
m_EditorClassIdentifier:
boneRoot: {fileID: 0}
skeletonRenderer: {fileID: 1263080511}

View File

@ -242,6 +242,120 @@ Transform:
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &757780186
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 100000, guid: d51ed5943e10bcb4394b5eec480293f8, type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 757780190}
- component: {fileID: 757780189}
- component: {fileID: 757780188}
- component: {fileID: 757780187}
m_Layer: 0
m_Name: dragon (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &757780187
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11400000, guid: d51ed5943e10bcb4394b5eec480293f8,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 757780186}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d247ba06193faa74d9335f5481b2b56c, type: 3}
m_Name:
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: 76506fa7fbeed084ab2dfb084648c628, type: 2}
initialSkinName: default
initialFlipX: 0
initialFlipY: 0
separatorSlotNames: []
zSpacing: 0
useClipping: 1
immutableTriangles: 0
pmaVertexColors: 1
clearStateOnDisable: 0
tintBlack: 0
singleSubmesh: 0
addNormals: 1
calculateTangents: 0
logErrors: 0
disableRenderingOnOverride: 1
_animationName: flying
loop: 1
timeScale: 1
--- !u!23 &757780188
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 2300000, guid: d51ed5943e10bcb4394b5eec480293f8,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 757780186}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: d58543c96f991934ca874395eb40222c, type: 2}
- {fileID: 2100000, guid: 3277fd5561d95724e83c6ca4a1dd28a4, type: 2}
- {fileID: 2100000, guid: d58543c96f991934ca874395eb40222c, type: 2}
- {fileID: 2100000, guid: 3277fd5561d95724e83c6ca4a1dd28a4, type: 2}
- {fileID: 2100000, guid: d58543c96f991934ca874395eb40222c, type: 2}
- {fileID: 2100000, guid: 3277fd5561d95724e83c6ca4a1dd28a4, type: 2}
- {fileID: 2100000, guid: d58543c96f991934ca874395eb40222c, type: 2}
- {fileID: 2100000, guid: 3277fd5561d95724e83c6ca4a1dd28a4, type: 2}
- {fileID: 2100000, guid: d58543c96f991934ca874395eb40222c, type: 2}
- {fileID: 2100000, guid: 3277fd5561d95724e83c6ca4a1dd28a4, type: 2}
- {fileID: 2100000, guid: d58543c96f991934ca874395eb40222c, type: 2}
- {fileID: 2100000, guid: 3277fd5561d95724e83c6ca4a1dd28a4, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &757780189
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 3300000, guid: d51ed5943e10bcb4394b5eec480293f8,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 757780186}
m_Mesh: {fileID: 0}
--- !u!4 &757780190
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 400000, guid: d51ed5943e10bcb4394b5eec480293f8, type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 757780186}
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_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1604340971 --- !u!1 &1604340971
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -1,19 +1,19 @@
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!29 &1 --- !u!29 &1
SceneSettings: OcclusionCullingSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PVSData: serializedVersion: 2
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings: m_OcclusionBakeSettings:
smallestOccluder: 5 smallestOccluder: 5
smallestHole: 0.25 smallestHole: 0.25
backfaceThreshold: 100 backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2 --- !u!104 &2
RenderSettings: RenderSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 6 serializedVersion: 8
m_Fog: 0 m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3 m_FogMode: 3
@ -25,6 +25,7 @@ RenderSettings:
m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_AmbientIntensity: 1 m_AmbientIntensity: 1
m_AmbientMode: 3 m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0} m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5 m_HaloStrength: 0.5
m_FlareStrength: 1 m_FlareStrength: 1
@ -37,12 +38,12 @@ RenderSettings:
m_ReflectionIntensity: 1 m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0} m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0} m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
--- !u!157 &4 --- !u!157 &4
LightmapSettings: LightmapSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 6 serializedVersion: 9
m_GIWorkflowMode: 1 m_GIWorkflowMode: 1
m_LightmapsMode: 1
m_GISettings: m_GISettings:
serializedVersion: 2 serializedVersion: 2
m_BounceScale: 1 m_BounceScale: 1
@ -53,51 +54,72 @@ LightmapSettings:
m_EnableBakedLightmaps: 1 m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0 m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings: m_LightmapEditorSettings:
serializedVersion: 3 serializedVersion: 8
m_Resolution: 1 m_Resolution: 1
m_BakeResolution: 50 m_BakeResolution: 50
m_TextureWidth: 1024 m_TextureWidth: 1024
m_TextureHeight: 1024 m_TextureHeight: 1024
m_AO: 0
m_AOMaxDistance: 1 m_AOMaxDistance: 1
m_Padding: 2
m_CompAOExponent: 0 m_CompAOExponent: 0
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 0 m_TextureCompression: 0
m_FinalGather: 0 m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 1024 m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2 m_ReflectionCompression: 2
m_MixedBakeMode: 1
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVRFiltering: 0
m_PVRFilteringMode: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousColorSigma: 1
m_PVRFilteringAtrousNormalSigma: 1
m_PVRFilteringAtrousPositionSigma: 1
m_LightingDataAsset: {fileID: 0} m_LightingDataAsset: {fileID: 0}
m_RuntimeCPUUsage: 25 m_ShadowMaskMode: 2
--- !u!196 &5 --- !u!196 &5
NavMeshSettings: NavMeshSettings:
serializedVersion: 2 serializedVersion: 2
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_BuildSettings: m_BuildSettings:
serializedVersion: 2 serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5 agentRadius: 0.5
agentHeight: 2 agentHeight: 2
agentSlope: 45 agentSlope: 45
agentClimb: 0.4 agentClimb: 0.4
ledgeDropHeight: 0 ledgeDropHeight: 0
maxJumpAcrossDistance: 0 maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2 minRegionArea: 2
cellSize: 0.16666666
manualCellSize: 0 manualCellSize: 0
cellSize: 0.16666666
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
m_NavMeshData: {fileID: 0} m_NavMeshData: {fileID: 0}
--- !u!1 &371702429 --- !u!1 &371702429
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 100000, guid: 700a0a62306a8954b8933538790e20a5, type: 2} m_PrefabParentObject: {fileID: 100000, guid: 700a0a62306a8954b8933538790e20a5, type: 2}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
serializedVersion: 4 serializedVersion: 5
m_Component: m_Component:
- 4: {fileID: 371702434} - component: {fileID: 371702434}
- 33: {fileID: 371702433} - component: {fileID: 371702433}
- 23: {fileID: 371702432} - component: {fileID: 371702432}
- 114: {fileID: 371702431} - component: {fileID: 371702431}
- 114: {fileID: 371702430} - component: {fileID: 371702430}
- 61: {fileID: 371702435}
m_Layer: 0 m_Layer: 0
m_Name: goblins-mesh m_Name: goblins-mesh
m_TagString: Untagged m_TagString: Untagged
@ -117,6 +139,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 40a82af6554a7594f9ffa9ac8dde212f, type: 3} m_Script: {fileID: 11500000, guid: 40a82af6554a7594f9ffa9ac8dde212f, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
extraRotation: 0
--- !u!114 &371702431 --- !u!114 &371702431
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -131,12 +154,17 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: 2e4e11d4dd87d844a876d18c4d76a612, type: 2} skeletonDataAsset: {fileID: 11400000, guid: 2e4e11d4dd87d844a876d18c4d76a612, type: 2}
initialSkinName: goblin initialSkinName: goblin
initialFlipX: 0
initialFlipY: 0
separatorSlotNames: [] separatorSlotNames: []
zSpacing: 0 zSpacing: 0
renderMeshes: 1 useClipping: 1
immutableTriangles: 0 immutableTriangles: 0
pmaVertexColors: 1 pmaVertexColors: 1
calculateNormals: 1 clearStateOnDisable: 0
tintBlack: 0
singleSubmesh: 0
addNormals: 1
calculateTangents: 0 calculateTangents: 0
logErrors: 0 logErrors: 0
disableRenderingOnOverride: 1 disableRenderingOnOverride: 1
@ -153,22 +181,28 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_Materials: m_Materials:
- {fileID: 2100000, guid: 54091ef934c41eb4192f72bfd8e3bcc9, type: 2} - {fileID: 2100000, guid: 54091ef934c41eb4192f72bfd8e3bcc9, type: 2}
m_SubsetIndices: m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0} m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_ReflectionProbeUsage: 1
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 0
--- !u!33 &371702433 --- !u!33 &371702433
MeshFilter: MeshFilter:
@ -185,100 +219,141 @@ Transform:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 371702429} m_GameObject: {fileID: 371702429}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: -2, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 1
--- !u!61 &371702435 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
BoxCollider2D: --- !u!1 &1248674550
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 371702429}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_Offset: {x: -0.055532753, y: 1.7475463}
serializedVersion: 2
m_Size: {x: 2.5330653, y: 3.6126883}
--- !u!1 &829885015
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 100000, guid: 700a0a62306a8954b8933538790e20a5, type: 2}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
serializedVersion: 4 serializedVersion: 5
m_Component: m_Component:
- 4: {fileID: 829885017} - component: {fileID: 1248674555}
- 108: {fileID: 829885016} - component: {fileID: 1248674554}
- component: {fileID: 1248674553}
- component: {fileID: 1248674552}
- component: {fileID: 1248674551}
m_Layer: 0 m_Layer: 0
m_Name: Point light m_Name: goblins-mesh (1)
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 1
--- !u!108 &829885016 --- !u!114 &1248674551
Light: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 11400002, guid: 700a0a62306a8954b8933538790e20a5,
type: 2}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 829885015} m_GameObject: {fileID: 1248674550}
m_Enabled: 1 m_Enabled: 1
serializedVersion: 6 m_EditorHideFlags: 0
m_Type: 2 m_Script: {fileID: 11500000, guid: 40a82af6554a7594f9ffa9ac8dde212f, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Name:
m_Intensity: 2 m_EditorClassIdentifier:
m_Range: 10 extraRotation: 0
m_SpotAngle: 30 --- !u!114 &1248674552
m_CookieSize: 10 MonoBehaviour:
m_Shadows: m_ObjectHideFlags: 0
m_Type: 0 m_PrefabParentObject: {fileID: 11400000, guid: 700a0a62306a8954b8933538790e20a5,
m_Resolution: -1 type: 2}
m_Strength: 1 m_PrefabInternal: {fileID: 0}
m_Bias: 0.05 m_GameObject: {fileID: 1248674550}
m_NormalBias: 0.4 m_Enabled: 1
m_NearPlane: 0.2 m_EditorHideFlags: 0
m_Cookie: {fileID: 0} m_Script: {fileID: 11500000, guid: d247ba06193faa74d9335f5481b2b56c, type: 3}
m_DrawHalo: 0 m_Name:
m_Flare: {fileID: 0} m_EditorClassIdentifier:
m_RenderMode: 0 skeletonDataAsset: {fileID: 11400000, guid: 2e4e11d4dd87d844a876d18c4d76a612, type: 2}
m_CullingMask: initialSkinName: goblingirl
serializedVersion: 2 initialFlipX: 1
m_Bits: 4294967295 initialFlipY: 0
m_Lightmapping: 1 separatorSlotNames: []
m_BounceIntensity: 1 zSpacing: 0
m_ShadowRadius: 0 useClipping: 1
m_ShadowAngle: 0 immutableTriangles: 0
m_AreaSize: {x: 1, y: 1} pmaVertexColors: 1
--- !u!4 &829885017 clearStateOnDisable: 0
tintBlack: 0
singleSubmesh: 0
addNormals: 1
calculateTangents: 0
logErrors: 0
disableRenderingOnOverride: 1
_animationName: walk
loop: 1
timeScale: 1
--- !u!23 &1248674553
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 2300000, guid: 700a0a62306a8954b8933538790e20a5,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1248674550}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 54091ef934c41eb4192f72bfd8e3bcc9, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &1248674554
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 3300000, guid: 700a0a62306a8954b8933538790e20a5,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1248674550}
m_Mesh: {fileID: 0}
--- !u!4 &1248674555
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 400000, guid: 700a0a62306a8954b8933538790e20a5, type: 2}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 829885015} m_GameObject: {fileID: 1248674550}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1.7437632, y: 3.0306358, z: -1.5414181} m_LocalPosition: {x: 2, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 2 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1457374310 --- !u!1 &1457374310
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
serializedVersion: 4 serializedVersion: 5
m_Component: m_Component:
- 4: {fileID: 1457374315} - component: {fileID: 1457374315}
- 20: {fileID: 1457374314} - component: {fileID: 1457374314}
- 92: {fileID: 1457374313} - component: {fileID: 1457374313}
- 124: {fileID: 1457374312} - component: {fileID: 1457374312}
- 81: {fileID: 1457374311} - component: {fileID: 1457374311}
m_Layer: 0 m_Layer: 0
m_Name: Main Camera m_Name: Main Camera
m_TagString: MainCamera m_TagString: MainCamera
@ -316,7 +391,7 @@ Camera:
m_Enabled: 1 m_Enabled: 1
serializedVersion: 2 serializedVersion: 2
m_ClearFlags: 1 m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} m_BackGroundColor: {r: 0.039984792, g: 0.1397059, b: 0.10890967, a: 0.019607844}
m_NormalizedViewPortRect: m_NormalizedViewPortRect:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
@ -337,6 +412,8 @@ Camera:
m_TargetDisplay: 0 m_TargetDisplay: 0
m_TargetEye: 3 m_TargetEye: 3
m_HDR: 0 m_HDR: 0
m_AllowMSAA: 1
m_ForceIntoRT: 0
m_OcclusionCulling: 1 m_OcclusionCulling: 1
m_StereoConvergence: 10 m_StereoConvergence: 10
m_StereoSeparation: 0.022 m_StereoSeparation: 0.022
@ -350,7 +427,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 2.0984764, z: -5.8611603} m_LocalPosition: {x: 0, y: 2.0984764, z: -5.8611603}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 1 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

File diff suppressed because one or more lines are too long

View File

@ -233,8 +233,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
skeletonRenderer: {fileID: 93048076} skeletonRenderer: {fileID: 93048076}
copyPropertyBlock: 0 copyPropertyBlock: 1
copyMeshRendererFlags: 0 copyMeshRendererFlags: 1
partsRenderers: partsRenderers:
- {fileID: 1769987560} - {fileID: 1769987560}
- {fileID: 1619823301} - {fileID: 1619823301}
@ -283,7 +283,6 @@ MeshRenderer:
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
m_Materials: m_Materials:
- {fileID: 0} - {fileID: 0}
- {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2}
m_StaticBatchInfo: m_StaticBatchInfo:
firstSubMesh: 0 firstSubMesh: 0
subMeshCount: 0 subMeshCount: 0
@ -362,9 +361,9 @@ MeshRenderer:
m_GameObject: {fileID: 122287539} m_GameObject: {fileID: 122287539}
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 0
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
m_Materials: m_Materials:
- {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2} - {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2}
@ -463,7 +462,7 @@ ParticleSystemRenderer:
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
@ -561,7 +560,7 @@ ParticleSystem:
moveWithTransform: 1 moveWithTransform: 1
moveWithCustomTransform: {fileID: 0} moveWithCustomTransform: {fileID: 0}
scalingMode: 1 scalingMode: 1
randomSeed: 0 randomSeed: -1037588642
InitialModule: InitialModule:
serializedVersion: 3 serializedVersion: 3
enabled: 1 enabled: 1
@ -4022,9 +4021,9 @@ MeshRenderer:
m_GameObject: {fileID: 1619823300} m_GameObject: {fileID: 1619823300}
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 0
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
m_Materials: m_Materials:
- {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2} - {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2}
@ -4134,9 +4133,9 @@ MeshRenderer:
m_GameObject: {fileID: 1698487791} m_GameObject: {fileID: 1698487791}
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 0
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
m_Materials: m_Materials:
- {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2} - {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2}
@ -4215,9 +4214,9 @@ MeshRenderer:
m_GameObject: {fileID: 1769987559} m_GameObject: {fileID: 1769987559}
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 0
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
m_Materials: m_Materials:
- {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2} - {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2}
@ -4291,8 +4290,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
skeletonRenderer: {fileID: 1918225116} skeletonRenderer: {fileID: 1918225116}
copyPropertyBlock: 0 copyPropertyBlock: 1
copyMeshRendererFlags: 0 copyMeshRendererFlags: 1
partsRenderers: partsRenderers:
- {fileID: 122287540} - {fileID: 122287540}
- {fileID: 1698487792} - {fileID: 1698487792}
@ -4341,7 +4340,6 @@ MeshRenderer:
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
m_Materials: m_Materials:
- {fileID: 0} - {fileID: 0}
- {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2}
m_StaticBatchInfo: m_StaticBatchInfo:
firstSubMesh: 0 firstSubMesh: 0
subMeshCount: 0 subMeshCount: 0

View File

@ -1,19 +1,19 @@
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!29 &1 --- !u!29 &1
SceneSettings: OcclusionCullingSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PVSData: serializedVersion: 2
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings: m_OcclusionBakeSettings:
smallestOccluder: 5 smallestOccluder: 5
smallestHole: 0.25 smallestHole: 0.25
backfaceThreshold: 100 backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2 --- !u!104 &2
RenderSettings: RenderSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 7 serializedVersion: 8
m_Fog: 0 m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3 m_FogMode: 3
@ -25,6 +25,7 @@ RenderSettings:
m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_AmbientIntensity: 1 m_AmbientIntensity: 1
m_AmbientMode: 3 m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0} m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5 m_HaloStrength: 0.5
m_FlareStrength: 1 m_FlareStrength: 1
@ -41,7 +42,7 @@ RenderSettings:
--- !u!157 &4 --- !u!157 &4
LightmapSettings: LightmapSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 7 serializedVersion: 9
m_GIWorkflowMode: 1 m_GIWorkflowMode: 1
m_GISettings: m_GISettings:
serializedVersion: 2 serializedVersion: 2
@ -53,7 +54,7 @@ LightmapSettings:
m_EnableBakedLightmaps: 1 m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0 m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings: m_LightmapEditorSettings:
serializedVersion: 4 serializedVersion: 8
m_Resolution: 1 m_Resolution: 1
m_BakeResolution: 50 m_BakeResolution: 50
m_TextureWidth: 1024 m_TextureWidth: 1024
@ -66,41 +67,58 @@ LightmapSettings:
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1 m_LightmapsBakeMode: 1
m_TextureCompression: 0 m_TextureCompression: 0
m_DirectLightInLightProbes: 1
m_FinalGather: 0 m_FinalGather: 0
m_FinalGatherFiltering: 1 m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 1024 m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2 m_ReflectionCompression: 2
m_MixedBakeMode: 1
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVRFiltering: 0
m_PVRFilteringMode: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousColorSigma: 1
m_PVRFilteringAtrousNormalSigma: 1
m_PVRFilteringAtrousPositionSigma: 1
m_LightingDataAsset: {fileID: 0} m_LightingDataAsset: {fileID: 0}
m_RuntimeCPUUsage: 25 m_ShadowMaskMode: 2
--- !u!196 &5 --- !u!196 &5
NavMeshSettings: NavMeshSettings:
serializedVersion: 2 serializedVersion: 2
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_BuildSettings: m_BuildSettings:
serializedVersion: 2 serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5 agentRadius: 0.5
agentHeight: 2 agentHeight: 2
agentSlope: 45 agentSlope: 45
agentClimb: 0.4 agentClimb: 0.4
ledgeDropHeight: 0 ledgeDropHeight: 0
maxJumpAcrossDistance: 0 maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2 minRegionArea: 2
cellSize: 0.16666666
manualCellSize: 0 manualCellSize: 0
cellSize: 0.16666666
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
m_NavMeshData: {fileID: 0} m_NavMeshData: {fileID: 0}
--- !u!1 &351144566 --- !u!1 &351144566
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
serializedVersion: 4 serializedVersion: 5
m_Component: m_Component:
- 4: {fileID: 351144570} - component: {fileID: 351144570}
- 33: {fileID: 351144569} - component: {fileID: 351144569}
- 23: {fileID: 351144568} - component: {fileID: 351144568}
- 114: {fileID: 351144567} - component: {fileID: 351144567}
m_Layer: 0 m_Layer: 0
m_Name: Spine GameObject (spineboy) m_Name: Spine GameObject (spineboy)
m_TagString: Untagged m_TagString: Untagged
@ -121,13 +139,17 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: 44691b56ed7d1f04da0cbc2a52a91b8d, type: 2} skeletonDataAsset: {fileID: 11400000, guid: 44691b56ed7d1f04da0cbc2a52a91b8d, type: 2}
initialSkinName: default initialSkinName: default
initialFlipX: 0
initialFlipY: 0
separatorSlotNames: [] separatorSlotNames: []
zSpacing: 0 zSpacing: 0
renderMeshes: 1 useClipping: 1
immutableTriangles: 0 immutableTriangles: 0
pmaVertexColors: 1 pmaVertexColors: 1
clearStateOnDisable: 0 clearStateOnDisable: 0
calculateNormals: 0 tintBlack: 0
singleSubmesh: 0
addNormals: 0
calculateTangents: 0 calculateTangents: 0
logErrors: 0 logErrors: 0
disableRenderingOnOverride: 1 disableRenderingOnOverride: 1
@ -148,7 +170,9 @@ MeshRenderer:
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
m_Materials: m_Materials:
- {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2} - {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2}
m_SubsetIndices: m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0} m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
@ -156,12 +180,13 @@ MeshRenderer:
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_SelectedWireframeHidden: 0 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 0
--- !u!33 &351144569 --- !u!33 &351144569
MeshFilter: MeshFilter:
@ -179,22 +204,23 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.3, y: -3.48, z: 0} m_LocalPosition: {x: -0.3, y: -3.48, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_Children:
m_Children: [] - {fileID: 795271517}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 2 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &795271513 --- !u!1 &795271513
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
serializedVersion: 4 serializedVersion: 5
m_Component: m_Component:
- 4: {fileID: 795271517} - component: {fileID: 795271517}
- 33: {fileID: 795271518} - component: {fileID: 795271518}
- 23: {fileID: 795271516} - component: {fileID: 795271516}
- 114: {fileID: 795271515} - component: {fileID: 795271515}
- 114: {fileID: 795271514} - component: {fileID: 795271514}
m_Layer: 0 m_Layer: 0
m_Name: Spine GameObject (gauge) m_Name: Spine GameObject (gauge)
m_TagString: Untagged m_TagString: Untagged
@ -228,13 +254,17 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: 22b19a38b21c15a48854f0db86b0b7d3, type: 2} skeletonDataAsset: {fileID: 11400000, guid: 22b19a38b21c15a48854f0db86b0b7d3, type: 2}
initialSkinName: default initialSkinName: default
initialFlipX: 0
initialFlipY: 0
separatorSlotNames: [] separatorSlotNames: []
zSpacing: 0 zSpacing: 0
renderMeshes: 1 useClipping: 1
immutableTriangles: 0 immutableTriangles: 0
pmaVertexColors: 1 pmaVertexColors: 1
clearStateOnDisable: 0 clearStateOnDisable: 0
calculateNormals: 0 tintBlack: 0
singleSubmesh: 0
addNormals: 0
calculateTangents: 0 calculateTangents: 0
logErrors: 0 logErrors: 0
disableRenderingOnOverride: 1 disableRenderingOnOverride: 1
@ -252,7 +282,9 @@ MeshRenderer:
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
m_Materials: m_Materials:
- {fileID: 2100000, guid: 9ab9bdbda020b3e46b5a3b0558ef591d, type: 2} - {fileID: 2100000, guid: 9ab9bdbda020b3e46b5a3b0558ef591d, type: 2}
m_SubsetIndices: m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0} m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
@ -260,12 +292,13 @@ MeshRenderer:
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_SelectedWireframeHidden: 0 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 0
--- !u!4 &795271517 --- !u!4 &795271517
Transform: Transform:
@ -273,14 +306,13 @@ Transform:
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 795271513} m_GameObject: {fileID: 795271513}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 4.09, z: 0} m_LocalPosition: {x: 0.15800005, y: 7.619125, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 351144570}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1025516230}
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!33 &795271518 --- !u!33 &795271518
MeshFilter: MeshFilter:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -293,10 +325,10 @@ GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
serializedVersion: 4 serializedVersion: 5
m_Component: m_Component:
- 4: {fileID: 1025516230} - component: {fileID: 1025516230}
- 114: {fileID: 1025516231} - component: {fileID: 1025516231}
m_Layer: 0 m_Layer: 0
m_Name: Attack Spineboy m_Name: Attack Spineboy
m_TagString: Untagged m_TagString: Untagged
@ -311,13 +343,13 @@ Transform:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1025516229} m_GameObject: {fileID: 1025516229}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -2.672, y: -1.3108752, z: 0} m_LocalPosition: {x: -2.672, y: 2.779125, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 1695530253} - {fileID: 1695530253}
m_Father: {fileID: 795271517} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1025516231 --- !u!114 &1025516231
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -337,11 +369,11 @@ GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
serializedVersion: 4 serializedVersion: 5
m_Component: m_Component:
- 224: {fileID: 1053578424} - component: {fileID: 1053578424}
- 222: {fileID: 1053578426} - component: {fileID: 1053578426}
- 114: {fileID: 1053578425} - component: {fileID: 1053578425}
m_Layer: 5 m_Layer: 5
m_Name: Text m_Name: Text
m_TagString: Untagged m_TagString: Untagged
@ -358,10 +390,10 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 1695530253} m_Father: {fileID: 1695530253}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 436.7, y: 225.4} m_AnchoredPosition: {x: 436.7, y: 225.4}
@ -414,13 +446,13 @@ GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
serializedVersion: 4 serializedVersion: 5
m_Component: m_Component:
- 4: {fileID: 1611520407} - component: {fileID: 1611520407}
- 20: {fileID: 1611520406} - component: {fileID: 1611520406}
- 92: {fileID: 1611520405} - component: {fileID: 1611520405}
- 124: {fileID: 1611520404} - component: {fileID: 1611520404}
- 81: {fileID: 1611520403} - component: {fileID: 1611520403}
m_Layer: 0 m_Layer: 0
m_Name: Main Camera m_Name: Main Camera
m_TagString: MainCamera m_TagString: MainCamera
@ -479,6 +511,8 @@ Camera:
m_TargetDisplay: 0 m_TargetDisplay: 0
m_TargetEye: 3 m_TargetEye: 3
m_HDR: 0 m_HDR: 0
m_AllowMSAA: 1
m_ForceIntoRT: 0
m_OcclusionCulling: 1 m_OcclusionCulling: 1
m_StereoConvergence: 10 m_StereoConvergence: 10
m_StereoSeparation: 0.022 m_StereoSeparation: 0.022
@ -492,20 +526,20 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10} m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1695530249 --- !u!1 &1695530249
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
serializedVersion: 4 serializedVersion: 5
m_Component: m_Component:
- 224: {fileID: 1695530253} - component: {fileID: 1695530253}
- 223: {fileID: 1695530252} - component: {fileID: 1695530252}
- 114: {fileID: 1695530251} - component: {fileID: 1695530251}
m_Layer: 5 m_Layer: 5
m_Name: Canvas m_Name: Canvas
m_TagString: Untagged m_TagString: Untagged
@ -541,7 +575,7 @@ Canvas:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1695530249} m_GameObject: {fileID: 1695530249}
m_Enabled: 1 m_Enabled: 1
serializedVersion: 2 serializedVersion: 3
m_RenderMode: 2 m_RenderMode: 2
m_Camera: {fileID: 0} m_Camera: {fileID: 0}
m_PlaneDistance: 100 m_PlaneDistance: 100
@ -550,6 +584,7 @@ Canvas:
m_OverrideSorting: 0 m_OverrideSorting: 0
m_OverridePixelPerfect: 0 m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0 m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingOrder: 0 m_SortingOrder: 0
m_TargetDisplay: 0 m_TargetDisplay: 0
@ -562,12 +597,12 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.01, y: 0.01, z: 0.01} m_LocalScale: {x: 0.01, y: 0.01, z: 0.01}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 1053578424} - {fileID: 1053578424}
- {fileID: 1847717248} - {fileID: 1847717248}
m_Father: {fileID: 1025516230} m_Father: {fileID: 1025516230}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 2.672, y: -2.779125} m_AnchoredPosition: {x: 2.672, y: -2.779125}
@ -578,11 +613,11 @@ GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
serializedVersion: 4 serializedVersion: 5
m_Component: m_Component:
- 224: {fileID: 1847717248} - component: {fileID: 1847717248}
- 222: {fileID: 1847717250} - component: {fileID: 1847717250}
- 114: {fileID: 1847717249} - component: {fileID: 1847717249}
m_Layer: 5 m_Layer: 5
m_Name: Health Text m_Name: Health Text
m_TagString: Untagged m_TagString: Untagged
@ -599,10 +634,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 1695530253} m_Father: {fileID: 1695530253}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -13, y: 343} m_AnchoredPosition: {x: -13, y: 343}

View File

@ -32,28 +32,35 @@ using UnityEngine;
using Spine.Unity.Modules.AttachmentTools; using Spine.Unity.Modules.AttachmentTools;
namespace Spine.Unity.Examples { namespace Spine.Unity.Examples {
// This is an example script that shows you how to change images on your skeleton using UnityEngine.Sprites.
public class MixAndMatch : MonoBehaviour { public class MixAndMatch : MonoBehaviour {
#region Inspector #region Inspector
[SpineSkin]
public string baseSkinName = "base";
public Material sourceMaterial; // This will be used as the basis for shader and material property settings.
[Header("Visor")] [Header("Visor")]
public Sprite visorSprite; public Sprite visorSprite;
[SpineSlot] public string visorSlot; [SpineSlot] public string visorSlot;
[SpineAttachment(slotField:"visorSlot")] public string visorKey = "goggles"; [SpineAttachment(slotField:"visorSlot", skinField:"baseSkinName")] public string visorKey = "goggles";
[Header("Gun")] [Header("Gun")]
public Sprite gunSprite; public Sprite gunSprite;
[SpineSlot] public string gunSlot; [SpineSlot] public string gunSlot;
[SpineAttachment(slotField:"gunSlot")] public string gunKey = "gun"; [SpineAttachment(slotField:"gunSlot", skinField:"baseSkinName")] public string gunKey = "gun";
[Header("Runtime Repack")] [Header("Runtime Repack")]
public bool repack = true; public bool repack = true;
public Material sourceMaterial;
[Header("Do not assign")] [Header("Do not assign")]
public Texture2D runtimeAtlas; public Texture2D runtimeAtlas;
public Material runtimeMaterial; public Material runtimeMaterial;
#endregion #endregion
Skin customSkin;
void OnValidate () { void OnValidate () {
if (sourceMaterial == null) { if (sourceMaterial == null) {
var skeletonAnimation = GetComponent<SkeletonAnimation>(); var skeletonAnimation = GetComponent<SkeletonAnimation>();
@ -63,53 +70,64 @@ namespace Spine.Unity.Examples {
} }
void Start () { void Start () {
Apply();
}
void Apply () {
var skeletonAnimation = GetComponent<SkeletonAnimation>(); var skeletonAnimation = GetComponent<SkeletonAnimation>();
var skeleton = skeletonAnimation.Skeleton; var skeleton = skeletonAnimation.Skeleton;
// All attachment changes will be applied to the skin. We use a clone so other instances will not be affected. // STEP 0: PREPARE SKINS
var newSkin = skeleton.UnshareSkin(true, false, skeletonAnimation.AnimationState); // Let's prepare a new skin to be our custom skin with equips/customizations. We get a clone so our original skins are unaffected.
customSkin = customSkin ?? new Skin("custom skin"); // This requires that all customizations are done with skin placeholders defined in Spine.
//customSkin = customSkin ?? skeleton.UnshareSkin(true, false, skeletonAnimation.AnimationState); // use this if you are not customizing on the default skin and don't plan to remove
// Next let's
var baseSkin = skeleton.Data.FindSkin(baseSkinName);
// NOTE: sprite textures need to be full rect. // STEP 1: "EQUIP" ITEMS USING SPRITES
var originalSkin = skeleton.Data.DefaultSkin; // STEP 1.1 Find the original attachment.
// Step 1.2 Get a clone of the original attachment.
int visorSlotIndex = skeleton.FindSlotIndex(visorSlot); // Step 1.3 Apply the Sprite image to it.
RegionAttachment originalVisor = originalSkin.GetAttachment(visorSlotIndex, visorKey) as RegionAttachment; // Step 1.4 Add the remapped clone to the new custom skin.
RegionAttachment newVisor = visorSprite.ToRegionAttachmentPMAClone(sourceMaterial);
newVisor.X = originalVisor.X;
newVisor.Y = originalVisor.Y;
newVisor.Rotation = originalVisor.Rotation;
newSkin.AddAttachment(visorSlotIndex, visorKey, newVisor);
// Let's do this for the visor.
int visorSlotIndex = skeleton.FindSlotIndex(visorSlot); // You can access GetAttachment and SetAttachment via string, but caching the slotIndex is faster.
Attachment baseAttachment = baseSkin.GetAttachment(visorSlotIndex, visorKey); // STEP 1.1
Attachment newAttachment = baseAttachment.GetRemappedClone(visorSprite, sourceMaterial); // STEP 1.2 - 1.3
customSkin.SetAttachment(visorSlotIndex, visorKey, newAttachment); // STEP 1.4
// And now for the gun.
int gunSlotIndex = skeleton.FindSlotIndex(gunSlot); int gunSlotIndex = skeleton.FindSlotIndex(gunSlot);
RegionAttachment originalGun = originalSkin.GetAttachment(gunSlotIndex, gunKey) as RegionAttachment; Attachment baseGun = baseSkin.GetAttachment(gunSlotIndex, gunKey); // STEP 1.1
RegionAttachment newGun = gunSprite.ToRegionAttachmentPMAClone(sourceMaterial); Attachment newGun = baseGun.GetRemappedClone(gunSprite, sourceMaterial); // STEP 1.2 - 1.3
newGun.x = originalGun.x; if (newGun != null) customSkin.SetAttachment(gunSlotIndex, gunKey, newGun); // STEP 1.4
newGun.y = originalGun.y;
newGun.Rotation = originalGun.Rotation;
newSkin.AddAttachment(gunSlotIndex, gunKey, newGun);
// Case 3: Change an existing attachment's backing region. // customSkin.RemoveAttachment(gunSlotIndex, gunKey); // To remove an item.
// if (applyHeadRegion) { // customSkin.Clear()
// AtlasRegion spineBoyHead = headSource.GetAtlas().FindRegion(headRegion); // Use skin.Clear() To remove all customizations.
// int headSlotIndex = skeleton.FindSlotIndex(headSlot); // Customizations will fall back to the value in the default skin if it was defined there.
// var newHead = newSkin.GetAttachment(headSlotIndex, headAttachmentName).GetClone(true); // To prevent fallback from happening, make sure the key is not defined in the default skin.
// newHead.SetRegion(spineBoyHead);
// newSkin.AddAttachment(headSlotIndex, headAttachmentName, newHead);
// }
// Case 4: Repacking a mixed-and-matched skin to minimize draw calls. // STEP 3: APPLY AND CLEAN UP.
// Repacking requires that you set all source textures/sprites/atlases to be Read/Write enabled in the inspector. // Recommended: REPACK THE CUSTOM SKIN TO MINIMIZE DRAW CALLS
if (repack) { // Repacking requires that you set all source textures/sprites/atlases to be Read/Write enabled in the inspector.
newSkin = newSkin.GetRepackedSkin("repacked", sourceMaterial, out runtimeMaterial, out runtimeAtlas); // Combine all the attachment sources into one skin. Usually this means the default skin and the custom skin.
// call Skin.GetRepackedSkin to get a cloned skin with cloned attachments that all use one texture.
// Under the hood, this relies on
if (repack) {
var repackedSkin = new Skin("repacked skin");
repackedSkin.Append(skeleton.Data.DefaultSkin);
repackedSkin.Append(customSkin);
repackedSkin = repackedSkin.GetRepackedSkin("repacked skin", sourceMaterial, out runtimeMaterial, out runtimeAtlas);
skeleton.SetSkin(repackedSkin);
} else {
skeleton.SetSkin(customSkin);
} }
skeleton.SetSkin(newSkin);
skeleton.SetSlotsToSetupPose(); skeleton.SetSlotsToSetupPose();
skeletonAnimation.Update(0); skeletonAnimation.Update(0);
Resources.UnloadUnusedAssets(); Resources.UnloadUnusedAssets();
} }
} }
} }

View File

@ -2,9 +2,8 @@
using Spine; using Spine;
using Spine.Unity; using Spine.Unity;
namespace Spine.Unity.Modules { namespace Spine.Unity.Examples {
public class BoneLocalOverride : MonoBehaviour { public class BoneLocalOverride : MonoBehaviour {
[SpineBone] [SpineBone]
public string boneName; public string boneName;
@ -15,12 +14,23 @@ namespace Spine.Unity.Modules {
public bool overridePosition = true; public bool overridePosition = true;
public Vector2 localPosition; public Vector2 localPosition;
[Space]
public bool overrideRotation = true; public bool overrideRotation = true;
[Range(0, 360)] public float rotation = 0; [Range(0, 360)] public float rotation = 0;
ISkeletonAnimation spineComponent; ISkeletonAnimation spineComponent;
Bone bone; Bone bone;
#if UNITY_EDITOR
void OnValidate () {
if (Application.isPlaying) return;
spineComponent = spineComponent ?? GetComponent<ISkeletonAnimation>();
if (spineComponent == null) return;
if (bone != null) bone.SetToSetupPose();
OverrideLocal(spineComponent);
}
#endif
void Awake () { void Awake () {
spineComponent = GetComponent<ISkeletonAnimation>(); spineComponent = GetComponent<ISkeletonAnimation>();
if (spineComponent == null) { this.enabled = false; return; } if (spineComponent == null) { this.enabled = false; return; }

View File

@ -0,0 +1,33 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Spine.Unity.Modules.AttachmentTools;
namespace Spine.Unity.Examples {
public class CombinedSkin : MonoBehaviour {
[SpineSkin]
public List<string> skinsToCombine;
Skin combinedSkin;
void Start () {
var skeletonComponent = GetComponent<ISkeletonComponent>();
if (skeletonComponent == null) return;
var skeleton = skeletonComponent.Skeleton;
if (skeleton == null) return;
combinedSkin = combinedSkin ?? new Skin("combined");
combinedSkin.Clear();
foreach (var skinName in skinsToCombine) {
var skin = skeleton.Data.FindSkin(skinName);
if (skin != null) combinedSkin.Append(skin);
}
skeleton.SetSkin(combinedSkin);
skeleton.SetToSetupPose();
var animationStateComponent = skeletonComponent as IAnimationStateComponent;
if (animationStateComponent != null) animationStateComponent.AnimationState.Apply(skeleton);
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: e864d2963143ec04eb4f905e6add115e
timeCreated: 1495176902
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,83 +0,0 @@
/******************************************************************************
* Spine Runtimes Software License v2.5
*
* Copyright (c) 2013-2016, Esoteric Software
* All rights reserved.
*
* You are granted a perpetual, non-exclusive, non-sublicensable, and
* non-transferable license to use, install, execute, and perform the Spine
* Runtimes software and derivative works solely for personal or internal
* use. Without the written permission of Esoteric Software (see Section 2 of
* the Spine Software License Agreement), you may not (a) modify, translate,
* adapt, or develop new applications using the Spine Runtimes or otherwise
* create derivative works or improvements of the Spine Runtimes or (b) remove,
* delete, alter, or obscure any trademarks or any copyright, trademark, patent,
* or other intellectual property or proprietary rights notices on or in the
* Software, including any copy thereof. Redistributions in binary or source
* form must include this license and terms.
*
* THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF
* USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
using UnityEngine;
using Spine;
using Spine.Unity;
namespace Spine.Unity.Modules {
public class CustomSkin : MonoBehaviour {
[System.Serializable]
public class SkinPair {
/// <summary>SpineAttachment attachment path to help find the attachment.</summary>
/// <remarks>This use of SpineAttachment generates an attachment path string that can only be used by SpineAttachment.GetAttachment.</remarks>
[SpineAttachment(currentSkinOnly: false, returnAttachmentPath: true, dataField: "skinSource")]
[UnityEngine.Serialization.FormerlySerializedAs("sourceAttachment")]
public string sourceAttachmentPath;
[SpineSlot]
public string targetSlot;
/// <summary>The name of the skin placeholder/skin dictionary entry this attachment should be associated with.</summary>
/// <remarks>This name is used by the skin dictionary, used in the method Skin.AddAttachment as well as setting a slot attachment</remarks>
[SpineAttachment(currentSkinOnly: true, placeholdersOnly: true)]
public string targetAttachment;
}
#region Inspector
public SkeletonDataAsset skinSource;
[UnityEngine.Serialization.FormerlySerializedAs("skinning")]
public SkinPair[] skinItems;
public Skin customSkin;
#endregion
SkeletonRenderer skeletonRenderer;
void Start () {
skeletonRenderer = GetComponent<SkeletonRenderer>();
Skeleton skeleton = skeletonRenderer.skeleton;
customSkin = new Skin("CustomSkin");
foreach (var pair in skinItems) {
var attachment = SpineAttachment.GetAttachment(pair.sourceAttachmentPath, skinSource);
customSkin.AddAttachment(skeleton.FindSlotIndex(pair.targetSlot), pair.targetAttachment, attachment);
}
// The custom skin does not need to be added to the skeleton data for it to work.
// But it's useful for your script to keep a reference to it.
skeleton.SetSkin(customSkin);
}
}
}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: d8033179a12443e4eaef33b35fed074c
folderAsset: yes
timeCreated: 1495179724
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -40,11 +40,8 @@ namespace Spine.Unity.Modules {
[System.Serializable] [System.Serializable]
public class SlotRegionPair { public class SlotRegionPair {
[SpineSlot] [SpineSlot] public string slot;
public string slot; [SpineAtlasRegion] public string region;
[SpineAtlasRegion]
public string region;
} }
[SerializeField] protected AtlasAsset atlasAsset; [SerializeField] protected AtlasAsset atlasAsset;
@ -53,69 +50,34 @@ namespace Spine.Unity.Modules {
Atlas atlas; Atlas atlas;
void Start () { void Awake () {
var skeletonRenderer = GetComponent<SkeletonRenderer>();
skeletonRenderer.OnRebuild += Apply;
if (skeletonRenderer.valid) Apply(skeletonRenderer);
} }
void Awake () { void Start () { } // Allow checkbox in inspector
GetComponent<SkeletonRenderer>().OnRebuild += Apply;
}
void Apply (SkeletonRenderer skeletonRenderer) { void Apply (SkeletonRenderer skeletonRenderer) {
if (!this.enabled) return; if (!this.enabled) return;
atlas = atlasAsset.GetAtlas(); atlas = atlasAsset.GetAtlas();
float scale = skeletonRenderer.skeletonDataAsset.scale; float scale = skeletonRenderer.skeletonDataAsset.scale;
foreach (var entry in attachments) { foreach (var entry in attachments) {
var slot = skeletonRenderer.Skeleton.FindSlot(entry.slot); Slot slot = skeletonRenderer.Skeleton.FindSlot(entry.slot);
var region = atlas.FindRegion(entry.region); Attachment originalAttachment = slot.Attachment;
ReplaceAttachment(slot, region, scale, inheritProperties); AtlasRegion region = atlas.FindRegion(entry.region);
}
}
static void ReplaceAttachment (Slot slot, AtlasRegion region, float scale, bool inheritProperties) { if (region == null) {
var originalAttachment = slot.Attachment; slot.Attachment = null;
} else if (inheritProperties && originalAttachment != null) {
// Altas was empty slot.Attachment = originalAttachment.GetRemappedClone(region, true, true, scale);
if (region == null) { } else {
slot.Attachment = null; var newRegionAttachment = region.ToRegionAttachment(region.name, scale);
return; slot.Attachment = newRegionAttachment;
}
// Original was MeshAttachment
if (inheritProperties) {
var originalMeshAttachment = originalAttachment as MeshAttachment;
if (originalMeshAttachment != null) {
var newMeshAttachment = originalMeshAttachment.GetLinkedClone(); // Attach the region as a linked mesh to the original mesh.
newMeshAttachment.SetRegion(region);
slot.Attachment = newMeshAttachment;
return;
} }
} }
// Original was RegionAttachment or empty
{
var originalRegionAttachment = originalAttachment as RegionAttachment;
var newRegionAttachment = region.ToRegionAttachment(region.name, scale);
if (originalRegionAttachment != null && inheritProperties) {
newRegionAttachment.X = originalRegionAttachment.X;
newRegionAttachment.Y = originalRegionAttachment.Y;
newRegionAttachment.Rotation = originalRegionAttachment.Rotation;
newRegionAttachment.ScaleX = originalRegionAttachment.ScaleX;
newRegionAttachment.ScaleY = originalRegionAttachment.ScaleY;
newRegionAttachment.UpdateOffset();
newRegionAttachment.R = originalRegionAttachment.R;
newRegionAttachment.G = originalRegionAttachment.G;
newRegionAttachment.B = originalRegionAttachment.B;
newRegionAttachment.A = originalRegionAttachment.A;
}
slot.Attachment = newRegionAttachment;
return;
}
} }
} }
} }

View File

@ -17,19 +17,19 @@ namespace Spine.Unity.Examples {
public Color color = Color.white; public Color color = Color.white;
} }
#if UNITY_EDITOR
void OnValidate () { void OnValidate () {
var skeletonComponent = GetComponent<ISkeletonComponent>(); var skeletonComponent = GetComponent<ISkeletonComponent>();
if (skeletonComponent != null) { if (skeletonComponent != null) {
skeletonComponent.Skeleton.SetSlotsToSetupPose(); skeletonComponent.Skeleton.SetSlotsToSetupPose();
var animationStateComponent = GetComponent<IAnimationStateComponent>(); var animationStateComponent = GetComponent<IAnimationStateComponent>();
if (animationStateComponent != null && animationStateComponent.AnimationState != null) { if (animationStateComponent != null && animationStateComponent.AnimationState != null) {
animationStateComponent.AnimationState.Apply(skeletonComponent.Skeleton); animationStateComponent.AnimationState.Apply(skeletonComponent.Skeleton);
} }
} }
ApplySettings(); ApplySettings();
} }
#endif
void Start () { void Start () {
ApplySettings(); ApplySettings();
@ -41,8 +41,11 @@ namespace Spine.Unity.Examples {
var skeleton = skeletonComponent.Skeleton; var skeleton = skeletonComponent.Skeleton;
skeleton.SetColor(skeletonColor); skeleton.SetColor(skeletonColor);
foreach (var s in slotSettings) foreach (var s in slotSettings) {
skeleton.FindSlot(s.slot).SetColor(s.color); var slot = skeleton.FindSlot(s.slot);
if (slot != null) slot.SetColor(s.color);
}
} }
} }

View File

@ -1,14 +1,13 @@
using UnityEngine; using UnityEngine;
using Spine.Unity; using Spine.Unity;
namespace Spine.Unity.Modules { namespace Spine.Unity.Examples {
/// <summary> /// <summary>
/// Add this component to a Spine GameObject to apply a specific slot's Colors as MaterialProperties. /// Add this component to a Spine GameObject to apply a specific slot's Colors as MaterialProperties.
/// This allows you to apply the two color tint to the whole skeleton and not require the overhead of an extra vertex stream on the mesh. /// This allows you to apply the two color tint to the whole skeleton and not require the overhead of an extra vertex stream on the mesh.
/// </summary> /// </summary>
public class SlotTintBlackFollower : MonoBehaviour { public class SlotTintBlackFollower : MonoBehaviour {
#region Inspector #region Inspector
/// <summary> /// <summary>
/// Serialized name of the slot loaded at runtime. Change the slot field instead of this if you want to change the followed slot at runtime.</summary> /// Serialized name of the slot loaded at runtime. Change the slot field instead of this if you want to change the followed slot at runtime.</summary>

View File

@ -1,7 +1,7 @@
{ {
"skeleton": { "skeleton": {
"hash": "Y26zlNQJnWO557F8ZD/2NjtP3n0", "hash": "pT8+kphidZDzlY5lbXpU0cNNzmQ",
"spine": "3.6.09-beta", "spine": "3.6.18-beta",
"width": 470.71, "width": 470.71,
"height": 731.57, "height": 731.57,
"images": "C:/Program Files (x86)/Spine/examples/spineboy/images/" "images": "C:/Program Files (x86)/Spine/examples/spineboy/images/"
@ -146,12 +146,6 @@
"front_upper_arm": { "front_upper_arm": {
"front_upper_arm": { "x": 28.31, "y": 7.37, "rotation": 97.9, "width": 54, "height": 97 } "front_upper_arm": { "x": 28.31, "y": 7.37, "rotation": 97.9, "width": 54, "height": 97 }
}, },
"goggles": {
"goggles": { "x": 97.08, "y": 6.54, "rotation": -70.63, "width": 261, "height": 166 }
},
"gun": {
"gun": { "x": 77.29, "y": 16.4, "rotation": 60.83, "width": 210, "height": 203 }
},
"gun2": { "gun2": {
"gun": { "x": 43.59, "y": -39.79, "width": 210, "height": 203 } "gun": { "x": 43.59, "y": -39.79, "width": 210, "height": 203 }
}, },
@ -212,6 +206,23 @@
"torso": { "torso": {
"torso": { "x": 63.61, "y": 7.12, "rotation": -94.54, "width": 98, "height": 180 } "torso": { "x": 63.61, "y": 7.12, "rotation": -94.54, "width": 98, "height": 180 }
} }
},
"base": {
"goggles": {
"goggles": { "x": 97.08, "y": 6.54, "rotation": -70.63, "width": 261, "height": 166 }
},
"gun": {
"gun": {
"type": "mesh",
"uvs": [ 1, 0.38477, 1, 1, 0.55294, 1, 0, 0.51149, 0, 0, 0.72913, 0 ],
"triangles": [ 3, 4, 5, 0, 2, 3, 0, 3, 5, 2, 0, 1 ],
"vertices": [ 108.05, 119.48, 217.1, 58.6, 171.34, -23.37, 28.15, -76.42, -62.51, -25.81, 12.13, 107.89 ],
"hull": 6,
"edges": [ 6, 8, 2, 4, 6, 4, 8, 10, 2, 0, 10, 0 ],
"width": 210,
"height": 203
}
}
} }
}, },
"events": { "events": {
@ -778,21 +789,21 @@
}, },
"muzzle": { "muzzle": {
"color": [ "color": [
{ "time": 0, "color": "0000803f", "curve": "stepped" }, { "time": 0, "color": "0000803e", "curve": "stepped" },
{ "time": 0.7667, "color": "0000803f", "curve": "stepped" }, { "time": 0.7667, "color": "0000803e", "curve": "stepped" },
{ "time": 0.8, "color": "0000803f", "curve": "stepped" }, { "time": 0.8, "color": "0000803e", "curve": "stepped" },
{ "time": 0.8333, "color": "0000803f", "curve": "stepped" }, { "time": 0.8333, "color": "0000803e", "curve": "stepped" },
{ "time": 0.8667, "color": "0000803f", "curve": "stepped" }, { "time": 0.8667, "color": "0000803e", "curve": "stepped" },
{ "time": 0.9, "color": "0000803f", "curve": "stepped" }, { "time": 0.9, "color": "0000803e", "curve": "stepped" },
{ "time": 0.9333, "color": "0000803f", "curve": "stepped" }, { "time": 0.9333, "color": "0000803e", "curve": "stepped" },
{ "time": 0.9667, "color": "0000803f", "curve": "stepped" }, { "time": 0.9667, "color": "0000803e", "curve": "stepped" },
{ "time": 1.1, "color": "0000803f", "curve": "stepped" }, { "time": 1.1, "color": "0000803e", "curve": "stepped" },
{ "time": 1.1333, "color": "0000803f", "curve": "stepped" }, { "time": 1.1333, "color": "0000803e", "curve": "stepped" },
{ "time": 1.2, "color": "0000803f", "curve": "stepped" }, { "time": 1.2, "color": "0000803e", "curve": "stepped" },
{ "time": 1.2333, "color": "0000803f", "curve": "stepped" }, { "time": 1.2333, "color": "0000803e", "curve": "stepped" },
{ "time": 1.2667, "color": "0000803f", "curve": "stepped" }, { "time": 1.2667, "color": "0000803e", "curve": "stepped" },
{ "time": 1.3333, "color": "0000803f", "curve": "stepped" }, { "time": 1.3333, "color": "0000803e", "curve": "stepped" },
{ "time": 2.5333, "color": "0000803f" } { "time": 2.5333, "color": "0000803e" }
], ],
"attachment": [ "attachment": [
{ "time": 0, "name": null }, { "time": 0, "name": null },
@ -4929,10 +4940,10 @@
}, },
"muzzle": { "muzzle": {
"color": [ "color": [
{ "time": 0.0225, "color": "0000803f", "curve": "stepped" }, { "time": 0.0225, "color": "0000803e", "curve": "stepped" },
{ "time": 0.0667, "color": "0000803f", "curve": "stepped" }, { "time": 0.0667, "color": "0000803e", "curve": "stepped" },
{ "time": 0.1, "color": "0000803f", "curve": "stepped" }, { "time": 0.1, "color": "0000803e", "curve": "stepped" },
{ "time": 0.1667, "color": "0000803f" } { "time": 0.1667, "color": "0000803e" }
], ],
"attachment": [ "attachment": [
{ "time": 0.0333, "name": "muzzle" }, { "time": 0.0333, "name": "muzzle" },
@ -5033,9 +5044,9 @@
}, },
"muzzle": { "muzzle": {
"color": [ "color": [
{ "time": 0.1333, "color": "0000803f", "curve": "stepped" }, { "time": 0.1333, "color": "0000803e", "curve": "stepped" },
{ "time": 0.1667, "color": "0000803f", "curve": "stepped" }, { "time": 0.1667, "color": "0000803e", "curve": "stepped" },
{ "time": 0.2667, "color": "0000803f" } { "time": 0.2667, "color": "0000803e" }
], ],
"attachment": [ "attachment": [
{ "time": 0.1333, "name": "muzzle" }, { "time": 0.1333, "name": "muzzle" },
@ -5118,21 +5129,21 @@
"slots": { "slots": {
"front_foot": { "front_foot": {
"color": [ "color": [
{ "time": 0.6667, "color": "0000803f", "curve": "stepped" }, { "time": 0.6667, "color": "0000803e", "curve": "stepped" },
{ "time": 1.3333, "color": "0000803f" } { "time": 1.3333, "color": "0000803e" }
] ]
}, },
"gun": { "gun": {
"color": [ "color": [
{ "time": 0, "color": "0000803f", "curve": "stepped" }, { "time": 0, "color": "0000803e", "curve": "stepped" },
{ "time": 0.6667, "color": "0000803f" }, { "time": 0.6667, "color": "0000803e" },
{ "time": 1.3333, "color": "c9c8483e" } { "time": 1.3333, "color": "c9c8483e" }
] ]
}, },
"rear_foot": { "rear_foot": {
"color": [ "color": [
{ "time": 0.6667, "color": "0000803f", "curve": "stepped" }, { "time": 0.6667, "color": "0000803e", "curve": "stepped" },
{ "time": 1.3333, "color": "0000803f" } { "time": 1.3333, "color": "0000803e" }
] ]
} }
}, },

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e3b64d7eaf0de4e45a00b7065166554d
timeCreated: 1495168707
licenseType: Free
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -9,14 +9,14 @@ MonoBehaviour:
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f1b3b4b945939a54ea0b23d3396115fb, type: 3} m_Script: {fileID: 11500000, guid: f1b3b4b945939a54ea0b23d3396115fb, type: 3}
m_Name: spineboy_SkeletonData m_Name: spineboy-unity_SkeletonData
m_EditorClassIdentifier: m_EditorClassIdentifier:
atlasAssets: atlasAssets:
- {fileID: 11400000, guid: b4b8457d6cb8fec49a40be5b71d79e51, type: 2} - {fileID: 11400000, guid: b4b8457d6cb8fec49a40be5b71d79e51, type: 2}
scale: 0.01 scale: 0.01
skeletonJSON: {fileID: 4900000, guid: d43e38db0e34033438474d0c01fd4404, type: 3} skeletonJSON: {fileID: 4900000, guid: e3b64d7eaf0de4e45a00b7065166554d, type: 3}
fromAnimation: [] fromAnimation: []
toAnimation: [] toAnimation: []
duration: [] duration: []
defaultMix: 0.1 defaultMix: 0.15
controller: {fileID: 0} controller: {fileID: 0}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a467507a4ffb1d542a558739b2fede77
timeCreated: 1495168707
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: d43e38db0e34033438474d0c01fd4404
TextScriptImporter:
userData:

View File

@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 44691b56ed7d1f04da0cbc2a52a91b8d
NativeFormatImporter:
userData:

View File

@ -8,16 +8,23 @@ Material:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_Name: stretchyman-diffuse-pma_Material m_Name: stretchyman-diffuse-pma_Material
m_Shader: {fileID: 4800000, guid: 2ce511398fb980f41b7d316c51534590, type: 3} m_Shader: {fileID: 4800000, guid: 2ce511398fb980f41b7d316c51534590, type: 3}
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _EMISSION _FIXED_NORMALS _NORMALMAP m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _EMISSION _FIXED_NORMALS _FIXED_NORMALS_VIEWSPACE
_NORMALMAP
m_LightmapFlags: 5 m_LightmapFlags: 5
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_CustomRenderQueue: 3000 m_CustomRenderQueue: 3000
stringTagMap: stringTagMap:
RenderType: Sprite AlphaDepth: true
IGNOREPROJECTOR: true
RenderType: Transparent
disabledShaderPasses: [] disabledShaderPasses: []
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
- _AlphaTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BlendTex: - _BlendTex:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
@ -38,15 +45,26 @@ Material:
m_Texture: {fileID: 2800000, guid: 33f10ea7e20549d40a1c23a1adc3f760, type: 3} m_Texture: {fileID: 2800000, guid: 33f10ea7e20549d40a1c23a1adc3f760, type: 3}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: m_Floats:
- PixelSnap: 0
- _BlendAmount: 0 - _BlendAmount: 0
- _BlendMode: 0 - _BlendMode: 0
- _Brightness: 1 - _Brightness: 1
- _BumpScale: 1
- _Cull: 0 - _Cull: 0
- _CustomRenderQueue: 0
- _Cutoff: 0.1 - _Cutoff: 0.1
- _DstBlend: 10 - _DstBlend: 10
- _EmissionPower: 1 - _EmissionPower: 1
- _EnableExternalAlpha: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _Hue: 0 - _Hue: 0
- _Metallic: 0
- _RenderQueue: 0 - _RenderQueue: 0
- _RimPower: 1.79 - _RimPower: 1.79
- _Saturation: 1 - _Saturation: 1
@ -56,6 +74,6 @@ Material:
m_Colors: m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _FixedNormal: {r: 0, g: 0, b: -1, a: 1} - _FixedNormal: {r: 0, g: 0, b: 1, a: 1}
- _OverlayColor: {r: 0, g: 0, b: 0, a: 0} - _OverlayColor: {r: 0, g: 0, b: 0, a: 0}
- _RimColor: {r: 1, g: 1, b: 1, a: 1} - _RimColor: {r: 1, g: 1, b: 1, a: 1}

View File

@ -164,6 +164,12 @@ namespace Spine.Unity.Modules.AttachmentTools {
attachment.scaleY = 1; attachment.scaleY = 1;
attachment.rotation = 0; attachment.rotation = 0;
attachment.r = 1;
attachment.g = 1;
attachment.b = 1;
attachment.a = 1;
// pass OriginalWidth and OriginalHeight because UpdateOffset uses it in its calculation. // pass OriginalWidth and OriginalHeight because UpdateOffset uses it in its calculation.
attachment.width = attachment.regionOriginalWidth * scale; attachment.width = attachment.regionOriginalWidth * scale;
attachment.height = attachment.regionOriginalHeight * scale; attachment.height = attachment.regionOriginalHeight * scale;
@ -708,6 +714,14 @@ namespace Spine.Unity.Modules.AttachmentTools {
skin.AddAttachment(slotIndex, keyName, attachment); skin.AddAttachment(slotIndex, keyName, attachment);
} }
/// <summary>Gets an attachment from the skin for the specified slot index and name.</summary>
public static Attachment GetAttachment (this Skin skin, string slotName, string keyName, Skeleton skeleton) {
int slotIndex = skeleton.FindSlotIndex(slotName);
if (skeleton == null) throw new System.ArgumentNullException("skeleton", "skeleton cannot be null.");
if (slotIndex == -1) throw new System.ArgumentException(string.Format("Slot '{0}' does not exist in skeleton.", slotName), "slotName");
return skin.GetAttachment(slotIndex, keyName);
}
/// <summary>Adds an attachment to the skin for the specified slot index and name. If the name already exists for the slot, the previous value is replaced.</summary> /// <summary>Adds an attachment to the skin for the specified slot index and name. If the name already exists for the slot, the previous value is replaced.</summary>
public static void SetAttachment (this Skin skin, int slotIndex, string keyName, Attachment attachment) { public static void SetAttachment (this Skin skin, int slotIndex, string keyName, Attachment attachment) {
skin.AddAttachment(slotIndex, keyName, attachment); skin.AddAttachment(slotIndex, keyName, attachment);
@ -730,8 +744,8 @@ namespace Spine.Unity.Modules.AttachmentTools {
skin.Attachments.Clear(); skin.Attachments.Clear();
} }
public static void Append (this Skin destination, Skin source, bool overwrite, bool cloneAttachments, bool cloneMeshesAsLinked = true) { public static void Append (this Skin destination, Skin source) {
source.CopyTo(destination, overwrite, cloneAttachments, cloneMeshesAsLinked); source.CopyTo(destination, true, false);
} }
public static void CopyTo (this Skin source, Skin destination, bool overwrite, bool cloneAttachments, bool cloneMeshesAsLinked = true) { public static void CopyTo (this Skin source, Skin destination, bool overwrite, bool cloneAttachments, bool cloneMeshesAsLinked = true) {
@ -943,5 +957,52 @@ namespace Spine.Unity.Modules.AttachmentTools {
return o.GetLinkedMesh(sprite, materialPropertySource.shader, inheritDeform, materialPropertySource); return o.GetLinkedMesh(sprite, materialPropertySource.shader, inheritDeform, materialPropertySource);
} }
#endregion #endregion
#region RemappedClone Convenience Methods
/// <summary>
/// Gets a clone of the attachment remapped with a sprite image.</summary>
/// <returns>The remapped clone.</returns>
/// <param name="o">The original attachment.</param>
/// <param name="sprite">The sprite whose texture to use.</param>
/// <param name="sourceMaterial">The source material used to copy the shader and material properties from.</param>
/// <param name="premultiplyAlpha">If <c>true</c>, a premultiply alpha clone of the original texture will be created.</param>
/// <param name="cloneMeshAsLinked">If <c>true</c> MeshAttachments will be cloned as linked meshes and will inherit animation from the original attachment.</param>
/// <param name="useOriginalRegionSize">If <c>true</c> the size of the original attachment will be followed, instead of using the Sprite size.</param>
public static Attachment GetRemappedClone (this Attachment o, Sprite sprite, Material sourceMaterial, bool premultiplyAlpha = true, bool cloneMeshAsLinked = true, bool useOriginalRegionSize = false) {
var atlasRegion = premultiplyAlpha ? sprite.ToAtlasRegionPMAClone(sourceMaterial) : sprite.ToAtlasRegion(false);
return o.GetRemappedClone(atlasRegion, cloneMeshAsLinked, useOriginalRegionSize, 1f/sprite.pixelsPerUnit);
}
/// <summary>
/// Gets a clone of the attachment remapped with an atlasRegion image.</summary>
/// <returns>The remapped clone.</returns>
/// <param name="o">The original attachment.</param>
/// <param name="atlasRegion">Atlas region.</param>
/// <param name="cloneMeshAsLinked">If <c>true</c> MeshAttachments will be cloned as linked meshes and will inherit animation from the original attachment.</param>
/// <param name="useOriginalRegionSize">If <c>true</c> the size of the original attachment will be followed, instead of using the Sprite size.</param>
/// <param name="scale">Unity units per pixel scale used to scale the atlas region size when not using the original region size.</param>
public static Attachment GetRemappedClone (this Attachment o, AtlasRegion atlasRegion, bool cloneMeshAsLinked = true, bool useOriginalRegionSize = false, float scale = 0.01f) {
var regionAttachment = o as RegionAttachment;
if (regionAttachment != null) {
RegionAttachment newAttachment = regionAttachment.GetClone();
newAttachment.SetRegion(atlasRegion, false);
if (!useOriginalRegionSize) {
newAttachment.width = atlasRegion.width * scale;
newAttachment.height = atlasRegion.height * scale;
}
newAttachment.UpdateOffset();
return newAttachment;
} else {
var meshAttachment = o as MeshAttachment;
if (meshAttachment != null) {
MeshAttachment newAttachment = cloneMeshAsLinked ? meshAttachment.GetLinkedClone(cloneMeshAsLinked) : meshAttachment.GetClone();
newAttachment.SetRegion(atlasRegion);
return newAttachment;
}
}
return o.GetClone(true); // Non-renderable Attachments will return as normal cloned attachments.
}
#endregion
} }
} }

View File

@ -29,7 +29,6 @@
*****************************************************************************/ *****************************************************************************/
using UnityEngine; using UnityEngine;
using System.Collections;
namespace Spine.Unity.Modules { namespace Spine.Unity.Modules {
[RequireComponent(typeof(SkeletonUtilityBone)), ExecuteInEditMode] [RequireComponent(typeof(SkeletonUtilityBone)), ExecuteInEditMode]
@ -37,7 +36,7 @@ namespace Spine.Unity.Modules {
[Tooltip("LayerMask for what objects to raycast against")] [Tooltip("LayerMask for what objects to raycast against")]
public LayerMask groundMask; public LayerMask groundMask;
[Tooltip("The 2D")] [Tooltip("Use 2D")]
public bool use2D = false; public bool use2D = false;
[Tooltip("Uses SphereCast for 3D mode and CircleCast for 2D mode")] [Tooltip("Uses SphereCast for 3D mode and CircleCast for 2D mode")]
public bool useRadius = false; public bool useRadius = false;
@ -62,10 +61,6 @@ namespace Spine.Unity.Modules {
lastHitY = transform.position.y; lastHitY = transform.position.y;
} }
protected override void OnDisable () {
base.OnDisable();
}
public override void DoUpdate () { public override void DoUpdate () {
rayOrigin = transform.position + new Vector3(castOffset, castDistance, 0); rayOrigin = transform.position + new Vector3(castOffset, castDistance, 0);
@ -73,17 +68,15 @@ namespace Spine.Unity.Modules {
if (use2D) { if (use2D) {
RaycastHit2D hit; RaycastHit2D hit;
if (useRadius) { if (useRadius)
hit = Physics2D.CircleCast(rayOrigin, castRadius, rayDir, castDistance + groundOffset, groundMask); hit = Physics2D.CircleCast(rayOrigin, castRadius, rayDir, castDistance + groundOffset, groundMask);
} else { else
hit = Physics2D.Raycast(rayOrigin, rayDir, castDistance + groundOffset, groundMask); hit = Physics2D.Raycast(rayOrigin, rayDir, castDistance + groundOffset, groundMask);
}
if (hit.collider != null) { if (hit.collider != null) {
hitY = hit.point.y + groundOffset; hitY = hit.point.y + groundOffset;
if (Application.isPlaying) { if (Application.isPlaying)
hitY = Mathf.MoveTowards(lastHitY, hitY, adjustSpeed * Time.deltaTime); hitY = Mathf.MoveTowards(lastHitY, hitY, adjustSpeed * Time.deltaTime);
}
} else { } else {
if (Application.isPlaying) if (Application.isPlaying)
hitY = Mathf.MoveTowards(lastHitY, transform.position.y, adjustSpeed * Time.deltaTime); hitY = Mathf.MoveTowards(lastHitY, transform.position.y, adjustSpeed * Time.deltaTime);
@ -92,17 +85,16 @@ namespace Spine.Unity.Modules {
RaycastHit hit; RaycastHit hit;
bool validHit = false; bool validHit = false;
if (useRadius) { if (useRadius)
validHit = Physics.SphereCast(rayOrigin, castRadius, rayDir, out hit, castDistance + groundOffset, groundMask); validHit = Physics.SphereCast(rayOrigin, castRadius, rayDir, out hit, castDistance + groundOffset, groundMask);
} else { else
validHit = Physics.Raycast(rayOrigin, rayDir, out hit, castDistance + groundOffset, groundMask); validHit = Physics.Raycast(rayOrigin, rayDir, out hit, castDistance + groundOffset, groundMask);
}
if (validHit) { if (validHit) {
hitY = hit.point.y + groundOffset; hitY = hit.point.y + groundOffset;
if (Application.isPlaying) { if (Application.isPlaying)
hitY = Mathf.MoveTowards(lastHitY, hitY, adjustSpeed * Time.deltaTime); hitY = Mathf.MoveTowards(lastHitY, hitY, adjustSpeed * Time.deltaTime);
}
} else { } else {
if (Application.isPlaying) if (Application.isPlaying)
hitY = Mathf.MoveTowards(lastHitY, transform.position.y, adjustSpeed * Time.deltaTime); hitY = Mathf.MoveTowards(lastHitY, transform.position.y, adjustSpeed * Time.deltaTime);