I know this is a strange question/request, but i am trying to make a “The last script you’ll ever need” script, but don’t know all ins and outs of unity C#.
Do you have any ideas on have to make this as close as possible?
I’ve worked on smaller scripts of this type before, but I’ve never been able to figure out whether you can actually use variables beyond just being plain old variables like Int=some number or str=“Some text”.
Can you use variables in some clever way to address components of your choice for example without coding a If for every possibility?
Any and every reply saying some step towards this is appreciated.
https://learn.unity.com/project/roll-a-ball-tutorial is a good start for complete beginners.
BTW, “The last script you’ll ever need” is possible only if your needs are extremely limited or at least well defined and not expanding.
Ok, thanks.
I meant that i just don’t know all there is to know about C# in Unity.
What i was searching for is primarily a way to address components, that you you choose in the editor, in objects you define in the editor, but also other parts of programming the script from the editor, for the fun of being able to.
Probably you can do this (specify code as name of the objects, or in public parameters) but benefits of that are going to be liimited.