Skip to content

Code Integration

Eiquf edited this page Feb 14, 2026 · 1 revision

Example of how to process a purchase in your game logic:

public void OnNodeClicked(Node node) {
    // 1. Check if the node is available based on graph and conditions
    if (node.IsAvailable(_progressionProvider)) {
        
        // 2. Perform the unlock
        node.Unlock(_progressionWriter);
        
        // 3. Apply the actual stats to the player
        ApplyStats(node.Stats);
        
        Debug.Log($"{node.Name} unlocked!");
    }
}

Clone this wiki locally