Hello,
I’ve been haphazardly self-teaching myself Unity recently, and I have been wondering. I have various scripts that do very broad things that are used in a lot of object (for example, one script has a set of animations like fade from a to b, move from x to y, rotate from m to n all over a certain amount of time) and I can apply the script to the object and call a method to start the coroutine which does the animation.
I was wondering if it would be bad practice to, instead of adding the script to a bunch of objects, declare it as a static class and add a GameObject as a parameter in each method. This way I wouldn’t have to worry about adding the script to the object, i could instead just call something like
AnimationScript.moveTo(new Vector3(5, 5), 10.0f, this);
Thanks!