mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-23 00:28:23 -05:00
19 lines
802 B
C#
19 lines
802 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace UnityAtoms.BaseAtoms
|
|
{
|
|
/// <summary>
|
|
/// Variable of type `GameObject`. Inherits from `AtomVariable<GameObject, GameObjectPair, GameObjectEvent, GameObjectPairEvent, GameObjectGameObjectFunction>`.
|
|
/// </summary>
|
|
[EditorIcon("atom-icon-lush")]
|
|
[CreateAssetMenu(menuName = "Unity Atoms/Variables/GameObject", fileName = "GameObjectVariable")]
|
|
public sealed class GameObjectVariable : AtomVariable<GameObject, GameObjectPair, GameObjectEvent, GameObjectPairEvent, GameObjectGameObjectFunction>
|
|
{
|
|
protected override bool ValueEquals(GameObject other)
|
|
{
|
|
return (_value == null && other == null) || _value != null && other != null && _value.GetInstanceID() == other.GetInstanceID();
|
|
}
|
|
}
|
|
}
|