
Now, when any GameObject with the Mesh Study component attached to it is visible in the Scene view, this class will handle drawing it. Add this attribute on the line above the MeshInspector class declaration: The first step is to tell Unity what kind of objects that this special editor should draw. Note that this class inherits from Unity’s base Editor class - that’s what makes Unity understand this is a custom editor rather than a game script. Open MeshInspector.cs and view the source code. Scripts in this special folder modify how the Unity editor works they do not become part of the built game. Select the Editor folder in the Project view.
#UNITY GET FILE TIME HOW TO#
You’re going to build a custom editor to tear this poor cube apart! (And then you’ll learn how to keep it in one piece.) Customizing the Editor Script In the Scene view, you will see a humble cube: Open 01 Mesh Study Demo inside RW/Scenes. Poking and Prodding Meshes With a Custom Editor In the next section, you will create a custom editor to visualize the parts of a 3D mesh.

Scripts: This contains runtime scripts, or components.Editor: The scripts inside this folder give you special powers in the editor during development.Scenes: This contains the three scenes that you will use for the different parts of this tutorial.Prefabs: This contains a CustomHeart prefab, which you’ll use to save your 3D mesh at runtime.Check out the folder structure in the Project view:
#UNITY GET FILE TIME DOWNLOAD#
Now that you have the basics covered, download the project using the Download Materials button at the top or bottom of this page, then unpack the files and open the starter project in Unity.

The invisible lines that connect these vertices form triangles, which define the basic shape of the object.īut in addition to the shape, the engine needs to know how to draw the surface of the object. A mesh is like a net of points, or vertices. The shape of a 3D object is defined by its mesh. Time to start with the basic vocabulary of 3D rendering. You can learn more about custom editors at Extending the Unity Editor. You can download the latest version of Unity here. You need to have at least Unity 2019.1.3 installed. If you need to brush up on these topics, check out Introduction to Unity UI and Introduction to Unity Scripting first. Note: This tutorial is intended for users who are familiar with the Unity editor and have some experience with C# programming.
