If you looked at the properties available for configuration on a Unity Rigidbody and poured through the documentation for it, you’ll likely find that most of its properties are pretty easily to understand, with the exception of Interpolate and Collision Detection. We’ve explored what the Collision Detection properties do in another article on this blog, and we’re going to explore the Interpolate property in this article.
Continue readingPosts categorised under:
Unity
Showing Unity’s NavMesh in-game
As part of a school assignment in the past year, my team and I created Apoca Force, a tower defense game where WAIFUs (World Apocalypse Intercepting Frontline Units) are deployed onto a battlefield to combat an undead horde. In this game, WAIFUs serve as the eponymous towers of the genre, but with a twist — by spending some resource, they can be moved after they are deployed.
To denote the areas that WAIFUs can walk on, we created an interface that highlighted walkable areas on the map when players decide to move their WAIFUs. This is what we ended up with:
Enjoyed this article? Then check out this other article about how we drew stat graphs for our WAIFUs on our UI interface.
Continue readingOrganising your Unity Inspector fields with a dropdown filter
Over the past 4 months, my team and I have been working on a rogue-like hack-and-slash game for our school’s final year project called Dust to Dust. We have very high ambitions for the game, and we had never worked on projects as large of a scale as this. Of course, by doing that, the challenges we encountered got bigger as well. We had to keep track of many parameters in developing a role-playing video game, and quickly realised that the time taken to find Inspector properties in the project was getting longer and longer. Furthermore, the project was on a 15-week timeline, so every minute was valuable.
Hence, we needed an effective solution that would ease navigation in the project, and — like before — it became clear that we had to once again extend the Unity Editor to suit our needs.
Continue readingMore tricks to get Unity Remote for Android working on Windows
This article is a continuation of our Getting Unity Remote for Android to work on Windows. If you’re here, that’s probably because you couldn’t get USB debugging to show on your Android device, and the simpler tricks we shared in our article didn’t work for you.
Continue readingGetting Unity Remote for Android to work on Windows
If you’re developing a game for Android on Unity, Unity Remote is an irreplaceable tool that allows you to quickly test your game on your Android device using Unity’s built-in Play-in-Editor feature. Unfortunately, it can also be pretty difficult to get Unity Remote to work, since it requires some very specific configurations on both your Android device and your computer.
Available solutions online are often incomplete, inaccurate, or outdated (Unity Remote was released more than 4 years ago, and the Android development scene is very different from how it was then), so you often have to piece solutions from multiple sources to get one that works. After grappling for hours to get Unity Remote working on multiple computers (and a lot of frustration), I’ve decided to write a set of articles to save you the same frustration. Hopefully, this will save you from 9000 Google searches and a damaged keyboard.
Continue readingGitHub Desktop for Unity — Part 1: Setting up your source control repository
This article is a part of the series:
Using GitHub Desktop for Unity collaboration
If you’re working on a Unity project with the free Unity license, you’re only allowed to have a maximum of 3 people (and a storage limit of 1GB) on Unity Collaborate Plastic SCM. While you can work around the headcount limitation by adding and removing members when needed, it can be quite a hassle. Hence, for those without a budget for a paid Unity plan, a cheap and easy way to go around both the personnel and storage limit is to use GitHub Desktop for collaboration.
Creating Reorderable Lists in the Unity Inspector
Update: Like this article? Then check out this other article on creating a dropdown filter for the Unity Inspector.
Over the last 5 months or so, me and my team have been involved in the development of a hybrid tower defense and RTS game called Ex-Terminator (click on the link to try it out, it’s free!) as part of a school project. During the course of developing the game, we quickly realised that, in order to allow us to have the flexibility to experiment with our level design, we had to experiment with a class in Unity called the ReorderableList
.
If you’ve read some of the other articles here, you’d have noticed that we normally link Unity classes to its page on the Unity Scripting Reference. We didn’t do so here because there is no official documentation for it at the time this article was written. The ReorderableList
class is filed under the namespace of UnityEditorInternal
, which also doesn’t have official documentation. We’ve decided to write an article about it, however, because of how useful it is, and because of how little information there is currently about it online.
Checking the type of GameObject you are colliding with in Unity
In any given game, you are probably going to find dozens, if not hundreds of different objects colliding or intersecting with one another. Hence, one of the first things you learn in Unity is how to identify the type of object you have touched. These are the most common ways to do so among beginners:
void OnTriggerEnter(Collider other) {
// If a GameObject has an "Enemy" tag, remove him.
if(other.tag == "Enemy") {
Destroy(other.gameObject);
}
}
void OnCollisionEnter(Collision collisionData) {
// If a GameObject has an "Enemy" tag, remove him.
if(collisionData.collider.tag == "Enemy") {
Destroy(other.gameObject);
}
}
Essentially, the idea is checking whether the object we are colliding with or touching has been labelled with an Enemy tag, before we perform any action on the object.
While it is simple and easy-to-understand, there are better ways of identifying objects we are colliding with.
Continue readingVector math for polar movement in 2D games (Unity)
Polar movement, i.e. moving objects at an angle, is something that people starting out in games programming often have trouble with. Coordinate systems are easy to understand, and so is moving things left and right or up and down; but what if you want to move at angles that are not parallel to an axis, like 30° upwards, or towards a target? How do you get a vector that represents that direction of movement?
Continue readingGetting your emission maps to work in Unity
Emission maps (also known as emissive maps) are textures that can be applied to materials to make certain parts of an object emit light (like the cube in the image above). In Unity, lights from emission maps don’t start affecting the scene as soon as you place them on the material. There are a lot of settings you have to get right in your scene and material settings to get the emission maps working right.
Continue reading