tjheldna Posted December 2, 2013 Share Posted December 2, 2013 Say I have a tree model and place it in the world, would I be better off creating a prefab from that tree to create more, or is it just as efficient to keep adding the models in? Just looking for the best approach.Cheers! Quote Link to comment Share on other sites More sharing options...
waspzxz Posted December 2, 2013 Share Posted December 2, 2013 I would say go with the prefad, any time you use multiples of an object as in trees, rocks, box and so on its best to make it a prefab. Quote Link to comment Share on other sites More sharing options...
Josh Posted December 2, 2013 Share Posted December 2, 2013 They're both the same in terms of computational efficiency, but if you use a prefab you only have to set up physics and stuff once, and you can always modify that single prefab and all instances of it will be updated. So really the map designer should always be drawing from the "Prefabs" folder. The person designing the props should be preparing them as prefabs for final use. 2 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rick Posted December 3, 2013 Share Posted December 3, 2013 How do you modify a prefab and have all instances be affected? If I drag in a prefab to the scene and modify something it tells me it'll break the fact that it's a prefab. Quote Link to comment Share on other sites More sharing options...
tjheldna Posted December 3, 2013 Author Share Posted December 3, 2013 At the moment you need to keep the original in the level somewhere to be able to edit. I posted in a separate topic which I must not have worded properly and I forgot to respond to. It would be real nice if a prefab was created and edited like a world as mentioned they are basically a world anyway. For example you can open up or save as a prefab in the world editor, or a separate editor window, make your changes and then save. This would eliminate the need for a base model in the level too. Quote Link to comment Share on other sites More sharing options...
Josh Posted December 3, 2013 Share Posted December 3, 2013 How do you modify a prefab and have all instances be affected? If I drag in a prefab to the scene and modify something it tells me it'll break the fact that it's a prefab. Go to File > Open and choose .*.pfb for the file extension. Prefabs files are really just .map files with a different extension. It would be real nice if a prefab was created and edited like a world as mentioned they are basically a world anyway. For example you can open up or save as a prefab in the world editor, or a separate editor window, make your changes and then save. This would eliminate the need for a base model in the level too. Wow, documentation fail. That's exactly how it works. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
tjheldna Posted December 3, 2013 Author Share Posted December 3, 2013 Wow, documentation fail. That's exactly how it works. Ha, nice. Case closed Quote Link to comment Share on other sites More sharing options...
tjheldna Posted December 3, 2013 Author Share Posted December 3, 2013 Would be cool if you could go File->Save As .pfb extension as an option also. Just an idea. Quote Link to comment Share on other sites More sharing options...
Josh Posted December 3, 2013 Share Posted December 3, 2013 I don't do that because prefabs require one top-level entity. Maybe a check can be added in the future. But you can re-save a prefab file you opened. Quote My job is to make tools you love, with the features you want, and performance you can't live without. 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.