cassius Posted April 26, 2014 Share Posted April 26, 2014 What are the advantages of turning a model into a prefab? Prefab were broke in 3.0 so I have only just started to consider them. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
MexSource Posted April 26, 2014 Share Posted April 26, 2014 I think when you save a prefab it saves the scripts and all settings too of that model. So you can load that prefab and you already have your script's on it etc. Quote C++ :3 Link to comment Share on other sites More sharing options...
Josh Posted April 26, 2014 Share Posted April 26, 2014 And if you modify the prefab later on, you don't have to go back and change all the instances of it in your map. Like if you decide you want the mass to be a different amount, or change the color of a light, you can just change the prefab and all maps will load that value. 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...
cassius Posted April 26, 2014 Author Share Posted April 26, 2014 That's great.Looks like I will be doing more prefabbing. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
cassius Posted April 26, 2014 Author Share Posted April 26, 2014 When converting a model into a prefab do you have to keep the original model and its textures etc? Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
josk Posted April 26, 2014 Share Posted April 26, 2014 Yes, someone let me know if I'm wrong as that's what I have been doing, Quote Elite Cobra Squad Link to comment Share on other sites More sharing options...
YouGroove Posted April 26, 2014 Share Posted April 26, 2014 Yes. A prefab is only a shortcut to grouped object / scripts / materials etc ... it is a little file of 1Ko. You change something it will change your prefab. I use prefabs only when it's needed, caus in LE3 if you keep CTRL and move some entity with script and other child object, you create automatically some instance without needing to create a prefab. The big advantage of prefab is when needing to instanciate or create a prefab by code, this is one line of code to load it, so you don't need to manually load model and it's materials,scripts, child entities by code. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
tjheldna Posted April 26, 2014 Share Posted April 26, 2014 You can open a .pfb file like a .map file. Once opened, you can add more entities etc you need to make sure it's a child of the original node and to re save you still need to right click on the original node and save as .pfb. Quote Link to comment Share on other sites More sharing options...
Josh Posted April 27, 2014 Share Posted April 27, 2014 When converting a model into a prefab do you have to keep the original model and its textures etc? Yes, it just refers back to the originals. The way I see this working is you've got one guy who just takes models and adds scripts and behavior to them, and gets them ready for the map designer to use in different scenes. The prefab maker can update his stuff at any time, and the maps will all be updated to match. So this allows different people to work together at different levels to make stuff. Even if you're working alone, it's a good idea to first make a few interactive prefab pieces, and then reuse them throughout your scenes, rather than doing everything from scratch in each map. 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...
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.