Don't hardcode references between UI, Audio, and Gameplay managers. Use the ScriptableObject architecture (popularized by Unite Austin 2017).
private UnityAction<int> _onEventRaised; public void RaiseEvent(int value) unity pro code
var bullet = _bulletPool.Get(); // Set position/velocity here... // Return to pool after 2 seconds StartCoroutine(ReturnToPool(bullet, 2f)); Don't hardcode references between UI, Audio, and Gameplay
It decouples your systems. You can change your UI without breaking your PlayerController. 2. Object Pooling: The Pro Performance Standard You cannot rely on Instantiate() and Destroy() in a production game. The Garbage Collector (GC) will cause frame rate spikes, killing the user experience. Don't hardcode references between UI
The biggest "code smell" in junior Unity Pro projects is filling every Update() method with logic that doesn't need to run every frame.
Beyond the Basics: Writing Production-Ready Code in Unity Pro