/r/unity

Photograph via snooOG

Unity is the ultimate entertainment development platform. Use Unity to build high-quality 3D and 2D games and experiences. Deploy them across mobile, desktop, VR/AR, consoles or the Web and connect with people globally.

This community is here to help users of all levels gain access to resources, information, and support from others in regards to anything related to Unity. Showcase your work and use this independent forum to connect with enthusiasts sharing the same passions.

Post away!

For the Unity Game Engine, please visit http://reddit.com/r/unity3d

/r/unity

113,006 Subscribers

1

Is it possible to get the length of an audio file that isn't being played?

I'm using Addressables to stream many audio files. During the initialization of a scene I want to make a list of every audio file's length. How can I do this?

0 Comments
2024/04/22
22:20 UTC

2

¡¡ I NEED HELP WITH NAVMESH !! It is the first time that I use the navmesh and of the 4 sections that come, only agents and areas appear, in addition, the bake option does not appear, which is the main one to make the mesh

1 Comment
2024/04/22
21:49 UTC

1

Starting my unity journey

hello guys i'm abeginner in unity, or in programming all in all. my question is should i watch a tutorial on how unity works or should i go straight to game making for beginners?

1 Comment
2024/04/22
18:51 UTC

1

Hey i recently decided to try to make my own Ui sprites but I ran into a problem.

https://preview.redd.it/tlw79c8mo2wc1.png?width=1920&format=png&auto=webp&s=1bf4f00e8f3573316c705eeb72eb3b1175082879

How do I get rid of these boxes around them? If you click anywhere in these areas it will click the button aswell. How can i just confine it to the area of the sprite?

0 Comments
2024/04/22
18:19 UTC

2

How do you handle character movement when attacking an enemy?

So let me preface this by explaining what I'm currently doing.

  • Walking, running, jumping, etc all handled in code
  • When I attack, I switch to using root motion velocity so that I can move fluently with attacks
  • Enemies are set up to do the same essentially, but with the added root motion velocity for damage animations

This works, however, I'm having the issue of my character moving past enemies when attacking, essentially missing some attacks due to not moving in conjunction with the enemy. I'm trying to think of a way to counteract this. I'm thinking to abandon the root motion attacking velocity and instead set the character to be slightly in front of the "focused" enemy when close enough to them. I already scan for closest enemy for my lock on script so I might be able to use this in conjunction. Or maybe check for if an enemy has been damaged, find closest enemy you were attacking, then focus that enemy. Many different options have popped into my head that I plan on trying after work today.

I would love to hear suggestions or personal anecdotes on similar situations!

2 Comments
2024/04/22
18:07 UTC

1

How to check 3 or more diffs side-by-side on Plastic SCM?

I used the diff tool on Plastic SCM and it was a really nice feature to check changes for my Unity project. I wonder if it's possible to to check 3 or more diffs side-by-side on Plastic SCM. If not on the GUI side, is it possible to do that with your typical git commands on the project directory?

0 Comments
2024/04/22
17:30 UTC

2

I've started working on a projects, got some assets off itch.io and this happens, any idea how can I fix this?

2 Comments
2024/04/22
17:10 UTC

1

animation sprites have diffrent layer order

i created animation sprite sheet and some of them have a diffrent layer and are invncible above backround. im not talking gamobject just the animation itself is invincible and have diffrent layer order to some sprites

0 Comments
2024/04/22
16:39 UTC

0

I tried launching phasmophobhia and it only gets to the flashing light warning before showing this and crashing. Can anyone help?

1 Comment
2024/04/22
16:04 UTC

3

We've added animation for a little side quest.

1 Comment
2024/04/22
15:16 UTC

2

If possible, how can I achieve this kind of lighting?

4 Comments
2024/04/22
14:45 UTC

1

Choppy Animation - Consistent frame-rate regardless of speed

I'm trying to do choppy animation, which means I would use a lower framerate in my spritesheet. However, I also need that animation's speed to get faster (as the game goes on) and using the speed change in unity causes the framerate to appear smoother as more frames are now passing by. Is there a way to make an animation faster but skipping frames to still make it appear choppy but also get faster?

2 Comments
2024/04/22
12:56 UTC

1

Unity Hub claims an editor version is installed even though i deleted it.

I've had a lot of problems with Unity's LTS version of 2022. I couldn't for example create new projects with it, however versions 2021 and 2023 worked fine. I thought I'd uninstall the 2022 and reinstall it, but after the uninstallation Unity claims that it's still installed. I have checked the location where Unity Hub claims the files for the editor are located and no such directory nor files exist. In Unity Hub when I click on the three dots for the 2022 version, I have two options: Show files location, when clicked results to nothing and remove from hub, which also results to nothing when clicked. I've reinstalled Unity hub multiple times, but nothing seems to get rid of it. I just wish to reinstall it, so I could develop projects using the latest LTS version.

