How do you create a new 2D gameobject?

I’m following this tutorial, on how to create custom triggers. It says i have to create a new 2d game object, but i don’t see that option anywhere?

It should normally be there… Perhaps you’d need to add the 2D-package?
Window->Package Manager → 2D (under Features).

I don’t see that anywhere?

At the top, where it says: “Packages: In Project” → Switch that to “Unity Registry”.

If that doesn’t work, try + → add by name: com.unity.feature.2d (or com.unity.2d.sprite)

That seems to work. I can now select the 2d submenu, in the gameobject menu. It says in the guide though, that i have to click on the button called sprite, to create a new sprite. If i do that, unity will instead open a whole new menu with different sprites.

Which one of them should i select?

8822353--1201060--Sprites.jpg

Any of them. They’re just different built-in sprites applied to a SpriteRenderer.
Like how Cube/Sphere/etc are simply different built-in meshes applied to a Mesh-Filter & -Renderer.
You can swap out the sprite once you’ve created the GameObject, which is probably what the guide will have you do.

It seems to have solved it, so i was able to finish this chapter of the tutorial as well.

Just an FYI - if you are following the official learn tutorials then they do specify the versions that it is for (you can select which version you are using on that page, so it may change the steps to follow depending upon the version). Ideally, you should select a version that the tutorial is designed for and then use that version of Unity to follow the tutorial. I’m only saying this as the tutorial you have selected if for 2018.x and 2019.x versions, yet you are using a 2021.x version of Unity - so you will find that things are different in the newer editor (like the fact you had to install the 2D package, and the sprite menu is different).

That’s just something to consider as to whether you want to be able to follow the tutorial exactly, or if you are okay with finding the new ways that the newer version does stuff compared to the tutorial (which can slow you down as you have to try to figure out where things may have been moved to in the newer version).

I’ve been using the official tutorials on the 2018 and 2019 versions before and they’ve never worked, only on the more recent 2021 versions.

Yes, i know. I have already tried to install the same version of unity, that the tutorials were made for.

It says that the tutorials are not available in that version. I wrote about it in this thread.