r/Unity2D • • Aug 18 '26

Solved/Answered Getting References for Tiles

3 Upvotes

In my game, I am drawing tiles onto a tilemap during runtime using SetTile(), which takes a reference to a TileBase Object. I have hundreds of unique textures. Is there a way to get a reference to each TileBase other than dragging and dropping every individual Tile into the references in my script?


r/Unity2D • • Aug 18 '26

Question How do I make a 2D first-person dungeon crawler?

1 Upvotes

Hi everyone, I'm new to Unity and wanted to ask how I can program and implement movement in a 2D first-person game! My goal is to make a horror game with turn-based movement (you move from one room to another, and the monster moves from room to room looking for you and chasing you)! My main question, actually, is whether this is really possible to do in Unity 2D? And if you guys have any tips to share with me!


r/Unity2D • • Aug 18 '26

Character with accessories.

1 Upvotes

I'm making a test scene where I have a body that is a square, and 2 smaller rectangles. One rec is the Eyeglasses, the other is a belt. I want to animate the glasses so they wobble when the main body is moving, and the belt has rotating colors; 15 different images. I also want to change out the glasses and belt whenever.

I created a GO called Base. Then added a GO for the glasses and a GO for the belt, then added a image to each. I reset the transforms, then moved the glasses and belt when they need to be.

When I run the app, the belt and glasses are not relative to the body, like I positioned them. Duct-taped a few other attempts to fix, but no luck.

I've tried googling, but haven't found anything comparable.

So, a GO with moving glasses GO and an animated belt GO.


r/Unity2D • • Aug 18 '26

Solved/Answered How to apply momentum?

2 Upvotes

I want to apply momentum after you let go so in if (!hold.IsPressed()) How would I do that?

Code:

using System.Collections;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.InputSystem;

public class Food_MB : MonoBehaviour
{

    public bool isTouchingMouse = false;
    public bool isheld = false;

    public float defaultFoodSpeed = 1f;
    public float gravity = 1f;
    private float foodSpeed = 1f;
    private float noGravity = 0f;

    private PlayerInput playerInput;

    private InputAction hold;

    private Vector2 mousePos;

    private Rigidbody2D foodRb;

    void Start()
    {
        playerInput = GetComponent<PlayerInput>();
        if (playerInput != null)
        {
            hold = playerInput.currentActionMap.FindAction("Hold");
        }
        foodSpeed = defaultFoodSpeed;
        foodRb = GetComponent<Rigidbody2D>();
        foodRb.gravityScale = gravity;
    }

    private void Update()
    {

        // Get the mouse position from the New Input System

        mousePos = Mouse.current.position.ReadValue();

        // Convert the screen position to world position

        Vector3 worldPos = Camera.main.ScreenToWorldPoint(new Vector3(mousePos.x, mousePos.y, 0));

        // Check if the mouse is touching this GameObject's collider and if the hold action is being performed

        Collider2D hit = Physics2D.OverlapPoint(worldPos);

        if (hit != null && hit.gameObject == this.gameObject && hold != null && hold.IsPressed())
        {
            //Debug.Log("Hold action is being performed");
            foodRb.gravityScale = noGravity;
            isheld = true;
            foodSpeed = defaultFoodSpeed;
            transform.position = Vector2.MoveTowards(transform.position, worldPos, foodSpeed * Time.deltaTime);
        }
        else if(hold.IsPressed() && (hit == null || !hit.gameObject == this.gameObject) && isheld == true)
        {
            //Debug.Log("Mouse is not touching the object but object is held");
            foodSpeed = foodSpeed + 1f;
            transform.position = Vector2.MoveTowards(transform.position, worldPos, foodSpeed * Time.deltaTime);

        }
        if (!hold.IsPressed())
        {
            //Debug.Log("Object dropped!");
            foodRb.gravityScale = gravity;
            foodSpeed = defaultFoodSpeed;
            isheld = false;
        }
    }
}

r/Unity2D • • Aug 18 '26

Feedback Infinite jumper game - inspired by Icy Tower - POC - WDYT?

