Run Editor script directly from game

Hey everyone,

How would you run Editor.as script directly from game ? Is it even possible ?
I would like to be able to run it from my game where my components are registered without need to recomompile Urho3DPlayer

Thanks

If all you need is the editor running, you should be able to do it just like Urho3DPlayer does. E.g.

ScriptFile* editorScript = cache->GetResource<ScriptFile>("Scripts/Editor.as");
editorScript->Execute("void Start()");

What actually happens is that the editor will pretty much overwrite any state you have set into the subsystems on your own, e.g. viewports, so actually getting it to sensibly coexist with your game is another matter.

Aha, thanks a lot,
So how would i proceed if i want editor to coexist with my game ?

Or better yet, what are some drawbacks running editor from a game ?

That’s very non-trivial task. It’s not directly supported now, but some people have made few steps towards it.

Thanks. What i want to achieve is to use Editor to quickly iterate when developing Components.

You may by interested in this: