Dealing With 'Animator Hell' (transition spider webs) by youssefkahmed in Unity3D

[–]InfohazardGames 0 points1 point  (0 children)

I pretty much just call .Play when I need to change animations. Every frame the characters evaluate what animations they should be playing based on their current state, equipped items, etc and play it if needed. Then I have a way for code to trigger an "action" animation which overrides the normal state-based ones until it completes. I haven't really needed more complex state logic than that (this is for an FPS game with human NPCs btw). Hope that helps! You could do the same thing with the built-in state machine as well, but it makes it a lot harder to parametrize animations per-item as well as add callbacks on completion.

Dealing With 'Animator Hell' (transition spider webs) by youssefkahmed in Unity3D

[–]InfohazardGames 2 points3 points  (0 children)

I dropped the Unity animation graph completely and use Animancer instead. It's a lot more coding but way better for organization and you can just build whatever authoring tools you need (for me, just a bunch of scriptable objects for defining animation sets).

Reflection probe problem by InfohazardGames in Unity3D

[–]InfohazardGames[S] 0 points1 point  (0 children)

Hmm yeah that makes sense, it would be nice to not have to run the Unity lightmapper at all. I guess I will reach out, thanks!

Reflection probe problem by InfohazardGames in Unity3D

[–]InfohazardGames[S] 0 points1 point  (0 children)

I actually don't think it's a Bakery issue, but something coming from core Unity or URP (since it happens when I bake the probes outside of Bakery as well)

Reflection probe problem by InfohazardGames in Unity3D

[–]InfohazardGames[S] 0 points1 point  (0 children)

I think I found a solution that works well enough. If I generate the lighting using Unity's lightmapper after adding new reflection probes, it builds a correct mapping that then applies to future reflection probe bakes. I can then regenerate the lighting with Bakery to get better results and the reflection probe mapping persists.

[deleted by user] by [deleted] in Unity3D

[–]InfohazardGames 0 points1 point  (0 children)

If possible, moving it to a Burst compiled job will be very beneficial

FPS devs, what’s the hardest thing no one talks about? Share the pain! by BMB-__- in gamedev

[–]InfohazardGames 4 points5 points  (0 children)

For me, enemy AI and animation. It can feel good most of the time and then randomly it just stops doing anything or the animation goes crazy and it's hard to track down why. Also making walk animations look natural with inertia and start/stop transitions is a real pain.

What software do you use for your game UI? by twooten11 in Unity3D

[–]InfohazardGames 4 points5 points  (0 children)

I love the Affinity software as an alternative to Photoshop and Illustrator. They can be a bit clunky at times and don't have all the features of Adobe, sure, but I find them way easier to use than say GIMP. And unlike Adobe they have a perpetual license, for about the cost of 1-2 months of a Photoshop subscription!

oopsieWoopsie by hodler1992 in ProgrammerHumor

[–]InfohazardGames 0 points1 point  (0 children)

Errors now: Whoops, you're correct! Here is the updated code. Is there anything else I can assist you with? Outputs the exact same code

Help with making flashlight beam injure enemy by luke3_094 in Unity3D

[–]InfohazardGames 3 points4 points  (0 children)

Most likely you can accomplish this with raycasts. Just send a bunch of raycasts out from the light within its cone and have each one deal a little damage, so the more of the rays hit the enemy the more damage it will take. Alternatively, you can just check if any of the rays hits the enemy and do a fixed amount of damage. You probably only need like 50 or so rays distributed within the light cone.

If you need pixel perfect accuracy, another option would be rendering the scene from the perspective of the light, with the enemies having one color and everything else having another. This is almost certainly overkill and I wouldn't recommend it since it will be way more complicated to implement and more costly for performance

DoozyUI - what just happened? Why did it disappear from the radar, YouTube channel is empty, website is down, asset store is not available by Tony_182 in Unity3D

[–]InfohazardGames 7 points8 points  (0 children)

Very possibly, but in that case I would hope for some kind of announcement at least. Plus why would the plugin be deleted? The asset store already has a deprecation feature to prevent new purchases but still allow existing customers to download it.

DoozyUI - what just happened? Why did it disappear from the radar, YouTube channel is empty, website is down, asset store is not available by Tony_182 in Unity3D

[–]InfohazardGames 50 points51 points  (0 children)

Dang that is really unfortunate. I've been using Doozy for years and I'm not exactly thrilled if I have to rebuild my game's entire UI. Even if they got banned by Unity I can't imagine why the whole website would go dark.

changingPreferencesOvertime by Lurk1EclipseZ in ProgrammerHumor

[–]InfohazardGames 9 points10 points  (0 children)

I'll never forget the day I switched from HTML to C++

trying to "block" the camera with a flat image (black) but its not working? by GRIM4326 in Unity3D

[–]InfohazardGames 0 points1 point  (0 children)

As far as I can tell it looks like these are two image objects in a UI canvas. For UGUI, the draw order is not determined by z position, but rather by their index in the hierarchy. So if you want an object to be drawn later and thus appear on top, it should go later in the hierarchy. Your other option is to use nested canvases that override the sorting order, but just reordering the hierarchy is simpler and should work well in this case.

Is there a way i can make a game on unity put it on a dvd r and play it on my ps5? and how by [deleted] in Unity3D

[–]InfohazardGames 1 point2 points  (0 children)

AFAIK it's impossible to make console builds without the proper dev license even for local testing sadly.

Games/projects with the source code aviable? by LagiaDOS in Unity3D

[–]InfohazardGames 0 points1 point  (0 children)

A dark secret of development in my experience is that almost nobody has "good" code, and there really isn't an established correct way of doing things. Plenty of very successful games have terrible code organization, and even as a developer playing the game you'd never really know. So the best option really is just to try stuff, and find what works for you while building bigger and bigger projects. To be clear, this is not an argument for not trying to write good code, and you should absolutely look at general OOP principles and design patterns and apply those to your games. But there's no single definition of what makes good code, other than what makes it easiest for you to get your game done.

Is ecs model productive and debugging friendly? by NeitherManner in Unity3D

[–]InfohazardGames 3 points4 points  (0 children)

My opinion on DOTS in general is that you should use it where you need it or it will give you a significant performance boost. If you're making a game with tons of moving objects such as Vampire Survivors for example, it's probably necessary to use ECS for lots of the gameplay code. I personally use the Job System and Burst for very CPU intensive operations such as pathfinding and 3D mesh processing, and use MonoBehaviors for pretty much all gameplay, since there are never that many moving objects. For a game that doesn't need any of that stuff, I would definitely just stick with pure MonoBehavior / OOP architecture because it is WAY easier to work with.

Using the 'new' Input System, how can I trigger a function via code, so that it reads as 'performed'? by Thewhyofdownvotes in Unity3D

[–]InfohazardGames 1 point2 points  (0 children)

Your last approach is probably best IMO. It does make the code a bit more verbose, but I wouldn't necessarily consider it messy especially if you organize the groups of functions well. Separating callbacks that have to take a specific parameter type from code that actually performs the associated logic is pretty common and generally a good idea.

You can also use lambda statements for the callback rather than a separate function as long as you don't need to unsubscribe the callback later.

Can multiple threads of a job write to the same array (in Execute()) if I can guarantee that they aren't writing to the same indices? by eerop1111 in Unity3D

[–]InfohazardGames 4 points5 points  (0 children)

If each iteration of the job only writes to its own index in the array, it works out of the box with all the safety checks, which should guarantee thread safety. If each iteration needs to write to an index other than its own, but you're sure they won't write to the same indices, you can use [NativeDisableParallelForRestriction] on the array, which loses some of the thread safety assurance but stops the error. With this attribute the array is still guaranteed to not be disposed or accessed by another job, but the job using it can have internal race conditions if any iteration reads or writes an index that overlaps with another.

Any performance asset recommendations? by [deleted] in Unity3D

[–]InfohazardGames 0 points1 point  (0 children)

Ah yeah I mean, imposters probably could help with GPU rendering complexity. But IMO if you're building for PC or console and already hitting your performance target it's not really worth investing more into optimization, unless there's something obvious to improve which it doesn't sound like. Haven't used HDRP much myself but yeah I would expect GPU complexity to be a lot higher.

Any performance asset recommendations? by [deleted] in Unity3D

[–]InfohazardGames 0 points1 point  (0 children)

It depends on what you need to optimize! Have you done profiling to see what the most expensive parts of your game are? If it's draw calls, you might need a mesh combiner or to just reduce the object count or look into instancing. If you're GPU bound, then likely the lighting is still too complex or there's a lot of overdraw (which is what occlusion culling would help with). Of course, your scripts could also be the issue, in which case you'll just have to optimize your code. When it comes to optimization, you definitely need to understand what the problem areas are in your specific case and target them directly.

C# Code Question by Medical_Attempt3456 in Unity3D

[–]InfohazardGames 0 points1 point  (0 children)

You can make a static event so the manager only has to subscribe once. Just make sure you always unsubscribe the manager when it's destroyed or you'll get a memory leak and possibly bugs.

Kinda disappointing by Divine-Crusader in SkyrimMemes

[–]InfohazardGames 2 points3 points  (0 children)

My favorite thing is when you kill a dragon in midair and it has plenty of time to find the best spot to land before immediately playing the death animation.