Jump to content
Rick

lua running from editor or engine

Recommended Posts

Was just thinking it would be nice if the engine.exe and editor.exe both created a lua variable so our main lua applications can tell where it's being called from. Different things need to happen depending on where it's called from and this would be a nice easy way of telling.

 

A few different things that I can think of depending on where the main lua file is being run from:

 

1. Create framework. If run from the editor we don't need to do this. If run from the engine we do. A check of fw == nil does work, but this would be an added support.

 

2. Load a sandbox map. When from the editor the map is the current map, but when from the engine you need to load a map. Knowing the main lua file is being called from the engine, we can then load a map.

 

I know we can check if the fw variable is nil, but that might not work in every situation. A person might not use the fw variable at all. Having the executable "pass in" a value indicating where it's called from would just be a more concrete approach in my view.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...