What is a NullReferenceException?

What NullReferenceException errors are (and how to fix them) in Unity

An error involving a NullReferenceException is something that new developers often encounter when working on projects in Unity. These errors occur when attempting to access object variables, or members of object variables, when the variable itself is null.

Although the cause is simple, NullReferenceException errors can present themselves in many different ways. As a result, fixing them isn’t always as straightforward as following a standard series of steps. In this article, we will explore the various ways that a NullReferenceException can occur in Unity, as well as how to handle these various situations.

If you don’t prefer reading and wish for more visual aid, check out our video guide here.
But if you prefer reading, scroll down to check the rest of the article.

Continue reading

Creating a Metroidvania (like Hollow Knight) — Part 4: Mana and Spellcasting

This article is a part of the series:
Creating a Metroidvania (like Hollow Knight) in Unity

2 June 2024: This article has been updated to correct some errors and missing information.
Thanks to Allan Valin for pointing these out to us! Check out this post to see a list of common issues readers run into with this part of the series.

Welcome to Part 4 of our Metroidvania tutorial series, where we’ll be taking you on a journey through the development process of creating your own Metroidvania game, just like the widely popular Hollow Knight, in Unity!

Continue reading
Creating a Rogue-like (like Vampire Survivors) - Part 10

Creating a Rogue-like Shoot ‘Em Up (like Vampire Survivors) — Part 10: Game Manager and UI 2

This article is a part of the series:
Creating a Rogue-like Shoot 'Em Up (like Vampire Survivors) in Unity

Ever wanted to create a rogue-like shoot 'em up game like Vampire Survivors? In Part 10 of our guide, we will go through how to create additional features for our game manager by continuing where we left off. We will also be covering some important additions to UI elements. You can also find Part 9 of our guide here, where we went through how to create a game manager to connect everything we have created thus far. We also covered how to create some important UI elements for the game, including several add-on features.

A link to a package containing the project files up to Part 10 of this tutorial series can also be found at the end of this article.

To view this content, you must be a member of Terresqualls Patreon at $10 or more
Already a qualifying Patreon member? Refresh to access this content.
Why an ArrayList cannot contain primitives in Java

Why an ArrayList in Java cannot contain primitives like int, double or char

In Java, an ArrayList is a very convenient object that allows us to create and manage variable-length arrays. However, in Java, an ArrayList also has a weird quirk. You cannot declare an ArrayList that uses Java primitives. Below are a few examples:

import java.util.ArrayList;

public class ArrayListTest {
	public static void main(String[] args) {
		ArrayList<int> intList = new ArrayList<int>();
		ArrayList<double> doubleList = new ArrayList<double>();
		ArrayList<char> charList = new ArrayList<char>();
	}
}
Continue reading
Getting Unity Remote to work with iOS devices

Getting Unity Remote to work with iOS devices

If you are an aspiring game developer, or someone with a lot of experience making games, you may need to, at some point, test out your games on your mobile device. However, you may find that the process of having to build and install your game onto your mobile device a time-consuming and tedious process. Especially if you encounter any bugs or UI glitches and now have to go back into Unity, make the changes and repeat the installation process all over again.

With Unity Remote 5 however, this process can be entirely avoided as, not only can you directly test them through the editor, you can even make changes on the fly just by stopping the play and making your changes, before pressing play again to check and see the effects of the new changes.

Continue reading

Creating a Metroidvania (like Hollow Knight) — Part 3: Melee combat & Enemy AI Base Class

This article is a part of the series:
Creating a Metroidvania (like Hollow Knight) in Unity

21 April 2024: This article has been updated to correct some errors and missing information.
Here’s the list of changes and bugfixes for Part 3 of the Metroidvania Series.

Welcome to part 3 of our Metroidvania tutorial series, where we’ll be taking you on a journey through the development process of creating your own Metroidvania game, just like the widely popular Hollow Knight, in Unity!

Continue reading

Creating a Metroidvania (like Hollow Knight) — Part 2: Dash, Double Jump and Advanced Movement

This article is a part of the series:
Creating a Metroidvania (like Hollow Knight) in Unity

Welcome to Part 2 of our Metroidvania tutorial series, where we’ll be taking you on a journey through the development process of creating your own Metroidvania game, just like the widely popular Hollow Knight, in Unity!

Continue reading
Creating a Rogue-like (like Vampire Survivors) - Part 9

Creating a Rogue-like Shoot ‘Em Up (like Vampire Survivors) — Part 9: Game Manager and UI 1

This article is a part of the series:
Creating a Rogue-like Shoot 'Em Up (like Vampire Survivors) in Unity

Ever wanted to create a rogue-like shoot 'em up game like Vampire Survivors? In Part 9 of our guide, we will go through how to create a game manager to connect everything we have created thus far. We will also cover how to create some important UI elements for the game, including several add-on features. You can also find Part 8 of our guide here, where we went through how to create passive items, and a way to manage the player's inventory. This included a way for the player to control and keep track of their existing passive items and weapons. We also created functionality for our weapons and passive items to level up.

A link to a package containing the project files up to Part 9 of this tutorial series can also be found at the end of this article.

To view this content, you must be a member of Terresqualls Patreon at $5 or more
Already a qualifying Patreon member? Refresh to access this content.

Creating a Metroidvania (like Hollow Knight) — Part 1: Movement and Camera

This article is a part of the series:
Creating a Metroidvania (like Hollow Knight) in Unity

Ever wanted to create a Metroidvania like Hollow Knight? In Part 1 of our guide, we will explore how to create movement, animations and a camera for our player character.

Continue reading
XAMPP phpMyAdmin not accessible in Windows

Unable to access phpMyAdmin on XAMPP (in Windows)

XAMPP is a great tool for web developers because it packages a couple of applications used for web hosting into one program, and it allows websites to be tested locally on a computer. Unfortunately, because it links multiple applications together, it is pretty error-prone.

One of the errors that might happen is that you might not be able to access XAMPP’s phpMyAdmin, which provides users with an interface to modify the local SQL database. In this article, we go through the various reasons why this might occur, as well as how you can fix them.

Continue reading