How should I change the material of an imported object using the PSB Importer?
Of course, it would be possible to manually assign materials one by one.
But there are some problems with this.
example)
CharacterA.PSB has 20 layers.
If you import this into Unity using the PSD Importer,
It becomes a prefab consisting of 20 SpriteRender GameObjects
By default, each Sprite Render is assigned a Sprite-Default Material.
I created Custom Character Dissolve Material through ShaderGraph.
- Character must be applied with Custom Dissolve Material
- Each character instance operates independently
- But the characters themselves have to share the same material (20 layers).
1. apply custom materials to Sprite Render
Do I have to bind each and every one of the 20 Sprite renders directly?
As requested in this thread,
Is there any way to allocate Default Material like in the case of 3D models?
2. Instance Issues
If character A-1’s dissolve value changes, it should only affect that character A-1’s instance.
At the same time, each of the A-1’s 20 layers should be affected the same.
Do I have to create a material at runtime and bind it 20 times when Instantiate new Instance?
Isn’t there a better way?