Fix issues with disabled puzzle steps not registering with puzzle manager

This commit is contained in:
Michal Pikulski
2025-09-12 14:38:56 +02:00
parent a580a5f35a
commit cec661586e
4 changed files with 14 additions and 14 deletions

View File

@@ -32,6 +32,11 @@ namespace PuzzleS
_interactable.interactionComplete.AddListener(OnInteractionComplete);
}
PuzzleManager.Instance?.RegisterStepBehaviour(this);
// Check if this step was already unlocked
if (stepData != null && PuzzleManager.Instance != null && PuzzleManager.Instance.IsStepUnlocked(stepData))
{
UnlockStep();
}
}
void OnDestroy()