Made children spawn
This commit is contained in:
33
Assets/Scripts/NullCheckers.cs
Normal file
33
Assets/Scripts/NullCheckers.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using JetBrains.Annotations;
|
||||
using Unity.VisualScripting;
|
||||
|
||||
namespace InterfaceOff
|
||||
{
|
||||
public class DebugUtils
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining), AssertionMethod, ContractAnnotation("null => true")]
|
||||
public static bool IsNull(UnityEngine.Object obj)
|
||||
{
|
||||
return obj.IsUnityNull();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining), AssertionMethod, ContractAnnotation("null => true")]
|
||||
public static bool IsNull(object obj)
|
||||
{
|
||||
return obj == null;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining), AssertionMethod, ContractAnnotation("null => false")]
|
||||
public static bool IsNotNull(UnityEngine.Object obj)
|
||||
{
|
||||
return !obj.IsUnityNull();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining), AssertionMethod, ContractAnnotation("null => true")]
|
||||
public static bool IsNotNull(object obj)
|
||||
{
|
||||
return obj != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user