Rich UI ... (Java ? )

I am a “newbie” trying to learn Unity. I am investigating it’s usage in a “Arch Viz” type of project. (eCommerce, 3D, Housing oriented ).

Working samples thus far figured out via the “UI Samples” project.

  • Controls - shows some of the standard controls that come with the UI system.
  • Drag And drop - How to implement a drag and drop handler.
  • Draggable Panel - How to implement a simple draggable and resizable window.
  • Layout Groups - Example of using the auto layout system with nested layout groups and a grid.
  • Lighting - Examples of UI affected by lighting in the scene.
  • Menu 3D - How to have a 3d UI with perspective that uses Mecanim for the buttons.
  • Render Texture - How to use render textures for UI elements.

If this is indeed true, this UI set appears limited for biz-apps.

There is plenty of discussion in the forums on cross-platform, open-source “dotnet” stuff. There appears to be a lot of work undertaken by Unity via IL2CPP etc. It also appears that adding a UI toolkit for all the platforms that Unity supports is a big challenge.

Just a thought … Why not consider the “open sourced java” platform ?. Maybe a huge exercise in “re-inventing the wheel” could be finessed ?.

I am guessing (correct me if I am wrong ) that integrating “event mechanism”, “scene access” etc are primarily where the work would be. This appears modest. (3 - 4 man months for a skilled engineer ?). Am, I missing something here ?.

This can dramatically propel the platform. Java is much more than a UI toolkit and consequently all kinds of Apps become possibilities…

/rk

Unity doesn’t use Java, so I don’t really know what you’re trying to get at. You can program a UI in Unity to do whatever you want.

–Eric

There is no “hidden agenda”.

All I was suggesting is that the cross-platform UI toolkit problem has been solved to a large extent in Java / JavaFX. Further it’s open-sourced.

Java is a full-fledged application development platform. So for someone desirous of building rich-3d based apps the combination of Unity + Java could be game-changer.

It appears that the effort being expended on IL2CPP is for a cross-platform scripting / UI solution. I am merely suggesting a re-visit to this challenge. Unless there are compelling reasons to do so, a second look at Java / JavaFX seems worthwhile. It’s a suggestion for Unity architects who look at slightly longer-term horizon.

/rk

I didn’t say you had any hidden agenda, the point being that Java has nothing to do with Unity, nor is it feasible that Unity would use Java for anything. Also IL2CPP has nothing at all to do with UI. So I’m not sure you quite understand what Unity is or how it works.

–Eric

Eric,

Here’s another attempt.

An intro to il2cpp internals …

This is effort is parallel to the JVM (Java Virtual Machine). Add an AOT compiler (optional ) and you have something that is a superset of the il2cpp project.

I hope it makes sense.

/rk

I’m well aware of what IL2CPP is. :wink: It converts IL code to C++ code. This way you can use native C++ compilers instead of using Mono, and this was introduced primarily because of Xamarin license issues on iOS, and is also used for WebGL (through the IL → C++ → Javascript chain). Again, nothing to do with UI, and it doesn’t change the way that Unity works; the intent is that publishing using IL2CPP should be generally no different to the user compared to publishing using Mono. It’s unclear what you’re asking for. If you want Unity to ditch Mono/.NET and use Java instead, no, that’s not something that will ever happen, nor would there be any benefit in doing so.

–Eric

Like Eric, I am also a bit confused as to exactly what you’re asking. It seems to be combination of general advice/ feature requests (have Unity use Java) and you hitting a roadblock of some sort with your UI.

As Eric already mentioned, Unity uses Mono (.NET), not Java, and I suspect that will never change There are also already several UI systems in place, all of which are perfectly cross-platform.

What exactly are you trying to accomplish UI-wise that you currently can’t? What are you looking for that you feel you would gain from Java? The more concrete you can formulate your questions the more we can help!

Apologies if my arguments were incoherent. Here’s another attempt.(probably a final attempt :slight_smile: )

  1. Weak UI - The current UI offered in Unity seems to be a small subset of a best-of-breed, modern UI toolkit. (Open Source JavaFX, Microsoft’s WPF, Qt etc). In our case we currently use Microsoft’s WPF and specifically their “ribbon interface”. We also use an embeded web-browser. These things are missing in Unity. In general the UI toolkit in Unity is significantly smaller and less capable compared to WPF, JavaFX etc. Consequently for us it becomes a limitation.

