
Runtime Compiled C++ Dear ImGui and DirectX11 Tutorial - Impossible
https://www.enkisoftware.com/devlogpost-20200202-1-Runtime-Compiled-C++-Dear-ImGui-and-DirectX11-Tutorial
======
davedx
This looks really nice.

I still remember when I worked in game development back in 2004 or so, that I
made extensive use of Visual Studio's "Edit and continue build" feature at
work, and how it really helped with the feedback loop. It was a little buggy
but worked very well considering it was only a "debug" feature.

A few years later I worked on an even bigger game with an even bigger loading
time, and "Edit and continue build" no longer worked at all due to the
platform architecture of the game. It really, really hurt my productivity (and
motivation). I wish this project all success, it could help many people!

(Does Unity have something like this yet? I remember last time I worked with
it I loved being able to change the properties of objects at runtime, but
still missed being able to change the actual code...)

~~~
dindresto
It looks like Unity does support runtime editing, or rather, "hot reloading":
[https://docs.unity3d.com/Manual/script-
Serialization.html](https://docs.unity3d.com/Manual/script-Serialization.html)

I didn't know that prior to you raising the question, so I can't say how well
it works unfortunately.

~~~
diegoperini
In my experience, it only reliable works for singleton objects which have
changes in their method bodies. Any change in the memory layout creates random
null reference exceptions on each frame update.

~~~
moron4hire
It also depends on how you've designed your MonoBehaviours. If you have
anything dependent on resources retrieved in your Awake event, those
references will not be restored and the Awake event will not re-occur. So you
either have to check and reacquire the references in your Update event (which
is costly), or design everything around serialized fields that are set in the
editor, with no objects acquired during Awake (which is intractable for
anything but the most basic projects).

Unity is designed to get the basic demo feature of whatever you're doing done
as quickly as possible. But building a production-scale product is actually
harder than just writing from scratch, as there are a lot of stupid design
decisions in Unity that get in the way.

------
fctorial
Does this have any applications other than hot reloading?

~~~
dougbinks
The purpose of Runtime Compiled C++ is robust 'hot reloading'.

------
PaulDavisThe1st
I suppose I'm the only person who wondered if "DirectX11" meant that MS had
finally ported their flagship game APIs to the venerable Unix graphics system.

