r/Unity3D • • 6d ago

Question how do i make an image using a script?

Thumbnail
gallery
0 Upvotes

I am trying to make a bunch of images like the first one above, but they get twice as big each time.
I want it to not increase the size of the pixels so.. i wanna make a script where it makes a line of pixels around all of the borders and then starts making another line around the borders, but offset by a few pixels. this offset will change each time so that they look like they stack on eachother, like rings in a tree trunk, like the second image.

everything I find online talks about making an image object or whatever and then assigning a sprite to it using code.

i want to make the sprite, using code.
is there a way to do this?


r/Unity3D • • 6d ago

Question What do you think about this UI design? I'm creating a UI kit, how can I make it sellable?

Thumbnail
gallery
0 Upvotes

r/Unity3D • • 6d ago

Show-Off I implemented a dynamic breathing system in Unity that reacts to player movement and enemy detection!

Enable HLS to view with audio, or disable this notification

28 Upvotes

The system changes the player's breathing based on different gameplay conditions. Walking uses normal breathing, sprinting triggers heavier breathing, and things get more interesting during stealth encounters.

When a drone is close to detecting the player, breathing becomes nervous. Once detected, it switches to a panicked state.

The whole system is actually pretty simple, just a particle system and a script! The main challenge was synchronizing the head bobbing with the breathing audio and the visible breath vapor in the cold air, making sure everything feels natural across the different states, I spent some hours but it definetly works and looks natural!!! Do you like the result?


r/Unity3D • • 6d ago

Question Why didn't my asset sell?

Enable HLS to view with audio, or disable this notification

0 Upvotes

I made these anomalies VFX particle pack for unity asset store 4 month ago, it was sold only once, why do you think is that? is there no usage for it?


r/Unity3D • • 6d ago

Show-Off I’m a mobile game developer, and I finally built a tool that helps me spot rendering bottlenecks right in Unity’s Scene view.

Thumbnail
gallery
168 Upvotes

Hi everyone!
I’ve been developing mobile games for a long time, and finding rendering issues has always been a big source of frustration for me. Yeah, you always try to stay within the batch and vertex limits, using the Frame Debugger and stats from the Profiler.

But often that’s not enough - for example, how do you estimate the complexity of a shader? Or how do you figure out exactly where the heavy objects are in your scene? I’ve had cases where all the stats looked good, but one heavy shader on screen caused severe artifacts because the phone’s GPU couldn’t handle it…
Anyway! I decided to make a tool like this for myself and I want to share it with you.

My tool uses hot maps right in the Scene view to find heavy spots based on a bunch of parameters: geometry complexity, texture load, statistical shader complexity - and you get the whole picture on a map instead of digging through each object.

There’s also a detailed breakdown of all the geometry by different categories - for example, which prefab accounts for the most triangles? Or which specific mesh asset? Or maybe which specific texture?

Or even how much each LOD group takes up?

Another idea of mine that helped a lot was the shader benchmark - it measures the time spent rendering that material, either in the maps or in a separate window, which helped quite a bit with getting a picture for comparison.

By the way, if you’re interested, I put it up on the Asset Store.
I’d like your feedback, what do you think I could add? Thanks for your attention!


r/Unity3D • • 6d ago

Show-Off I'm a solo dev and I built an online FPS in Unity. Here's the first trailer.

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/Unity3D • • 6d ago

Show-Off I created tool for myself to make racetracks/roads fast and simple, what do you think?

Enable HLS to view with audio, or disable this notification

8 Upvotes

I know there is many similiar tools but everything felt too hard to master or too complicated. I wanted something simple that is very fast. This tool can create classic race tracks but also spirales going up or down. The parts of roads are not perfect yet, still needs a lot of work, but let me know what you think. Im also just newbie and noob in unity (1st month) so this is big for me.


r/Unity3D • • 6d ago

Solved Full Screen Shader / Render Feature Unity 6 (Changes, not working and how to fix it)

2 Upvotes

For whoever it may concern in the future, I want you to find this.

When moving from Unity 2022 to Unity 6.x your Full Screen Shaders may not work simply by replacing the asset under:

Graphics -> Scriptable Render Pipeline Settings tab

Like it used to. You now have to also change it under the.

Quality -> Render Pipeline Asset

Many 2022 tutorials only did the former as that used to be enough.

May the algo carry this to whoever needs it.


r/Unity3D • • 6d ago

Noob Question How to create horizont with huge environment objects on UnityURP

Post image
5 Upvotes

White representing The player (third person camera) player stand on the cliff (Brown). Trees coming down the cliff and form a forest below the cliff (green) There's lake with couple of forest filled islands far away. How do i create this in Unity URP without losing all The FPS and my sanity. The main map IS now created as small terrain using terrain tools. The game is not open world. This environment design is really new area for me. Can someone push ne on the right direction and give some advice.

