mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16:01 +08:00
Merge branch '3.8' into 4.0-beta
This commit is contained in:
commit
81aee82c91
@ -163,11 +163,10 @@ cocos2d::TrianglesCommand* SkeletonBatch::addCommand(cocos2d::Renderer* renderer
|
|||||||
CCASSERT(programState, "programState should not be null");
|
CCASSERT(programState, "programState should not be null");
|
||||||
|
|
||||||
auto& pipelinePS = command->getPipelineDescriptor().programState;
|
auto& pipelinePS = command->getPipelineDescriptor().programState;
|
||||||
if (pipelinePS != programState)
|
if (pipelinePS == nullptr || pipelinePS->getProgram() != programState->getProgram())
|
||||||
{
|
{
|
||||||
CC_SAFE_RELEASE(pipelinePS);
|
CC_SAFE_RELEASE(pipelinePS);
|
||||||
pipelinePS = programState;
|
pipelinePS = programState->clone();
|
||||||
CC_SAFE_RETAIN(pipelinePS);
|
|
||||||
|
|
||||||
updateProgramStateLayout(pipelinePS);
|
updateProgramStateLayout(pipelinePS);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -657,6 +657,9 @@ namespace Spine.Unity {
|
|||||||
go.transform.localPosition = Vector3.zero;
|
go.transform.localPosition = Vector3.zero;
|
||||||
var canvasRenderer = go.AddComponent<CanvasRenderer>();
|
var canvasRenderer = go.AddComponent<CanvasRenderer>();
|
||||||
canvasRenderers.Add(canvasRenderer);
|
canvasRenderers.Add(canvasRenderer);
|
||||||
|
var rawImage = go.AddComponent<RawImage>();
|
||||||
|
rawImage.maskable = this.maskable;
|
||||||
|
rawImage.raycastTarget = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -47,7 +47,7 @@ namespace Spine.Unity.Playables {
|
|||||||
|
|
||||||
public override double duration {
|
public override double duration {
|
||||||
get {
|
get {
|
||||||
if (template.animationReference == null)
|
if (template.animationReference == null || template.animationReference.Animation == null)
|
||||||
return 0;
|
return 0;
|
||||||
return template.animationReference.Animation.Duration;
|
return template.animationReference.Animation.Duration;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -141,7 +141,7 @@ namespace Spine.Unity.Playables {
|
|||||||
|
|
||||||
var skeleton = skeletonComponent.Skeleton;
|
var skeleton = skeletonComponent.Skeleton;
|
||||||
|
|
||||||
bool skeletonDataMismatch = clipData.animationReference != null &&
|
bool skeletonDataMismatch = clipData.animationReference != null && clipData.animationReference.SkeletonDataAsset &&
|
||||||
skeletonComponent.SkeletonDataAsset.GetSkeletonData(true) != clipData.animationReference.SkeletonDataAsset.GetSkeletonData(true);
|
skeletonComponent.SkeletonDataAsset.GetSkeletonData(true) != clipData.animationReference.SkeletonDataAsset.GetSkeletonData(true);
|
||||||
if (skeletonDataMismatch) {
|
if (skeletonDataMismatch) {
|
||||||
Debug.LogWarningFormat("SpineAnimationStateMixerBehaviour tried to apply an animation for the wrong skeleton. Expected {0}. Was {1}",
|
Debug.LogWarningFormat("SpineAnimationStateMixerBehaviour tried to apply an animation for the wrong skeleton. Expected {0}. Was {1}",
|
||||||
|
|||||||
@ -119,13 +119,12 @@ namespace Spine {
|
|||||||
if (count< 3) throw new ArgumentException("Polygon must contain at least 3 vertices");
|
if (count< 3) throw new ArgumentException("Polygon must contain at least 3 vertices");
|
||||||
|
|
||||||
offset <<= 1;
|
offset <<= 1;
|
||||||
count <<= 1;
|
|
||||||
|
|
||||||
var firstX = polygonVertices[offset];
|
var firstX = polygonVertices[offset];
|
||||||
var firstY = polygonVertices[offset + 1];
|
var firstY = polygonVertices[offset + 1];
|
||||||
var last = offset + count;
|
var last = offset + count;
|
||||||
|
|
||||||
for (int i = offset, n = offset + count - 2; i<n; i += 2) {
|
for (int i = offset, n = offset + count; i < n; i += 2) {
|
||||||
var x1 = polygonVertices[i];
|
var x1 = polygonVertices[i];
|
||||||
var y1 = polygonVertices[i + 1];
|
var y1 = polygonVertices[i + 1];
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user