I'm making a little system for a tactical-rpg project I'm working on.
Basically, I'm taking the size of any Gameobjects that I want to be the map and it creates automatically an array of Tiles at the right position.
The problem comes when I want to display these tiles. My first idea was to simply display a texture at the position of the tile but I can't find a tool provided by Unity for this.
My second guess is to instantiate a plane and apply the texture on this one. But I don't know if having hundreds of planes on my scene will impact the performance?
Thank you in advance for your answers!
Answer by EdwinChua
Apr 11 at 05:18 PM
Your second approach, applying a texture to a plane, is correct. Having several hundred planes isn't an issue, as most 3D models (eg. of buildings) use many of them.
I've noticed though, that the player colliding with complicated objects (with many small mesh colliders) tend to be taxing on performance. In cases like these, I would either remove those objects, or encapsulate the whole group within a box collider.
It also depends on the platform you are building for.
I'm pretty new to Unity, so someone might have a better answer to your question.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
5 People are following this question.
Best practices : alpha channel and atlas
Help with using a single texture for all terrain trees
Computing required to assign pre-existing material
Multiple meshes vs single mesh (performance vice)
Will having no textures increase performance?