We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7cbe428 + 209155d commit d1c6ba8Copy full SHA for d1c6ba8
UnitySetup/UnitySetup.psm1
@@ -69,7 +69,7 @@ class UnityProjectInstance
69
}
70
71
72
-class UnityVersion
+class UnityVersion : System.IComparable
73
{
74
[int] $Major;
75
[int] $Minor;
@@ -100,6 +100,14 @@ class UnityVersion
100
101
102
103
+ [int] CompareTo([object]$obj)
104
+ {
105
+ if($null -eq $obj) { return 1 }
106
+ if($obj -isnot [UnityVersion]) { throw "Object is not a UnityVersion"}
107
+
108
+ return [UnityVersion]::Compare($this, $obj)
109
+ }
110
111
static [int] Compare([UnityVersion]$a, [UnityVersion]$b)
112
113
if($a.Major -lt $b.Major) { return -1 }
0 commit comments