Questions tagged [refactoring]
The refactoring tag has no summary.
14 questions
0
votes
1
answer
316
views
Refactoring fighting game Movement class responsibilities
I'm a web developer, new to C# and trying to learn Unity. I've learned the C# syntax, I understand how to write working code, although I'm having a hard time understanding when and to what classes ...
3
votes
1
answer
2k
views
How to reference nameof private serialized field in unity custom inspector
I'm running into a problem that I think will seriously affect maintainability down the road, so I'd like to figure it out now before it becomes a problem.
I've been starting to use private [...
43
votes
6
answers
8k
views
When is the best time to consider performance?
I am coming from software development background. During the software
development cycle, we usually focus on functionalities and the working
product. At the end of development, we start optimizing ...
1
vote
1
answer
1k
views
Unity storing many items in an RPG game
I want to ask about the best method of storing data that represents information's about specified objects.
I want to find a better way to storing somewhere items in my RPG game before problems had ...
1
vote
1
answer
478
views
Inherited property in derived class reference only base class
[Context] I am developing a game in Unity, and wanted to make a Game Manager. Like many examples out there, it uses a Singletron design pattern. But i have several other Managers, all using Singletron ...
1
vote
2
answers
963
views
Handling differing inventory items on use interactions
Hey there my fellow programmers. Looking for a little input into a potentially smelly code problem (I was about to post this on the Code Review SE, let me know if that's the more proper place).
After ...
6
votes
1
answer
1k
views
How can I refactor "attack cooldown" into "attack speed"?
I'm building a game where the player's character can attack bad guys and vice versa. I built this with the concept of an "attack cooldown" because I don't want units to be able to attack each other ...