- Home /
Change the color of a black sprite?,How can i change the color of a black sprite?
so basically, I have been working on this game for a long time and I have added a black sprite that has a skeletal system. I have spent a long time working on different animations and have many of them setup. I imported a PSB file with a different layer for each part so I can have a skeleton system. After a lot more working on the game, I realized I wanted to change the color but I could not because it was black. I spent a few minutes and changed the color in the original PSB but am not sure how I can change my sprite without having to redo all of the animations. Is there a way I can change the color of my black sprite or reimport a PSB for a skeletal system but keep the animations? Thanks!,So basically. I have been working on this 2d game for a while and have invested a lot of time in making skeletal animations for a sprite I made. But now, I want to be able to change the color of the sprite from code and I cant because it is black, I actually have a copy of the different components of the sprite but in white but cant find a way for me to change it, without having to redo all my animations(which will take a long time). What can I do to change a black sprite's color or just redo the skeletal system and still be able to keep the animations I made?
Answer by cwalshwarder · Apr 07, 2020 at 03:34 AM
I don't think you can change a black sprite's color directly.
You can reimport assets, though I don't know if that breaks animations so make a backup. Right click and select open in explorer, then drop in the new thing with the same name and replace it.
If that doesn't work, maybe a sprite mask would work. You'd put a sprite mask on the same gameobject as the animated sprites, and a big square white sprite or whatever on a child gameobject. You could change its color and it would have the same shape as the animated sprite.
Your answer
Follow this Question
Related Questions
Sprite with MaterialPropertyBlock not updating until Animated 1 Answer
How can I accomplish this effect in a texture (animated gif in the explanation) 3 Answers
Access sprite secondary texture in shader for UI canvas image 1 Answer
Grass shader sprite 2D 3 Answers
How do I sync sprite layer? 0 Answers