- Home /
Other
With Unity 4.3, how should I import my map?
For my 2D hack and slash game I would like to import a map into Unity and set it as a background but I am very confused as to how to go at it. After that I'll to add some collision lines using the background image. Should I be using "Sprite" or is there some other more effective way?
Answer by PhilRousse · Nov 13, 2013 at 10:44 PM
If you're doing a 2d game, you should use sprite. It's the most effective way.
For the collision, use the Collider 2D families:
Circle collider (CircleCollider2D) supporting a centroid and radius.
Box collider (BoxCollider2D) supporting a centroid and a size.
Polygon collider (PolygonCollider2D) supporting an arbitrary set of polygons. It can be initialized to the shape of a sprite by dragging the sprite onto the component.
You can also look a the 2D tutorial who offer good idea on how to work with the 2D feature:
[[YouTube] Unity 4.3 - 2D Game Development Walkthrough ](http://youtu.be/4qE8cuHI93c)
[1]: http://youtu.be/4qE8cuHI93c
Thanks alot for the answer. But does it matter if my sprite is huge? Like over 5k pixels.
It may affect the performance of the game. But it's easier to reduce resolution than increase.
I guess I could use some kind of tile spawning approach which would reduce the size of my maps and make it more effective. Alright thanks :D
Follow this Question
Related Questions
Plugin Android that doesn't work anymore in Unity 4.3 0 Answers
Do the Unity 4.3 support top-down view? 1 Answer
Unity3d 4.3 2d learning 1 Answer
Unity 4.3 Physics 2d Change Axis 1 Answer