Today’s article continues the series by finding all the job-safe APIs in the Unity engine as of 2019.3. We’ll compare against 2019.1 to see what’s new!
Search Results
With each new release of Unity, more and more job-safe APIs are added. Today we’ll look at the new ones and learn how we can move even more code into high-performance C# jobs.
Along with Unity 2019.1 and Burst, the Unity.Mathematics package is now out of Preview. It offers alternatives to longstanding core types in Unity such as Vector3
, Matrix4x4
, and Quaternion
. Today we’ll see how switching to these types can improve performance in Burst-compiled jobs.
Today’s tutorial gives step-by-step instructions on how to use F# as a programming language in Unity. It updates an older tutorial from 2015 that used Unity 5.2 because a lot has changed in Unity since then. With an improved IL2CPP and support for .NET Standard 2.0, it’s easier than ever to simply drop in F# support. Read on to learn how!
Unity 2018.3 brings us even more thread-safe APIs that we can call from the C# job system. Today we’ll look at a systematic way to find them all so we know what’s safe to use and what’s not.
Two weeks ago we tested the performance of the async
and await
keywords plus the C# Task
system against Unity’s new C# jobs system. This tested the usual combination of async
and await
with the Task
system, but didn’t test the Task
system directly against Unity’s C# jobs system. Today we’ll test that and, in so doing, see how to use the Task
system without the async
and await
keywords.
Unity 2018.1 brought us two asynchronous code systems. First, there’s C# 5’s async
and await
keywords in conjunction with the Task
and Task<T>
types. Second, there’s Unity’s own C# jobs system. There are many differences, but which is faster? Today’s article puts them to the test to find out!
Unity provides IJob
, IJobParallelFor
, and IJobParallelForTransform
and it turns out these are written in C# so we can learn how they’re implemented. Today’s article goes through each of them so we can learn more about how they work and even see how we can write our own custom job types.
The Unity API can mostly only be used from the main thread. This is used as an excuse by Unity developers to write all their code on the main thread. This makes their code run 2-6x slower. So what can we do about it? Today’s article presents a simple way to use the Unity API from other threads. Read on to learn how to unlock all that extra CPU power!
Unity 5.5 has been out for about a month now and it’s time to update the benchmarks for JSON libraries. Which is fastest now? Which creates the least garbage? Read on to find out!