[csharp][unity] Fixed compile errors on older Unity/C# versions.

This commit is contained in:
Harald Csaszar 2025-06-24 12:03:42 +02:00
parent fe46a6cfa8
commit 31d34d08fd
5 changed files with 9 additions and 9 deletions

View File

@ -54,7 +54,7 @@ namespace Spine {
this.name = name; this.name = name;
this.duration = duration; this.duration = duration;
int n = timelines.Count << 1; int n = timelines.Count << 1;
timelineIds = new HashSet<string>(n); // note: not needed: timelineIds = new HashSet<string>(n);
bones = new ExposedList<int>(n); bones = new ExposedList<int>(n);
SetTimelines(timelines); SetTimelines(timelines);
} }
@ -2106,7 +2106,7 @@ namespace Spine {
/// <summary> /// <summary>
/// The index of the constraint in <see cref="Skeleton.Constraints"/> that will be changed when this timeline is applied. /// The index of the constraint in <see cref="Skeleton.Constraints"/> that will be changed when this timeline is applied.
/// </summary> /// </summary>
public int ConstraintIndex { get; } int ConstraintIndex { get; }
} }
/// <summary>Changes an IK constraint's <see cref="IkConstraintPose.Mix"/>, <see cref="IkConstraintPose.Softness"/>, /// <summary>Changes an IK constraint's <see cref="IkConstraintPose.Mix"/>, <see cref="IkConstraintPose.Softness"/>,

View File

@ -51,9 +51,9 @@ namespace Spine {
/// </summary> /// </summary>
void UpdateRegion (); void UpdateRegion ();
public abstract Color GetColor (); Color GetColor ();
public abstract void SetColor (Color color); void SetColor (Color color);
public abstract void SetColor (float r, float g, float b, float a); void SetColor (float r, float g, float b, float a);
Sequence Sequence { get; set; } Sequence Sequence { get; set; }
} }

View File

@ -33,8 +33,8 @@ using System.Collections.Generic;
namespace Spine { namespace Spine {
public interface IConstraintData : IPosedData { public interface IConstraintData : IPosedData {
public string Name { get; } string Name { get; }
public IConstraint Create (Skeleton skeleton); IConstraint Create (Skeleton skeleton);
} }
public abstract class ConstraintData<T, P> : PosedData<P>, IConstraintData public abstract class ConstraintData<T, P> : PosedData<P>, IConstraintData

View File

@ -31,6 +31,6 @@ using System;
namespace Spine { namespace Spine {
public interface IPose<P> { public interface IPose<P> {
public void Set (P pose); void Set (P pose);
} }
} }

View File

@ -31,7 +31,7 @@ using System;
namespace Spine { namespace Spine {
public interface IPosedData { public interface IPosedData {
public bool SkinRequired { get; } bool SkinRequired { get; }
} }
/// <summary> /// <summary>