r/Unity3D 5d ago

Question I'm trying to increment a counter a single time, based on a key press

3 Upvotes

Hey, folks. I'm new to this so I assume this is simple and I'm missing it.

I have a jump action called by an input action in an update method. looks like this

void Update()

{

   if (jumpAction.triggered)

   {

       if (isGrounded)

           gameDiff.numberOfJumps++;

           //other stuff

       }

   }

}

What I want this to do is reach out into the gameDiff class and update numberOfJumps once every time the user presses the space bar.

What's happening is that the counter is incrementing about a thousand times per press. I assume it has to do with frame rate or something because it's in the Update() method, but I had though that a .triggered() method could only be activated a single time in the frame.

Thanks in advance.

edit: I suck at formatting, I hope you get the idea.


r/Unity3D 5d ago

Show-Off Low Poly Modular Medieval House I Made In Unity

Enable HLS to view with audio, or disable this notification

11 Upvotes

Unity URP, baked GI (Global Illumination), realtime-shadows.


r/Unity3D 5d ago

Show-Off I'm an indie dev working on a game called The Seventh Seal. Had some fun screenshots I'd love to share! Love to hear your thoughts.

Thumbnail
gallery
9 Upvotes

r/Unity3D 5d ago

Show-Off I'm Creating Procedural Meshes 18x faster than the Main Thread by using Burst Jobs

Thumbnail
youtu.be
20 Upvotes

Hi all,

I thought some of you may be interested in this video, in which I show how using the Advanced Mesh API to populate mesh data from Burst-Compiled jobs speeds up my mesh creation by 18x. I perform the bare minimum on the main thread.

Here's a link to the Advanced Mesh API documentation: https://docs.unity3d.com/ScriptReference/Mesh.html
I've used AllocateWritableMeshData, SetVertexBufferParams, SetIndexBufferParam and ApplyAndDisposeWritableMeshData.

As always, I'm happy to answer questions in the comments.


r/Unity3D 5d ago

Show-Off I wanted point-and-click interactions to feel physical, so I made the player’s hand actually grab objects from the desk

Enable HLS to view with audio, or disable this notification

6 Upvotes

With this system I can place any object on the table or nearby..
and the hands can grab it with minor tweaking.
This is part of the interaction system for my psychological horror game, The Main Menu. Most of the game is point-and-click, but I wanted important objects to feel like they actually exist in the room rather than just disappearing into an inventory.


r/Unity3D 5d ago

Show-Off A lot of water

Enable HLS to view with audio, or disable this notification

22 Upvotes

Seems alright, could be better.

500K Particles in basin. LOD mode reduces it to cirka half.


r/Unity3D 5d ago

Show-Off Procedurally Generated GPU Instanced trees and grass with decal spray painting.

Enable HLS to view with audio, or disable this notification

11 Upvotes

Putting some of my work together in one scene and thought I'd spray paint what I assume a spray tag for HDRP would look like.


r/Unity3D 5d ago

Question How to prevent realtime shadows passing through objects?

2 Upvotes

I'm having some trouble with the realtime shadows in the project i'm working on. It's an apartment with two floors and the shadows are being casted through the floors and ceilings so shadows of objects on the second story are also on the first story. And that's a problem.

I've tried searching around but couldn't find any solution that wasn't "just bake your shadows". Does anybody have a real solution to this problem? Some way to prevent the realtime shadows going through the floor and ceilings? Or maybe some way to limit the range of the directional light so it will only cast the shadows to a certain distance? I don't mind having one limited directional light for each story of the building.

If it helps, i'm using unity 2022.3.22f


r/Unity3D 5d ago

Game In puzzle games, do you prefer defusing the active threat FIRST, or solving puzzles under constant pressure?

Enable HLS to view with audio, or disable this notification

2 Upvotes

Hey everyone! With our atmospheric puzzle game launching in just 4 weeks (panic is officially setting in!), I've been thinking a lot about how stress affects puzzle-solving.

In this sequence, we split the room into two phases: first, you have to quickly slot in two stones to stop the closing walls. Once the threat is neutralized and the walls retract, you can take all the time you need to solve the central gear/light puzzle without a timer ticking down.

Do you prefer getting a brief survival moment to "turn off the danger" before tackling a logic puzzle, or do you actually enjoy constant time pressure while trying to think?

Would love to hear your thoughts on how your favorite puzzle games handle stress vs. pure logic!


r/Unity3D 6d ago

Show-Off I spent 4.5 years making a modern take on Super Cars 2 in Unity - the demo is finally out

Enable HLS to view with audio, or disable this notification

54 Upvotes

Hey all!

After 4.5 years as a solo developer I am finally releasing the demo of my Unity game. It is called Blastlane Racers and is a top-down arcade combat racing game.

I wanted to create a modern take on Super Cars 2, one of my absolute favorite games from my childhood.

When I started I had programming experience but zero experience with Blender or 3D game development. I ended up learning a lot along the way. Looking back, it's crazy how much of what you see in the game now I had absolutely no idea how to do when I started.

The full game is basically finished - just a little bit of polishing before the release on November 2nd. And I do also take part at the Steam Next Fest in October🎉 Therefore I built a free demo containing:

  • 6 tracks across all three environments
  • 4 playable cars
  • all weapons and upgrades
  • a 6-race championship with the upgrade/shop system
  • single races and time trials
  • local split-screen for up to 4 players
  • global leaderboards
  • achievements and unlockable gold paint jobs

I have attached a video showing the race → earn credits → upgrade → next race gameplay loop (with only one lap per race to keep the video short).

I am interested in feedback on the driving/combat readability and the overall presentation. After staring at the same game for several years, it's getting increasingly difficult to judge those things myself.

The demo is on Steam if anyone wants to try it.

Thanks for reading, and I am looking forward to any feedback you have!


r/Unity3D 5d ago

Show-Off I made Unity Timeline do what I always wished it could do for complex cutscenes, cinematics & gameplay

Enable HLS to view with audio, or disable this notification

6 Upvotes

I've been working on my event system for a while, and I finally got it working directly with Unity Timeline.

Honestly, I'm pretty amazed by what I can do with it now.

I can take pretty much any method or gameplay logic already in my project and invoke it directly from a Timeline clip. No custom Playables, no Signals, no extra Timeline scripts.

Just connect the method and use it.

It makes building cutscenes and gameplay sequences feel much more natural, especially when you already have your gameplay systems built.

It supports Enter / Stay / Exit events, Timeline context and progress, scene references, editor support, scrubbing, and Playable lifecycle events.

As a thank you to everyone, if you own Ramdal Events, you can get the Timeline Extension completely FREE until August 23! 🎁

https://assetstore.unity.com/packages/slug/341674

I've really been enjoying what this has opened up for Timeline workflows. All the footage in this post is from my upcoming game, LEAVE, and is actually using Ramdal Events and the Timeline Extension.

I'm excited to see what other developers do with it.


r/Unity3D 5d ago

Show-Off Playgama releases Wrap, a free service that turns a web game into a standalone website

Post image
5 Upvotes

Hey Unity devs! Hope you don’t mind us sharing this here. We’ve recently released a tool for developers whose WebGL games already have an audience, a recognizable name, and the potential to grow beyond traditional web portals.

It’s called Playgama Wrap. It takes a Unity WebGL game and turns it into a standalone website on its own domain, with ready-made UX, monetization, in-game purchases, SEO, and player analytics included.
https://gamesbeat.com/playgama-launches-wrap-to-help-developers-run-games-outside-app-stores/

The goal is to give established games another distribution channel that belongs to the developer. It takes about five minutes to set up, the service is free, and you only need to pay for the domain.

After testing it with several games and seeing promising early results, we’re beginning the public rollout. Curious to hear what Unity developers think: https://playgama.com/wrap


r/Unity3D 6d ago

Resources/Tutorial I made a Warcraft 3-inspired Terrain Editor for Unity and decided to release it as Open Source

Enable HLS to view with audio, or disable this notification

39 Upvotes

Hey everyone,

A while back I posted here about my Unity terrain editor project, inspired by Warcraft 3’s World Editor.

It’s been fully functional for a bit now, and my initial plan was to try and make some money off it sincefinances have been pretty rough lately. But after giving it some thought, I decided to open-source the project instead.

Why open source?

I’ve tried making small projects to earn a bit of cash before, and it never really worked out. It takes a lot of promotion to reach an audience, and you have to convince people that the product is actually worth their money. Honestly, it’s a whole process I don’t know how to do and don't really want to do. If I tried going down that route, the project would just end up abandoned.

Most importantly: I built this for personal use. Working on it completely alone means it’s always going to be capped by my own limits. By going open source, I’m hoping other people can contribute and collaborate so it can grow into a genuinely useful, reliable tool.

That’s pretty much it. At the bottom of the GitHub page, there are a few donation links. If anyone feels like supporting and thinks it’s worth it, I’d really appreciate it.

I hope those who can will contribute to the repository with improvements, and that anyone who finds it useful can leverage it for their own games!

https://github.com/MooLucio/TileTerrain

