Removed TOTU 103
This commit is contained in:
		
							
								
								
									
										19
									
								
								Assets/Scripts/DebugLogger/DebugLoggerInitializer.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								Assets/Scripts/DebugLogger/DebugLoggerInitializer.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| 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 | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Ignacio Gómez Puga
					Ignacio Gómez Puga