Can you create a “Prefab” type object in UE4 like you did in UE3/UDK? What I am in need of is a way to create a group of actors (i.e. Wall meshes, lights, decorations etc) in a library and then use them in my level. I’ve tried doing this with bllueprints but they seems to be killing my game play frame rates.
Hi Demolition Man,
Yes you can do this by creating a Blueprint component. This can be like a “Prefab”. If you check out this video you can get idea of how it works. You can even use BPs to affect these objects.
When I tried doing this, what happened is that my frame rate dropped by about 10-15 fps! So my question is do a massive number of blueprints in a level create massive overhead? The level has 115 actors in it of which I guess there’s probably 30 unquie mesh types in use. I am using point lights
Here’s another interesting question about using Blueprints as a replacement for UDK’s prefab item. How would you access the materials within the blueprint definition? In my case, I have a blueprint with four walls, a floor, a ceiling and a room light.
Do you mean access materials within the blueprint graph sequence? Or do you mean access them for your components e.g. wall mesh, floor mesh, roof mesh etc?
You can apply materials to your various components in the components section of the blueprint.
As for accessing materials from your blueprint graph sequence, I believe if you create a material with parameters you are able to reference these parameters in your blueprint, such as a scalar parameter. Not 100% on that though… someone else may want to chime in.
You guys from Unreal should have blue text or a special distinguishing user feature that marks you out as Guys from Epic. Makes it easier to spot you in a crowd :3
I was trying to access the materials of components within the blueprint (i.e. Walls and Floors). The idea was to create a series of blueprint that would build hallways and entire rooms at a crack. But with this limitation all I can do is build them with one set of materials that I selected at the time of creating the assets. I was really hoping to be able to replace those base wall and floor materials with something different. Also, I’ve notice that those assets are placing in the map with a purple color. Is that to designate that they are part of a blueprint?
you can expose the materials via the blueprint as a variable. So when you drop the blue print you would then go to details and select the relevant materials that have been exposed.
This seems to have worked like a charm! It took me a while to figure out that this needed to be in the construction script for the blueprint but once I tried it out it did the job flawlessly. Thanks again for the idea!