20 lines
412 B
C#
20 lines
412 B
C#
using UnityEngine;
|
|
|
|
public class DebugLoggerInitializer : MonoBehaviour
|
|
{
|
|
private static bool isInitialized = false;
|
|
|
|
private void Awake()
|
|
{
|
|
if (!isInitialized)
|
|
{
|
|
DontDestroyOnLoad(gameObject); // Evita que este objeto se destruya
|
|
isInitialized = true;
|
|
}
|
|
else
|
|
{
|
|
Destroy(gameObject); // Previene duplicados
|
|
}
|
|
}
|
|
}
|