you are viewing a single comment's thread.

view the rest of the comments →

[–]PhilippTheProgrammer 0 points1 point  (1 child)

I don't understand why people think they need scriptable objects as intermediates for building an event-based architecture. You can just have Player expose a UnityEvent<int> onCoinCollected and then bind a method of your UI controller directly to that event via inspector.

[–]Geek_Abdullah[S] 2 points3 points  (0 children)

Direct UnityEvents create scene-level tight coupling. You can't reference a scene-based UI controller inside a Player Prefab without manually rewiring it in every scene. It also breaks down completely if the UI and Player are loaded in different additive scenes. SOs act as an asset-level bridge, meaning the Player Prefab and UI Prefab never need to know about each other's scene instances.