34 lines
646 B
C#
34 lines
646 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using DependencyInjection;
|
|
using UnityEngine;
|
|
|
|
public class GlopalLogger : MonoBehaviour, IDependencyProvider
|
|
{
|
|
[SerializeField] private bool isActive = true;
|
|
|
|
[Provide]
|
|
public GlopalLogger provideLogger()
|
|
{
|
|
return this;
|
|
}
|
|
|
|
public void Log(string Massage)
|
|
{
|
|
if (isActive)
|
|
Debug.Log(Massage);
|
|
}
|
|
|
|
public void LogError(string Massage)
|
|
{
|
|
if (isActive)
|
|
Debug.LogError(Massage);
|
|
}
|
|
|
|
public void LogWarning(string Massage)
|
|
{
|
|
if (isActive)
|
|
Debug.LogWarning(Massage);
|
|
}
|
|
}
|