0 Followers
1 Following
16 Posts
@AngryAnt @djlink sorry that we both ruined your day 😞
"Usage of null propagation on Unity Objects is incorrect"

Minor thing in visual studio (2019) I see: mobile = GetComponent<Mobile>(); mobile?.Activate(); Visual Studio (2019) has a a few...

Unity Forum
@djlink I was under the impression that this was not recommended with Unity? Something about this syntax will run in fringe cases when the object is in fact null.
@djlink that's why I use win32 API to create messagebox.show!
@djlink kinda agree! And in my post-Steamdeck world I would like more than a more powerful switch. They also need to rethink their online offering to at least match PS and Xbox.
@grumpygamer same, but I really should stop printing them.
@djlink ah, didn't realise it was only editor allocation. Even though, handy. And code looks a bit neater anyway.
@djlink did not know this! I also recently discovered you should use trygetcomponent rather than getcomponent because it is allocated even if getcomponent is null!
@grumpygamer this! Also going for a shower or to the bathroom can stimulate the mins on a solution.
@grumpygamer as someone who is on a train 2 hours a day it's amazing. Playing Monkey Island on it on the way in, and developing my game on the way home (that bit not on a Steam deck of course)