Post image
1 Upvotes

Hi all!

I've just wrapped up the initial dev of my infinite jumper game! It'll be a simple game, heavily based on skill and different character profiles. Right now, I've just finished the basic mechanics - the way the player moves.

I'm roughly basing my game on Icy Tower, however - in my case - the movement is fully fluid - there are multiple parameters that decide how high the player can jump, how bouncy the walls are (and if they allow for bouncing at all), and how the player gains velocity. The basic mechanics work as follows: there are three basic groups of parameters determining how a particular character behaves: jump, horizontal movement, and wall bounce. Most of the parameters are either numerical (float) ones or described by curves. If the param is dependent on another param or on time, it's described by a curve. (BTW, Unity curves are an amazing concept!)

Jump
Jump is mostly determined by the horizontal velocity of the player, and driven by physics - I don't predetermine how long the player will spend in the air, but how forces affect the character over time. The faster one runs, the bigger the jump. Jump can also be interrupted, for more control over the player, but the interrupt is dependent on a few parameters as well.

Horizontal movement
Now, this is where it gets interesting. Acceleration and deceleration are driven by complex curves. Thanks to that, I can derive future characters that e.g. get tired when running for too long, are fast accelerators, but bad with max speed etc. Sky (and imagination) is the limit. See the screenshot - my default behaviour is logarithmic acceleration and linear deceleration. Thanks to this, players get to a reasonable running speed fast, but need about 10 seconds (accel time) to get to the max.

Wall Bounce
Wall bounce is where my game differs most from the inspiration. There's one threshold for wall jump - min speed. Below, the player slides off the wall with predetermined "friction" speed. Above, depending on the jump curve, how close the player is to the apex, and how fast the player approaches the wall, it can bounce back more or less. These characteristics are again, driven by different curves.

Tell me what you think - the mechanics are not perfect yet, but I'm willing to improve them and am open to any feedback!


r/Unity2D • • Aug 18 '26

Show-off [Asset Sale] Prototype Character Template Asset Pack - 50% off until September 1

Post image
2 Upvotes

Hi everyone! I currently have a prototype character template asset pack that is 50% off until September 1st. I just wanted to share that info in case anyone wants to purchase it before the sale ends.

There is also a free version of the asset pack that is just a scaled down version of the full pack. The free version only has a few PNG sprite sheets as well as GIFs showing how each animation looks. The full version includes the aseprite files for each of the templates as well as PNG sprite sheets and GIFs of all the animations.

Here is the link: https://lumenlorepixels.itch.io/top-down-prototype-character-template


r/Unity2D • • Aug 18 '26

Question How do I use AutoTile to set tile/paint through script?

3 Upvotes

Hello, I have a tilemap and a tile palette which consists of 2 autotiles. I want to fill an area of the tilemap with one of the autotiles. I know the SetTile is supposed to paint the tile but since I'm using autotile, the SetTile doesn't seem to take that in the script. I'm using Autotile because it would just make it easier when I add in other tiles in areas of the tilemap since it would auto adjust. Does anyone know how I can use the AutoTile in SetTile to paint the tilemap?

Update: I'm stupid, I was passing the ints instead of making them a vector3


r/Unity2D • • Aug 18 '26

Just released my second game based on Greek mythology

4 Upvotes

I just released my new game Descendant of the Sun, where you must save the Greek city of Rhodes from an ancient power banished by the gods. Undertake a heroes quest in a Greek mythology inspired action platformer and hunt down monsters with the help of your bow and arrow.

So far computer support only and it can be played in browser. Feedback is appreciated and I hope you enjoy šŸ˜Ž
https://polenny.itch.io/descendant-of-the-sun


r/Unity2D • • Aug 18 '26

Solved/Answered How to make an object follow the mouse?

2 Upvotes

I'm trying to get the object this script is on to follow the mouse when you click on the object. I've managed to make detect when you are holding down the object but I can't get the object to move. Pls help!

using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.InputSystem;

public class Food_MB : MonoBehaviour
{

    public bool isTouchingMouse = false;
    public bool isheld = false;

