Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building Customization #128

Open
ksPriyanka opened this issue Oct 11, 2018 · 9 comments
Open

Building Customization #128

ksPriyanka opened this issue Oct 11, 2018 · 9 comments

Comments

@ksPriyanka
Copy link

ksPriyanka commented Oct 11, 2018

Hi,
Is it possible to determine the tap on the buildings or to determine customization, like changing color or texture of the building, roads?

@reinterpretcat
Copy link
Owner

Hi,
yes, you can do it as shortly described here: https://github.com/reinterpretcat/utymap/blob/master/docs/howto.md#tweak-mapcss-styles
MapCss is the way to change properties consumed by element builders.

To detect tap, you need to add unity's mono behaviour on game object. To achieve this, you can tweak GameObjectBuilder:

https://github.com/reinterpretcat/utymap/blob/master/unity/demo/Assets/Scripts/Core/Plugins/GameObjectBuilder.cs

Building's mesh is used to be created by core part, so adding corresponding behaviour in BuildFromMesh(Tile tile, Mesh mesh) should help.

@ksPriyanka
Copy link
Author

ksPriyanka commented Oct 15, 2018

Thanks.

Also, the project doesn't support Scripting Runtime Version 4+??? I tried changing it from 3.x and it started giving errors like
IProgress' is an ambiguous reference between System.IProgress' and `UtyRx.IProgress'

and when trying to fix it, it resulted in some other error like a chain. Any way to come out of this problem?

@reinterpretcat
Copy link
Owner

I stopped to work on project in Jan, 2018, before it was there. You might try to overcome the problem within using alias directive:
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-directive

@ksPriyanka
Copy link
Author

Hey sorry to bug you again.

Is it possible to change the texture of the building or roads during runtime?
Like I have 4/5 textures for building something like bricks & stones of different kinds. Similarly for the roads too. I can change it with Unity IDE but not being able to change it during the run time.

Is it possible to change it during runtime too?

@reinterpretcat
Copy link
Owner

have you thought about texture atlas: https://en.wikipedia.org/wiki/Texture_atlas ?
utymap uses texture atlases: it is good from performance reasons

@ksPriyanka
Copy link
Author

ksPriyanka commented Oct 29, 2018

Hey, can building Id be enough to get the information of that building?
Information like Geometry of the building or the height of the building, about Tiles?

@reinterpretcat
Copy link
Owner

In theory, yes. Practically, might be complicated as building might consist from multiple parts (ways).

search API might be useful for you, see https://github.com/reinterpretcat/utymap/blob/master/core/src/index/GeoStore.hpp

@ksPriyanka
Copy link
Author

Hi,
xml files that gets generated in the Index folder, how is it being read by the script? I tried searching for it but couldn't exactly figure out the script responsible for that.
InitTask.cs does show the entry point for composing the graph but still, I am unclear about it.

@reinterpretcat
Copy link
Owner

osm xml files are processed by OsmXmlParser: https://github.com/reinterpretcat/utymap/blob/master/core/src/formats/osm/xml/OsmXmlParser.hpp which uses boost spirit to define grammar in eBNF form and generate corresponding parser.

InitTask is just one peace. Take a look at https://github.com/reinterpretcat/utymap/blob/master/core/shared/ExportLib.cpp : this file defines native API available from managed part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants