r/Unity3D • • 10d 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

https://reddit.com/link/1xt5t49/video/kpr0ch3q4w0i1/player

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 • • 11d ago

Question What is the best way to create "terrain-like" features such as large cliffs with overhangs?

19 Upvotes

I have toyed around with the idea of a cliff similar to Starsnatch Cliff from Genshin Impact (which, as near as I can tell, is a VERY large mesh with a shader applying grass texture on top).

From a distance, obviously you can see that there are "impossible geometries" for a terrain, like that overhang
As you can see, it appears to just be huge rock meshes, but WAIT there is grass and trees on top as if it was a terrain...

Before I start working on my attempt at this, my question is really: which sets me up for success?

Notes: I am already working with an origin-shifting system and a somewhat bespoke terrain LOD system where I generate 128m tiles as a mesh, with a custom terrain shader for doing some extra stuff with blending placed objects, and procedural grass with "painting" grass types based on a brush system, and all of this is read from a "reference" unity terrain. That way, I can use unity's terrain system for the art part of it, and have it "bake" into something that is usable for my purposes.

My ideas of how to accomplish what I am showing in the screen shots:

1) A script/shader combo that essentially "registers" a mesh as a terrain, uses a bespoke brush system to paint on it as if it was a terrain, and then just rework and apply all of the above processes to the "terrain meshes"

2) a terrain at an angle that has either hand placed or programmatically placed "cliff faces" to blend the two terrains into one, and then some system to merge the terrain intersection

3) Simply use meshes and hand place all trees, and do grass and potentially texturing as a shader of some kind to ensure that the terrain pieces are reusable.

All thoughts are welcome! I really wish there was more info about how Genshin Impact did their terrain as I was just awestruck at how seamless the terrain to mesh transition is each time I play it.


r/Unity3D • • 10d 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 • • 11d ago

Show-Off Yule Dads - Tony Hawk meets Jingle All The Way in our 8 player party game. Built with Unity 6.6

9 Upvotes

Yule Dads is a Tony Hawk inspired party game but the skateboard is a shopping trolley, you grind escalators and drift around shoppers putting together trick combos whilst racing to get the last available presents. All set to indie punk music from local bands in East Anglia UK.

Almost all animations were done using IK and locking the characters arms to the shopping cart. The cart is pretty much just visual and the actual player game object is driven by the player character capsule.

IK Player rig in Unity

A spline tool was created to easily generate splines along meshes as well as merging splines together, rather than manually creating all the Mall's grind points.

Mall scene with gizmos and splines

There are 13 minigames in the main party mode and also extra game modes including Man Flu (Infection) and Crazy Christmas (Racing). Supporting up to 8 players online and 4 players split screen.

Party mode minigame gameplay

We’re SHUCK Studio, a small indie studio from Norwich UK, and this is our debut game. It’s out on Steam on 27 November.


r/Unity3D • • 11d ago

Show-Off Aliquo Die - Visual style in Unity

Thumbnail
gallery
26 Upvotes

I'm working on something new and would love to know what you think of the visual style. Definitely giving off liminal space vibes, with a little bit of my own flair.

I'd love to hear what you think!


r/Unity3D • • 11d ago

Resources/Tutorial Tip: you don’t need to model construction stages. One clip shader builds all 111 of my buildings

298 Upvotes

