r_unity3d | Unsorted

Telegram-канал r_unity3d - r/Unity3D

156

News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).

Subscribe to a channel

r/Unity3D

Can you feel the speed? Trying to improve speed boost feeling. Would love to hear your thoughts!

https://redd.it/1oncwy9
@r_Unity3D

Читать полностью…

r/Unity3D

Is unity good for making a 2D Dating sim?
https://redd.it/1onlm6s
@r_Unity3D

Читать полностью…

r/Unity3D

Testing visuals before commiting to making the game in this style. Play or Pass?

https://redd.it/1ongg88
@r_Unity3D

Читать полностью…

r/Unity3D

Is my character too tall for my game: UPDATE
https://redd.it/1oncsqk
@r_Unity3D

Читать полностью…

r/Unity3D

This my Resident Evil inspired survival horror game that uses fixed cameras and modern tank controls MADE WITH UNITY (and lots of love)

https://redd.it/1on9yea
@r_Unity3D

Читать полностью…

r/Unity3D

Borrowed some Tarantino for my Main Menu

https://redd.it/1on7cs6
@r_Unity3D

Читать полностью…

r/Unity3D

Issue with the old input system

I am developing a mobile game and running the device simulator in the unity editor.

I implemented some touch events that work fine on mobile, but for quick testing, i want to be able to do them in the editor using keyboard and mouse.

For example I am trying to maps moue scrolling to zoom in/out, but these events are not registering in the simulator window (not even in the game window).

Debug.Log("Trying scroll & keyboard"); // works fine
if (Input.mouseScrollDelta.y != 0) {
Debug.Log("Scroll"); // doesn't work when scrolling
}
if (Input.GetKey(KeyCode.W)) {
Debug.Log("W"); // doesn't work when typing W
}

Any workaround to be able to do this in the editor? Thanks

https://redd.it/1on2rud
@r_Unity3D

Читать полностью…

r/Unity3D

Is my 2D character too tall for my game?

Hi! I'm currently developing a 2D horror action game and I've finally settled on an art style I like.

My problem is, my main characyer's sprite is 77 pixels tall and 21 pixels wide.

For context, this is going to be a 3/4 top down game in the style of the old Zelda games or Undertale. And those games typically have pretty short characters, which is why I'm a little concerned.

Id rather know now so I could redesign the character than create a full sprite sheet which I might have to redo from the ground up.

So would the current character work anyway, or will it cause issues down the line?

Thanks!

https://redd.it/1on2uul
@r_Unity3D

Читать полностью…

r/Unity3D

Why is my game so pixelated?

Hi I'm very new using unity. When I use the assets that I have which are in a resolution of 1024x1024 they look very pixelated in the game display and I don't know why. Also when I move some assets they usualy change a little bit which can be annoying.

https://preview.redd.it/7xwxkp1xoxyf1.png?width=1080&format=png&auto=webp&s=daa918dc543845d8d55e32f9e2ef7b9f89c770b5

I want these lines to appear but they are invisibles sometimes when I move the panel



https://redd.it/1omx7nl
@r_Unity3D

Читать полностью…

r/Unity3D

Checkout the lighting in my game "The Last Phoenix"
https://redd.it/1omt651
@r_Unity3D

Читать полностью…

r/Unity3D

Relax and shoot robots under night sky! in this 2D game for android!
https://play.google.com/store/apps/details?id=com.luka.survivorexe&hl=en

https://redd.it/1omfmw4
@r_Unity3D

Читать полностью…

r/Unity3D

Unity + Dolphinbar (wiimote) motion controls

Hi all, I am making a game with wiimote inputs using a dolphinbar to connect the controller to my computer. Using mode 3, I can use 'listen' in the inputs action editor to get all my inputs working. All aside from motion controls. I cant even tell if motion controls are part of mode 3. When playing games in dolphin emulator (using mode 4 - wiimote emulator mode), motion controls work fine but when trying to use it in unity, I cant find anyway to recieve any input from it. I am aware of all the libraries that exist but they are outdated to the version of unity that I am working in (6000.1.11f1) as well as I am a bit clueless on how to use any of them. Any help is appriciated.

https://redd.it/1omm8o0
@r_Unity3D

Читать полностью…

r/Unity3D

This went viral on YouTube... Thought you'd find it funny
https://www.youtube.com/shorts/-pnTwFm-EMw

https://redd.it/1omkdsv
@r_Unity3D

Читать полностью…

r/Unity3D

Surprised how easy this steering trick was to implement.

https://redd.it/1omgkcm
@r_Unity3D

Читать полностью…

r/Unity3D

How do i prevent double jumping

so my player keeps double jumping if i spam W

my code:

using Unity.VisualScripting;

using UnityEngine;

using UnityEngine.InputSystem;

public class newmovement : MonoBehaviour

{



[SerializeField\] private Animator walk_0;

public Rigidbody2D rb;

public Transform groundCheck;

public LayerMask groundLayer;

private PlayerRespawn playerRespawn;

private AudioSource audioSource;

public AudioClip jumpClip;

public AudioClip deathClip;

private float horizontal;

public float speed = 8f;

public float jumpingPower = 16f;

private bool isFacingRight = true;

[SerializeField\] float pitchVariance = 0.05f;

private float jumpBufferTime = 0.2f;

private float jumpBufferCounter;

private float coyoteTime = 0.2f;

private float coyoteTimeCounter;



void Start()

{

playerRespawn = GetComponent<PlayerRespawn>();

audioSource = GetComponent<AudioSource>();

}

// Update is called once per frame

private bool isGrounded()

{

return Physics2D.OverlapCircle(groundCheck.position, 0.2f, groundLayer);

}

private void Flip()

{

if (isFacingRight && horizontal < 0f || !isFacingRight && horizontal > 0f)

{

isFacingRight = !isFacingRight;

UnityEngine.Vector2 localScale = transform.localScale;

localScale.x *= -1f;

transform.localScale = localScale;

}

}

public void Move(InputAction.CallbackContext context)

{

horizontal = context.ReadValue<Vector2>().x;

}

void Update()

{

if (Mathf.Abs(rb.linearVelocity.x) > 0.05f)

{

walk_0.SetBool("walking", true);

}

else

{

walk_0.SetBool("walking", false);

}

Flip();

if (isGrounded())

{

coyoteTimeCounter = coyoteTime;

}

else

{

coyoteTimeCounter -= Time.deltaTime;

}

rb.linearVelocity = new Vector2(horizontal * speed, rb.linearVelocity.y);

if (!isFacingRight && horizontal > 0f)

{

Flip();

}

else if (!isFacingRight && horizontal < 0f)

{

Flip();

}

if (Input.GetButtonUp("Submit"))

{

playerRespawn.Respawn();

}

}

public void Jump(InputAction.CallbackContext context)

{

// Handle jump input buffering

if (context.performed)

{

jumpBufferCounter = jumpBufferTime; // Set the buffer when the jump button is pressed

}

else

{

jumpBufferCounter -= Time.deltaTime; // Decrease the buffer counter over time

}

// Only jump if coyote time is active and we have buffered the jump input

if (coyoteTimeCounter > 0f && jumpBufferCounter > 0f)

{

// Apply the jump velocity (only once)

rb.linearVelocity = new UnityEngine.Vector2(rb.linearVelocity.x, jumpingPower);

// Play jump sound effect

jumpBufferCounter = 0f; // Clear the buffer once the jump has been executed

PlaySFX(jumpClip);

}

// Early jump cut-off (when the jump button is released while rising)

if (context.canceled && rb.linearVelocity.y > 0f)

{

rb.linearVelocity = new Vector2(rb.linearVelocity.x, rb.linearVelocity.y * 0.5f); // Cut the jump short

}

}

private void OnCollisionEnter2D(Collision2D other)

{

if (other.gameObject.CompareTag("spike"))

{

PlaySFX(deathClip);

playerRespawn.Respawn();

}

}

private void PlaySFX(AudioClip audioClip)

{

float randomPitch = Random.Range(1f - pitchVariance, 1f + pitchVariance);

audioSource.pitch = randomPitch;

audioSource.clip = audioClip;

audioSource.Play();

}

public void Interact(InputAction.CallbackContext context)

{

// Handle jump input buffering

if (context.performed)

{

playerRespawn.Respawn();

}

}

}

https://redd.it/1omei5m
@r_Unity3D

Читать полностью…

r/Unity3D

Devlog #1 Building the main character for *Trollvein* — a 2D Nordic mythology platformer

https://redd.it/1onmj1f
@r_Unity3D

Читать полностью…

r/Unity3D

I Created an Animator 40x Faster Than Unity’s Default 22,500 Animated Objects at 135 FPS, No Complex Blends Needed Link Description

https://redd.it/1onfiht
@r_Unity3D

Читать полностью…

r/Unity3D

What if the Mayan underworld was the setting for a game?

I would like to develop an idea called "Xibalbá", a video game inspired by the Mayan culture.

The story begins with an explorer who, while defending a "cenote", ends up accidentally entering the "xibalba" because he was curious to explore a ruined temple.

There he will have no choice but to cross the four paths and the six houses and finally face the lords of "Xibalbá", ("Hun-Camé" and "Vucub-Camé").

The goal would be to leave the underworld and return to the land of the living.

How was it? 🌟

https://redd.it/1ongqie
@r_Unity3D

Читать полностью…

r/Unity3D

Running your Unity game on the Steam Deck
https://redd.it/1ond8cy
@r_Unity3D

Читать полностью…

r/Unity3D

Made little trains to take you between areas in this subway level

https://redd.it/1on8iy2
@r_Unity3D

Читать полностью…

r/Unity3D

2D animation on canvas

I need help. I'm making a scene using IEnumerators and buttons in a canvas and I want a short animation to play after a scripted sequence, but it just doesn't work. I'm not an expert in unity, but I know how basic "single-image" animations work (in a canvas), but I want to basically loop 2 images very quick for like 3 seconds and then go back to the rest of the scripted scene.



public GameObject bathtubAnimation;

IEnumerator BathtubEvent()
{
MusicManager.instance.GetComponent<AudioSource>().Pause();

bathtubAnimation.SetActive(true);
yield return new WaitForSeconds(3);
bathtubAnimation.SetActive(false);
yield return new WaitForSeconds(0.5f);

etc etc...
}

Something like that for example, where I can set the object with the animation to true, wait, and then set it to false.



I've tried finding a tutorial for what Im specifically looking for, but I can't find anything. Please help : (

https://redd.it/1on652c
@r_Unity3D

Читать полностью…

r/Unity3D

New update for my game Cubic Void coming soon

https://redd.it/1on3ojc
@r_Unity3D

Читать полностью…

r/Unity3D

Need Help Understanding SRP Batcher Behavior in 2D URP (Parallax + UI Optimization on iOS)

Hey everyone!!

I’m new to 2D iOS game development and have been slowly optimizing my game step-by-step. My first goal is making sure the parallax background and player UI are fully optimized before I move on.

I’ve been stuck on this all day and figured I’d ask the experts here 😅

Basically, I’ve been analyzing the Frame Debugger and noticed how the SRP Batcher is grouping my draw calls. I’m using the 2D Renderer (URP), and the screenshots show the batching events for one frame.

Here’s what I’m seeing:
\#1: My game’s background
\#2: Water layer (makes sense because separate material/layer?)
\#3: Parallax layers 3–9
\#4: Parallax layer 2 only
\#5: Parallax layers 1 and 10

There’s no dynamic lighting in the game so it’s just a colorful arcade-style 2D project which means I plan to switch to the Sprite-Unlit shader later(I would like to know the science behind what is going on). But right now, only one SRP batch seems to be using it (shown in screenshot #2).

My questions are:

* Why is the SRP Batcher grouping the elements this way?
* Could this be caused by different materials/shaders or large vertex counts?
* Does it matter that I’m running in Development Build with Deep Profiler enabled?
* And most importantly, does this batching pattern mean I’m doing something wrong, or is it normal behavior?
* Is there any guide to tackling a lag spike that you guys can help me figure out since it says the spike is coming from scripts and vsync?

When I play the game on my iPhone, it runs smoothly — no visible lag — but in the Profiler, I still see noticeable spikes, and I’d love to understand whether they’re related to improper batching or just debug overhead.

If anyone here is experienced with Unity 2D URP optimization and would be open to helping me understand or even mentoring me through some of this, I’d be more than happy to compensate you for your time (commission or consulting-style).

I’m really ambitious about this project and want to learn how to debug and optimize it properly. Any advice, resources, or insights would mean the world 🙏

Thanks so much in advance!

*(Screenshots)*

[https://imgur.com/a/K32CRsy](https://imgur.com/a/K32CRsy)

https://redd.it/1on0yyk
@r_Unity3D

Читать полностью…

r/Unity3D

This went viral on YouTube... I thought you guys would find it funny

https://redd.it/1omka8p
@r_Unity3D

Читать полностью…

r/Unity3D

Does anyone know a way to make it so a sprite can appear behind another while above it, but appear in front of it when below, similar to how it is in Undertale/deltarune.

https://redd.it/1omrd67
@r_Unity3D

Читать полностью…

r/Unity3D

Thrust Game Dev Video
https://youtube.com/watch?v=tobYkEEwRiA&amp;si=id2sPg4f3NqtokgK

https://redd.it/1omm1n5
@r_Unity3D

Читать полностью…

r/Unity3D

How do you approach a melee combat system?

I'm stumped on how to implement a melee combat system. I'm trying to make it an advanced one, where users can edit their movesets.

It's not quite like a fighting game. If anything, it'd be somewhat similar to the Nioh 2 skill tree, but in 2D, of course.


How do you guys approach this? I tried the following but there are some things I can't quite get right.

* **Finite State Machines:** This gets pretty wonky. I tried two ways: A state for each attack, which is obviously really unsustainable in the long term if I want to have an advanced skill tree, and it just seemed silly adding a state for every single attack. And the other way is just 3 states of "Light", "Medium" and "Heavy" attacks. This seems to be the way to go *on paper* but I'm not sure how to actually handle this codewise? How do I attach animations to each state this way?

Can I use Scriptable Objects to store attack data? In that case, how do I handle the hitboxes? Are they in the code, or in the animation itself as key events? How do I even handle hitboxes if each attack is unique? Do I include start-up frames, active frames and recovery frames in the SO itself or is it a part of the animation events?

How do I do all of this with the *minimum* number of 'systems' possible so it's good design that's easy to expand upon? (This is more of an engineering question ig)


It's very complex for someone like me who's just trying to figure things out. I'm fine doing very simple things like regular attacks, a single keybound ability (ala Hollow Knight-type of combat) but once I want to add variety and customization it just gets REALLY complicated.

https://redd.it/1oml0fm
@r_Unity3D

Читать полностью…

r/Unity3D

relax and play this unique 2D shooter for android! where you shoot robots under night sky full of stars and meteors!
https://youtu.be/HjkRX6pJx84?si=uXL7s8SEeq1bRbW0

https://redd.it/1omfpk6
@r_Unity3D

Читать полностью…

r/Unity3D

Why are they not colliding?

https://redd.it/1omg0h9
@r_Unity3D

Читать полностью…

r/Unity3D

My first game project and user interface — do you like it?
https://redd.it/1omdrus
@r_Unity3D

Читать полностью…
Subscribe to a channel