Closed arpit2050 closed 7 years ago
The Unity SDK currently does not support creating 2D floorplans. We have prioritized Java support since it has great support for 2D rendering.
What were you considering using it in Unity for?
I was looking for 2D-Map generation while learning an area using Project Tango with the help of Unity3d so that later I can use that map for understanding navigation in different location within that area learning. Is there any way for generation of 2D map using Unity3D with the help of Project Tango in dynamic runtime.
Just for clarification, could you point me to the Java floor plan example you would like to see Unity support as well?
1) https://github.com/googlesamples/tango-examples-java/blob/master/java_floor_plan_example/app/src/main/java/com/projecttango/examples/java/floorplan/FloorplanActivity.java *Custom View that draws the plan in 2D.
Thanks for the clarification!
The difficulty you will have here is that building 2D polygons at runtime is not something Unity is especially good at. You could use the Mesh interface to create your vertices and make sure to extrude the mesh yourself. The Java code that builds the polygon is relatively straightforward and could be directly ported to C#.
I hope this helped! I'm going to close this issue as good 2D rendering support is not something our plugin can really address. If you are building primarily a 2D app, I suggest using the C or Java APIs directly.
@chaosemer I understand your reasoning about not having a Unity example for floorplan extraction, but is there any reason why the Unity API doesn't even expose the floorplan extraction function? I would appreciate being able to extract the polygons using the Unity API, but I can't seem to find it at all.
@LudwikJaniuk, like I mentioned above, we have prioritized Java support for floorplan extraction as Java has great 2D rendering.
Ok, I understand. Just in case I'd be missing a possible solution - it is not possible to call on the java API from unity C# code, is it? I have found some examples on the internet of calling java code on android from Unity C#, but the examples are pure and simple java language functions. I assume it wouldn't be possible to call the java Tango API in that way (I'm talking specifically about Unity AndroidJavaObject), because of setup and all?
If you are willing to do some hookup yourself, I would recommend calling into the C functions over calling into the Java API. Java would work, but calling into C is easier.
Hello, Does Unity SDK supports 2d-floor plan extraction just like in JAVA API for creating 2d maps for navigation using Project Tango