mirror of
https://github.com/smyalygames/monopoly.git
synced 2026-01-04 02:38:42 +01:00
27 lines
581 B
C#
27 lines
581 B
C#
using UnityEngine;
|
|
|
|
namespace Mirror.Cloud
|
|
{
|
|
/// <summary>
|
|
/// Adds Extension to check if unity object is null.
|
|
/// <para>Use these methods to stop MissingReferenceException</para>
|
|
/// </summary>
|
|
public interface IUnityEqualCheck
|
|
{
|
|
|
|
}
|
|
|
|
public static class UnityEqualCheckExtension
|
|
{
|
|
public static bool IsNull(this IUnityEqualCheck obj)
|
|
{
|
|
return (obj as Object) == null;
|
|
}
|
|
|
|
public static bool IsNotNull(this IUnityEqualCheck obj)
|
|
{
|
|
return (obj as Object) != null;
|
|
}
|
|
}
|
|
}
|