Code sharing between VS and Unity 3D

In my previous blog post I covered how I usually set up new .Net projects. The post covered both naming convention, .Net Standard and .Net Core. In this post I will show a four ways you can share code between .Net projects and Unity 3D projects. There are several good reasons why you would like … Read more

Setting up new .Net projects

Intro I have been a developer for somewhere around 30 years now. In my time I have created a few thousand projects of varying sizes, and for every new iteration I try to improve slightly on my previous. I also see a lot of code from others, and most what I see don’t seem care … Read more

sizeof() vs Marshal.SizeOf()

To get the size of a data type in .Net you can use   or  . I’ll briefly explain the difference between the two. sizeof()   (MSDN) can only be used on data types that have a known size at compile-time. It is compiled as a constant. If you attempt to use it on invalid … Read more

Cost of method wrapper

Introduction What happens if a method is just a wrapper for another method? Is the extra jump optimized away by compiler? Does it take much time? I thought I’d look into this and measure a bit. With the different compilers, Jits and runtimes I thought it would be fun to see what happens. I’ll use … Read more

Speeding up Unitys Vector in lists/dictionaries

Introduction With this post I am digging into some performance improvements for Unity 3D’s Vector2, Vector3, Vector4 and Quaternion. The short version is that they really need   and can benefit from a better  . I’m demonstrating this with example of how it severely decreased performance in my project. Adding IEquatable<T> has no side-effects, if … Read more

Automatic class generator for CsvHelper

CsvHelper helps in reading CSV files. But creating the model and mapper classes can be a bit time consuming. On this page you can generate the classes. Just fill inn the fields below with the header for your CSV file. It will generate the model and a mapper class. Code sample to use classes generated: … Read more

IIS redirect HTTP to HTTPS but allow Let’s Encrypt

Let’s Encrypt makes it easy for everyone to use HTTPS. The Windows client letsencrypt-win-simple simplifies installing and updating certificate in IIS. Using IIS URL Rewrite function you can allow Let’s Encrypt certificate retrieval/renewal and redirect all visitors to HTTPS URL of site.