Skip to content

Instantly share code, notes, and snippets.

@drawcode
Created December 23, 2016 20:40
Show Gist options
  • Save drawcode/d2265dd233533514141c70b8109851a2 to your computer and use it in GitHub Desktop.
Save drawcode/d2265dd233533514141c70b8109851a2 to your computer and use it in GitHub Desktop.
Code (CSharp):
// Somewhere at line 3345 in method GenerateColorToTargets()
else if(GetComponent<CanvasRenderer>())
{
colors = new Color[1,3];
colors[0,0] = colors[0,1] = GetComponent<CanvasRenderer>().GetColor();
}
Code (CSharp):
// Somewhere at line 4128 in method ApplyColorToTargets()
else if(GetComponent<CanvasRenderer>())
{
GetComponent<CanvasRenderer>().SetColor(colors[0,2]);
}
Code (CSharp):
// Somewhere at line 4150 in method ApplyColorToTargets()
else if(GetComponent<CanvasRenderer>())
{
GetComponent<CanvasRenderer>().SetColor(colors[0,1]);
}
Example call to fade out a child image of the Canvas GameObject:
iTween.ColorTo(GameObject.Find("Canvas").transform.Find("Image").gameObject, new Color(0.0F,0.0F,0,0F), 1.0F);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment