Hi all, pretty new around here. I’m a 20+ year career software engineer who is just stepping into game dev. I’ve worked through a couple of 3D courses on Udemy and just started my first 2D course:
https://www.udemy.com/course/unity2drpg
I’m wondering if anybody else has taken this and if any of my concerns are valid. It also might be that I’m just not far enough in the course, but I’m following along and doing a bunch of things that feel dirty and I was wondering if someone could tell me if any of this is normal/common practice or if my gut feelings are correct:
- PlayerController is a singleton but the instance is made static, so it can be randomly accessed from anywhere in the game. I think this seems ok for single player or if you will have a static number of players.
- The PlayerController is holding state about the last scene transition they went through, but the state of a previous scene change seems to have nothing to do with controlling the player. This seems like a bad place to store this information.
- Three scripts into the game and we had to go into the project settings and adjust the script execution order for the player controller and the area exit to be above default time, because they are both competing to initialize values from each other in the Start() method. Other hooks like “Awake()” are never used. Just a shot in the dark here, but I would think a well designed game should never have to have any of the game logic scripts ordered in here… that sounds like a poorly designed system to me.
- Almost every member variable is public vs using [SerializeField]
I’m sure there is more that I can’t think of right now. I don’t mean to flame or trash this course in any way – I am learning a lot from it. I’m just curious if my thinking is correct or if what this course is having me do is common practice.
Thank you!