- Home /
Is there a way to apply a texture to a 2d collider?
I want to make a level editor for a 2d platformer and I figured I would create polygon colliders with a script and apply textures to them to simulate terrain.
It would look something like this: http://i.imgur.com/g1nWERR.png
Or is there a simpler way to achieve something similar?
Answer by SunnyChow · Sep 27, 2016 at 10:24 AM
the keyword is not "collider", but "mesh". i am not sure about 2d. but if there is nothing designed for 2d mesh. i think you have to generate a mesh based on the polygon collider 2d. add it to a gameobject with MeshRenderer and MeshFilter
Your answer
Follow this Question
Related Questions
How to enable antialiasing for Texture2D 0 Answers
EdgeCollider2D or BoxCollider2D? 1 Answer
Unity changes pixel colors 2 Answers
Texture Compression format for UWP,Texture 0 Answers
Blending two Texture2D 1 Answer