Rick Posted January 11, 2010 Share Posted January 11, 2010 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.