From 31d34d08fd198abe19a9e5e8503dc671c522d323 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Tue, 24 Jun 2025 12:03:42 +0200 Subject: [PATCH] [csharp][unity] Fixed compile errors on older Unity/C# versions. --- spine-csharp/src/Animation.cs | 4 ++-- spine-csharp/src/Attachments/IHasTextureRegion.cs | 6 +++--- spine-csharp/src/ConstraintData.cs | 4 ++-- spine-csharp/src/IPose.cs | 2 +- spine-csharp/src/PosedData.cs | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/spine-csharp/src/Animation.cs b/spine-csharp/src/Animation.cs index 883d066e6..58cee06a6 100644 --- a/spine-csharp/src/Animation.cs +++ b/spine-csharp/src/Animation.cs @@ -54,7 +54,7 @@ namespace Spine { this.name = name; this.duration = duration; int n = timelines.Count << 1; - timelineIds = new HashSet(n); + // note: not needed: timelineIds = new HashSet(n); bones = new ExposedList(n); SetTimelines(timelines); } @@ -2106,7 +2106,7 @@ namespace Spine { /// /// The index of the constraint in that will be changed when this timeline is applied. /// - public int ConstraintIndex { get; } + int ConstraintIndex { get; } } /// Changes an IK constraint's , , diff --git a/spine-csharp/src/Attachments/IHasTextureRegion.cs b/spine-csharp/src/Attachments/IHasTextureRegion.cs index 658f1dfd4..6186737ed 100644 --- a/spine-csharp/src/Attachments/IHasTextureRegion.cs +++ b/spine-csharp/src/Attachments/IHasTextureRegion.cs @@ -51,9 +51,9 @@ namespace Spine { /// 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; } } diff --git a/spine-csharp/src/ConstraintData.cs b/spine-csharp/src/ConstraintData.cs index 16c42fe58..676d7d059 100644 --- a/spine-csharp/src/ConstraintData.cs +++ b/spine-csharp/src/ConstraintData.cs @@ -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 : PosedData

, IConstraintData diff --git a/spine-csharp/src/IPose.cs b/spine-csharp/src/IPose.cs index 6a652e47e..9ac4a1c39 100644 --- a/spine-csharp/src/IPose.cs +++ b/spine-csharp/src/IPose.cs @@ -31,6 +31,6 @@ using System; namespace Spine { public interface IPose

{ - public void Set (P pose); + void Set (P pose); } } diff --git a/spine-csharp/src/PosedData.cs b/spine-csharp/src/PosedData.cs index 6da38c671..720b16aca 100644 --- a/spine-csharp/src/PosedData.cs +++ b/spine-csharp/src/PosedData.cs @@ -31,7 +31,7 @@ using System; namespace Spine { public interface IPosedData { - public bool SkinRequired { get; } + bool SkinRequired { get; } } ///