Hi there, this is, hopefully, a simple question. Why do I not see TimeSpans in tutorials/examples more? Are using these considered a bad practice? I know all sorts of nifty things can be done with just plain ol' floats and Time.deltaTime, but very little seems to fit the elegance (in my opinion) of something like:
timeInAir += TimeSpan.FromSeconds(Time.deltaTime);
I'm still new to Unity, but I'm afraid of building bad habits now if I should be staying away from TimeSpans/DateTimes. Are these just not used a lot because not everyone comes from a C# background and is used to these futuristic objects?
Specifically, I'm wondering if:
1. Are they performant (across all platforms)?
2. Do they work across all platforms?
3. Do they ever not work the way they should (from MS C# background) in Unity's custom .net compiler setup?
Sorry if this isn't considered constructive, but I think Best Practices are rather important to nail down early.
Thanks.
↧