Inspector vs Script: Component best practice?

Hey! im new to Unity but know a little C#.

i have a question on “best practice” when creating components:

you can add components (audiosources, rigidbodies, colliders etc) to your stuff via the inspector but i added all that in script because i like being able to look at my code and see exactly whats goin on.

however i have a nagging feeling that unity really wants you to do that stuff in the inspector…

what is considered best practice and are there performance/optimization differences to be aware of?

thanks!

Most custom level serializers do this. You are on a right track. Use the way which is more convenient to you :slight_smile: