One of the things that intrigues me in Unity is it's Entity-Component system and how it handles scripting. When you create a C# or Javascript and attach to a GameObject in Unity, several methods from that script are called. onUpdate, onAwake, onLateUpdate, etc.
Does anyone have any ideas on the possible implementation of that in a custom ECS? Is there a ScriptingSystem, which pre-interprets all scripts on boot, and then calls those methods on each frame? The ScriptingSystem has several calls from the game loop, for each event (method attached) on those scripts (update, late update, awake, etc.)?