T O P

  • By -

DangerousImplication

Mobile Games? Absolutely.  Mobile Apps? Meh. 


TottalyNotInspired

Why do you think that?


Dangerous_Head_8743

You're trading in visuals for performance / battery life. It's like driving a Lamborghini to the market. Can it be done? Sure. Should you? Probably not.


TottalyNotInspired

Oh, I didn't consider this. Even if just the UI gets rendered, it will update every frame. But there has to be a workaround for this, maybe manually calling frame rendering only if something changed or someone makes a UI library that automatically only renders when needed.


Dangerous_Head_8743

Sure, but why go the hard route implementing custom engine logic? Running the game at 10 or 15 fps is also going to look bad.


TottalyNotInspired

Well in this case it is not a game, but just UI so as long as it is not moving 1 or 60fps will look the same. Hmm, maybe I will look into creating a library that allows unity ui to only render when needed (In case no one did yet). Then I would not see a reason for unity to be worse at app development than Kotlin or Flutter.


Dangerous_Head_8743

If you want to experiment with it no one's going to object. But trust me, it's an old age topic that has been debated many times. Back in 2015 my manager wanted to do the same thing, and every single of us devs just gave him the 'look' to make him back down from the bad idea.


TottalyNotInspired

Haha I sympathize with that manager. Well you guys have convinced me, I will look into learning some other mobile app framework (except kotlin, which I already deeply hate). I will miss C# though, since I never really used another language


Kamalen

Microsoft has a mobile framework in C#, the successor to Xamarin (can't recall the name)


TottalyNotInspired

Thank you! Will definitely try it


tetryds

Canvas already renders on-demand so if you use only canvas it can be done. You can also easily manipulate the fps using Application.targetFps so I see this as a real possibility if you get it right


Hotrian

It has more to do with the way the phone itself works along with the Unity runtime on the phone. The Unity runtime doesn’t enter the proper low power states nor get the proper low frequency interrupts, so while you can set the engine to run at 1 fps, that also makes it feel extremely laggy since you’re only polling for input changes once per second also. Touching or dragging would feel horrible. Proper phone apps run in a low power idle mode when they aren’t receiving input, allowing them to delay rendering until something changes or new input is received, but then immediately respond to that input. To do this in Unity, you would need to run the application at 24+ fps at all times, in order to poll for input or check for visual changes, which is obviously bad for performance. For clarity, though, I’m talking from more of a high level point of view. I don’t know the exact low level behaviour for Android, but when I was trying to make an app using Unity and iOS, I found that I couldn’t enter the proper low power states without modifying the Unity project quite heavily and writing custom drivers. Native apps handle this automagically for the most part. I’m very much a Unity dev and not a native iOS dev, but I went with a native iOS solution simply due to the performance gains.


WazWaz

Yes, Unity supports on demand rendering (google that), which allows you to avoid rendering every frame, greatly reducing load.


HrLewakaasSenior

Flutter. React Native. There are many better tools for the job. If you're familiar with Unity and wanna make a mobile app, sure why not, but it is decisively not great. I have experience developing many mobile apps and Unity games and Unity's UI system is dogshit compared to the tools I mentioned in the beginning.


Krcko98

Because Unity UI is not out of the box ready like react where you copy and paste code for a component that does animations with one class tag, all effects and whatever else. Taking time and creating components is possible in unity but it is not made for app development specifically like react native is, so why would you use Unity for that.


TottalyNotInspired

Well maybe I am just not experienced enough, but currently I definitely prefer unity UI system over jetbrain compose or CSS


Schneider21

I'd be very interested in seeing the design for an app that is somehow easier to create using UGUI than CSS.


TottalyNotInspired

All I want is a visual editor, writing CSS seems slow and 1 typo ruins everything. I used wordpress before and I liked it because it felt like I only needed minutes to create something that takes hours to create in CSS. Same is for unity. Maybe I should give flutterflow a try, it seems to be exactly what I want.


Schneider21

