Everyday Unity – Telegram
Everyday Unity
1.1K subscribers
157 photos
59 videos
42 files
2.36K links
A game developer and tech lead in a top grossing company posting Unity, programming, and gamedev related stuff that I find interesting
Website: https://gamedev.center

Most used tags are:
#performance
#shader
#interview

Author: @alexmtr
Download Telegram
An interesting benchmark on Json Parsing using Newtonsoft Json Serializer
I wanted to see the difference in parsing speeds between this custom method
https://www.newtonsoft.com/json/help/html/ReadingWritingJSON.htm
And the regular
JsonConvert.DeserializeObject<>() method Result

Manual deserialization is 50.03% faster then the regular method. However  - The Manual deserialization is 196 lines of code compared to just 1.

I also tested if running the parsers in Multithreading was helpful and it wasn’t, just they synchronization between threads took longer then the whole job. So for most Jsons we experience I did not find any speed benefit in multithreading.

#deserialization #json
Deep C# - Casting the Escape from Strong Typing

This ability to accept a bigger object i.e. you can safely downcast the parameter, is often referred to as contravariance. That is the return parameter can be safely upcast to a smaller object and this in turn is refered to as covariance.

https://www.i-programmer.info/ebooks/47-deep-c/493-deep-c-c4.html

#cast #csharp
Shader Tutorial: Pulsing to Audio

A very detailed guide how to make shader that reacts to audio input

https://www.patreon.com/posts/shader-tutorial-38679948

#shader #audioinput #pulse
Unity Architecture Pattern: Structured Prefabs

The author suggest to always create a monobehaviour for the root of the prefab to avoid GetComponent calls and easier validation of provided references to components.

https://bronsonzgeb.com/index.php/2021/05/01/unity-architecture-pattern-structured-prefabs/

#prefab