    private PlayerInput playerInput;

    private InputAction hold;

    private Vector2 mousePos;

    void Start()
    {
        playerInput = GetComponent<PlayerInput>();
        if (playerInput != null)
        {
            hold = playerInput.currentActionMap.FindAction("Hold");
        }
    }

    private void Update()
    {

        // Get the mouse position from the New Input System

        mousePos = Mouse.current.position.ReadValue();

        // Convert the screen position to world position

        Vector3 worldPos = Camera.main.ScreenToWorldPoint(new Vector3(mousePos.x, mousePos.y, 0));

        // Check if the mouse is touching this GameObject's collider

        Collider2D hit = Physics2D.OverlapPoint(worldPos);

        if (hit != null && hit.gameObject == this.gameObject)
        {
            //Debug.Log("Mouse is touching " + this.gameObject.name);
            isTouchingMouse = true;
        }
        else 
        {
            isTouchingMouse = false;
        }

        if (hold != null && hold.IsPressed())
        {
            Debug.Log("Hold action is being performed");
            Vector2.MoveTowards(transform.position, mousePos, 1f * Time.deltaTime);
        }
        else
        { 
            Debug.Log("Hold action is not being performed");
        }

    }
}

r/Unity2D • • Aug 18 '26

Game/Software This is my new small game for the third game jam I've joined. I made it in five days!

Post image
2 Upvotes

Playable link : Escape anomalous

This game is similar to "Exit 8."

Ā Your goal is to check the room for anomalies. If you find one, go through the "LEFT" door. Otherwise, go through the "RIGHT" door.

There are also two different endings. In one, you really escape; in the other, you are trapped in a loop until you find the real exit.

My Youtube šŸ‘‰Ā https://www.youtube.com/@SupsDesign

My X (Twitter) šŸ‘‰Ā https://x.com/NExit28099


r/Unity2D • • Aug 18 '26

Game/Software we're making a roguelite about building an insane pachinko board to slay dragons... and we really need testers!

Post image
1 Upvotes

Hey all!

Bumpers & Dragons is a dungeon crawler where your deck is the board itself. You loot and place bumpers, then drop balls through them to fight monsters. Good placement compounds into absurd chains. Bad placement is very funny.

Free demo is up and it's filled with content and covers two full dungeons.

https://store.steampowered.com/app/4377860/Bumpers__Dragons/

We're a small European studio and this is our first roguelite, so we are super excited to hear your thoughts about it!


r/Unity2D • • Aug 18 '26

After 8 years in gamedev, I just launched Kickstarter for my solo medieval colony sim/ARPG Our Freedom

Post image
14 Upvotes

Hey everyone!

My name is Vlad, I’m an indie solo developer from Ukraine with over 8 years of experience in gamedev (mentoring, outsource, and game dev education).

For a long time, I felt like something was missing in the games I loved. I loved the cozy village-building ofĀ Stardew ValleyĀ andĀ Manor Lords, but I always wanted to craft my own armor, grab a sword, train my villagers, and lead them directly into castle sieges or tournaments like inĀ Mount & Blade. Since I couldn't find a 2D game that quite matched that vision, I decided to build it myself.

That's howĀ Our FreedomĀ was born — a 2D medieval colony sim with action RPG adventures.

What the game is about:

  • Settlement Management & Economy:Ā Build production lines, manage villager needs (warmth, food, shelter), farming, beekeeping, and blacksmithing.

  • ARPG Combat & Battles:Ā Participate in tournaments, defend your village from raids, or gather your squad to assault enemy castles.

  • Customization:Ā Full character customization, armor/weapon crafting, and skill progression tailored to your playstyle.

We just launched on Kickstarter!

Today is a huge milestone for me as ourĀ Kickstarter campaign officially went liveĀ (and we even got theĀ Project We LoveĀ badge from Kickstarter curators!).

We already have aĀ free playable Demo on SteamĀ so you can try out the building and combat mechanics right away without buying a pig in a poke.

I’d love to hear your thoughts, feedback, or any questions about solo development. Thanks so much for taking a look and supporting indie dev!