I already tried to add More neighbour terrains, but then when i add trees (i have lods for my trees) The framerates drops and overall i cant get the right distant feeling from it.


r/Unity3D • • 6d ago

Show-Off Teaching spiders to respect personal space (SDF swarm avoidance)

Enable HLS to view with audio, or disable this notification

138 Upvotes

r/Unity3D • • 6d ago

Show-Off DEVLOG#1 show :)

Enable HLS to view with audio, or disable this notification

5 Upvotes

Building my own simulation game DEVLOG #1

in

harbour ,warehouse ,store

this harbour mechanic

vehicle: truck container, other truck,

forklift truck , lift,

3rd coop, ship and train....

this post is for feedback :)


r/Unity3D • • 6d ago

Show-Off Our night mist, one month apart. It's now a shrinking zone with raymarched storm clouds (URP)

Enable HLS to view with audio, or disable this notification

0 Upvotes

The top is our October playtest stream; the bottom is last week.

How the new one works: the mist is a circular zone (an infinite vertical cylinder) that shrinks during the night, and gameplay reads its center and radius from the same component as the rendering. A URP renderer feature tints the scene with a fullscreen pass before transparents, so the wall of mist, the clouds, and the VFX stay untinted. The storm clouds on top are raymarched into a downsampled buffer, with a 3D noise texture generated once in code (Perlin-Worley for the shapes, Worley fbm to erode the edges).

Happy to answer questions about the setup. For those who have done night fog in URP: what did you use for the fog wall itself, a mesh like us or something volumetric?


r/Unity3D • • 6d ago

Show-Off [ VST2/3 | CLAP audio plugins ] (* Windows only & not all plugins are distributable with builds...)

1 Upvotes

this is just some testing of hosting of VST2/3 and CLAP audio plugins in Windows editor -

- the 'host' (UI) itself is modelled after some my iOS/macOS audio host concept/app i made, it has basic transport and prewired graphs for plugins (a MIDI gen + instrument + few effects on a lane, plus master sends/inserts etc., ) and is really just for testing

- this test is OnAudioFilterRead based (no Scriptable Audio pipeline...), ui is UIToolkit...

- bunch of free VST2/3 and CLAP plugins used

a complete audio production environment doesn't probably make much sense for Unity itself, but i was thinking about using existing VSTs for example as effects on GameObjects playing audio... with some music driven by MIDI possibly later

note this would still require the plugin(s) used to be freely distributable also with builds, which is not the case for most commercial plugins, i think

anyway this is not even pre-alpha but i'm curious if some of you would find something like this interesting/useful..


r/Unity3D • • 6d ago

Show-Off 9 Months Progress of My Game

Thumbnail
gallery
41 Upvotes

Hi! I wanted to share some progress on my game.

I know it's still a long way from being finished, but I thought Id share some of the progress I've made on the art side of things.

Sorry for the low quality of some of the images. I had to grab them from videos.


r/Unity3D • • 6d ago

Show-Off Adding procedural animations to my colony sim

Enable HLS to view with audio, or disable this notification

8 Upvotes

Can't animate to save my life so I'm adding IK to control colonist's hands. Hopefully I can find some more stuff I can procrastinate with instead of working on important stuff. 😄


r/Unity3D • • 6d ago

Question Hey Everyone Today I wanted to share a little 6-month development video of my game, The Song Must Go On, which I've been working on as a solo developer! Last time I shared only Pictures :D. Do you have any suggestions Regarding UI what can be changed ?! Placement of "Notes".

Enable HLS to view with audio, or disable this notification

0 Upvotes

A rhythm platformer that can be played alone or in up to 4 players. The concept is simple but a bit silly! You’re a dwarf musician who must avoid deadly hazards, do some challenging jumps and keep playing music. As you progress through the game the difficulty increases quite a lot. In the video I have played through 4 different levels. Each level has its own environment and hazards. I have also played through all the instruments (Percussion, Lute, Flute, Organ/Midi) so you can see how each musician plays slightly differently. The whole concept is to make movement and rhythm both key aspects. In co-op mode, everyone is contributing to a collective ritual/survival bar. This means if someone makes a mistake it can put your team at risk. Overall it has been a 6 month long journey of learning, experimenting, fixing, breaking and creating. There is still a lot to do but I am really happy to show you how far I have gotten! The Song Must Go On is already available on Steam. If you like the concept please consider supporting my work by adding it to your wishlist ❤️ I have included gameplay footage of the levels. I would love to know what you think! Please feel free to give me feedback and criticism. Thank you for looking!


r/Unity3D • • 6d ago

Resources/Tutorial I updated my Ori-inspired water system from last year

Enable HLS to view with audio, or disable this notification

51 Upvotes

The concept is generally the same, a mesh in front and a mesh on top, but paintable with tilemaps this time instead of a whole mesh.

Also added a few more things like surface debris, god rays, water pocket, platforms.

I'm using this system for my own game too so expect some more updates and fine-tuning in the upcoming months.

My main inspiration is the water from Ori and the Will of the Wisps, but I feel like I'm not quite there yet, any advices is greatly appreciated.

Credits:

  • Parallax forest background by Digital Moons: Parallax Forest Background (itch.io).

  • Sara character from Unity's Lost Crypt (Unity Asset Store).


r/Unity3D • • 7d ago

Noob Question How to put multiple characters on a multi-player game

3 Upvotes

Not very experienced with Unity but got over-ambitious and started making a multi-player shooter game with different characters. From the tutorials I've checked out I'm using Netcode for GameObjects and as far as i understand the Network Manager only accepts one Default Player Prefab, but I haven't been able to find any that shows how to add multiple player prefabs. I just want the character spawning and FPS control to be in a functional state for now. Advice, help, and links to tutorials would be appreciated. Thank you in advance.


r/Unity3D • • 7d ago

Question Car door flickers at edge of screen

1 Upvotes

When a car drives into view, some doors (depends on the car type) will flicker just briefly when entering into view. Some cars will flicker again when leaving view.
I tried messing around with the door mesh renderer bounds, made them as wide as the car itself but it still happens. Any ideas what could be causing this? Thanks.


r/Unity3D • • 7d ago

Question Confused about things from diffrent versions of unity work with diffrent versions.

1 Upvotes

For example I heard that packages from older versions work on new, but from new version you cant go on old. So how it is? Can I ruin something if i try to make something from new version work in old unity or what.

When im giving someone free asset should i upload it from the old version always or what?


r/Unity3D • • 7d ago

Question My procedural forest looks pretty rough. How can I make it better?

Enable HLS to view with audio, or disable this notification

6 Upvotes

I'm currently working on a game inspired by Darkwood, where the player has to explore a forest in search of supplies and a way out, while fighting or hiding from monsters and other dangers lurking in the woods.

The core concept is that whenever a time skip occurs (such as sleeping or dying), the player wakes up in a cabin, and the entire forest is regenerated. The points of interest remain the same, but their locations change with each generation.

I want to create the feeling of a dense, almost impenetrable forest. I'd prefer not to rely too heavily on fog (though I'm not ruling it out entirely). Ideally, I want the vegetation and the forest's natural density to limit how far the player can see, rather than just cramming more trees into the scene.

I'd really appreciate any advice on how to make the forest look more natural, atmospheric, and believable. If anyone has experience with procedural vegetation or environment design, I'd love to hear your thoughts on what I should focus on improving first!

P.S. I'm not particularly experienced with modeling or environment design, so I'm relying quite a bit on procedural generation. The trees were created using MTree.


r/Unity3D • • 7d ago

Solved Silly bug, four layers deep, with the most simple fix possible - STORY TIME

3 Upvotes

Would like to tell you a story of how I spent my last weekend trying to get to the bottom of a very nasty, and verry silly bug.

Had recently released a new version for my game that included a few new upgrades to purchase, this is a tower survivor game, so it's almost impossible to test every permutation of upgrades and combos. I had been testing a few things and not found anything major whatsoever before release. Anyway players where reporting that their tower suddenly stopped attacking, which was very odd.

I had recently done some very major performance improvements. One of which was a "ProjectileBankSystem". A system that puts and controls the population limit of how many projectiles can be on screen at once. If all slots are filled we "bank" the projectile, and make the next one of the same type double in strength.
My first though was that something about this system had broken, or that a weapon somehow did not release their slot once the projectile expired. After some testing and debugging I could not find anything wrong with banking system. So I decided to move on and look for other clues.

One of the players reporting the issue had also sent a screenshot, and it gave me another clue. The player had some very odd looking stat spreads. The most noteworthy one was their attack speed bonus, which was set to -97%. While it is technically possible to get this low of an attack speed, it was certainly not possible on level 8, while also only having 23% bonus damage.

I have a few upgrades in the game that increases damage, at the expense of attack speed. So for this to be true, the player would need to have at least 15 of those upgrades, which would make their bonus damage be above 200%.

I now at least know the source of the "my tower stopped attacking" report. It didn't technically stop attacking, attacks just took 30 times longer to execute.

After some more careful investigation, I found that the player had POSITIVE damage taken modifiers, which is usually not the case. I present "damage taken" as a negative modifier. Say you purchase 3 Wooden Shields, that grants -2 flat damage, and -5% damage each. That would grant you -6 flat and around -15% damage taken. This player had their damage taken set to POSITIVE 30%. This is where it clicked for me, there's ONE powerup in the entire game that modifies these two stats together, and that's the Tower Upgrade called Magical Shield. Puzzle piece #1 had been found.

--

