mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-22 08:08:51 -05:00
[Removed] Debug mode logging
This commit is contained in:
parent
a64ae84096
commit
5c094f1b10
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user