<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mario Mignemi</title>
    <description>The latest articles on DEV Community by Mario Mignemi (@mario_mignemi).</description>
    <link>https://dev.to/mario_mignemi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4078219%2F27d6a2b5-70a0-42b9-b5f1-3a7f17560283.jpg</url>
      <title>DEV Community: Mario Mignemi</title>
      <link>https://dev.to/mario_mignemi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mario_mignemi"/>
    <language>en</language>
    <item>
      <title>When Rider Forgets How to Write Assembly Definitions: My Day-Long Fight With UnityAtoms</title>
      <dc:creator>Mario Mignemi</dc:creator>
      <pubDate>Tue, 18 Aug 2026 05:08:47 +0000</pubDate>
      <link>https://dev.to/mario_mignemi/the-rider-bug-thats-probably-already-in-your-project-you-just-havent-noticed-yet-2p0c</link>
      <guid>https://dev.to/mario_mignemi/the-rider-bug-thats-probably-already-in-your-project-you-just-havent-noticed-yet-2p0c</guid>
      <description>&lt;p&gt;Yesterday, adding a dependency in Jetbrains Rider was a non-event: type the class name, hit &lt;code&gt;Alt+Enter&lt;/code&gt;, keep coding. Today, the exact same shortcut quietly stopped writing anything to my .asmdef file  and it took me a full day to even understand what was going on, let alone fix it.&lt;/p&gt;

&lt;p&gt;For context: right now, I'm working on a flexible selection system for my game &lt;strong&gt;The Weight of One: The Jovarko Incident&lt;/strong&gt;, a tactical space-combat game. The project is split into several modules, each with its own Assembly Definition: &lt;code&gt;Core.asmdef&lt;/code&gt;, &lt;code&gt;Systems.asmdef&lt;/code&gt;, &lt;code&gt;UI.asmdef&lt;/code&gt;, &lt;code&gt;Data.asmdef&lt;/code&gt;, and so on. I recently added &lt;strong&gt;UnityAtoms&lt;/strong&gt; through the Package Manager, and I wanted to use types like &lt;code&gt;AtomEvent&lt;/code&gt; and &lt;code&gt;AtomValueList&lt;/code&gt; from the Data module. Simple stuff. Except it wasn't, and here's the story of it.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Ghost Import
&lt;/h2&gt;

&lt;p&gt;The first sign something was wrong was almost funny. I'd type &lt;code&gt;AtomEvent&lt;/code&gt;, the name would show up red (unresolved), I'd hit &lt;code&gt;Alt+Enter → Reference and import&lt;/code&gt;, and the red would disappear. Great, dependency resolved, right?&lt;/p&gt;

&lt;p&gt;Then I'd switch focus to the Unity Editor window to check something in the Inspector. The moment I clicked back into Rider, the exact same symbol was red again. Same file, same line, nothing touched in between.&lt;/p&gt;

&lt;p&gt;It felt like Rider had briefly &lt;em&gt;pretended&lt;/em&gt; to fix the problem and then changed its mind the second I looked away.&lt;/p&gt;




&lt;h2&gt;
  
  
  What &lt;code&gt;Reference and Import&lt;/code&gt; Is Actually Supposed to Do
&lt;/h2&gt;

&lt;p&gt;To be clear on what should happen: when you add a dependency through the Unity Package Manager, and you click Alt+Enter on an unresolved type that exist in an external assembly, Rider is supposed to add a reference in your .asmdef file. In my case, &lt;code&gt;Data.asmdef&lt;/code&gt; should end up depending on &lt;code&gt;UnityAtoms.UnityAtomsCore.Runtime&lt;/code&gt;. That's the whole mechanism that makes cross-module code work cleanly with Assembly Definitions instead of forcing everything into one giant assembly.&lt;br&gt;
Except my &lt;code&gt;Data.asmdef&lt;/code&gt; never actually gained that reference. The autocomplete &lt;em&gt;looked&lt;/em&gt; like it worked. But the underlying file wasn’t changed, which meant the result was only cosmetic. The Rider’s syntax highlighter got a brief nap before Unity's next domain reload reminded it that, structurally, &lt;strong&gt;nothing had actually been connected&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Troubleshooting Rabbit Hole
&lt;/h2&gt;

&lt;p&gt;At this point, I did what anyone would do: assumed it was something dumb on my end and started working through the usual checklist.&lt;br&gt;
    • Invalidate Caches / Restart &lt;br&gt;
    • Regenerate project files from Unity &lt;br&gt;
    • Fully close Unity, delete the &lt;code&gt;.csproj&lt;/code&gt; / &lt;code&gt;.sln&lt;/code&gt; files, reopen and let them regenerate &lt;br&gt;
    • Clean out the &lt;code&gt;Library&lt;/code&gt;/ folder &lt;br&gt;
    • Update both Rider and the JetBrains Rider Editor package&lt;br&gt;
    • Toggle &lt;code&gt;Git packages&lt;/code&gt; and &lt;code&gt;Built-in packages&lt;/code&gt; under Unity's &lt;em&gt;External Tools&lt;/em&gt; preferences. &lt;/p&gt;

&lt;p&gt;None of it stuck. By the end of the day, I had tried basically every standard fix in the book and I was exactly as blocked as when I started.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Almost-Fix
&lt;/h2&gt;

&lt;p&gt;Here's the one thing that worked, sort of: opening the asmdef file directly inside Rider's own editor and adding the reference by hand. Mind you, not through Unity's Assembly Definition Inspector. Through the raw file directly. That would sometimes get the symbols to resolve and &lt;em&gt;stay&lt;/em&gt; resolved.&lt;/p&gt;

&lt;p&gt;Sometimes. Not always. And I still haven't figured out what actually triggers it to break again. It's not tied to a specific action I can reproduce on demand, which is the most frustrating kind of bug: the kind where your "fix" is really just a temporary appeasement ritual and nothing else.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Bugs Me More Than a Normal Bug
&lt;/h2&gt;

&lt;p&gt;Well, it turns out I wasn't the only one blindsided by this either. A bit of digging turned up &lt;a href="https://youtrack.jetbrains.com/issue/RIDER-94834" rel="noopener noreferrer"&gt;RIDER-94834&lt;/a&gt; on JetBrains' YouTrack, a closely related report of asmdef references not being persisted correctly.&lt;/p&gt;

&lt;p&gt;And what gets under my skin isn't that the bug exists — software breaks, that's just how things go. It's &lt;em&gt;how&lt;/em&gt; it fails. Nothing about the UI hinted that the import hadn't actually landed on disk. That distinction matters to me.&lt;/p&gt;

&lt;p&gt;If package-sourced assemblies are a known blind spot for Rider, that's fine. It's a limitation, and limitations are forgivable. What isn't forgivable is showing that everything is ok when something silently fails. If Rider doesn’t support this type of import, say so: a warning banner, a tooltip, a line in the changelog. Anything beats finding out, after a wasted day, that it’s a visual bug.&lt;/p&gt;

&lt;p&gt;I'm not saying this to pile on. I pay for Rider, and it earns that money close to 100% of the time, which is exactly why this one stings. The bar is set high, and watching a core part of the Unity workflow quietly fail with zero warning felt genuinely out of character.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;I've since opened a &lt;a href="https://rider-support.jetbrains.com/hc/en-us/community/posts/38152781602066-Rider-no-longer-adds-resolves-asmdef-references-for-UnityAtoms" rel="noopener noreferrer"&gt;thread on the Rider support forum&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If this problem sounds familiar to you, don't just quietly work around it, please. Go upvote and comment on both the thread and the  YouTrack issue. A pile of "me too" moves the needle.&lt;/p&gt;

