Jump to content
Niosop

Prefab support

Recommended Posts

I'm working on a game in LE and Unity in parallel (Unity for lower end hardware and web deployment, LE for downloadable version). The major thing I'm missing in LE right now is prefab support. For instance, I make an ambulance with flashing lights. In Unity, I drop in the ambulance model, then position some lights visually, tweak the settings, then make a prefab out of it. Quick, easy. In LE, I drop in the ambulance model, edit the Lua file, create the lights in code, position them in code, save, tweak position, save, etc. Takes a LOT more time. In retrospect I could have saved some time by adding bones or empties or something to the FBX to help position the lights, but it's one more step that could be avoided.

 

Do you think adding prefab support to the editor would be in your short term roadmap? I know it's been mentioned in the forums before but I'm not sure if it was in the Feature Request forum or not and I don't think Josh ever responded to that thread.

Share this post


Link to post

This would be interesting. The ability to save off multiple objects combined as a prefab. I wonder if there would be any way for the community to do this vs Josh doing it in the editor code.

 

Maybe we could have a prefab object. You set the targets of the prefab to all the other objects you want combined together. Then in the settings of the prefab you could have something that saves a new object out there.

 

For this to happen we would need the ability to create an object from lua code. I'm not sure if we have that ability.

Share this post


Link to post

Yeah, I think this is a good idea. Maybe an SBX can be saved as a model + automatically generated script. Until then, I recommend creating pivots in the mesh, and then using FindChild() to see where the lights should be positioned.

Share this post


Link to post

As not to confuse the level with a prefab, could it be more like a self-contained .PFB or something file.

 

To me it seems like it would be an SBX file, but minus all the terrain and extra stuff, and containing some relationship settings (joints, relative positioning, etc.).

Share this post


Link to post

I am someone who has asked for this feature in the near past too. I think this would be an incredible feature!

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...