- Home /
Create sprite renderer using custom material
I have done following thing.
Create Material
Attach sprite with texture type as Texture
Add sprite renderer component to game object
Assign material to it that I create in last steps
There is no sprite available for selection. Following image illustrate my problem correctly.
So my question in how to create sprite renderer with custom material?
There is no point in using Diffuse, because sprite meshes don't have normals.
Thanks for your reply but I can't able to understand what you are trying to say? Please clarify more.
Diffuse implies you're using lighting. You can't light something that has no normals.
Answer by siddharth3322 · Feb 12, 2014 at 04:37 AM
I have changed my shader setting of material to tk2d/BlendVertexColor and I get a sprite available for selection.
Answer by Jessy · Feb 11, 2014 at 01:19 PM
You don't assign _MainTex (called "Base(RBG)" on that shader) manually for a sprite. The Sprite Renderer overrides it. Because you haven't assigned a sprite to the renderer, you see nothing.
So basically what I have to do? I want to create different material for my different sprites because of I want to handle multiple resolutions.
$$anonymous$$ultiple resolutions are handled by switching the sprite, not the material. Why do you have the idea that a material can "handle multiple resolutions"?
I am right now studying $$anonymous$$ultiplatform Toolkit in which I have to add platform specific material so that I want to create material. But you talked about multiple resolution handled by switching sprite only. So please give more detail in this. Basically my motto is to manage all the aspect ratios with multiple graphics also.
Your answer
Follow this Question
Related Questions
Sprite obstruction transparent area 1 Answer
Determine Texture Size 0 Answers
Created Material Shows Dark Sprite 1 Answer
Dynamic load and unload texture atlas 0 Answers
Atlas size based on sprite 0 Answers