Unity Learn home
Courses
filter +
DOTS Best Practices
Course
Advanced
1 Hour55 Mins
If you’re working on a game (or other real-time simulation) that requires the most efficient CPU usage possible, then Unity’s Data Oriented Technology Stack (DOTS) is a great way to get the performance you need. However, to use DOTS successfully, you can’t simply grab the API documentation and dive straight in. Before you begin creating a project with DOTS you must understand the following: The fundamental concepts of data-oriented design Data-oriented design in Unity The best practice advice in this guide Data-oriented design (DOD) is a big change from the object-oriented programming (OOP) that many developers have spent their whole careers working with. This means that the learning curve for DOTS might be steep, and there are a lot of pitfalls that might stop you from getting the performance benefits you hope for. This Best Practice Guide contains advice to help avoid those pitfalls. Sections 1 and 2 of this guide explain the fundamental knowledge you need to understand before starting to build DOTS applications, and the biggest obstacles to achieving good performance. Later sections contain techniques that you can use to squeeze even more performance out of the technology, but you must have a fundamental understanding of the basics to get good use out of them. NOTE: This guide is not intended to be a comprehensive tutorial to all aspects of building a DOTS-based application. The primary focus of this guide is to help you obtain the best possible runtime performance in code written using the DOTS packages, with a particular focus on the Entity Component System. As such, there are many topics which fall outside the scope of this guide and are not covered in detail or mentioned at all. Here is an incomplete list of topics which aren’t covered here: In-depth discussion of features which were primarily used in older, experimental versions of the Entities package, such as SystemBase and Entities.ForEach() How to use the Baking system to author and convert entity data How to create and use BlobAssets to represent memory-ready, read-only data Some newer convenience features such as Aspects . Aspects can help to simplify complex entity queries but come with an additional runtime performance cost. This feature is under active development and may be featured in future versions of this guide. Packages which supplement ECS but which are not a core part of DOTS, such as Entities Graphics , Unity Physics , Havok Physics for Unity , and Netcode For Entities
Programming Interactions with C# Scripting in Unity
Course
Intermediate
7 Hours10 Mins
Take your Unity development skills to the next level by learning how to create program interactions using C# scripting. This hands-on course delves into interactive gameplay mechanics, from setting up player controls and projectiles to integrating animations, ragdoll physics, and sound effects. Using Unity’s Input System, Cinemachine, and Mecanim animation system, you'll learn to create dynamic and engaging player experiences. Perfect for intermediate developers, this course will equip you with the tools and techniques to build interactive projects with confidence while deepening your C# scripting expertise. By the end of this course, you will be able to: Navigate and understand the sample project structure. Configure Unity’s Input System for player interactions. Design and script a functional main menu with scene transitions. Modify and script player prefabs to respond to input for movement and rotation. Set up and configure Cinemachine cameras for smooth tracking and interaction. Create, instantiate, and manage projectiles using colliders, rigidbodies, and forces. Design interactive targets and implement collision-based effects, including particle systems. Build and dynamically update in-game UI using Text Mesh Pro. Use the singleton pattern to manage UI elements across gameplay. Create and manage animations using the Mecanim system and animator parameters. Configure and toggle ragdoll states for dynamic physics-based interactions. Play and script sound effects for enhanced gameplay immersion.