Unity UI …

Microsoft’s WPF …

Open Sourced JavaFX

Qt

  1. Cross platform WPF ?.
    If WPF were to be cross-platform, our discussion might have been moot. But it appears that WPF is strongly tied to the win32 platform.

  2. If you take #1 and #2 and the effort being expended to produce a cross-platform UI support for Unity, it sounds to reason that Java merits a re-look. One of Java’s original design goals was cross-platform. Consequently a lot of effort has gone into this over the past 20 odd years and arguably a very strong cross-platform development environment has emerged.

  3. Biz-Apps - Perhaps Unity’s currently offered UI toolkit is sufficient for the gaming industry. However for general purpose apps, it would be cool to have a best-of-breed UI support as well. In our case we were using bscontact (Vrml97 / X3D ) along with WPF. We are considering moving away from bscontact (www.bitmanagement.com) due to limitations in it’s graphics quality, support for physics etc. Unity & Unreal were our principal choices. We are more or less settling on Unity. But find Unity’s UI support a bit weak.

  4. Architectural change - My suggestion to re-visit this issue and take a second look at Java / JavaFX has major implications. I am not making this suggestion flippantly. I realize the deep integration with “dotnet” that exists today. However if Unity desires to be an attractive engine in broader 3D oriented biz-apps the UI issue needs a re-visit.

Sorry for the long post. If I have failed to make my point, I apologize we can end this discussion here.

/rk

As I mentioned before, you’re free to extend the UI system as you wish. You’re not limited to what’s supplied by Unity, and if you’d rather not spend the time doing that yourself, there are packages available on the asset store that have additional functionality. Moreover, you don’t even need to use the built-in UI classes if you don’t want to. There are various third-party GUI systems such as NGUI if you’d prefer to go that route.

As for Java, it’s not even remotely feasible to use that in Unity. You seem to be asking them to rewrite the engine, breaking all existing code, alienating the entire user-base, and throwing out untold millions of man-hours of work in the process. I hope you understand how completely unrealistic that is. You seem to have some fairly fundamental misunderstandings of the technologies used by Unity.

–Eric

Eric,

I am not convinced with your answers. I have expressed very clearly that these are architectural-level changes and that I very well understand the implications.

But as in all endeavors there is a cost-benefit. That is partly what I was attempting to bring attention to.

LOB apps on which plenty of money is riding need heavy-duty UI support. For e.g our app is targeted at a $15bn industry in the housing sector. I will look into the alternatives u suggested.

Anyway, this conversation is beginning to go nowhere from my perspective. Sorry, if I have wasted your time.

Cheers …
/rk

@rktumuluri , I definitely understand your point now. However, Java really isn’t a feasible solution here for the reasons Eric mentioned. Something like that would essentially constitute an entirely different engine.

I think it’s also important to keep in mind that Unity is a game engine first and foremost. Qt is an entire development suite and, like Java, used in a far more general sense. “General apps” have different structures and requirements, so you naturally get UI solutions that fit the platform. With Unity, everything the user sees takes place in a Scene, so it makes sense to take a very graphical approach there. Other platforms might offer something similar through Views or Screens, or even just be fully programmatic. The point though, is that every platform has its own tools and requirements.

In the case fo Unity, every game is so unique and has such vastly differentiating requirements, it’s very hard to create useful, general UI components, though I honestly think they did a stellar job with the new UI. In the case of a web browser like you mentioned, there likely simply isn’t enough demand for that for the UI team to spend any work on.

If all you need is from the 3D side is something like a walkthrough of a house, Java might be the way to go with a library like LibGDX, LWJGL or one of many others, and then using a UI framework to your liking. Or perhaps you could use Qt, or anything else that suits your fancy.

If you do need a more complete engine like Unity though, I’m afraid you’ll either have to extend the UI yourself, or buy a package from the Asset Store if it exists (for instance, there is at least one web view asset available). If your app is truly that valuable though, I would imagine the company easily being able to put aside some resources to build a dedicated in-house UI solution.

I hope that clarified things a little bit. I’m sure your feedback is appreciated by the Unity team, but I’m afraid at the same time it’s not really feasible to act on.

Best of luck with your app!

1 Like

Senshi,

Your response is nice. It makes sense. Thanks.

/rk