Skip to content

Instantly share code, notes, and snippets.

@CodeSmile-0000011110110111
Created March 5, 2023 10:47
Show Gist options
  • Save CodeSmile-0000011110110111/242b1f686781df58d066d014b66bdf51 to your computer and use it in GitHub Desktop.
Save CodeSmile-0000011110110111/242b1f686781df58d066d014b66bdf51 to your computer and use it in GitHub Desktop.
GameObject extension to check if an object is null OR "missing reference"
using UnityEngine;
namespace CodeSmile.EditorTests
{
public static class GameObjectExt
{
public static bool IsNullOrMissing(this GameObject instance) => instance == null || ReferenceEquals(instance, null);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment