Currently, I'm creating a city simulation game, and I've run into a problem that I have no idea on how to solve. How can you color in parts of a map from data? Similar to how all SimCities handle visualization. Technically, I could spawn one gameobject per each point, and then color it in, but that would mean creating about 10,000 gameobjects, which is simply not an option.
I'd generate a mesh for where the coloring should happen, give each vertex the color and alpha it should render and use a transparent shader. I would render that on an in between camera, after scene and before UI
Answer by ferriseuler
Mar 03 at 09:23 PM
You could plot the data with D3.js and then use SVGAssets from the store to import it as an asset. Alternatively you could simply create a bitmap plot and use that as an image but the SVG route might be more versatile from a data viz point of view.
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
35 People are following this question.
[Problem] Change 3DText color with C# script
How to get the Color Code in RGB Hex from RGBA? (Unity 3D 5.0f1)
Get sprite color r,g,b,a, values c#
Animation disappears after getComponent?
Setting an Objects Colour using a variable Color from an array?