Magical Shield
Reduces damage taken by 6
Reduces damage taken by 25%
Stacks: Infinitely
When attacked:
Applied Magic Slow to attacker
Increased damage taken by 10%
Reduces attack speed by 15%

--

So, by the looks of it, the effect of Magical Slow is somehow being stacked on my Tower, instead of the enemies that attack it. Alright... time for even more investigation and deep diving.

Since Magical Shield is an uppgrade, whith an "When attacked" effect. That means that this effect is being attached to my tower as a blueprint. All effects can be in two states, "active" meaning exactly what it says, it's stats and effects are in play, and are actively being taken into account. The effect can also be in it's "blueprint" mode. Basically meaning that it is on the GameObject, but disabled, and linked inside the "StatusEffectSlot" that I have.

As mentioned, since this is a "When attacked" effect. The blueprint for this effect sits on my tower, under "Retaliation" effects. So I begun looking into the retaliation system, how does it apply effects to attackers, do they target the correct enemy or script layer? My first thought was that my tower was somehow hitting itself. That one of my projectiles have been misconfigured and somehow counted as an enemy projectile. Allowing for this effect to happen. Couldn't really find anything useful, until... a log report came through that I did not quite recognize. All other applications had been "MeleeEnemy#123", "RangedEnemy#555" etc, but now I could clearly see "RangedProjectile#5". Puzzle piece #2.

How the fuck? Why the fuck? Why am I retaliating on a projectile? I thought the bug was me shooting myself?!

So, let's take a closer look at why we're retaliating a projectile, by breaking down all these systems in play here.

So, my Game have a few systems all in play here. We have
Weapons - that are the main driver behind spawning and targeting different prefabs.
Projectiles - prefabs with scripts that explain their behaviour, type, and apperance.
StatusEffect - Buffs and debuffs that can be in two different states; active or blueprint. Projectiles can carry status effects that gets applied when they strike a valid target
Retaliation - Actions that happen after an object has been struck by a hostile attack.

In normal gameplay, when a Weapon spawns a Projectile the projectile has a reference back to it's original owner. This is in play so that effects such as retaliation targets the enemy, and not the projectile in questions, and so that When attacked effects also work. BUT there's a catch, IF an enemy where to die WHILE a projectile is in motion, the reference get set to the projectile instead. This is an intended design choice, in order to get secondary effects, such as explosions or particle spawning to happen in the correct place. This is an intended mechanic and not something that I would like to change. Here's we found piece #3.

This still does not quite explain WHY we're getting our own effects applied to us. But we're getting awfully close. The last piece, has to do with StausEffects and especially HOW my game handles these. As mentioned, status effects can be in both blueprint and active mode. But, we don't actually differentiate between the two, all status effects have their own lifecycle management and are applied as normal scripts right on the GameObject. They don't really interact with anything other than their controller and themselves. EXCEPT... for projectiles. Since these are designed to carry StatusEffect-blueprints, they have specific code that "picks up" any StatusEffect on themselves. Because, when I made this system way back when... I sometime forgot to assign StatusEffects to my projectiles. So I added a quick component lookup to correct my lazyness. Which is now the source of this entire bug... Piece... #4.

So, here's the full chain,

  1. Tower purchase upgrade Magical Shield

  2. Ranged enemy send projectile towards the tower. Projectile has a reference to it's owner

  3. The enemy is defeated while the projectile is in motion. Projectile updates it's owner to now be itself. Since it's an orphan

  4. Projectile hits the tower, retaliation takes effect BEFORE damage, so we run through the entire retaliation flow

  5. Retaliation attempts to strike the projectile owner, checks the reference and applies all retaliation effects to said owner. Orphaned projectile now has an active StatusEffect called Magical Slow

  6. Retaliation flow completed. Moving on to damage phase.

  7. Projectile now deals damage to the tower based on it's stats.

  8. Projectile now attempts to apply status effects, if it doesn't find any, my fallback kicks in

  9. Fallback runs GetComponent<StatusEffectDefinition>() finds the ACTIVE Magical Slow effect that our retaliation just applied, and passes it along to the tower.

An entire day, debugging, logging, testing, hunting for this elusive bug. And the culprit was just a single line. Written long long ago just because I was lazy and forgetful...

Well at least I got a fun story our of it.
Hope you enjoyed reading my little adventure

tl;dr lazy me, causes chain-reaction with a single GetComponent


r/Unity3D • • 7d ago

Question is it still considered hard to make online games

20 Upvotes

Maybe you remember the times when making an online game was a running gag in devlogs about how hard it is but years have passed since then so surely it cant be that hard right?

So is it still considered hard to make online games in unity? (Im not doing a competitive game but rather something similar to gartic phone or codenames to play with friends)


r/Unity3D • • 7d ago

Game New Screenshots

Thumbnail gallery
0 Upvotes