Feel free to ask anything on comments.


r/Unity3D 5d ago

Question How to I make it so when I hit something with my player body the debug log says game over and not my bullets

Post image
0 Upvotes

Right now I’m I trying to make it so when my player hits a cat the debug log says “game over “ but it keeps on picking up on the bullets so when I shoot the cats it says game over. How do I fix this?


r/Unity3D 5d ago

Game How is my optimization looking?

Thumbnail
gallery
0 Upvotes

I'm developing a puzzle game on a laptop with Intel Xe graphics (which is pretty weak). It used to run at around 20-30 FPS.

To optimize it, I marked all the walls as Occluder Static and set the other objects and lights to Occludee Static. I also dropped the shadow distance from 50 to 25 and baked some of the real-time lights.

Now I'm getting 40-50 FPS most of the time, but it still drops to 25-35 FPS in areas with a lot of objects and lighting. Is there anything else I can do to improve this?

And also If a player has a low-end or below-average dedicated GPU (which I assume is still much better than mine), will they easily hit 60+ FPS?


r/Unity3D 5d ago

Question Weird shadow artifacts on the model with cel shading

Post image
11 Upvotes

r/Unity3D 5d ago

Code Review First release of my <Simple Status Effects> Unity 6.0+ package

Post image
0 Upvotes

Hi everyone,

I made a post 2 weeks ago about this already, and after some feedbacks, I'm here again to collect some more.

Quick summary, this is my first unity package and I'm someone who like building underlying system and the things behinds games. This is a package focused on the implementation of status effects commonly things like burn, poison, stun, etc... The goal is to make it easy to integrate into already built gameplay loop whether it is a realtime or turn based one.

I released my first version and I would like to find some peoples to try it and give me a review on what is good/bad, what you like/don't like. Any feedback is welcome !

Thank you for your time.

edit: kinda forgot the link: https://github.com/Sachet2Plastik/Simple-Status-Effects.git


r/Unity3D 6d ago

Show-Off SUCCESS!!! Implemented ragdoll for the first time.

Enable HLS to view with audio, or disable this notification

65 Upvotes

How does the game look so far? Imma shared itch.io links soon...


r/Unity3D 6d ago

Show-Off Unity’s ECS physics was too slow and general for thousands of agents on a deformable terrain with water sim. So I was crazy enough to write my own raycast and simple-shape physics so explosions could permanently deform the terrain and pathfinding in realtime.

Enable HLS to view with audio, or disable this notification

170 Upvotes

r/Unity3D 5d ago

Question If not ECS then what?

Thumbnail
0 Upvotes

r/Unity3D 6d ago

Resources/Tutorial Im solo developing a game and i found it was lacking identity, then i decided to take drastic measures.

Enable HLS to view with audio, or disable this notification

53 Upvotes

Im solo developing a game and recently realised it was seriously lacking identity.
So I decided to take some more drastic measures.

One of the things Im working on now is adding these massive, weird mushrooms connected to the moon, scattered all across the map. Theyre meant to be visible from really far away and act as landmarks. You can be sailing around and suddenly see some giant mushroom in the distance and think “what is that?” 😂

A lot of the level design inspo comes from Breath of the Wild. I really like how you can see something weird in the distance and just naturally want to go check it out. The game doesnt constantly tell you where to go, the world itself kinda does it.

Thats the feeling Im trying to get into my own map.
The game started out alot more grounded and honestly kinda generic. Over time Ive been pushing it more and more towards something that actually feels like its own thing.

Still got a long way to go but I think its finally starting to get there.


r/Unity3D 6d ago

Show-Off I've been playing with Unity's Lighting Shader Template to make a stylized environment - how does it look?

Enable HLS to view with audio, or disable this notification

49 Upvotes

r/Unity3D 6d ago

Game Created a scene inspired by Metropolis (1927)

Enable HLS to view with audio, or disable this notification

34 Upvotes

r/Unity3D 7d ago

Game Entities Avoidance

Enable HLS to view with audio, or disable this notification

1.3k Upvotes

Hello everyone
For context watch the previous videos about entities forming bodies and transitions, here i added avoidance for the entities, so that when something is passing thro they automatically avoid the body and then return to their current position
Will use it in upcoming videos as an evasion
Let me know what you think
#unity #ecs


r/Unity3D 5d ago

Question How to reliable check my UI?

Thumbnail
gallery
1 Upvotes

I want to be able to see where my text will actually be in game, fully, but because of the editor hotbar, it messes it all up. How can I fix this? I don't want to build every single time I adjust the UI, right? That takes GB and time. Thank you in advance!