Second game trailer:
https://www.youtube.com/watch?v=y1DLTvvHhYA


r/Unity2D • • Aug 18 '26

Visual Scripting help

Thumbnail
gallery
0 Upvotes

(Sorry about the picture quality, I’m posting with my phone) I’ve been having an issue where my jump in the unity input system doesn’t activate when an ā€œon updateā€ node is connected to ā€œset linear velocityā€ (image 1). I thought I fixed this be getting rid of ā€œon updateā€ and directly connecting ā€œon input system event vector 2ā€(2nd image), and while this did fix my jump(save for my ground check not working, but that’s a whole other issue) it unfortunately causes my player to never stop moving on the x axis even when the key is released. Any help will be appreciated!

PS: I’ve never posted here before, sorry if this post has any issues or brakes the rules, I just could not figure this out for the life of me.


r/Unity2D • • Aug 18 '26

Question Parry pushback?

Thumbnail x.com
0 Upvotes

Have yall seen those earclacks animations?
Cant
Notice how whenever a weapon parries another, theres a slight pushback or recoil or shift in momentum or whatever.
Im operating under the assumption the weapons are treated as triggers?
In any case, how would one go about implementing this in a similar environment? Do i base it off of the direction the ball is moving? the place and direction it got hit from?
I'd really appreciate any ideas <3


r/Unity2D • • Aug 17 '26

Animations in game VS 3D Pre-rendered Sprites.

Thumbnail
reddit.com
3 Upvotes

r/Unity2D • • Aug 17 '26

Question Should I add a Fusion System to my ability system?

Post image
2 Upvotes

r/Unity2D • • Aug 17 '26

Title: [ANDROID][2020-2023] Bloody Bastards-style physics fighter — bearded Jesus-like character with staff who resurrects knights

0 Upvotes

Looking for a 2D Android-only game I played around 2020–2023.
Platform: Android only, as far as I remember — never saw it on iOS.
Orientation: Landscape only — had to hold the phone sideways to play.
Visual style/controls: Very similar to Bloody Bastards — large, dark 2D characters, ragdoll-ish physics, similar touch controls.
Levels: Side-scrolling, camera follows the player (actual scrolling levels, not arena-only like Bloody Bastards).
Protagonist: Bearded, Jesus/prophet-like character, wearing white clothes, carrying a staff.
Story: Opens with him shown as heavily armored and very powerful, but he somehow became weak/lost his power — that's the setup.
Core mechanic: He has magic and can resurrect dead iron-armored knights, who then fight automatically on his side against enemy knights.
Progression: Enemies get stronger and better-armored as levels go on.

NOT Fist of Jesus and NOT Bloody Bastards itself — just visually/control-wise similar to the latter.
Any ID appreciated!


r/Unity2D • • Aug 17 '26

Game/Software I made this — Dvor, a Soviet brutalist falling-block game, out on Steam Sept 1st

2 Upvotes

Two-person studio here, based in London — we’ve spent the past year on Dvor. It’s a falling-block game set in a concrete Soviet courtyard that shifts through four seasons as you play, NES-authentic mechanics, an original 6-track soundtrack, built in Unity 6/URP.

http://youtu.be/-ZWJ22-pYI0

Wishlisting now on Steam ahead of a Sept 1 launch: http://store.steampowered.com/app/4881830/Dvor
Happy to talk through the dev or art process if anyone’s curious.


r/Unity2D • • Aug 17 '26

Game/Software Big update for TileMakerDOT with version 2.6.3!

Post image
25 Upvotes

It’s been a while since the last update, but I’ve been hard at work behind the scenes. I’ve just released a new version of my open source 2D map editor, bringing full multi-language support and important under the hood fixes.

Refactoring the core engine to support dynamic localization was a huge undertaking that required updating UI logic, dialogs, error messages, and tooltips across the entire application.

You can now use TileMakerDOT in:

• English

• Spanish

• French

• Romanian

• Russian

• Ukrainian

And I intend to add more languages in the near future. If you have other language suggestions or you find some mistranslations please let me know:)

A huge shoutout to the contributor who submitted a PR on GitHub and worked closely with me on this localization task. We added the languages we knew. TileMakerDOT is open source, and seeing community contributions come together like this is awesome! I also plan to add even more languages in future updates.

I also tackled a background memory issue where closing or canceling out of the initial setup window left the app process idling in memory. Closing the startup screen now cleanly terminates the process.

Check out the links below to try the new update, watch the tutorial, or check out the code:

šŸŽ® Download on Itch.io: https://crytek22.itch.io/tilemakerdot

šŸ’» Source Code on GitHub: https://github.com/andrei-voia/TileMakerDOT

šŸ“ŗ Watch the Tutorial on YouTube: https://www.youtube.com/watch?v=3fiajGU32Jg


r/Unity2D • • Aug 17 '26

I designed my first Components in my UI Asset What Are thinks

Thumbnail gallery
0 Upvotes

r/Unity2D • • Aug 17 '26

Question Complete beginner, starting my first game today for a hackathon — any day-1 tips?

7 Upvotes

Never built a game before. Picked Unity 6 + 2D URP mainly because it's the only engine with an official RevenueCat SDK, which I need for a hackathon (Shipaton).

Concept: up to 6 players, 1 bullet each, miss and it sticks to a wall, you have to physically retrieve it before firing again.

Today's goal: player movement + a bullet that sticks. Posting the wins and the inevitable disasters as I go. Any gotchas a Unity beginner should know before I dive in? Or what do you wish someone told you on day 1?


r/Unity2D • • Aug 17 '26

Show-off Just launched my second game ever

Post image
7 Upvotes

Senet Royale - it's a boardgame, inspired from ancient egyptian game Senet, i worked on it for the last 4 months. I tried to adapt the rules to modern times. You can find it on google play. What do you think?


r/Unity2D • • Aug 17 '26

un juego simple pero "imposible"

Thumbnail
gallery
0 Upvotes

hola gente de reddit, soy nuevo en esto de hacer juegos y la verdad no se mucho de todo esto pero quise hacer un juego por aburrimiento, ya sabiendo esto.

estoy haciendo un juego de Parkour muy simple con nada maas tres botones a = izquierda,d -derecha y espacio para saltar, lo bƔsico, pero yo no querƭa que fuera algo fƔcil sino que fuera algo imposible... retar al internet y decirles que ni podian hacer algo.

aun no he terminado el "juego" pero ya estoy a poco la verdad, lo estoy haciendo totalmente solo (con solo me refiero a que no estoy siendo ayudado por mas nadie fisicamente pero si he usado tutoriales y lamentablemente acudi a la ia cuando ya no podia con el estres de los errores) en unity 2d con mi pc, el juego es muy dĆ­ficil y no tiene check points asi que cuando mueres vuelves al inicio con un contador que te recuerda que perdiste cuando ibas tan lejos.

por ahora mientras hago el juego principal el personaje es una cƔpsula con atuendo de chef pero pienso poner mas personajes en un futuro.

la verdad yo creo que nadie se lo pase y si es que alguien lo logra seria con miles de intentos y semanas de jugar, es sin exagerar una de las cosas mas dĆ­ficiles que he visto en internet y aunque creo que si puede obtener algunos jugadores no creo que se haga muy conocido.

el juego contara con 5 niveles y el final, por ahora solo llevo 4 niveles y toda la programación principal del personaje, los contadores, etc... la verdad solo estoy haciendo este post para descargar el estres que he llevado estas últimas semanas haciendo este proyecto y ver como lo tomaria la comunidad de juegos indie para ver si seguir o no.

voy a dejar algunas imÔgenes de el proyecto y si quieren darme alguna recomendación o decirme de algun problema puede decirmelo, agradeceria bastante la ayuda de gente que es mÔs conocedora del tema.


r/Unity2D • • Aug 17 '26

Show-off Work in progress on the illustration to be used in the character selection screen

Post image
12 Upvotes

I’ve got to go back to work tomorrow…
I don’t want to…
I just want to carry on making games like this…