Hello,
I am new to Unity development but have worked with GIS for a little while. I am trying to get GIS data e.g. shapefiles into the Unity environment. For instance suppose I have a shapefile (vector) of some buildings.
I am exporting the shapefile into FBX to import it into Unity. However, I lose the attributes (area, owner, year, floors, etc) of buildings when I convert the shapefile to FBX. What is the best approach to have both geometry and attributes of buildings in Unity? The attributes are important and I need them in Unity.
Any feedback would be appreciated.
Cheers,
David
Unity’s gameobjects are made up of components. The position, rotation, and scale of an object is defined by its Transform component. Its appearance is defined by a Renderer component. Its physical behaviour is determined by a Rigidbody component, for example. You need to define a component (i.e. a script) that is going to store the attributes for each building (I’m assuming here that you have one FBX per building, and you’re looking to create one gameobject for each of those).
Then you need to programmatically populate the component’s properties for each shape/building at the same time as you load the FBX file.