Strip debug logging from the game, fix screen weirdness

This commit is contained in:
Michal Pikulski
2025-10-14 15:53:58 +02:00
parent 18be597424
commit e8180b21bf
65 changed files with 768 additions and 411 deletions

View File

@@ -3,6 +3,7 @@ using UnityEngine;
using UnityEngine.Playables;
using System.Linq;
using System.Threading.Tasks;
using Core;
using Input;
namespace Interactions
@@ -156,7 +157,7 @@ namespace Interactions
{
if (timelineAsset == null)
{
Debug.LogWarning("[InteractionTimelineAction] Timeline asset is null");
Logging.Warning("[InteractionTimelineAction] Timeline asset is null");
return true; // Return true to continue the interaction flow
}
@@ -175,7 +176,7 @@ namespace Interactions
}
else
{
Debug.LogWarning($"[InteractionTimelineAction] Could not find track named '{mapping.playerTrackName}' for player binding");
Logging.Warning($"[InteractionTimelineAction] Could not find track named '{mapping.playerTrackName}' for player binding");
}
}
catch (Exception ex)
@@ -195,7 +196,7 @@ namespace Interactions
}
else
{
Debug.LogWarning($"[InteractionTimelineAction] Could not find track named '{mapping.pulverTrackName}' for follower binding");
Logging.Warning($"[InteractionTimelineAction] Could not find track named '{mapping.pulverTrackName}' for follower binding");
}
}
catch (Exception ex)
@@ -212,7 +213,7 @@ namespace Interactions
playableDirector.stopped += OnPlayableDirectorStopped;
// Log the timeline playback
Debug.Log($"[InteractionTimelineAction] Playing timeline {timelineAsset.name} for event {mapping.eventType}");
Logging.Debug($"[InteractionTimelineAction] Playing timeline {timelineAsset.name} for event {mapping.eventType}");
// Play the timeline
playableDirector.Play();
@@ -224,7 +225,7 @@ namespace Interactions
bool result = await _currentPlaybackTCS.Task;
// Log completion
Debug.Log($"[InteractionTimelineAction] Timeline {timelineAsset.name} playback completed with result: {result}");
Logging.Debug($"[InteractionTimelineAction] Timeline {timelineAsset.name} playback completed with result: {result}");
// Clear the task completion source
_currentPlaybackTCS = null;
@@ -237,7 +238,7 @@ namespace Interactions
if (director != playableDirector || _currentPlaybackTCS == null)
return;
Debug.Log($"[InteractionTimelineAction] PlayableDirector stopped. Signaling completion.");
Logging.Debug($"[InteractionTimelineAction] PlayableDirector stopped. Signaling completion.");
// Signal completion when the director stops
_currentPlaybackTCS.TrySetResult(true);
@@ -250,7 +251,7 @@ namespace Interactions
// If the TCS still exists after timeout, complete it with failure
if (_currentPlaybackTCS != null)
{
Debug.LogWarning($"[InteractionTimelineAction] Timeline playback timed out after {timeoutDuration} seconds");
Logging.Warning($"[InteractionTimelineAction] Timeline playback timed out after {timeoutDuration} seconds");
_currentPlaybackTCS.TrySetResult(false);
}
}