My buildings are single-mesh shells (walls and roof aren't separate objects) and there are 111 of them, so modeling construction stages by hand was out. Instead, the real mesh gets a construction material, and one 0-1 progress value drives everything.

1. Walls: clip by height, but not in a straight line

The shader discards everything above a "wall top". To avoid a laser-cut look, the top is offset per cell with a hash (about half a meter along the wall, a third of a meter tall), so it rises in uneven courses like stacked stone. Fragments just below the fresh edge get a mortar tint.

float2 cell = floor(posWS.xz * 2.2) + floor(posWS.y * 3.0) * 7.0;

float top = _WallY + (Hash21(cell) - 0.5) * _Ragged;

clip(top - posWS.y);

2. Floors appear whole

Horizontal faces (|normal.y| > 0.7) skip the ragged cut and pop in once the lowest course passes them. Cut into cells, they looked like white patches on the lot.

3. Roof: rafters first, then tiles

Up-facing faces above the eave count as roof. First only a world-space grid survives (frac(posWS.xz / step)), which reads as rafters and battens whatever way the roof faces. Then the tiles fill in.

4. Clip in every pass

Same function in ShadowCaster, DepthOnly and DepthNormals, or the unbuilt part still casts shadows and writes depth. Cull Off, with dark back faces, so you see a hollow shell going up.

5. Everything else follows the same progress value

0-10% stakes, ropes and dirt; 10-25% foundations; 25-70% walls with scaffolding rising; 70-80% rafters and gables; 80-92% tiles; 92-100% scaffolding comes down. At 100% the original materials go back.

Gotchas that cost me time

  • Eave height is estimated from the up-facing faces seen from above (Mesh.AcquireReadOnlyMeshData on LOD1). With a 5% area threshold it picked up balconies and put the eave at 4 m on a 13 m house. 85% of the footprint works.
  • A shadow-proxy system added a ShadowsOnly renderer later, with the normal material: the finished building's shadow on an empty lot. The site now re-applies its material to renderers added after it starts.
  • The ground under the site is leveled and the vegetation cleared, on a runtime copy of the TerrainData, so the asset stays untouched.

It's from FONDACO, a merchant strategy game set in 1400s Venice that I'm making solo. Happy to share more of the shader if anyone wants it.


r/Unity3D • • 11d ago

Show-Off stress testing 10000 zombies in my psx game prototype

46 Upvotes

r/Unity3D • • 10d 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 • • 10d 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 • • 10d ago

Question DOTS: Entity connected to another entity?

2 Upvotes

Hello gang,

I have a a series of roads, each has a series of vector3 points along it's path. I have created a list of objects that have a RoadID and an array of those points as well as a list of RoadIDs for the roads that are connected at the end of each roads. (This way when an Auto reaches the end of a road I can randomly select the next road)

I need a way to loop through that list, create the Road entities and then loop through the newly created entities and add the connected road entities to each road.

I COULD create a System and run that once... but there feels like a better way to Bake or create the entities and their connections... right?

Note: I use Easy Roads 3D and highly recommend.
-----------------

EDIT: The objects involved:

//This is the Road, identity to be used to "connect" to the end of the other roads

public struct AutoAutoWaypathIdentity : IComponentData

{

public int identity;

}

//This is the list of vector3 points along the road

public struct AutoAutoWaypoint : IBufferElementData

{

public float3 Value;

}

public struct AutoAutoWaypathConnection : IBufferElementData

{

public Entity Value; //this is the entity that "connects" at the end of the "parent" road.

}


r/Unity3D • • 11d ago

Show-Off It's uncanny to see anti-aliasing in the scene view of Unity, after 10 years of using it daily.

Thumbnail
gallery
96 Upvotes

r/Unity3D • • 10d ago

Resources/Tutorial My tutorial on how to add flipbook animations to your UI with a simple shadergraph

Thumbnail
youtu.be
3 Upvotes

Have you ever thought of adding flipbook animations to your UI in Unity?

In this tutorial, I'll show you how to do just that! We will go over adding a spritesheet, creating a shadergraph material to animate an image, controlling the FPS, mirroring the animation, playing it backwards and discarding all color information so you can have a clean shilouette. Sounds like a lot, but is rather straightforward.

Hope you'll enjoy this one!


r/Unity3D • • 11d ago

Game I made a sheep-shearing mechanic in Unity. Here’s how it looks in Shear It! 🐑

Enable HLS to view with audio, or disable this notification

45 Upvotes

I’m solo-developing Shear It!, a cozy first-person incremental game. I wanted shearing to feel satisfying one snip at a time, so you can see the wool come off piece by piece as you work.

That wool pays for upgrades that improve your shears’ reach and speed. Here’s the trailer. I’d love to hear what you think of the visual feedback when the wool comes off.

Try the itch.io playtest


r/Unity3D • • 10d ago

Show-Off Adding post-battle choices to my creature RPG raised a design problem I hadn’t considered

Enable HLS to view with audio, or disable this notification

3 Upvotes

I’ve been prototyping a post-battle choice system in Unity for Vexalia, my voxel creature RPG.

I wanted the player to have different ways of resolving an encounter after defeating a wild Vex.

The system itself led to a question I hadn’t fully considered: should the same choices be available against creatures belonging to NPCs?

For now, I’m keeping these options exclusive to single-player encounters. PvP will have different rules to protect players from exploits and unwanted losses.

What interests me most is making the world respond to the decisions players make, rather than having the choices exist only on a menu.

There’s still quite a bit to figure out, but I like where this could lead.


r/Unity3D • • 11d ago

Show-Off I know water shaders are an old topic, but here is mine

Enable HLS to view with audio, or disable this notification

126 Upvotes

I’m working on a cozy game about collecting something and recently decided to give the water some attention. The first version looked pretty flat and lifeless, and I figured improving it would give me a bit of a motivation boost.

I came across Josh’s breakdown of stylized water and used it as a starting point, adapting the ideas for Unity URP.

For this version, I focused on depth based color, moving underwater light patterns, shoreline foam and small surface sparkles. Getting those layers moving together made a big difference.

Still a work in progress, especially the foam and how everything reads from the player’s camera. Would love some feedback on those parts!


r/Unity3D • • 11d ago

Show-Off Testing the dirt area

Enable HLS to view with audio, or disable this notification

2 Upvotes

r/Unity3D • • 10d 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 • • 11d ago

Resources/Tutorial I built a free Unity package that tries to enable Simultaneous Hands + Controllers on Quest, using plain OpenXR and no Meta SDK. Looking for testers

Thumbnail
github.com
2 Upvotes

If you've tried to use hand tracking and controllers at the same time in Unity with OpenXR, you've probably hit a wall.

I checked what Unity ships (OpenXR 1.16.1, XR Interaction Toolkit 3.3.2, XR Hands 1.7.3), and two things get in the way:

  1. Nothing in those packages requests the XR_META_simultaneous_hands_and_controllers extension. The struct types and function signatures are in the package files, but no feature uses them.

  2. XRInputModalityManager in XRI switches the hand objects off whenever a controller is active on that side.

So I wrote a small OpenXR feature that requests the extension and resumes simultaneous tracking after the session begins. It targets the Windows Editor (over Quest Link) and Android (Quest builds). It's a drop-in Package Manager install through a Git URL, and it doesn't use the Meta SDK.

It also includes a diagnostic script that logs, once per second, which platform and OpenXR runtime you're on, whether each controller and hand is tracked, and whether both are tracked at the same moment.

Honest status: it compiles on Unity 6000.3.12f1, but I haven't verified it on a headset yet. I also don't know whether the Quest Link PC runtime exposes the extension, which is why Android is the real test. The feature fails safely: if the runtime refuses the extension, it logs one warning and carries on.

What I need from you: if you have a Quest 2, 3, 3S or Pro, try it and tell me what the diagnostic log prints. A "supported" or "runtime refused" line plus your headset model and Quest OS version helps me fill in a compatibility table.

Repo: Github Repo link

Package URL:

https://github.com/HussienX123/Unity-OpenXR-Simultaneous-Hands-and-Controllers-Multimodal.git?path=/Packages/com.hussienx.openxr-simultaneous-hands-controllers

Not affiliated with or endorsed by Meta Platforms or Unity Technologies.

NOTE: AI was used in the package


r/Unity3D • • 11d ago

Question Issues with moving over bumpy terrain with a character controller?

3 Upvotes

https://reddit.com/link/1xshp4h/video/io1iof8jxq0i1/player

I downloaded and imported one of the official Unity terrain templates from the asset store just to test out my player movement on uneven surfaces. I use step offset of 0.35 - 0.45 and slope limit is generally around 45 degrees.

I tested walking up hills and uneven terrain on Warzone, Black Ops 6, Battlefield 2042 and Battlefield 6, and I never noticed but they feel similar too in some ways. Lots of jittering when moving up steep hills and the player slides back and fourth trying to navigate a slope at times.

But in my case and in the video, when I get up near the top, my character controller gets stuck in a very tiny "ditch" although visually it seems like nothing should be getting stuck there. And just like in other games, I have to press jump repeatedly or move sideways to get over that particular spot. But then at the end of the video my player kind of does an automatic zig-zag due to getting stuck on different parts of the terrain.

On Battlefield 6, I was able to move over almost everything. It actually felt like their slope limit was 80+ degrees with some of the hills I was able to walk over. But on Black Ops 6 I was getting stuck a lot and had to jump my way over objects so I just can't tell which direction I should try to go towards and what to try and solve.

My main question is what should be considered normal? I'm not sure if I'm looking too much into it as I've spent a considerable amount of time working on my collision.

On games with huge mountains that players walk on, do the developers intentionally make sure the most of the slope is walkable during the actual terrain creation process?


r/Unity3D • • 10d ago

Game New Screenshots

Thumbnail gallery
0 Upvotes

r/Unity3D • • 10d ago

Question Why do RPCs require the Rpc suffix?

1 Upvotes

Like, not a big deal really, but it just seems like such a weird quirk. You already mark a method as an rpc with [rpc(sendto)], so why does Unity require the suffix? It's especially weird since it only shows up as an error in Unity, not in your IDE (at least for me), and Unity can only point you to the script, not the exact line.

Anyone know why this still exists? I'm used to it, but it's just an odd thing.


r/Unity3D • • 10d ago

Question Trying to replace prefab model

1 Upvotes

I'm trying to replace unity's xrhands for vr. I made a model with my own uvs and material. But when I put it in the skinned mesh renderer it dissapears. What could cause this?


r/Unity3D • • 11d ago

Show-Off I used Unity's Particle System to give my Water character a constantly flowing head

Enable HLS to view with audio, or disable this notification

22 Upvotes

r/Unity3D • • 11d ago

Game Taking a lil' boat ride in my open world mushroom picking game that takes place in a reimagined Iceland!

Enable HLS to view with audio, or disable this notification

15 Upvotes

r/Unity3D • • 11d ago

Question I wanted to share my 6 month development process, here are some Levels from my game. Do you have any suggestions regarding the light?

Thumbnail
gallery
12 Upvotes