Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

share|improve this question

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
 
Ok, then i know its a dead end. Very useful information. :) –  Lautaro Oct 14 at 6:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.