r/Unity3D – Telegram
r/Unity3D
259 subscribers
12.6K photos
15.5K videos
14 files
47.8K links
News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).
Download Telegram
How to create a new Selectable?

As you already know, Unity has some UI objects (using Text Mesh Pro or not) that are "selectable", that means that we can interact with them, like for example a button, a dropdown, et cetera...

I want to create my own selectable that is a Slide-Toggle, I do not think that Unity have this one nor Text Mesh Pro.
But first, I want to know what the structure of the noscript have to be?
Do I need to use the class Selectable or just the Interface, I don't know about that.

I just want it to have the basics, so the Selectables properties (as the navigation and .interactable) and public methods (.Select()...).

Thanks for any help.

https://redd.it/1hotx2r
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
A view of one of the first levels for my first Steam game What do you think it looks like?
https://redd.it/1how7sp
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
How would one make a mirror that works like this? o.o (Sorry if a stupid question)

https://redd.it/1howdla
@r_Unity3D
Media is too big
VIEW IN TELEGRAM
Using Shader Graph I made this customizable and dynamic Skybox shader for synthwave, retro & space scenes!

https://redd.it/1houvy0
@r_Unity3D
A side project I'm working on. Farming sim, open world. 🌳🦮 How does it look so far?
https://redd.it/1hoyf0v
@r_Unity3D
Member variables and their prefix

Let me start by saying that I’m aware that a great deal of this is subjective, based on specific needs and/or is personal preference.

Having said that, can someone please ELI5 local/member variables and the use of, for example, m_. Or any other pattern for that matter, like appending an “a” prefix or a singular underscore, etc.

I read on the unity forum that using them “.. solves all potential problems with ambiguity with member variables or local variables.”

This is how i interpret the prefix: say you have a Player noscript. In it, you call a method from your Inventory noscript and pass in a variable defined outside of both Player and Inventory. Should that variable have a prefix of some sort? i.e instead of int number it should be int _number?

Please share your opinions, as thoroughly as you’d like. Use analogies though my brain works better that way 🙂

https://redd.it/1hp2trn
@r_Unity3D
Thinking of Starting a YouTube Channel for the "99% Club" of Indie Games

Hey fellow devs,

So, I had this brilliant idea at 2 a.m. (you know, when the best ideas come to life): What if I started a YouTube channel dedicated to showcasing solo and small indie games? Not the ones already hogging the limelight on Steam's front page, but the real underdogs. The demos, prototypes, and games that might only have a couple of downloads but still represent hundreds of hours of blood, sweat, and questionable life choices.

I mean, let’s face it—we’ve all daydreamed about someone playing our game on YouTube, leaving wholesome (or hilarious) feedback, right? I want to be that person for you. The indie dev’s indie dev. The champion of games that are “a bit rough” but brimming with passion.

Now, full disclosure:

I haven’t actually started the channel yet.

I have no editing skills (lol).

I’m a socially awkward gremlin (hi).

I also don’t know if this kind of self-promoting-post-but-not-really is allowed here, so mods, pls don’t smite me.

But I made a placeholder YouTube channel because I’m serious-ish about this: https://www.youtube.com/@TheHoardWorkshop. There’s nothing there yet except dreams and a doodle of a guy I might turn into a PNGtuber/animation style mascot. Think “Jaiden Animations but worse,” because simplifying is hard, okay?

So here’s the deal:

What do you think of this idea? Am I setting myself up for heartbreak and 3 views per video, or could this actually be useful for the dev community?

Tell me about your games! I don’t care if it’s a demo, prototype, or some weird experiment that’s been quietly chilling on Steam for years—if it hasn’t hit the big time, I wanna see it.

Also, if someone’s already doing this better, drop their link in the comments. I’ll happily support them instead (and maybe save myself from a slow spiral into video editing madness).

Thanks for reading my ramble! I’d love to hear your thoughts—and your games! :D



https://redd.it/1hp5gn2
@r_Unity3D
Thinking of Starting a YouTube Channel for the "99% Club" of Indie Games

Hey fellow devs,

So, I had this brilliant idea at 2 a.m. (you know, when the best ideas come to life): What if I started a YouTube channel dedicated to showcasing solo and small indie games? Not the ones already hogging the limelight on Steam's front page, but the real underdogs. The demos, prototypes, and games that might only have a couple of downloads but still represent hundreds of hours of blood, sweat, and questionable life choices.

I mean, let’s face it—we’ve all daydreamed about someone playing our game on YouTube, leaving wholesome (or hilarious) feedback, right? I want to be that person for you. The indie dev’s indie dev. The champion of games that are “a bit rough” but brimming with passion.

Now, full disclosure:

I haven’t actually started the channel yet.

I have no editing skills (lol).

I’m a socially awkward gremlin (hi).

I also don’t know if this kind of self-promoting-post-but-not-really is allowed here, so mods, pls don’t smite me.

But I made a placeholder YouTube channel because I’m serious-ish about this: https://www.youtube.com/@TheHoardWorkshop. There’s nothing there yet except dreams and a doodle of a guy I might turn into a PNGtuber/animation style mascot. Think “Jaiden Animations but worse,” because simplifying is hard, okay?

So here’s the deal:

What do you think of this idea? Am I setting myself up for heartbreak and 3 views per video, or could this actually be useful for the dev community?

Tell me about your games! I don’t care if it’s a demo, prototype, or some weird experiment that’s been quietly chilling on Steam for years—if it hasn’t hit the big time, I wanna see it.

Also, if someone’s already doing this better, drop their link in the comments. I’ll happily support them instead (and maybe save myself from a slow spiral into video editing madness).

Thanks for reading my ramble! I’d love to hear your thoughts—and your games! :D



https://redd.it/1hp5hbo
@r_Unity3D
Media is too big
VIEW IN TELEGRAM
After a year of development and polishing, My memory-game roguelike now has a release trailer! Let me know what you think & does it explain the game well?

https://redd.it/1hp8ceh
@r_Unity3D
What is considered best practice as far as propelling an object forward?

Thinking of ditching setting up velocity alltogether, and just adding force instead. Any potential pitfalls that I might be missing? This is for Top down perspective.

https://redd.it/1hpboit
@r_Unity3D
Can someone help mmake this shotgun work

On the shot gun object i have 5 emptys that the bullets spawn at. some are angled so the shot gun has a spread but that's not working. I think it is because even though their spawning angled, the velocity is still the vector2 from the mouse and player. I've been trying everything I can think of for about 30 minutes. A lot of this code is Chat gpt and I understand most of it but I'm still not skilled to enough to fix this problem. Thank you for anyhelp



{

public Transform player;

public Rigidbody2D PlayerRb;

public float orbitRadius = .2f;

public GameObject bulletPrefab;

public Transform firePoint1;

public Transform firePoint2;

public Transform firePoint3;

public Transform firePoint4;

public Transform firePoint5;

public float bulletSpeed = 10f;



private Vector3 mousePosition;



void Update()

{

if (player == null)

{

Debug.LogWarning("Player reference is missing.");

return;

}



mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);

mousePosition.z = 0; // Mkae sure z is 0 for 2D space



Vector2 directionToMouse = (mousePosition - player.position).normalized;



Vector2 orbitPosition = (Vector2)player.position + directionToMouse * orbitRadius;

transform.position = orbitPosition;



// Rotate the gun to face the mouse

float rotationAngle = Mathf.Atan2(directionToMouse.y, directionToMouse.x) * Mathf.Rad2Deg;

transform.rotation = Quaternion.Euler(0, 0, rotationAngle);



// Flip the gun if it's on the left side of the player

if (directionToMouse.x < 0)

{

transform.localScale = new Vector3(1, -1, 1); // Flip vertically



}

else

{

transform.localScale = new Vector3(1, 1, 1); // Normal orientation

}

if (Input.GetMouseButtonDown(0)) // Left mouse button

{

Shoot(directionToMouse);

}

}



void Shoot(Vector2 direction)

{

Debug.Log(direction);

if (bulletPrefab == null || firePoint1 == null)

{

Debug.LogWarning("Bullet prefab or fire point is missing.");

return;

}



// Store the fire points in an array

Transform[] firePoints = { firePoint1, firePoint2, firePoint3, firePoint4, firePoint5 };



// Loop through each fire point

foreach (Transform firePoint in firePoints)

{

// Instantiate the bullet at the fire point

GameObject bullet = Instantiate(bulletPrefab, firePoint.position, firePoint.rotation);



// Apply velocity to the bullet

Rigidbody2D rb = bullet.GetComponent<Rigidbody2D>();

if (rb != null)

{

rb.velocity = direction * bulletSpeed + PlayerRb.velocity;

}

}

}

}

https://redd.it/1hpfaqj
@r_Unity3D
Educational Books for Unity 2D?

What are some books or e-books I should pickup to learn how to build games in 2D with Unity?

https://redd.it/1hpgbzn
@r_Unity3D
can someone tell me what this EditorLoop is and what causes it so that it makes my game drop so many frames??
https://redd.it/1hpbky3
@r_Unity3D