Final touchups to the lifecycle management

This commit is contained in:
Michal Pikulski
2025-11-11 10:53:09 +01:00
parent 0aa2270e1a
commit 9a6914b9bd
38 changed files with 62 additions and 229 deletions

View File

@@ -41,9 +41,6 @@ namespace Interactions
// Action component system
private List<InteractionActionBase> _registeredActions = new List<InteractionActionBase>();
// ManagedBehaviour configuration
public override int ManagedAwakePriority => 100; // Gameplay base classes
/// <summary>
/// Register an action component with this interactable

View File

@@ -287,10 +287,8 @@ namespace Interactions
ItemManager.Instance?.RegisterItemSlot(this);
}
protected override void OnDestroy()
internal override void OnManagedDestroy()
{
base.OnDestroy();
// Unregister from slot manager
ItemManager.Instance?.UnregisterItemSlot(this);
}

View File

@@ -50,10 +50,8 @@ namespace Interactions
ItemManager.Instance?.RegisterPickup(this);
}
protected override void OnDestroy()
internal override void OnManagedDestroy()
{
base.OnDestroy();
// Unregister from ItemManager
ItemManager.Instance?.UnregisterPickup(this);
}