Member-only story

Object-Oriented Programming (OOP) vs Data-Oriented Tech Stack (DOTS) in Unity

I’m sticking with OOP. At least for now.

Ray
CodeX
4 min readApr 30, 2022

If you have been developing using Unity for quite some time, you should have heard of DOTS by now. It is a fundamental change in Unity’s architecture and it also signals a change in how developers think about code and data. This data-oriented design (DoD), an opposite approach to the long-time default standard in many industries object-oriented design enables developers to take advantage of the multicore processors and has proven to increase performance in applications. However, one thing to note is that DOTS is not a direct opposite of OOP because DOTS in Unity encompasses multiple technologies that deliver the data-oriented approach.

Photo by Joshua Aragon on Unsplash

Now, in Unity, DOTS consists of several components working together:

  • The Entity-Component-System (ECS) framework
  • C# Job system for multithreading
  • Burst compiler for optimized native code

DOTS >> OOP

One huge advantage of DOTS compared to OOP is the way data is handled in Unity. Data structures are handled such that cache misses are avoided for the most part and this results in increased speed and efficiency. The separation between data and implementation…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

CodeX
CodeX

Published in CodeX

Everything connected with Tech & Code. Follow to join our 1M+ monthly readers

Ray
Ray

Written by Ray

Embedded Software Engineer and Indie Game Developer

No responses yet

Write a response