[Removed] Debug mode logging

This commit is contained in:
Thimo de Ram 2022-03-14 11:44:12 +01:00 committed by Miika Lönnqvist
parent a64ae84096
commit 5c094f1b10

View File

@ -27,12 +27,9 @@ namespace UnityAtoms
{
switch (_usage)
{
case (AtomEventReferenceUsage.VARIABLE):
return _variable == null ? LogNullReference(nameof(_variable)) : _variable.GetOrCreateEvent<E>();
case (AtomEventReferenceUsage.VARIABLE_INSTANCER):
return _variableInstancer == null ? LogNullReference(nameof(_variableInstancer)) : _variableInstancer.GetOrCreateEvent<E>();
case (AtomEventReferenceUsage.EVENT_INSTANCER):
return _eventInstancer == null ? LogNullReference(nameof(_eventInstancer)) : _eventInstancer.Event;
case (AtomEventReferenceUsage.VARIABLE): return _variable == null ? null : _variable.GetOrCreateEvent<E>();
case (AtomEventReferenceUsage.VARIABLE_INSTANCER): return _variableInstancer == null ? null : _variableInstancer.GetOrCreateEvent<E>();
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;
}
}
}
}