Quick answer: Unity reporting “cyclic assembly references between MyGame and MyGame.UI”? Two .asmdefs reference each other — assemblies cannot circularly depend.

UI code calls into Gameplay; Gameplay raises UI-bound events that reference UI types. The reference list ends up looping.

Detect the Cycle

The error message names the participating assemblies. The cycle may be longer: A → B → C → A. Open each .asmdef and trace the references.

Extract Shared Types

Move types that both sides need into a third assembly (e.g. MyGame.Shared). Both UI and Gameplay reference Shared; no cycle.

Invert via Events

If Gameplay needs to notify UI, have UI register a callback on Gameplay’s event — Gameplay never references UI types. System.Action as the event signature avoids type dependency.

Interface Boundary

Define an interface in Shared (e.g. IInventoryView); UI implements it, Gameplay calls through it. Concrete UI types stay in UI; the contract is shared.

Verifying

Project compiles. No cyclic error. Layered architecture (Shared / Core / UI) is reflected in the dependency graph.

“Cycles need a shared third party or an inversion via interface/event.”

Establish layer rules at project setup — UI references Core, Core references nothing, plug-ins layer below or above. Cycles become impossible by convention.