Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing GlowColor in script without messing up brightness. #15

Closed
umaqs opened this issue Oct 25, 2017 · 1 comment
Closed

Changing GlowColor in script without messing up brightness. #15

umaqs opened this issue Oct 25, 2017 · 1 comment

Comments

@umaqs
Copy link

umaqs commented Oct 25, 2017

I have a simple sprite (square of white color) and I am setting a random color to its sprite renderer in code. I want to use the same color as GlowColor which works fine for once but when I change GlowColor a couple of times it loses its color brightness resulting in lose of glow.

Here is the code I am using:

public void Init (Color color) 
{
    sprite = GetComponent<SpriteRenderer>();
    sprite.color = color;
    SpriteGlow.SpriteGlow glow = GetComponent<SpriteGlow.SpriteGlow>();
    glow.GlowColor = color;
}

Init method is called multiple times, how can I set glow color so it is visible every time?

PS: Currently Bloom effect is applied on all the materials. How can I remove the effect from some of materials?

Cheers

@elringus
Copy link
Owner

I've added a glow brightness property, so it's now possible to change color and glow power separately (e1939b1). You can download the updated package here: https://github.com/Elringus/SpriteGlow/releases/download/v2.2a-release/SpriteGlow.unitypackage

PS: Currently Bloom effect is applied on all the materials. How can I remove the effect from some of materials?

Check the 'Threshold' value of the bloom effect: https://github.com/Elringus/SpriteGlow#why-the-glow-appears-on-the-whole-image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants