Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
0
Members

[Help] Sprite Renderer's setColor(Sup.Color) doesn't seem to be working sometimes Locked

A topic by Phrawger (Jasmine Schatz) created Jan 20, 2016 Views: 461 Replies: 1
This topic was locked by Elisée Jan 21, 2016
Viewing posts 1 to 2

The arrows are made of the following visual actors:

  • An actor with the background sprite renderer
  • An actor with the outline sprite renderer and a text renderer
The large buttons are made of the following actors:
  • An actor with the sprite renderer for the background of the button and the text renderer for the word "GROOVE" or "SHADE"
  • An actor with the sprite renderer for the outline of the button and the text renderer for "STEEL" or "NATION"
My trouble comes from setting the color to the various components. The backgrounds work. The text renderers all work. But the setColor function for the outline sprite renderers don't work outside of the scene editor. My goal is to set the outlines to be the same color as the text within code. I can set the color of the outlines in the scene renderer and it works as intended. I can set the colors of every other component in code and it works as intended. But not for calling the setColor function the outlines sprite renderers. Please help?
(+1)

This'll teach me to RTFM. I was initializing the Sup.Color with RGB values in the 0-255 range instead of 0.0-1.0. Very weird that it ended up working with the textRenderers at all, in that case.

Sorry about that!