EqualityHelper Class
Definition
Section titled “Definition”Helper methods for ScriptableValues.
public static class EqualityHelperInheritance object
Methods
Section titled “Methods”Equals(T, T)
Section titled “Equals(T, T)”Helper method for checking if two types are the same.
public static bool Equals<T>(T x, T y)Parameters
Section titled “Parameters”x T
The first object to compare.
y T
The second object to compare.
Returns
Section titled “Returns”bool
true if the specified objects are equal; otherwise, false.
Remarks
Section titled “Remarks”This takes Unity objects into consideration.
IsNull(T?)
Section titled “IsNull(T?)”Helper method for checking if an object is null.
public static bool IsNull<T>(T? obj)Parameters
Section titled “Parameters”obj T
The object to check.
Returns
Section titled “Returns”bool
true if the object is null; otherwise false.
Remarks
Section titled “Remarks”This takes Unity objects into consideration.
IsSameType(object?, out TType?)
Section titled “IsSameType(object?, out TType?)”Helper method to check if the given object is the same type as the provided generic type.
public static bool IsSameType<TType>(object? value, out TType? newValue)Parameters
Section titled “Parameters”value object
The object value to check.
newValue TType
The value as the generic value.
Returns
Section titled “Returns”bool
true if the value is the same type; otherwise false.
Exceptions
Section titled “Exceptions”ArgumentNullException
value is null.