Skip to content

Commit

Permalink
fix: unity version constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
ExerciseBook committed Jul 25, 2024
1 parent f1308b4 commit 763bdcf
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Colors/Colors/ColorExtension.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Text;
#if !UNITY_2022_1_OR_NEWER
#if !UNITY_2020_1_OR_NEWER
using System.Drawing;
#else
using UnityEngine;
Expand All @@ -11,7 +11,7 @@ public static class ColorExtension
{
public static string SerializeColor(this Color color)
{
#if !UNITY_2022_1_OR_NEWER
#if !UNITY_2020_1_OR_NEWER
int r = color.R;
int g = color.G;
int b = color.B;
Expand Down
6 changes: 3 additions & 3 deletions Colors/Colors/ColorUtils.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !UNITY_2022_1_OR_NEWER
#if !UNITY_2020_1_OR_NEWER
using System.Drawing;
#else
using UnityEngine;
Expand Down Expand Up @@ -75,7 +75,7 @@ private static Color ParseUintColor(uint src)

internal static Color MakeColorFromRgba(int red, int green, int blue, int alpha)
{
#if !UNITY_2022_1_OR_NEWER
#if !UNITY_2020_1_OR_NEWER
return Color.FromArgb(alpha, red, green, blue);
#else
return new Color(red * 1f / 255f, green * 1f / 255f, blue * 1f / 255f, alpha * 1f / 255f);
Expand All @@ -84,7 +84,7 @@ internal static Color MakeColorFromRgba(int red, int green, int blue, int alpha)

internal static Color MakeColorFromRgbaF(float red, float green, float blue, float alpha)
{
#if !UNITY_2022_1_OR_NEWER
#if !UNITY_2020_1_OR_NEWER
return Color.FromArgb(
(int)(alpha * 255),
(int)(red * 255),
Expand Down
4 changes: 2 additions & 2 deletions Colors/Colors/Constance.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !UNITY_2022_1_OR_NEWER
#if !UNITY_2020_1_OR_NEWER
using System.Drawing;
#else
using UnityEngine;
Expand All @@ -9,7 +9,7 @@ namespace Paraparty.Colors
internal static class Constance
{
internal static Color White =
#if !UNITY_2022_1_OR_NEWER
#if !UNITY_2020_1_OR_NEWER
Color.White;
#else
Color.white;
Expand Down
4 changes: 2 additions & 2 deletions Colors/Colors/Oklab.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Linq;

#if !UNITY_2022_1_OR_NEWER
#if !UNITY_2020_1_OR_NEWER
using System.Drawing;

#else
Expand Down Expand Up @@ -75,7 +75,7 @@ double GammaCorrect(double c)

public static Oklab FromColor(Color color)
{
#if !UNITY_2022_1_OR_NEWER
#if !UNITY_2020_1_OR_NEWER
double r = (double)color.R / 255.0;
double g = (double)color.G / 255.0;
double b = (double)color.B / 255.0;
Expand Down
4 changes: 2 additions & 2 deletions Colors/Colors/Oklch.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.Linq;
#if !UNITY_2022_1_OR_NEWER
#if !UNITY_2020_1_OR_NEWER
using System.Drawing;

#else
Expand Down Expand Up @@ -46,7 +46,7 @@ public Color ToColor()

public static Oklch FromColor(Color color)
{
#if !UNITY_2022_1_OR_NEWER
#if !UNITY_2020_1_OR_NEWER
double r = (double)color.R / 255.0;
double g = (double)color.G / 255.0;
double b = (double)color.B / 255.0;
Expand Down
2 changes: 1 addition & 1 deletion Colors/Colors/Tools.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.Globalization;
#if UNITY_2022_1_OR_NEWER
#if UNITY_2020_1_OR_NEWER
using UnityEngine;
#endif

Expand Down
2 changes: 1 addition & 1 deletion UnityNative/UnityNative/UnmanagedStringArray.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if UNITY_2022_1_OR_NEWER
#if UNITY_2020_1_OR_NEWER
using System;
using System.Collections.Generic;
using Unity.Collections;
Expand Down
2 changes: 1 addition & 1 deletion UnityNative/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author": "ParaParty",
"displayName": "ParaPartyUtil.UnityNative",
"version": "3.0.0",
"unity": "2022.3",
"unity": "2020.1",
"description": "",
"dependencies": {}
}

0 comments on commit 763bdcf

Please sign in to comment.