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

View File

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

View File

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

View File

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

View File

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