For quite a long time, Unity installer came with a custom MonoDevelop distribution to assist Unity developers with starting with game development. At that time, it was the only available option for many, since other solutions were simply too expensive. Visual Studio Community was then introduced, and almost immediately it became the default Unity C# IDE, but only on the Windows […]
Tag: Editor Scripting
7 Ways to Keep Your Unity Project Organized
I saw a person on Quora the other day, asking how programmers are able to write projects that consist of over 10,000 lines of code. When software gets bigger, it is more difficult to maintain and that’s a fact. So here’s the thing – if you don’t keep your project organized, you’re going to have a hard time […]
Myths and Facts of the Unity Game Engine
Unity is only for games It’s a myth. Of course Unity has been created as a game engine, but it’s so flexible that it is successfully being used in other industries, such as architecture, medicine, and engineering. For an example, see 3RD Planet. It is the largest online consumer event platform, showcasing the top tourist destinations in each […]
How to Make a Custom Editor Window in Unity
Today we will cover creating custom Unity editor windows. They can be used in many different ways. Most probably you know them from 3rd party assets. Even if you’re not an asset developer, creating custom windows may help you greatly with your game development! One of good examples of how the custom Unity editor window may be used is […]
Unity 5.1 Assertion Library
There’s a great article by Yegor Bugayenko called Need Robust Software? Make It Fragile. It’s about Fail Fast philosophy where you should write your code in the way that your application will fail as fast as possible if something is significantly wrong with your data or environment. When you’re building a mobile game with Unity then most probably you’re […]
Rendering custom GUI on Scene view
If you’re using assets from the Asset Store then most probably you realized that some scripts introduce custom GUI elements inside the scene view. Custom GUI elements may be very helpful in many cases and they are also easy to implement! Today I’d like to show how to do this. First, you need to know when custom […]
Executing Custom Scripts from Unity’s Menu
You can do wonderful things with your Unity editor via scripting. For instance, you can write a script to populate your scene with random objects. All you need is a method of executing those scripts. Let’s talk about how to put your scripts into any menu. For this purpose, we will use MenuItem annotation and write […]
Custom gizmos with OnDrawGizmos
Did you know that by implementing OnDrawGizmos() method in your scripts you can draw a custom gizmo? Last time we talked about how to use icons’ settings to assign various icons to invisible game objects. Yet if you have some experience with scripting then you can create your own gizmos. Basic Example Gizmo drawing can be done using […]
Use CustomEditor to customize your script inspector
When your scripts are getting bigger, then usually the number of properties is greater too. Unity, by default, is using the most generic way to display these properties because it does not know the context. You can use decorator attributes but that’s not the only way you can deal with it. In fact, Unity gives you complete freedom to […]
Use decorator drawers to improve inspector view of your scripts
If you’re writing a custom script then most probably you want to manipulate its public field values from the Inspector. By default, the Inspector fields are placed next to each other and the field name is the only information that you receive. You can write a custom editor, but this requires creating another script with a […]
Use Debug.Break() to pause Unity editor from the code
You can pause your game from the editor any time you want. But did you know that you can trigger the pause from the code based on some condition? There’s a console option called Error Pause. When enabled, it will pause your game when any run-time error occurs. When your game is paused, you can easily investigate what is […]
ExecuteInEditMode will run your script in edit mode
You might be familiar with the workflow that all of your game scripts are working only when you hit the Play button. Did you know that you can force some scripts to be running even when you’re in the edit mode? Why would you do that? I mean that you may have player scripts, enemies scripts, weapons […]