What’s new in Prefab Tool 1.0.6
1.0.6 ------------------ * Add Stamp Prefab option to level editor context menu to spawn disconnected prefab actor * Add Replace Selected Actors with Prefab to context menu as a replacement of built-in "Replace Selected Actors with" function * Add Change Prefab option to context menu * Add "Replace Actors With Created Prefab" option in Prefab editor setting * Add Prefab Component Visualizer * Now generated blueprint will inherit mobility setting from prefab * Add workaround to persist painted vertex color of blueprint instances inside prefab * Fix ensure issue in generated blueprint * Fix bug when creating a new prefab out of a prefab and immediately placing it will cause the contents of the original prefab in the scene to disappear * Fix bug circular nested prefab might be created when applying prefab change * Fix bug attempting to create nested prefab when nested prefab support is off * Change Prefab editor module's LoadingPhase to PostEngineInit * Minor code refactoring
The “Replace Actors With Created Prefab” and “Prefab Component Visualizer” options could be turn on from Prefab Tool editor setting.
Prefab Tool 1.0.7 feature sneak peak - Selection Lock
Coming to 1.0.7, you can now lock selection of prefab actor. It works kind of like group, once locked, you can’t select any children actors.
( It’s probably the most requested feature, the original plan is to implement it through built-in group actor, but at the end decided to go with my own implementation. )
Prefab Tool 1.0.7 update is now live on itch.io. Marketplace version submitted.
1.0.7 ------------------ * Add Lock Selection feature, now spawned prefab actor will be locked/grouped by default * Add context menu and hotkey to toggle lock selection * Enable Prefab Component Visualizer by default; Now draw darker wireframe box to indicated lock status * Add Select children actors to context menu * Stamp prefab will now disconnecting all chidren prefab actor * Add Undo support for hide/lock prefab actor through context menu * Add 4.18 support; Drop 4.15 support
Do Prefabs work with custom C++ components built off an Unreal engine built from source?
I have actors with custom components (C++ blueprints) built using a custom Unreal engine 4.17. The components access parts of NVidia PhysX that are not available through the general build. If I build prefabs from standard actors and these custom components, do you foresee any problems? I want to use the prefabs in a way similar to the way we’ve used them in Unity.
regarding - 1.0.6 Update
Holy cow!!! :eek: Everyone on our team is totally blown away by the extraordinary attention from you to our requests and bugs. We greatly appreciate your work!
@jkraptor Sorry that I somehow missed your post. For prefab with custom c++ components it should works just fine as long as properties of your c++ components could be serialized (with UE4’s default serializer). E.g. if you can copy and paste the actor with the custom c++ component, you should be able to save the actor inside the prefab as well.
@Denis.Korkh, so glad to hear that Hope seeing your works!
We modified the uplugin file to remove the WhitelistPlatforms for the runtime module. I’m not sure if you had a reason for doing that or not, but with that setup it does not work on a console build.
Oh, the only reason that WhitelistPlatforms line was added to the uplugin file is that it’s a requirement when submitting code plugin to Unreal Marketplace. I think Epic is using that info to build necessary binaries when staging the plugin for marketplace download.
Hi, I’m setting up discord server for all my tools:
Please feel free to post discussion / feature request / bug report in either place.
( I’m travelling from 14.Nov 2017 to 1 Dec.2017, and will be more active on discord when I’m back.)
First of all, thank you for creating this tool and for me it’s been of great help so far.
Well, I say so far because I’ve just discovered a potential issue. I need to deliver my project to the client soon and I’ve just figured out that when I package the game as an executable, all prefabs stored in content and loaded from there by my blueprints (I spawn prefabs in runtime) don’t show up in the executable. The issue is that the prefab has 0 children in it and hence can’t spawn them. Am I doing something wrong here?
This blueprint is placed in the scene and has array reference to prefabs which are then spawned using spawn actor and assigning a prefab to it. It works in editor no problems, but not in executable. Also, when packaging the project, I packaged the map with directory which stores prefabs.
Is there an obvious solution that I’m missing here?
Still love your tool!
Noticed another issue;
- Drag a static mesh asset into scene (turns into static mesh actor)
- Right-click in content browser, create prefab (from the new static mesh actor which is selected)
- Save prefab, place in level.
- Rename the static mesh asset.
- Place prefab in level again - it’s static mesh actor child will not have a static mesh assigned.
- Reverting the previously placed prefab also unsets the mesh from its static mesh actor.
Your tool is the best.
But really, great work! Our team uses it a ton and loves it.
@Denis.Korkh I can’t reproduce the issue your encountered in 4.18. May I ask what engine version are you using? (and have you update Prefab Tool to latest version?)
I am having an issue with the plugin not allowing me to create new prefabs. I can select the Prefab filter, to allow me to navigate only prefab actors in my content browser, however, when I right click in the browser, there is no Prefab tab. I notice it should appear under “Physics” and above “Sounds”, but it does not show up in either the “Create New” button, nor under the right click drop down. I am hoping you know the quick fix. I have of course, activated the plugin in the plugins tab.
Thanks for your time
Plugin Version: 1.0.7
Engine Version: 4.18.2
Hi @Rallii Have you select any actors in the level before right click on the content browser?
A prefab could only be created with at least one actor been selected.
Strange. I’m using UE 4.18.2 and Prefab 1.0.7
I double checked my repro steps and still get the same result. (regarding renaming the source static mesh.)
The only thing I can think of is that if one were to do this to a static mesh which is referenced by other assets such that it creates a redirector - I imagine the repro steps wouldn’t produce the same bug since the prefab would point to the newly created redirector. In my case, no redirector for the source mesh is created since no other assets reference it. Hope this helps.
I walked through it a little and have found that the PrefabContent string contains the old source mesh name after the rename.
The prefab which is already placed in level during rename is handled properly but changes to it aren’t propagated to the asset - if I hit apply on the already placed prefab after source mesh rename placing prefab of that type works after. In summary, renaming source mesh fixes references in prefab instances already placed in level but not the asset version of it in the content browser.
I think I found the problem and it has to do with not saving the level during any of the steps. If I save the level even just after placing the original static mesh, before creating the prefab everything works ok. I stumbled on it by looking at where it was getting the content string and it appeared to be looking through the level for the static mesh actor archetype definition which still had the old mesh name. So I suppose I stumbled into an edge case - I don’t imagine this would come up often.
@Denis.Korkh Thanks a lot for your detail repro steps! I just found out that in 4.18 there’re extra quote string for asset’s path which causing asset references tracking failed. I’m working on a fix for that.
No problem, thank you for being on top of it! I have an unrelated thought as part of making a prefab best practices for our project and figured I’d share.
In addition to using prefabs for organizing arrangements of props, our artists were asking for this sort of tech in order to be able preserve the ability to make project-wide changes to a single arrangement of props. Example: given a prefab of a tree stump w/ rocks and flowers around it we may want to tilt the stump at an angle to give it attitude.
Prefab allows exactly that but the problem on a bigger project is you never have full knowledge of the context of any given instance of this stump. Suppose somewhere in the project an apple was placed on the tree stump which would now probably either intersect or float above the tilted tree stump. So its a very tempting practice but I think its dangerous on a large project and may discourage it. An interesting feature which may help this problem would be a way to render out a snapshot of each place some prefab is used. It may be challenging to have a general solution where to place the view for rendering the instances. One way might be to allow a prefab to have a thumbnail scene node/camera which can be adjusted by the artist for this purpose. For my example (tree stump and flowers) I might arrange the camera overhead. I’m tempted to hack something like this together but it may also be an interesting feature out of the box.
I’m encountering issues regarding the “Generate Blueprint” feature!
When I create a Prefab composed of StaticMeshActors and “Generate Blueprint” out of it, it generates a Blueprint with Child Actors filled with StaticMeshActors instead of creating a Blueprint with Static Mesh components.
Another issue I have is the “Generated Blueprint” reference is lost when I remove the Prefab which originally generated it off the map. Replacing the Prefab gives me an unconnected Prefab and I have to manually reconnect the Prefab and its Blueprint.
And something I would love to see added is to be able to specify an array of actor class that I would like the “Generate Blueprint” feature not to add to the generated Blueprint. I’d like to specify this in a global way.
I was doing a series of tutorial about building a Diablo-like dungeon generator and I really counted on that feature to streamline the level design process. I made a video about using Prefab Tool and in the middle of it I realized these two bugs were kind of ruining the perfect workflow Prefab Tool can offer
I love the work you’re doing, hope you’ll get everything solved!
Good luck and have fun everyone
“Generate Blueprint” currently will always create child actors for every actors inside the prefab. In next update, I’ll add an option to try harvest components instead of creating child actors. (Thanks to the code contribution from you and your team!)
Generate blueprint reference currently is stored inside prefab component but not in prefab asset. The original thought is that one prefab could be used to generate multiple version of blueprint. But that seems over-design and causing confusion. I’ll also change that in next update.
The “Ignore Actor Classes” is a great idea. Will working on that.
Sorry that somehow I totally missed your reply. For the scenario you described, I think maybe adding a new prefab usage window, containing a list of prefab actors, so artist can navigate through the list, and the level editor viewport will zoom to selected prefab actor automatically to make it easier to spot any placement issue.