mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[unity] Fixed compile error of previous commit regarding Vector2Int on Unity 2017.1.
This commit is contained in:
parent
6ef7df4be6
commit
005e714534
@ -27,6 +27,10 @@
|
|||||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#if UNITY_2017_2_OR_NEWER
|
||||||
|
#define HAS_VECTOR2INT
|
||||||
|
#endif
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Rendering;
|
using UnityEngine.Rendering;
|
||||||
@ -44,6 +48,7 @@ namespace Spine.Unity.Examples {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[RequireComponent(typeof(SkeletonGraphic))]
|
[RequireComponent(typeof(SkeletonGraphic))]
|
||||||
public class SkeletonGraphicRenderTexture : SkeletonRenderTextureBase {
|
public class SkeletonGraphicRenderTexture : SkeletonRenderTextureBase {
|
||||||
|
#if HAS_VECTOR2INT
|
||||||
[System.Serializable]
|
[System.Serializable]
|
||||||
public struct TextureMaterialPair {
|
public struct TextureMaterialPair {
|
||||||
public Texture texture;
|
public Texture texture;
|
||||||
@ -249,5 +254,6 @@ namespace Spine.Unity.Examples {
|
|||||||
protected override void AssignMeshAtRenderer () {
|
protected override void AssignMeshAtRenderer () {
|
||||||
quadCanvasRenderer.SetMesh(quadMesh);
|
quadCanvasRenderer.SetMesh(quadMesh);
|
||||||
}
|
}
|
||||||
|
#endif // HAS_VECTOR2INT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,9 +31,14 @@ using System;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Rendering;
|
using UnityEngine.Rendering;
|
||||||
|
|
||||||
|
#if UNITY_2017_2_OR_NEWER
|
||||||
|
#define HAS_VECTOR2INT
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Spine.Unity.Examples {
|
namespace Spine.Unity.Examples {
|
||||||
|
|
||||||
public abstract class SkeletonRenderTextureBase : MonoBehaviour {
|
public abstract class SkeletonRenderTextureBase : MonoBehaviour {
|
||||||
|
#if HAS_VECTOR2INT
|
||||||
public Color color = Color.white;
|
public Color color = Color.white;
|
||||||
public int maxRenderTextureSize = 1024;
|
public int maxRenderTextureSize = 1024;
|
||||||
public GameObject quad;
|
public GameObject quad;
|
||||||
@ -143,5 +148,6 @@ namespace Spine.Unity.Examples {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void AssignMeshAtRenderer ();
|
protected abstract void AssignMeshAtRenderer ();
|
||||||
|
#endif // HAS_VECTOR2INT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user