Skip to content

Unity Installation Guide

Discipol edited this page Sep 18, 2022 · 11 revisions

This page contains detailed step-by-step instructions on setting up Entitas with the Unity game engine. If you still have questions after reading through this then please check out the FAQ, ask for help in the chat, or crate a new issue.

Step 1 - Prepare New Unity Project

Create and open a new Unity project. Then go to the Unity toolbar and select Assets>Open C# Project. This will open the default code editor associated with Unity and generate script assemblies needed by Entitas. You can then close or minimize the editor since we won't need it during setup.

Note: Some external editors do not automatically generate a .csproj file (e.g. Visual Studio, emacs, vim). If using one of these editors, ensure that a .sln and .csproj file have been created. Visual Studio will automatically do this if you have at least 1 C# script in your project.

Open C# Project Menu

Optional

Create a new folder in the root of your Unity project to hold the Entitas add-on. This is commonly named "Libraries" or "Plugins" in most examples, but you can name it anything you want.

Libraries folder

Step 2 - Import and Setup Entitas

Download the latest Entitas.zip found in Releases then open it and drag and drop the folder named Entitas (located under Assets/Entitas) into the folder you created earlier or into the root of your Unity project. You may also need the folder named DesperateDevs.

Unity folders after import

Wait for Unity to reload and you should now see a new section on the toolbar titled Tools, select that and choose Jenny > Preferences to open the preferences window. This is the preferences window for Jenny, the code generator.

In the Jenny preferences window press the button labeled Auto Import. You will then see a warning message, just select Continue and overwrite and all settings in the preferences window should now be automatically setup for you.

Jenny menu

Step 3 - Test Code Generator

Press the big green button labeled Generate in the preferences window or use the hotkey Shift+Ctrl+G to verify that everything is setup correctly and to generate your first code.

If everything is working you should see a message in the console and a new folder inside your Unity project containing all generated files. By default this is located at Sources/Generated. If you get an error message instead, please read the FAQ for solutions to common issues.

Generated Code folder

All done. You're awesome! 🎉😉

Congratulations! You are now all ready to start creating amazing things with Entitas and Unity! To learn how to start making components, systems and game logic, check out the Tutorials and Examples sections.

Troubleshooting

If your Tools->Entitas menu shows only migrate..., check that you have all the contents of release.zip/Assets/ somewhere inside your assets directory. In version 1.7, not having the DesperateDevs folder will cause this problem on Windows.

Clone this wiki locally