I got it so levels can reset, which was simpler than I thought it would be, but was still a bit intimidated by the prospect of revising the entity editor so it worked with the new paradigm. Fortunately something else came up and I didn’t have to… yet.
The behavior system I use involves reading class data from xml files and then generating the appropriate behavior for use in runtime. There’s a problem with this that didn’t come up in testing: This only works if the class itself exists in program memory, and that only happens if I’ve explicitly imported it for use in the program. When I was testing all of this stuff out, everything was active in memory because I had test instances up and running to make sure everything worked, but now that I’ve deleted all of that stuff it means it couldn’t find the class information when it tried to generate the entity from its prototype.
It turns out that haxe’s importing scheme is lazy, and only actually generates the class data if something is explicitly imported — just using a wildcard import of the entire package didn’t help at all. Fortunately, they thoughtfully included a set of macros, among which was one which allowed me to recursively import the entire package of all existing behaviors. This means that any behaviors I add in the future should be automatically included, and all should be usable in the entity editor. It wasn’t what I had in mind for today, but it’s not bad for a day’s work.