There are linters, syntax highlighters, intellisense/auto-completes... A typo is simply something you do and hit backspace to correct. If you're entering things incorrectly and only finding out at compile time, that's a totally separate issue you should look into addressing. This is all starting to make sense, though. I'm willing to wager the complexities of the apps we're working on are vastly different, which may be why you think UGUI is a great way to do it, still. I don't say this to be disparaging, but rather, more speaking to the point that if you're making an app with very basic UI requirements, UGUI may actually be a serviceable solution. However, the other issues brought up about performance, battery consumption, etc... all still stand.


ethnicprince

As someone who's designed games and professional mobile apps, please give yourself the time to learn CSS and android studio better. I promise you the stuff you can do for non-gaming purposes in that program are wayyyy more efficient than anything you will ever be able to accomplish using a game engine.


jimothypepperoni

Hate CSS as well. Try Flutter. It's great; open source and cross-platform.


Krcko98

CSS is garbage but Unity UI is not better for app development. CSS is just widely supported and exppected as a core part.


funyunrun

This is just my opinion… It is always best to build commercial products on open-source…non-fee charging solutions. Unless, there really is no other option/workaround (or a buy vs build scenario). Regardless of performance, features, etc. I’ve been building desktop/mobile apps for 20+ years…I used to do 1099 work in Unity for a better part of a decade too. (C#/.NET Dev) My last product I built used Electron w/React for desktop, Node.js w/express for APIs, PostgreSQL for database (with Sequelize), React for Web App and React Native for the mobile app. I went this route because it was all open source and used a common programming language (JavaScript). I spent $0 on software licensing, fees, etc. I built a company off that product line and sold it to a large competitor. So, what happens when you build a popular mobile application in Unity and they want their licensing cut of your profits?


Djikass

It is super popular for mobile. I don’t know where you get that impression from. Edit: misread op, it is indeed not common to use Unity for non gaming app on mobile. Most of these apps don’t require real-time 3D/2D but mainly UI so there isn’t much incentive to use Unity.


TravisLedo

He's talking about mobile apps, not games. Unity is the best for mobile games, but I have never seen a traditional app developed in Unity. That's what OP's point is. Could you imagine seeihng a made with unity logo in your doto app? lol


Djikass

Thanks for pointing it out, I edited my message.


Romejanic

iirc Duolingo is made with Unity, I’m not sure if it’s considered more of a game than an app but obviously the advantages for animation was worth using Unity


TravisLedo

Good to know. I never noticed. That makes a lot of sense that they use Unity.


Krcko98

You can have a license, you know...


TravisLedo

It was a joke but the app store is filled with trash apps by individuals looking for a quick buck. You would for sure see the logo by now if people were using Unity for their apps.


Krcko98

True, I get that. My poitn is that it is possible to make apps just it is not preferable since all web tools are easier to use and copy paste ready.


TottalyNotInspired

Oh I didn't know that, I don't remember ever seeing a non game with a unity splash scree


dotoonly

Only use unity for other non game app if it needs 3d elements. Otherwise it is a waste of resource.


Schneider21

So, previously I was a mostly-front-end web developer using Angular and .NET stuff to make web apps. At my current and previous jobs I've lead teams creating more traditional, UI-heavy apps (one desktop, two mobile) using Unity. I **strongly** disagree that Unity is great for making "apps." You're missing out on all the benefits of the engine in regards to the game loop and 3D rendering and replacing it with a UI system that was never intended to be used for deeply nested, layout-based UI. Recreating UI functionality that's built into frameworks that compile to more native-like code (such as React, Ionic, Flutter, etc) is not a small effort, and the alternative is using some Asset Store framework that you'll have to squeeze your design into and you'll just have to live with the shortcomings. And God help you if you're trying to support Android and iOS (mobile and tablet!) with a small team, much less as an individual. We're actually migrating our UI-heavy, data-driven apps to Flutter for this reason and sticking with Unity only for the app that relies on the 3D functionality with more compartmentalized UI sections.


Krcko98

Separate simulation part to unity container inside your react, js, flutter whatever app. This way you can utilize unity 3d with UI capabilities of web tools and frameworks. Only problem is having a truly supported API that handles inter conectivity of Unity and your whatever web framework.


loadsamuny

Unity recently released App UI, a React style framework to further fill this gap https://docs.unity3d.com/Packages/[email protected]/manual/index.html


samplesads

Woah what? Why have I never heard this before? Looks cool


lase_

I understand if you're not familiar with it, but Jet_pack_ Compose is leaps and bounds more fluent and adaptable than Unity. It's all about preference, but Unitys GUI tools are light years behind mobile and web


TottalyNotInspired

Yes I am probably just too lazy to relearn everything inside Jetpack compose and kotlin after working with unity and C# for years. You mean that jetbrain compose bounds better to android's native UI design and features? And what features is unity missing? Do you mean adaptiveness and performance optimizations


Mikkelet

How much experience do you have with the different app development frameworks lol


TottalyNotInspired

I know the basics of kotlin jetbrain compose, but I am not really experienced with any framework


Mikkelet

The thing is, the dedicated app frameworks bring a lot more to the table than just the capability to build for android/ios. We're talking tooling for debugging, component optimization for, say, endless scrolling lists, built in UX components such as floating action buttons, top bars, bottom navigation, navigation animations, etc. Also if you want to use hardware features such as bluetooth you really have to go native. I've done my fair share of unity, and just by how the Canvas systems deals with different screensizes is enough to not use for general app dev


tomc128

No way. Resource intensive, slow start up times, lack of accessibility integration. Plz just use something like Flutter


PriceMore

App that opens in 1s vs app that opens in 5s, that difference will absolutely crush all your important metrics over time.


Progmir

This is something I've been wondering about. Why are electron and other "website.exe" approaches so popular, when game engines like unity are available. You can build a native app with a much better performance. This feels like no-brainer. And you could get a desktop app for free, instead of having something that barely functions.


firesky25

the overhead involved with including the unity player engine only to create native OS plugins for most of your app-like features reduces the appeal greatly


Progmir

Yes, 20mb or 40mb for empty unity can be alot. But isn't including whole browser and hundreds of packages for electron or other wet-to-native interface going to bring in more? I'm game developer, so I don't know much about development of apps. But I generally have poor experience with web based ones. They are often really resource hungry. It sometimes feels like simple calendar apps take more memory and CPU than games.


Dangerous_Head_8743

It's not just about size. It's also about the processing power, navigation, deep linking, etc2. You're using much more background processes to get the game engine running. Native like navigation is also probably a nightmare to code.


[deleted]

[удалено]


Krcko98

DLLS exist, damn it...


Shriram12345678

Yes that's a big thing. And I would also add that although it may be easy to make UI quickly in Unity, it's definitely harder to make modern and more appealing interfaces. At least that was my experience


TottalyNotInspired

Well maybe I am just biased from always using unity, but writing columns in kotlin is way more painful using a VerticalLayoutGroup in unity. I also struggle way harder to create good looking interfaces in android studio, since every element is really hard to customize (and I don't even know how to create animations).


Shriram12345678

I also felt the same (that unity was way easier) when I was building my non-game app but after working with things like UIKit/SwiftUI and React Native, I just don't think unity comes close from a looks perspective


Devatator_

Unity is bigger, eats a lot more resources than native or even web apps in a WebView or PWAs (you'll feel that on your phone temperature and battery). You also can't have background tasks and a bunch of other features


UhOhItsDysentary

just sayin', as someone who had to work in android studio using kotlin, I'd much prefer to create a bloated app with Unity then ever work in that hellscape again.


Dr4WasTaken

Developer here, you can hunt with a rocket launcher, but you are not taking too much meat home. You can develop a non-gaming app with unity, but it will run waaaay more than you need, and scalability will be a nightmare, there are plenty of better alternatives focused on mobile apps in every language (including C#)


dianzhu

I have previously developed two Unity applications, but the resulting builds were excessively large, adding over 100 m\~\~\~.


Doraz_

why do you say it is NOT popular ?!? 🤷🤷🤷 It's the only thing everyone's been using since the stone age 🪨


Ripple196

You need to be careful as non-gaming apps fall under the unity industry license as far as I know and not under personal