Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Unity for non-gaming purposes

Discussion in 'General Discussion' started by LucentLight, Oct 2, 2018.

  1. LucentLight

    LucentLight

    Joined:
    Oct 2, 2018
    Posts:
    3
    I'm working on a contract for a client and they've expressed an interest in now making the software with multiplatform support (essentially Mac and PC). Initially the requirement was Windows, so I was writing the program in C#. I know Unity can build for Mac and PC, but I'm wondering how effective that is. Will server connections and all that be able to work if done in C# through Unity, using .NET of course? That's really my biggest concern. The app will make frequent calls to a server. If that doesn't translate well I don't think I'll be able to use Unity, but it's so much better than repackaging it another way. Thoughts?

    (Also, GUIs are much easier to make in Unity. So... if this would work it'd be wonderful.) And I do have the backup of having them download Wine on their employees' Macs. Since this is an internal software for a small business it wouldn't cause too big a problem. Still, the pay goes up if it will work on Mac/PC out of box.
     
    AlanMattano likes this.
  2. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,440
    It's kind of wasteful if you're just making a GUI app. Otherwise, there's not really any limitations to note.
     
  3. XCPU

    XCPU

    Joined:
    Nov 5, 2017
    Posts:
    118
    Software development system just like any other.

    Only problem I had was the stigma of being a 'game' engine, so got turned down.
    Might make another pitch for it this year. Subtle, when the time is right. :)
    Not a contract though, day job.
     
  4. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    6,106
    If you're making it for something that requires 3D visualisation, or really the potential for various forms of visualisation, then Unity's probably a good fit. If you're just looking for something GUI-like, you might be better off with something else though.
     
  5. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,164
    Xamarin with Caliburn Micro
     
    angrypenguin likes this.
  6. LucentLight

    LucentLight

    Joined:
    Oct 2, 2018
    Posts:
    3
    I haven't done much with Xamarin, but I'm creating a desktop application. It's my understanding that Xamrin is more mobile oriented, right?
     
  7. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    14,704
    I'm starting to believe I'm the only one that enjoyed building a GUI-based application in Visual Studio. :p
     
    AlanMattano, ikazrima and LucentLight like this.
  8. LucentLight

    LucentLight

    Joined:
    Oct 2, 2018
    Posts:
    3
    I also like VS GUI building. Cross-platform compiling doesn't work so well with it, though, from what I understand.
     
  9. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,247
    Xamarin is cross-platform focused. It is an officially-supported cross-platform C# framework. Basically, it's like Mono only with Microsoft's official blessing. Originally it was a third-party library that you had to pay for. But Microsoft bought the company and integrated their library into C# natively, so now anyone who uses Visual Studio has access to it.

    It can be used to deploy Visual Studio projects on Mac and Linux, as well as mobile platforms like Android and iOS. One of the bigger benefits of Xamarin is being able to access native APIs on the different platforms it supports. Some systems like Unity don't necessarily allow this.
     
    Ryiah and angrypenguin like this.
  10. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,513
    Unity is going to force you to use 3D rendering and a 60 or so frames per second game loop, whether you want to or not.

    If you are okay with that, then go for Unity. If performance is critical, use something else.
     
    Ryiah and angrypenguin like this.
  11. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    14,704
    From time to time I stumble upon mention that Mono has support for System.Windows.Forms but I have never bothered trying it. About the only other modern GUI builder I'm aware of is the one that comes with NetBeans for Java. WYSIWYG UI builders seem to be a dying concept outside of weird cases like Unity.

    https://www.mono-project.com/docs/gui/winforms/
    https://netbeans.org/features/java/swing.html

    If I needed to make a normal application these days I would likely go with the same approach Microsoft took for Visual Studio Code. VS Code is written in HTML/CSS/JS running in a portable browser framework called Electron. It runs on Windows, macOS, and Linux.

    https://electronjs.org/

    While searching for an easy-to-use UI framework for it I came across Photon. It looks like it would be very easy to work with. At least as easy as you're going to get without resorting to a WYSIWYG editor which seems to be non-existent for Electron.

    http://photonkit.com/
     
    Last edited: Oct 3, 2018
  12. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,164
    It works for UWP and Desktop too
     
  13. willemsenzo

    willemsenzo

    Joined:
    Nov 15, 2012
    Posts:
    531
    It has but it is buggy.
     
  14. guneyozsan

    guneyozsan

    Joined:
    Feb 1, 2012
    Posts:
    63
    I've used Unity for plenty of non-game projects. Unity is cool for working with remote data. But clients want Unity mostly because it is cross-platform and their projects involve some 3D component (major or minor).

    All projects I did were remote data oriented apps. That part works very well with C#. I don't think you will have any problem with that part. Still, I don't know if your native C# code will translate directly but just go and make some simple experiments to get your data from server. Also check Unity's WebRequest class and Coroutines. You'll have an idea of how it will go.

    If it was a mobile project, a Unity app will be a battery eater monster when compared to native apps so I would suggest not to use it unless you need 3D. But on PC it doesn't matter.

    For distribution you can also build for WebGL and run on browser as a 3rd platform with PC and Mac. In this case you'll need to take special treatement of file handling if there is any upload and downloads. But doable.

    Also consider if you need (or want) to pay for the license to remove Unity splash screen or not. This can be pretty OK for a game but it's usually a no-no for a utility app.
     
    AlanMattano, eatsleepindie and Kiwasi like this.
  15. eatsleepindie

    eatsleepindie

    Joined:
    Aug 3, 2012
    Posts:
    348
    I once built a social networking app using Unity and a modified version of my multiplayer framework. Completely overkill but it was just for fun. I have to say that it was nice to be able to port to console, PC, mobile, etc. incredibly quickly for testing a lot of devices and accounts at once.

    Initial load times will definitely be longer than if you chose other means, but most people don't close down apps anyway, so it's a once in a while thing to wait for. I also find nGUI very easy to work with, especially when coupled with TextMesh Pro, so whipping up a basic UI and getting the basic functions in place was a fairly painless process.

    If you're loading a lot of WWW images [on mobile if applicable] you'll want to keep your memory as tidy as possible to prevent app crashes by ensuring you "clean up" as they move through the app. There are plenty of posts around these parts to help with that.

    Which ever path you choose, best of luck!
     
  16. guneyozsan

    guneyozsan

    Joined:
    Feb 1, 2012
    Posts:
    63
    Just because of this Unity sounds very charming for testing ideas in the wild. Then you can develop the actual application from scratch using a more convenient optimized platform.
     
    eatsleepindie likes this.
  17. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,082
    Since I'm making a game, my first plugin for this game is a non-gaming purpose app.
    [WIP] DAD
    I was able to make this app because it was much easier to make it in Unity. Using the new Unity UI as a software editor and component from the asset store, for a novice in software development like me, is simple and I like the idea that I can ship multiplatform. Also, using VR there is much more room for visual interface than a 4 or 8K monitor! Futuristic App

    I ask FontLab developers why they do not use Unity for the new non-gaming purpose app IV and here is the answer:
    Forum.fontlab.com flexible platform engine
    Looks like they use prefer Qt
    https://en.wikipedia.org/wiki/Qt_(software)
     
    Last edited: Oct 5, 2018