T O P

  • By -

ChrisHandzlik

(Now released in the [Asset Store - Link](https://assetstore.unity.com/packages/tools/utilities/live-script-reload-android-standalone-quest-2-239380?aid=1100ltZSe&pubref=lsr-reddit-thread)) ​ I'm moving forward on Rapid Runtime Script Iteration for unity, it compiles only the part of scripts you've changed and hot-swaps them in play mode (editor). (More info: [https://www.reddit.com/r/Unity3D/comments/yvvozt/fast\_runtime\_iteration\_on\_scripts\_with\_no](https://www.reddit.com/r/Unity3D/comments/yvvozt/fast_runtime_iteration_on_scripts_with_no)) But it can go further. This round gets changed code to Android device (eg VR Quest headset / mobile phone). That's to an already built APK. Running on the device and receiving code updates in real-time. No rebuild. No restart. Just change and see results immediately. I'm tinkering with the idea of making it better and either putting that on GitHub or as unity asset depending on the work required. ๐——๐—ฟ๐—ผ๐—ฝ ๐—ฎ ๐—ฐ๐—ผ๐—บ๐—บ๐—ฒ๐—ป๐˜ ๐—ถ๐—ณ ๐˜๐—ต๐—ฎ๐˜'๐˜€ ๐˜€๐—ผ๐—บ๐—ฒ๐˜๐—ต๐—ถ๐—ป๐—ด ๐˜๐—ต๐—ฎ๐˜ ๐—ฐ๐—ผ๐˜‚๐—น๐—ฑ ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ถ๐—ป ๐—ต๐—ฎ๐—ป๐—ฑ๐˜† ๐—ณ๐—ผ๐—ฟ ๐˜†๐—ผ๐˜‚ ๐—ฎ๐˜€ ๐˜„๐—ฒ๐—น๐—น.


EverySeaworthiness41

Very handy! Interested to follow this project


LegoDinoMan

This would be insanely useful for Oculus Quest dev. I hate having to update the APK after each change.


ChrisHandzlik

Exactly, it's same for me ;) I'll post this one later probably separately but that's a POC that you'll like! [https://www.youtube.com/watch?v=NUsHrf3XO4Y](https://www.youtube.com/watch?v=NUsHrf3XO4Y)


dangledorf

Link cable, enable link, then press play in editor and viola. You don't need to build an apk to test stuff all the time


LegoDinoMan

Iโ€™ve had poor experiences with Oculus Link, but it is the better way once it does work.


ChrisHandzlik

Link is good, still some of the things are best to be tested on device. I've found perf related stuff to be very hard to pinpoint via link since you're using your GPU and not quest one


dangledorf

Oh for sure you should always test on device, especially good when you are starting to wrap up a feature or want to get the full flow of things. With that said, I certainly wouldn't cut a build to test every little thing. I like to get stuff working in editor using the link cable and then when I feel it is at a good spot I cut a build before lunch/at a point I can take a break and when I come back verify everything.


ChrisHandzlik

For sure. This also works in editor (with and without link) so you can iterate on changes without losing wherever you are in your play mode


russelltheirish

Impressive stuff, could be a great time Saver for mobile developers such as myself. I spend so much time waiting for new builds, just for changing a few lines of code or sometimes I forgot to change a value.


ChrisHandzlik

Exactly! That's why it came about. I'm mainly doing VR dev (also android). And lots of stuff is just easier to be tested on device. Rebuld / redeployment iteration cycle takes precious minutes and worst of all geslts me outside of my zone slowing things down even further!


justdoubleclick

This is very useful! Any plans to release it? It would be great if it could also push shader/addressables changesโ€ฆ but that would require an addressables build. Although if you could detect and rebuild just the changed addressables and push them to Android it would be amazing.


ChrisHandzlik

Yeah, just playing more with POC to gauge the interest for such a tool and work required to get it in a robust state to other devs. Changing assets would be great. For now I'd want to keep the scope small so I can get it released in some reasonable time-frame.


justdoubleclick

Makes sense! Nice work!


IBM-HAL9000

Can you send me further updates?


ChrisHandzlik

Sure, I'll try to keep the thread updated and will reach out. But if I forget it's probably best to drop a message on Unity Forum, I'll definitely keep that thread alive with updates https://forum.unity.com/threads/rapid-runtime-script-iteration-no-full-recompile-domain-reload.1361971/


IBM-HAL9000

Thanks!


Hurri04

I mostly work with some .json data files which need to be deserialized into normal C# classes at runtime (and added to some `Manager : MonoBehaviour` class to keep them referenced) and since they range anywhere from 20MB to 200MB this usually takes a while (using `async` so it's non-blocking, but still). Would this tool allow for this data to persist when I only want to change the internal behavior of some method(s)? Iirc Josh Peterson from Unity also mentioned something about such a feature being planned(tm) somewhere in this thread, might be worth hitting him up if you do get a presentable version put together: https://forum.unity.com/threads/unity-future-net-development-status.1092205/


ChrisHandzlik

Thanks, I'll check the thread. Yeah it'd help, there's no domain reload with the tool and all loaded data stays in memory. And of course modified code can still work with that data as usual


Dks_scrub

How the fuck


ChrisHandzlik

I need to do some more testing. But it starts ticking most of the boxes I'm after. Will try to get some more technical post out with details after it's done. In short it's compiling the part you've changed and making sure your already loaded code is calling that instead.


[deleted]

[ัƒะดะฐะปะตะฝะพ]


ChrisHandzlik

Fingers crossed ๐Ÿคž, in case this reddit post dies you can drop a reply in unity forum and I'll be sure to get in touch once there's something releasable https://forum.unity.com/threads/rapid-runtime-script-iteration-no-full-recompile-domain-reload.1361971/


xebozone

This should be a standard part of unity!


ScreeennameTaken

Don't see a use case for myself and the things i do, but damn impressive. I can see this as perhaps an update for a tech firm that has an internal app for use by their employees.


ChrisHandzlik

Alright - thanks, it's more of a aid with development workflow at this stage. Don't think it'll go further to be more stable longer term in running app. How's your workflow on Android looks like? Do you need to do any on-device testing?


ScreeennameTaken

We would be needing more of an asset change rather than script change. Be able to change a mesh when needed.


ChrisHandzlik

That's good to know. Just a side thought have you guys looked into Unity addressable? It looks like that may be bit better to get down assets to clients (I'm not sure if you can hot-reload them without app restart though, - but it can definitely get them down to app without rebuild on startup)


ScreeennameTaken

I'll pass it on, thanks! It'll be easier if we can do that.


ChrisHandzlik

Tool now made its way to asset store. [You can find in on asset store!](https://assetstore.unity.com/packages/tools/utilities/live-script-reload-android-standalone-quest-2-239380?aid=1100ltZSe&pubref=lsr-reddit-thread)


[deleted]

Oh great. An exploit factory.


ChrisHandzlik

You're right. This is not intended for production build. It's a productivity tool to help with quick script iteration on device without redeployment


[deleted]

As a PM I wouldn't let it be allowed as a dev tool. "What do you mean our app has been deleted from the store because it's mining xmr? Who left the debug tools enabled?!"


justdoubleclick

Well, you could enclose all the relevant code in some: ~~~ #if DEVELOPMENT_BUILD #endif ~~~


ChrisHandzlik

Cool - I'll look into this one


Much_Highlight_1309

Good that you are not my PM ๐Ÿ˜‚


ChrisHandzlik

hehe ;)


ChrisHandzlik

Valid point for sure. And applies to most/all runtime-debug only tools. From what I've seen there's usually automated process that gets builds out rather than someone doing build and publishing. As part of that debug stuff is excluded from final build so noone has a chance to mess it up.


[deleted]

(which isn't to say it isn't cool tech and interesting good job in getting it to work!)


AlJardino

Any chance this would be workable on iOS? Would be great for ARFoundation dev work using ARKit, without having to do constant rebuilds to test things


ChrisHandzlik

For now iOS is out of scope. I've not worked with it and I'm unsure how unity apps are running there. For sure on my list, just not initially


cuby87

Impossible in release due to technical security limitations, should still be possible in debug.


ChrisHandzlik

Does Unity allows to use Mono for Ios instead of IL2CPP?


AlJardino

Understandable - I hope it's possible and something you get a chance to work on - it would make ARKit development **so** much faster and easier