&lt;p&gt;For now, I'm sticking with the manual-edit workaround and treating every successful &lt;code&gt;Alt+Enter&lt;/code&gt; import with deep suspicion until I've actually reopened the file to confirm the reference stuck. Not a great long-term workflow, but it's hopefully unblocking me for the moment.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Has anyone else seen asmdef references silently drop the moment you switch focus between Unity and Rider?&lt;/strong&gt; If you've found a workaround that actually holds, not just "sometimes" but reliably, I'd really like to hear it in the comments.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Useful Links:&lt;/em&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/@TheWeightOfOne-i9m/streams" rel="noopener noreferrer"&gt;The Weight of One - Official Channel&lt;/a&gt; &lt;a href="https://giovarco.itch.io/the-weight-of-one-the-jovarko-incident" rel="noopener noreferrer"&gt;The Weight of One - Itch.io Page&lt;br&gt;
&lt;/a&gt;&lt;a href="https://www.youtube.com/@mariomignemi1288/streams" rel="noopener noreferrer"&gt;My Personal Channel&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can find my Dev Vlogs in all channels!&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>gamedev</category>
      <category>rider</category>
      <category>csharp</category>
    </item>
    <item>
      <title>How a Broken Button Forced Me to Rebuild My Entire Architecture</title>
      <dc:creator>Mario Mignemi</dc:creator>
      <pubDate>Sat, 15 Aug 2026 16:53:48 +0000</pubDate>
      <link>https://dev.to/mario_mignemi/how-a-broken-button-forced-me-to-rebuild-my-entire-architecture-12da</link>
      <guid>https://dev.to/mario_mignemi/how-a-broken-button-forced-me-to-rebuild-my-entire-architecture-12da</guid>
      <description>&lt;p&gt;A few weeks ago, I hit a deadlock that took me an embarrassingly long time to fix: I couldn't have a shuttle without a button, and I couldn't have a button without a shuttle.&lt;/p&gt;

&lt;p&gt;Here's why. My four-year-old button system required a live GameObject reference to be valid: no reference, and the button would self-destroy. Fine for a button that operates on a ship already sitting in the scene. Not fine for a boarding shuttle, which doesn't exist until a button spawns it. So &lt;strong&gt;the button needed the shuttle to exist to avoid self-destruction, and the shuttle needed a button to exist to spawn&lt;/strong&gt;. Neither one could go first.&lt;/p&gt;

&lt;p&gt;The bug wasn't in the shuttle. It was in a button that was four years old.&lt;/p&gt;

&lt;p&gt;I'm building &lt;strong&gt;&lt;em&gt;The Weight of One: The Jovarko Incident&lt;/em&gt;&lt;/strong&gt;, a tactical space-combat game where you command a capital ship and its subsystems. The shuttle in question is a small craft you launch from your own hangar to either forcibly dock an enemy ship from the outside, or peacefully move into the hangar of a neutral or allied ship. Simple concept. &lt;strong&gt;It broke everything I had.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This post isn't really about the shuttle, though. It's about the module structure I ended up building because of it, and whether drawing hard boundaries — before writing a single line of code — was worth the friction it's currently causing me.&lt;/p&gt;




&lt;h2&gt;
  
  
  Every button in my prototype came with a spaceship stapled to it
&lt;/h2&gt;

&lt;p&gt;My original UI code, written during early prototyping, made buttons stateful. A &lt;code&gt;ButtonModel&lt;/code&gt; held a direct reference to the ship it operated on, and if that reference wasn't there,  another script would destroy the button on the spot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;
    &lt;span class="c1"&gt;// Pseudo-Code&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ButtonModel&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;MonoBehaviour&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;Transform&lt;/span&gt; &lt;span class="n"&gt;linkedShip&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SelfDestructOnDestroyedObject&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;MonoBehaviour&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;

        &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="n"&gt;ButtonModel&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="p"&gt;...&lt;/span&gt;

        &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="n"&gt;IEnumerator&lt;/span&gt; &lt;span class="nf"&gt;OnLostReferenceDestroySelf&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="p"&gt;...&lt;/span&gt;
                    &lt;span class="nf"&gt;Destroy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gameObject&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="p"&gt;...&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's fine when the ship already exists in the scene before the button does, which has been the case so far. However, for a shuttle, it's exactly backwards: the button is what's supposed to trigger the creation of the gameobject. &lt;strong&gt;The classic Mexican standoff.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I don't blame past-me for this. It was prototype code from 2021-2022, and it did its job for years, until it didn't in 2026. But I'm not the type to bolt on a special case just for shuttles and move on. &lt;strong&gt;If I have the feeling that the design is wrong, I want to know why and fix it.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Making the button stop caring whose ship it was
&lt;/h2&gt;

&lt;p&gt;The fix felt obvious once I named the actual problem: the button shouldn't hold a reference at all. It should announce an intent and let something else figure out the target.&lt;/p&gt;

&lt;p&gt;Stateless buttons break the deadlock cleanly. The catch: &lt;strong&gt;something&lt;/strong&gt; still needs to track which button maps to which ship. There’s no getting around it. That something is basically a lookup — conceptually a &lt;code&gt;Map&amp;lt;Button, Spaceship&amp;gt;&lt;/code&gt; — and I didn't want a bare dictionary sitting inside a &lt;em&gt;MonoBehaviour&lt;/em&gt; pretending to be a service, and six months later nobody remembers what it's for.&lt;/p&gt;




&lt;h2&gt;
  
  
  Down the ScriptableObject rabbit hole
&lt;/h2&gt;

&lt;p&gt;I had used &lt;em&gt;ScriptableObjects&lt;/em&gt; for exactly one thing before this story: configuration data. Stat blocks, balance numbers, that kind of thing. Looking into how larger studios structure decoupled systems, I found a much bigger use of SOs: as runtime variables, event channels, and typed runtime sets that replace both generic &lt;em&gt;EventBuses&lt;/em&gt;, which I've been using so far, and direct references.&lt;/p&gt;

&lt;p&gt;It solved my mapping problem cleanly.&lt;/p&gt;

&lt;p&gt;What it didn't solve was a bigger question: &lt;strong&gt;full rewrite, or hybrid architecture?&lt;/strong&gt; I have &lt;u&gt;no problem&lt;/u&gt; resetting and rebuilding systems, that's genuinely part of why I enjoy programming. However, a full architectural rewrite of a project that's somewhere between a prototype and an actual demo is a different bet than restructuring one feature. So I picked a feature that didn't exist at all — &lt;strong&gt;a flexible mission system&lt;/strong&gt; — and decided to build it entirely with a ScriptableObject architecture in a separate project, as a real test.&lt;/p&gt;




&lt;h2&gt;
  
  
  Drawing five boxes before writing any mission code
&lt;/h2&gt;

&lt;p&gt;Before touching the mission system, I made one decision on purpose: &lt;strong&gt;assembly definitions&lt;/strong&gt;, not just folder conventions, would decide where files were allowed to live. In fact, almost everything I came across about SO architecture — articles, videos, you name it — flagged a common problem: every variable, event channel, and runtime set is its own small asset, and that adds up fast.&lt;/p&gt;

&lt;p&gt;A feature that used to be two files in the old &lt;em&gt;EventBus&lt;/em&gt; system could easily turn into five or six files. Left unorganized, that adds up into a mess fast, so I wanted the boundaries locked in from day one.&lt;/p&gt;

&lt;p&gt;Five main modules, five assemblies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Core&lt;/strong&gt;: Generic, game-agnostic primitives — base SO wrappers, generic interfaces, extensions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UI&lt;/strong&gt;: Draws to Canvas/Screen, captures interface input, raises intent events&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data&lt;/strong&gt;: SO Variables, Event Channels, Runtime Sets, and config schemas — no &lt;code&gt;Update()&lt;/code&gt; loop&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gameplay&lt;/strong&gt;: Moment-to-moment entity behavior like movement, combat, mission triggers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Systems&lt;/strong&gt;: Global, cross-scene infrastructure, like save/load, scene transitions, campaign progress.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Dependency graph:&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3yo8g4a5f5v0a7wukgcd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3yo8g4a5f5v0a7wukgcd.png" alt="Dependency Graph" width="800" height="431"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The one rule that makes the other five make sense
&lt;/h2&gt;

&lt;p&gt;None of this is exotic on its own. Assembly definitions weren't new to me, but I’ve never actually reached for them. Game development isn't my day job, so they just weren't on my radar until now.&lt;/p&gt;

&lt;p&gt;This is the part that maps directly back to the shuttle deadlock. The old &lt;code&gt;ButtonModel&lt;/code&gt; was a compile-time UI-to-Gameplay dependency wearing a &lt;em&gt;MonoBehaviour&lt;/em&gt; costume. The new rule makes that specific mistake &lt;strong&gt;impossible&lt;/strong&gt; to write by accident. The assembly definition simply won't allow it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where the shuttle actually landed
&lt;/h2&gt;

&lt;p&gt;Here's the part I want other people to take away from this. Understanding &lt;em&gt;ScriptableObject&lt;/em&gt; architecture hasn't stopped me from placing files where I think they belong, only to have the assembly definition reject them.&lt;/p&gt;

&lt;p&gt;At first, this was annoying. Then I noticed a pattern: every one of those errors was telling me one of two things. Either the file is genuinely misplaced, or &lt;strong&gt;the code design underneath it is wrong&lt;/strong&gt;: future tech debt I hadn't noticed yet, because nothing was preventing me from writing it that way.&lt;/p&gt;




&lt;h2&gt;
  
  
  Is it paying off?
&lt;/h2&gt;

&lt;p&gt;Honestly, provisionally, yes! But I'm not going to pretend the trade-off is free: having a &lt;em&gt;ScriptableObject&lt;/em&gt; architecture and five modules means more files, which adds real ceremony for a solo dev before any feature ships. There's no dodging that.&lt;/p&gt;

&lt;p&gt;I picked the mission system specifically because it was new territory: a contained way to test the architecture before betting the rest of the game on it. I'm treating that as a deliberate validation step. I want to see it hold up across a few more features before I call it the standard.&lt;/p&gt;

&lt;p&gt;On the plus side, what I didn't expect was how much &lt;strong&gt;the friction itself became useful information&lt;/strong&gt;. Every misplaced file is a small, cheap lesson about my own design, delivered immediately instead of six months later as an unmaintainable spaghetti mess.&lt;/p&gt;




&lt;p&gt;If you're staring down a similar dilemma, the one thing I want you to take from this “happy accident” is: don't draw module boundaries as folders, draw them as &lt;strong&gt;dependency "permissions"&lt;/strong&gt;. Enforce them with assembly definitions, and let the compiler be blunt with you. &lt;/p&gt;

&lt;p&gt;This whole approach is a sharp departure from the generic &lt;em&gt;EventBus&lt;/em&gt; pattern I used to lean on, which is a big enough topic to deserve its own post. For now: I'll keep building the mission system and report back on whether five assemblies still feel right once the feature list grows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Developers unite!&lt;/strong&gt; Let me know how you've drawn your own lines.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Useful Links:&lt;/em&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/@TheWeightOfOne-i9m/streams" rel="noopener noreferrer"&gt;The Weight of One - Official Channel&lt;/a&gt;&lt;br&gt;
&lt;a href="https://giovarco.itch.io/the-weight-of-one-the-jovarko-incident" rel="noopener noreferrer"&gt;The Weight of One - Itch.io Page&lt;br&gt;
&lt;/a&gt;&lt;a href="https://www.youtube.com/@mariomignemi1288/streams" rel="noopener noreferrer"&gt;My Personal Channel&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can find my Dev Vlogs in all channels!&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>architecture</category>
      <category>eventdriven</category>
      <category>gamedev</category>
    </item>
  </channel>
</rss>
