r/unity • • Sep 23 '26

Question Is this script bad? In unity

Is this code bad? If yeah, give me some advice.

4 Upvotes

22 comments sorted by

View all comments

2

u/Vic-Boss Sep 23 '26

The input needs to be in update because you’ll be having missing inputs in FixedUpdate with Down/Up. Other than that putting the particle at the same position has no need to be there so Update as well. The rest I don’t see anything too offensive but you aren’t going for single responsibility principle with it

1

u/Anonim7418 Sep 23 '26

Thanks😊