I want something like this,
void M <T> (T t) {go.AddComponent<T>()};
but with the ability to just do something like
M(BoxCollider);
How?
I want something like this,
void M <T> (T t) {go.AddComponent<T>()};
but with the ability to just do something like
M(BoxCollider);
How?
Something like this:
void M <T>() { go.AddComponent(typeof(T)); }
then you'd just use
M<BoxCollider>();