When your Unity method’s parameter list becomes a CVS receipt
Description
The meme is styled like a dark-theme tweet. In blue text it tags “@unity3d” followed by the question: “How many inputs you want to pass through the method?” On the next line, the reply simply says “Me: Yes.” Beneath the tweet is a code screenshot showing a C# method signature highlighted in a code editor: “void MemoryPuzzleDataManager.SavingSessionData(int playRoundCount, int condition, int trial, int complexity, bool status, bool isShapeCorrect, List<int> boardSelection, List<int> userSelection, List<char> userSelectionHand, int numberOfTimesRightHandUsedInTrial, int numberOfTimesLeftHandUsedInTrial, int numberOfTimeRightHandUsedInTotal, int numberOfTimeLeftHandUsedInTotal, double FirstSelectionTime, double trialCompletionTime, double averageFirstSelectionTime, double averageTrialCompletionTime)”. The absurdly long list of parameters satirizes poor API design, highlighting code smell issues like long parameter lists and maintainability headaches common in Unity C# projects, eliciting relatable developer humor about clean-code violations
Comments
20Comment deleted
Pro tip: when your Unity SaveSession method has so many parameters it’s flirting with the Ethernet MTU, you’re no longer passing arguments - you’re reinventing JSON with worse ergonomics
This is what happens when you treat method signatures like a NoSQL document - eventually someone will ask 'but can we also pass the kitchen sink?' and the answer will still be another parameter at position 47
When Unity asks how many parameters you need and you answer 'yes,' you end up with a method signature so long it needs its own scroll bar. This is the architectural equivalent of ordering everything on the menu because you couldn't decide - except instead of indigestion, you get a maintenance nightmare that makes every code reviewer weep. At this point, the method isn't just violating the Single Responsibility Principle; it's running a full-scale insurgency against it. Pro tip: if your method signature requires a parameter object, a builder pattern, and possibly a therapist, it's time to refactor
Unity: “How many inputs?” Me: “Yes.” At 18 parameters the call site is basically positional JSON, and every bug is a permutation we could’ve avoided with a Parameter Object and a domain model
This is the LongParameterList × PrimitiveObsession speedrun - just take a SessionTelemetry DTO and pass an ID; your stack trace deserves to fit on one monitor
Unity mantra: Why define a SaveData struct when one method can shoulder the parameter apocalypse?
A telescopic constructor Comment deleted
But it's life ) Comment deleted
if you have more than 3 parameters, then you are doing something wrong. Comment deleted
aye, just using the main config class to do this (& changing data along the way instead of collecting it once dumping happens) would be more efficient. Comment deleted
yeah exactly, that’s the right way to do imho. the function should be something like MemoryPuzzleDataManager.savesession(SessionData data). i know that code is joke but i’ve seen people coding like that so it just brings terrorizing memories about fixing bugs in those codes Comment deleted
aye Comment deleted
Yup, that is why we will make 20 overloads. Comment deleted
make it a struct Comment deleted
Exactly, thank you Comment deleted
* except for some edge cases Comment deleted
Can you pass object with this fields? Like in javascript: function({ param1, param2, param3}) {} Comment deleted
*Encapsulation left this chat* Comment deleted
that's why unity sucks btw Comment deleted
More like op's method sucks, that screams for a class or a struct at that point Comment deleted