0
\$\begingroup\$

Is it possible to have extension methods that starts coroutines? Id like to have an extension method for the GameObject that checks if itself has a renderer and a material and then lerps the color to a target color.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

I can't think of a way to do it. Since extensions are static and they cannot inherit the MonoBehaviour that contains the StartCoroutine methods.

\$\endgroup\$
1
  • \$\begingroup\$ Ok, then i know its a dead end. Very useful information. :) \$\endgroup\$
    – Daarwin
    Commented Oct 14, 2013 at 6:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .