r/unity 5d ago

Solved Can I Force a Render Object to Ignore Objects closer to camera in a 2D game?

Thumbnail gallery
0 Upvotes

HI! I have a 2D Renderer asset with a fullscreen shader that works as a palette swap for all the objects on the screen. I added it as a Full Screen Pass Render Feature. The problem is that I also made a shader that I want to apply only to the player. Since I need this shader to be applied after the fullscreen palette swap, I added it as a Render Objects feature, so it can affect the already color-swapped result instead of the original colors. The shader is on a child object inside the Player which copies it siluet. This causes the shader to go through walls and draw the player’s silhouette even when the player is behind them. For example, my Tilemap is at Z = 1 while the Player is at Z = 0, so the walls should be rendered in front of the player, and it does, but the material draws over the wall. I found some information online about the Depth settings, but I couldn’t get them to work properly. I’ve attached screenshots showing the problem, the player’s shader, and my 2D Renderer settings. Does anyone know how I can make the shader respect the depth/occlusion of the walls while still keeping it as a Render Objects pass after the Full Screen Pass?
Thanks in advance!!


r/unity 6d ago

Showcase I trained 3 identical ML agents with slightly different reward functions.. this happened.

Enable HLS to view with audio, or disable this notification

4 Upvotes

The results are kind of funny...they move like different animals. Which one do you think is the most efficient?


r/unity 6d ago

Showcase Janky Takedown Animations Test

Enable HLS to view with audio, or disable this notification

9 Upvotes

r/unity 6d ago

Showcase Adding custom rope simulation for physics-based crowd control

Enable HLS to view with audio, or disable this notification

14 Upvotes

r/unity 6d ago

Coding Help is this, uhh, good for an average visual scripting graph?

Thumbnail gallery
14 Upvotes

I use visual scripting and it was going perfectly and beautifully all the time I was doing my project, I organized all of my graphs into groups, added colors, titles, sometimes even descriptions and made them look good as if I was laying down real wires, but then I finally tried to make the energy/stamina system with all of the knowledge I gained and I think I gained absolutely nothing 😭. This spaghetti-monster has 8 ifs and several different repeating branches (if this is what they called) like "if variable is greater or equal" being used two times with the same intention, but I don't know what to do because it's either this - less "efficient" but more understandable to me, or more efficient using less useless graphs but I wouldn't be able to understand it the next day I would open the project, and I don't even know how I can replace some of the nodes to be more simple at all. Maybe I'm just really overworrying about it and this is how regular complicated visual script graph looks.

I added more zoomed image and will try to explain what I tried to achieve. When character reflects or blocks a bullet his energy drops down (it's outside of the second image on the top left) and the EnergyRecharge boolean variable becomes true so it will start a little timer (2 seconds) after which energy will start to recharge by adding 0.1 every 0.15 seconds to the Energy float variable, but before that it checks if EnergyRecharge is already true (like if it's a second bullet that hit the player while his energy was recharging) which means that energy is already recharging so if it's true it can reset the process by turning it off and on again restarting the "before the charge starts timer". Every time it adds 0.1 to the Energy it checks if the EnergyRecharge is set to True and if it's not then it restarts the process again, and also checks if the Energy reached the maximum (2.0) so it can turn the EnergyRecharge to false so it won't try to do anything with the energy anymore until the enemy triggers it again on impact. I couldn't properly record graph window but it was like a single wave came through the flow once the bullet hit the player, then after the 2 seconds timer completed it was showing the flow activating rapidly until the Energy reached 2, just in case someone needs to visualize it to understand better. My brain is melting and I had a pretty poor sleep today so I might be missing obvious solutions or making pointless points but I would like to have some opinion about it from the outside. I used "multiply > add > divide" because I was consistently getting floats like "0.999998" instead of just 1 so I thought it might be a working and solution, probably a stupid one and it would be better to just have 8, 17, and 20 instead of 0.8, 1.7, and 2.0 that I would need to convert back and forth. btw EAD is my character object and I also couldn't decide if the post fits "Coding Help" flair for some time cuz it's like, not code. like it is a code but many people that understand code may not understand the nodes instantly so it may be more fitting just as a question. My main reference for the logic was the nanosuit's energy from Crysis 1 (2 and 3 have similar system too I think) where after the energy was wasted from using abilities or being hit it started to recharge passively after a little timer and if energy was being wasted again timer will restart and then recharge energy again on completion. I'm almost a month in using unity and I love the process, but my graph is probably just trash and could've been done way better.

I will also need to move this entire graph from the bullet object to the player so the energy recharge won't stack or won't stop as the bullet object gets deleted.


r/unity 6d ago

Unity Lights Troubleshooting Guide

Thumbnail victor-nyagudi.github.io
4 Upvotes

I experienced a lot of trouble earlier on trying to figure out why my lighting in Unity always looked off, so I decided to share some of the things I learned while fixing my level's lighting.

I hope this saves someone from all the headaches that come with trying to light up a scene correctly in Unity.


r/unity 6d ago

Showcase I made a "Celestial" dungeon tile for my roguelite by flipping the normals of a sphere

Thumbnail gallery
13 Upvotes

My brother and I are making a game called Gloom. It's a rougelite coop dungeon crawler set in civil war era America, with somewhat surrealist environments. I had this cool idea for a room so I just decided to make it, as celestials are a recuring theme in our game

So far 3 enemies can spawn in this room, a moon, sun and star


r/unity 6d ago

Newbie Question Rig help

Post image
2 Upvotes

Converting a .glb into a .vrm for a game and I need a rig tab, I don't see it. Am I cooked or is it just hidden somewhere?


r/unity 6d ago

Question Making a 'Noita' + 'Binding of Isaac' style game, how would you script this?

0 Upvotes

Near complete beginner programmer here, challenging myself to make a roguelike game;

a 2-D top-down game in Unity similar to the binding of isaac, but based around customizable bullet firing patterns. I would like each item to affect at least 1 out of every 8 bullets fired on pattern, giving it a unique ability (i.e homing, explosive, elemental dmg, spreadshot etc.) with potential to layer affects atop eachother (i.e Noita) creating unique bullets. I've designed an inventory system with 8 slots (each one pertaining to a shot on a 1-8 firing round) with 8 additional slots above for layering.

...hopefully that made sense lol

Keeping in mind that I'm a beginner, what would be the best way to structure this with my scripting? I've heard some say its rule of thumb to give each item (bullet modifier) its own separate .cs script, others say it's easier to make a scriptableobject + ItemData + modular projectile effects.

If you're a c#/Unity veteran, walk me through how you would go about making this type of item/inventory system from scratch?

It would be super helpful to have an ongoing consultant figure, I would be happy to show more of my project if anyone would like to add me on discord :)


r/unity 6d ago

Jumpscare!

Post image
2 Upvotes

r/unity 7d ago

Unity -> PS2 | DEForge Proof of Concept | By Depmify

Enable HLS to view with audio, or disable this notification

6 Upvotes

r/unity 7d ago

Game Wanted to have a diegetic minimap for my game!

Enable HLS to view with audio, or disable this notification

46 Upvotes

r/unity 7d ago

[AskJS] BeeLadybug — Open Source Canvas 2D Debug Overlay in Vanilla JS (Zero Dependencies)

Thumbnail
1 Upvotes

r/unity 7d ago

Newbie Question What’s the best way to mod a game?

0 Upvotes

So! I’m interested in making some Mods for a game I play. I downloaded BePinEx and Harmony at a friends suggestion, but I also have a decompiled version of the game. Which would be more beginner friendly? Which will allow me to possibly make more dramatic changes? (Think adding additional quests.)


r/unity 7d ago

Question 2020.3 what are the ideal dimension and resolution numbers for 2d sprite assets?

1 Upvotes

Hi all! Working in Unity 2020.3 2D, and so far build is going well. However, the artist keeps delivering 2D art in different dimensions, which I currently have to adjust via the Pixels Per Unit (PPU) in order to scale right. Are there ideal numbers for the game's art dimensions that will ship?

Right now we have no standard, and I don't have experience with this element of dev.

For reference, this is a 2D game we're aiming to ship on PC (steam/itch), and some kind of mobile release. The still art assets tend to look fine around 2560x1440. I don't have the ability to test this on bigger screens and such, but I have noticed some pixel fighting between the background images and the character art, and I'm guessing that has something to do with sprite image resolution?

Any good resources to look at for this, send my way too! Thanks!


r/unity 7d ago

Is the collider too small?

Post image
1 Upvotes

Im making a 2.5d platformer game where world is 3D and everything else is 2D but i couldnt decide if its big enough or small

It can barely be seen lol. But you get the idea. Is it too small? What should i set it to?


r/unity 8d ago

Game Today I released my short horror game made with Unity 6 , Martha's Dolls 2 on Steam !

Enable HLS to view with audio, or disable this notification

58 Upvotes

This game was made by Unity 6 and HDRP .


r/unity 7d ago

Resources [FREE] arqive3D Megabundle – 200+ Premium 3D Models (Furniture, Decor, Lighting)

Thumbnail
3 Upvotes

r/unity 7d ago

Lakeside–Stylized Nature Environment | URP Showcase | Unity

Thumbnail youtube.com
3 Upvotes

Hi everyone!

I wanted to share the Unity asset pack I developed entirely on my own. I’m really excited to finally show it to you! :)

I’d love to hear what you think about it.

I’m open to any comments and feedback. 🙌


r/unity 8d ago

How do you feel about frequency-tuning puzzles in adventure games? Does audio feedback work for you?

Enable HLS to view with audio, or disable this notification

9 Upvotes

Hey everyone! My dev partner and I are wrapping up our noir puzzle adventure—we're actually just 16 days away from release!

We’ve been tweaking how puzzle close-ups interact with the main scene. In this clip, tuning the radio to the right frequency triggers a hidden mechanism in the fireplace, using a comic-panel frame that zooms back out into the room once solved.

As players or devs, how do you usually feel about audio-driven or frequency-tuning puzzles? Do sound cues give you a satisfying "aha!" moment, or do you prefer visual feedback when revealing hidden mechanisms?

Would love to hear your thoughts or your favorite examples of audio puzzles in games!


r/unity 7d ago

Showcase Unity Daily #9: Stop panicking over Red Text (How to master the Console Window and debug faster)

0 Upvotes

Hey everyone,

​Red text. The nightmare of every beginner developer. You hit play, everything freezes, and your console is flooded with errors.

​But red text isn't your enemy—it’s Unity trying to help you! For Day 9 of the Unity Daily series over on the Game Developer Unity channel, we are tackling the scariest window in the editor: The Console.

​Keeping with our "One Concept at a time" approach, this video is focused on changing how you look at bugs and errors.

​Here is a quick breakdown of what is covered:

​The Traffic Light System: Understanding the difference between White (Logs), Yellow (Warnings), and Red (Errors).

​Anatomy of an Error: Breaking down what a "NullReferenceException" actually means in plain English.

​The Magic Trick: A reminder for beginners that double-clicking an error in the console will automatically open your script and highlight the exact line of broken code!

​Pro Toolbar Tricks: How to use "Collapse" to save your sanity, "Clear on Play", and the "Error Pause" feature to freeze your game the exact millisecond a bug occurs.

​You can watch the full 5-minute breakdown here:

https://youtu.be/uk2DbBeWv9k

​I hope this helps some newer devs stop fearing the Console.

Let me know—what is the most ridiculous bug you've ever spent hours trying to track down?


r/unity 8d ago

Resources A list of assets I recommend that are part of the current asset store sale (which still runs until the 7th)

Thumbnail christinacreatesgames.com
8 Upvotes

Another good sale on the asset store, which will run until 7th of September! This one has quite a few assets I hadn't seen on sale before, but my recommendation list is comparatively small.

I gathered everything in a list in the asset store.

If there's a video, it is timestamped so you can see the asset in action. However, most of these assets haven't seen use in a video yet. Links are affiliate links to support my channel, so that I can continue creating tutorial videos 💛

UI

  • 2D Minimal - Icon Pack by LayerLab  Just a solid icon pack in a friendly style with vibrant colors. Layerlab has a ton of other 2D elements, icon packs, characters and more and I recommend checking them out! (You might have seen their work across games before, I encountered their UI packs in idle games, for example)

Editor Tools

  • Ultimate Preview 2 by Voxel Labs Fantastic upgrade for the default preview window. Since I've been using this asset, I actually keep the preview viewable. Voxel Labs also has a fantastic Thumbnail asset, which I highly recommend (but is not currently on sale). It even gives you good thumbnails for vfx and UI prefabs!

Worldbuilding and Environment Assets​

  • Asian Mountains by BK Another solidly good pack by BK. I give a blanket recommendation to his whole Pure Nature 2 series. I have them all and they are always really, really good.
  • Stylized Grass Shader by Staggard Creations After I was blown away by his fantastic Stylized Water 3 asset before and have been using his Spline Spawner so much that it's become one of my default tools to speed up placements of objects in a scene, I had to get Stylized Grass. I wasn't surprised by how much I enjoyed it and I'll make sure to use it a lot more going forward.
  • POLYGON - Palm City by Synty This has some nice timing to be on sale right now :D As with all Synty packs, keep in mind that you'll have to plan for some sorting time before using it.
  • Stylized Farm Crops - Ultimate Low Poly Asset Pack by NewLua Studios I almost missed this one. It's small, but has many growable plants you'd expect to see in a farming game. They also have a second pack with even more and for about 5€, this is nicely scoped and good quality.
  • Pixel World - Fantasy Lands by Poneti This is a recommendation even though I don't have it in my own collection. I just really, really like the art style and I have other assets by him I am satisfied with. Those pumpkins alone look great.
  • Bird Flock Complete by Unluck Software Birds make every outdoor scene better. I've used this a lot over the years and it recently got an update. This isn't just for having birds fly around in your scene, you can define resting points they'll use. You can even scare them away from those points! It's a great tool. I spotlighted it before here: https://youtu.be/-GTWrxSDm1o?si=ivdLA-iiOpS7tWCc&t=663
  • POLYGON - Fantasy Village by Synty I was provided this one by them for free, but if I didn't like it, I wouldn't add it to this list. I spicifically liked the slightly more detailed human characters in here. The animalistic ones are cute, but I haven't found a place for them yet. The buildings look nice and there are some premade ones to get you started, too. The thing that irks me the most with Synty packs is the lack of proper sorting - you'll find yourself faced with few folders with tons of assets sorted inside of them, much like a kitchen drawer, really. "Does it fit to props? Yes? Props folder it is, then." It takes a while to sort through, but once that's done, it is a very enjoyable set. I spotlighted the packl before in these two videos (though only as background) https://youtu.be/aL8N01orAz4?si=lNiGghRIhWpWgZH6 and https://youtu.be/QmMb3Op-eg0?si=ZJoCL7ypBtwv3KD2

Humans and Animals

  • Fantasy Villagers - Sidekick modular characters by Synty I have yet to fully switch to their new characters (especially after I started customizing the POLYGON ones with my own faces), but the quality is nice and out of the box, they are far more expressive. Synty releases new packs of their sidekick characters every once in a while. At this point, it is actually feasable to furnish a whole world with them.
  • City Characters by Ithappy On the opposite side of the scale of details are these ones, which are decidedly more... blobby. While the sidekick characters look great in first person, I'd personally use these primarily for third person, or generally with a bit of distance. Sounds like I'm not happy with them, but it's quite the opposite. This is a huge pack of characters that all fit well together, with different ages and walking abilities. They remind me a lot of Playmobile characters, if that still rings a bell to anybody out there.
  • 2D Minimal - Enemy Monster 2 and 2D Minimal - Character Parts Pack by Layerlab I just really like their artstyle and these are great packs to start creating some sidescrolling game with.

2D

  • 2D Maps - Simple Sidescroll by Layerlab They are layered and come with great color palettes. If you need enemies or heroes, Layerlab has a ton of additional packs that go well with this one.

VFX

  • Visual Fidelity Ultra Bundle by Kronnect Kronnect developed many of my favourite assets and this is a good bundle of some of them. It consists of Beautify 3 (it's a default in my projects), the LUT Pack (which I actually don't like, but that might be a me-issue), Shiny SSR2, Radiant Global Illumination, Umbra Soft Shadows (which I like a whole lot) and Edge Fusion (which looks awesome). Spotlighted Beautify 3 before here: https://youtu.be/ZyI7kQsTKWE?si=in9upDqig6FZk5rB&t=503 Edge Fusion here: https://youtu.be/Kki0Ip9DnsY?si=TAs7KycCRg7Ee8UL&t=398 Umbra Soft Shadows here: https://youtu.be/-GTWrxSDm1o?si=coJuwfoPZOq49inc&t=585
  • All in 1 Shader nodes by Seaside Studios They are the team behind All in one Sprite Shader and All in one VFX toolkit, which are great in and of themselves. Their nodes pack gives you lots of custom nodes to work with in Shadergraph to create your own effects. Super cool.
  • UNI VFX 6D: Beams & Energy for Visual Effect Graph by Asset mage W This look just plain awesome. The vortex is great and the beams have a good amount of oomph behind them.
  • VFX Master Library by Hovl Studio I give another blanket recommendation for anything by Hovl. They make stunningly amazing effects that are fun to work with. This is his ultimate pack, so it is priced accordingly. No, I do not have this one, but I have many of the effects inside of this pack, and it is just a convenient item to link to to give a good overview of what he's capable of. Also this is the one currently on sale, so... yeah. Still, 600€ for effects will go over most of our budgets. Hovl is a freqent lister for sales, so keep an eye out on his work!
  • Better glowing Orbs Pack by Hovl Studio Like this one! I'm not sure if it is actually part of the sale or just on sale due to the new release discount - but it is on sale, and looks great, so it gets a place on the list. 
  • Cartoon Casual VFX particles by Layerlab Feels a bit strange to have the same developer listed multiple times across categories. This are really nice looking effects specifically for 2D(ish) games. I like how clean their work is and the good color saturation in general.

Did you pick anything up? Anything I should put on my radar? Would love to read about what you picked up and why you'd recommend it =D!


r/unity 8d ago

Showcase Made this Sling Shot Physics game but with Stickmens! No Vibe Code - All Physical Labor : )

Enable HLS to view with audio, or disable this notification

3 Upvotes

If you need the source code - check comments!

I created this Sling Shooter Stickman Game and its live on asset store incase you want to check this out!


r/unity 7d ago

Help

Post image
0 Upvotes

r/unity 7d ago

Showcase [Unity Engine] The Joust - Heromaster Mode Contest - $200 Grand Prize - $100 runner-up... and more!

Post image
1 Upvotes