diff --git a/Packages/Core/Runtime/EventReferences/AtomEventReference.cs b/Packages/Core/Runtime/EventReferences/AtomEventReference.cs index 8cbceba1..b065247a 100644 --- a/Packages/Core/Runtime/EventReferences/AtomEventReference.cs +++ b/Packages/Core/Runtime/EventReferences/AtomEventReference.cs @@ -27,12 +27,9 @@ namespace UnityAtoms { switch (_usage) { - case (AtomEventReferenceUsage.VARIABLE): - return _variable == null ? LogNullReference(nameof(_variable)) : _variable.GetOrCreateEvent(); - case (AtomEventReferenceUsage.VARIABLE_INSTANCER): - return _variableInstancer == null ? LogNullReference(nameof(_variableInstancer)) : _variableInstancer.GetOrCreateEvent(); - case (AtomEventReferenceUsage.EVENT_INSTANCER): - return _eventInstancer == null ? LogNullReference(nameof(_eventInstancer)) : _eventInstancer.Event; + case (AtomEventReferenceUsage.VARIABLE): return _variable == null ? null : _variable.GetOrCreateEvent(); + case (AtomEventReferenceUsage.VARIABLE_INSTANCER): return _variableInstancer == null ? null : _variableInstancer.GetOrCreateEvent(); + case (AtomEventReferenceUsage.EVENT_INSTANCER): return _eventInstancer == null ? null : _eventInstancer.Event; case (AtomEventReferenceUsage.EVENT): default: return _event; @@ -84,18 +81,5 @@ namespace UnityAtoms { return reference.Event; } - - private E LogNullReference(string atomEventReferenceUsage) - { - if (AtomPreferences.IsDebugModeEnabled) - { - Debug.Log($"{atomEventReferenceUsage} reference is missing in inspector."); - return null; - } - else - { - return null; - } - } } }