This is basically what I want:
public Component theComponent;
public GameObject objToAnswer;
public Color color;
public void Finished()
{
objToAnswer.GetComponent<theComponent>().ReturnColor(color);
}
Return.requestComponentBehaviour' is a "field" but a "type" was expected
I understand that I can’t do this way, but there’s another approach to achieve this result, I mean getting a custom component?
Also, just to clarify, the component would then be set in Unity Editor, so I guess I can’t cast as something, because I don’t know what would be anyway.