I will appreaciate any kind of help, thanks.

5 Comments
2024/04/22
10:14 UTC

1

Trying to Make Platformer Shadow using Raycasts

I was recently learning to use raycasts and wanted to put the knowledge into practice.

As the title says, I am attempting to replicate the "fake shadow" effect 3D platformers have. This would make it simpler for the player to line up jumps.

To do so, I have a raycast straight down, and a shadow (a png of a circle) will appear at the point the ray hits. (It's actually 0.01 units above the point the ray hits, to avoid weird clipping issues)

This works to a degree, however when the player falls/jumps fast enough, the shadow will often hop or sink for a split second before settling back into place like this. I assumed it may be timing related, so I tried to put the code that checks for the position of the shadow into FixedUpdate(), but that made the issue worse.

My question is how can I get it to stick to the floor without hopping or sinking? (Bonus question, is there perhaps a better/simpler solution for the shadow than a raycast?)

Any and all help is appreciated!

Here is the code for the shadow:

public Raycast ray;

public Vector3 pos;

public float yCheck;

void Start()

{

ray = GetComponentInParent<Raycast>();

}

void Update()

{

pos = transform.localPosition;

pos.y = .01f - ray.rayDist;

yCheck = pos.y;

transform.localPosition = pos;

}

1 Comment
2024/04/22
09:01 UTC

1

How do i use existing animations from downloaded assets?

Hello to everyone,

i have a small university project comming up and its making a small game in unity. I decided to create a 2d pixel platformer. I went ahead and found some free assets from the unity store and downloaded them.

The think is i dont know how to use the existing animations from the assets and i cant find a youtube video related to this short of think . So can someone help me please?

2 Comments
2024/04/22
06:56 UTC

1

I would like to become GAME DESIGNER so what portfolio should need to create. can anyone Please tell me examples on how to make game designers portfolio

Here is the sample I don't know whether it is worth or not. should I need to improve?

Youtube

Is it worth for Game Designer Portfolio or need to improve?

11 Comments
2024/04/22
05:42 UTC

0

Brackeys is going to Godot, just like I said last year

0 Comments
2024/04/22
02:21 UTC

2

Addressable Load Scene Problem

Hello friends, I want to load scenes with the Addressable system, but even if I put an IF-ELSE condition in the Update function, it automatically opens the scenes. I call it from my other script file with 'loadingscene.LoadScene();

https://preview.redd.it/35bk4y2cvxvc1.png?width=865&format=png&auto=webp&s=81b6faf7983e578aae2ce965354d73666c9dde07

2 Comments
2024/04/22
02:06 UTC

13

Unity counting our customer's revenue as ours???

Just had a meeting with Unity's compliance team.

We're a small startup (2 FTE) and we've just been told we have a week to upgrade our 2 seats to the Unity Industry licenses ($4950USD/seat) or Unity will revoke access.

Although we don't hit the $200k revenue threshold that our business generates, apparently Unity is counting our customer's revenue as our revenue? This makes absolutely no sense to me? He said this has been in their terms for a while.

How can they justify differentiating license/subscription tiers based off what revenue our CUSTOMERS generate? By this logic, if we provided like $50 of services to a large enterprise, or even just a small business with revenue above $200k then we'd need an Industry license.

Just because we work with a particular customer, doesn't have any correlation to our ability to pay these huge license fees. For a business of our size, this will have a serious impact on cash flow and our ability to grow to become a business that can afford its licenses.

9 Comments
2024/04/21
23:19 UTC

1

Colors and code suggestion not working?

I have started my first game in unity with vs code 2019 following a turtorial by game maker’s toolkit. But after a few minutes I’ve noticed that his suggestions for code were way better: while mine just worked on “public float” or “if” his also suggested something like “Vector2” or “gameObject”. Also some of his words were coloured like “gameObject”, “Time.delta.time ” or “Vector2”. I don’t know if there is a premium version of vs code wich incudes these features or if he has a newer version or different Settings. Many it’s just because he uses a MacBook.

I hope my question is not to stupid and my problem can be solved.

6 Comments
2024/04/21
21:09 UTC

79

Brackeys is back!

10 Comments
2024/04/21
20:25 UTC

1

Simplfy complex mesh -> FPS decrease

Hello. I have a very complex 3D model of an industrial plant -> 18 million triangles, without simplification I achieve around 20 FPS. Using a MeshSimplifier I can reduce the number of triangles to around 9 million according to unity. However, I only have around 18 FPS afterwards. How can the average FPS be reduced even though the model has so much less triangles? In both cases, the model is loaded into Unity at runtime.

Any ideas?

16 Comments
2024/04/21
18:52 UTC

Back To Top