2D Top Down Pixel Art RPG Game Dev in Unity 2022 ~ Crash Course Tutorial for Beginners
Why Stack Overflow recommends it
Stack Overflow users cite it as the tutorial they were following when they hit problems with Unity's Input System, player movement, animator blend trees and sword colliders, and answerers point to specific timestamps.
Recommended by 2 people across 2 different months, 2022 to 2023.
What it is
A 90-minute beginner crash course by Chris' Tutorials that builds a 2D top-down pixel art RPG in Unity 2022. It walks through pixel art import settings, tilemaps, the new Input System, a player controller script, collision sliding, animation, Cinemachine and a sword attack against a slime enemy.
What people said
Recommends Chuck · 2022-07 · Stack Overflow · on “Visual Studio will not recognize Unity modules”
At 22:20 in the video [this video] they get the Input System package from the Package Manager. The documentation for InputValue [LINK] says it's from the UnityEngine.InputSystem namespace, so when you see the error: error CS0246: The type or namespace name 'InputValue' could not be found It's the compiler telling you it can't find the namespace where InputValue is defined. To solve this problem, you need to add a "using" statement at the top of the file to tell the compiler where to find that function. using UnityEngine.InputSystem; Their code won't work without it, either and actually at 31:50 in the same video [this video] you see them realize the error and correct it as well.
Recommends Tomas Iniguez · 2022-08 · Stack Overflow · on “Why can't I move my character in unity using newInput package?”
I'm new to unity and I'm trying to follow this tutorial: [this video] But when I do the code at 42:00 [this video] and compile my character wont move at all. I wont to believe I did everything exactly as the video explains but I cant figure out how to fix it. Here is my code using System.Collections; using System.Collections.Generic; using UnityEngine.InputSystem; using UnityEngine; //Take and handle input and movement from the character public class PlayerController : MonoBehaviour { public float moveSpeed = 1f; public float collisionOffset = 0.05f; public ContactFilter2D movementFilter; Vector2 movementInput; Rigidbody2D rb; List<RaycastHit2D> castCollisions = new List<RaycastHit2D>(); // Start is c
Cites MadAtTheKeyboard · 2022-06 · Stack Overflow · on “Visual Studio will not recognize Unity modules”
I am a complete beginner to Unity, as well as Visual Studio 2022. I was trying to make a 2D game, and have been following along this tutorial, [this video] . At 25:11, we are shown how to make a script to control the player movement. While I was going to use Visual Studio Code, the Unity debugger for VScode is deprecated, and no longer functions. To solve this I switched to Visual Studio 2022. I installed the 'Game Development with Unity' and the '.NET desktop development' modules, and set the default external editor within Unity to Visual Studio 2022. I also regenerated the .csproj files as I was instructed in another form. Despite this, I encounter error CS0246: The type or namespace name 'Inpu
Cites MrCPlusPlus · 2022-11 · Stack Overflow · on “Unity blend tree in animator not working/jittering”
I am using unity version: 2021.3.6f1 I have setup indevidual animations for the player (four-way idle and walk) and I am using two blend trees which the script accesses and changes the variables moveX, moveY and is_idle. I am using the new Unity input system: Screenshot of new Unity input system. [LINK] and cinemachine (cinemachine isn't causing problems though). When I run the script, it has a weird jittering effect as if the animator keeps reseting the animation playback. Below is a video. Link to video [LINK] Screenshot of the animator: Screenshot of the animator [LINK] Here is the code in the player controller: using UnityEngine.InputSystem; public class PlayerController : MonoBehaviour
Cites AtomicUnleashed · 2023-07 · Stack Overflow · on “2D top down character not moving in Unity version 2021.3.20f1”
I was following this tutorial for a 2D, top down RPG until around the 40 minute mark. I tested the code that was given and the player did not move. There were no errors. Here's the tutorial if required: [this video] Here's the code: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.InputSystem; // Takes and handles input and movement for a player character public class PlayerController : MonoBehaviour { public float moveSpeed = 1f; public float collisionOffset = 0.05f; public ContactFilter2D movementFilter; Vector2 movementInput; Rigidbody2D rb; List<RaycastHit2D> castCollisions = new List<RaycastHit2D>(); // Start is called before the first frame up
Cites Rigel · 2023-11 · Stack Overflow · on “why is my collider is not triggering when i attack?”
I have a problem, I did everything like in this video [this video] but when the sword collider activates the slime doesn't disappear, for some reason the colliders don't interact even if I turn on the slime collider trigger. 1:23:40 like that enemy code public class Enemy : MonoBehaviour { public Enemy enemy; public float health = 1; public float maxhealth = 1; public void Start() { health = maxhealth; } public float Health { set { health = value; if (health <= 0) { TakeDamage(); } } get { return health; } } public void TakeDamage() { Destroy(gameObject); } } sword code public class swordattack : MonoBehaviour { public Collider2D swordcollider; public float damage = 3; Vector2 rightattackoff; pri
Cites Rigel · 2023-12 · Stack Overflow · on “collider does not follow”
I have a problem, I did everything like in this video [this video] but when the sword collider activates , sword collider is not located near the character, but goes to the edge,but if I leave the collider enabled, then it will be located near the character correctly original position sword collider [LINK] as long as I don't attack with the left mouse button everything is fine [LINK] after clicking the collider goes away [LINK] I tried to bind the collider to the character, but I don’t know how to do it. In the end, it should have turned out like in the video, I hit the slime and it disappears, but for some reason the collider goes away when hit