Question by
KokodokoGames · Feb 18, 2018 at 08:59 AM ·
spriterendererprefab-instancespritesheetprefab changing at runtime
Can I replace the source image of slices by script?
I have a prefab that uses slices from a single PNG. (in animation clips). If I replace that PNG in the Finder, all slices taken from that PNG are automatically updated, which is great.
But I want to do this by script: just replace the PNG where all slices are taken from, with another PNG. This is so that each of my prefabs instances can all use a different spritesheet PNG source for its slices.
Comment
Your answer
Follow this Question
Related Questions
Instances of the same prefab behaving differently 0 Answers
How do I get the Box Collidor to form around the shape of the Sprite? 2 Answers
Unity overwrites prefab values in runtime 0 Answers
How to correctly change sprite on a prefab clone? 0 Answers
Is there a way to control when lighting is generated? 0 Answers