Prefab Tool - Prefab Support for Unreal Engine

@Yun-Kun, sorry for the issue you encountered. Prefab Tool should be able to deal with redirectors behind the scene, but there was a bug that prevent blueprint redirectors been fixed when it’s renamed. Thanks a lot for bring that to my attention. I’ll make a quick fix build to itch.

Regarding your 2nd question, say if you have a prefab contains 2 actors, do you mean create a blueprint with 2 child actor components, or you mean create a blueprint with components copied from these 2 actors?

Prefab 1.0.2 Updated. Get it from itch

Change Log

@Yun-Kun, to fixed the blueprint rename issue with 1.0.3 version:

  1. Rename Blueprint Asset back to original name when Prefab was created
  2. Drag the prefab to level, verify if it’s in right state, then click “Apply” to update prefab content
  3. Then you can rename Blueprint Asset to new name, and fix up redirectors

Let me know if there’s still any issues

Wow, so fast and efficient! Thank you very much for your quick answers and the bug fix!

We’re going to check it out tomorrow and I’ll let you know how it goes :slight_smile:

I mean create a blueprint with components copied from these 2 prefabs.

The idea would be to convert the prefab into a Blueprint actor (in the limits of what can possibly be transfered this way).
Each component of the prefab would turn into a single Blueprint of the Actor type (much like the “blueprint -> convert selected actors to blueprint class” feature).
It would give me an Actor Blueprint with all components that were inside the prefab initially.

Hey @ -

I am using a plugin called HammUEr right now.

Would Prefab Tool support meshes imported by hammUEr?

Just curious here.

@HeadClot, Prefab Tool works with actors, so as long as you can drag meshes into levels, they can be turn into a Prefab.
@Yun-Kun, I see. Like the idea, added to todo list :slight_smile:

Hi @,

The more I look into this tool the more interested I become :).

Just wanted to ask - On your initial post you say “Apply changes of Prefab to all Prefab instances.” Is this optional? In other words, say I create a house prefab with a blueprint actor of a door. The default door is locked (bool), but I want to unlock a specific door (on a specific instance of a prefab). Will I be able to simply deselect the boolean on the door from that one instance in editor? Or will any change to any actor inside a prefab automatically propagate to all prefabs?

Also, I want to give a vote for @Yun-Kun’s suggestion - if you are able to easily convert a prefab to a Blueprint actor (and keep the exact hierarchy etc), then we can convert our prefabs to BP Actors to be able to spawn them at runtime! This will also take care of [MENTION=28980]Ali Akbar[/MENTION] 's suggestion and can be used with Dungeon Architect -which coincidentally I just bought from the Summer Sale :slight_smile:

Just some suggestions - keep up the good work!

@CoquiGames,

In your house prefab example, say if you have 10 instances of the house prefab with default locked blueprint door actor, and you just changed one specific door to be unlocked, here’s what might happen:

28431814-35612ff8-6db8-11e7-87e2-f08e4762902b.png

  • Click “Apply”, all 10 houses will have their door unlocked
  • Click “Revert”, current door will be reverted to locked
  • Check off “Connected”, the door will be remain unlocked. (But it’ll not receive any updates from the house prefab afterward)
  • Do nothing, save the map and re-open the map, that specific door will be reverted to locked. (Unless the “Update All Prefab Actors when Open Map” option is unchecked)
    28431817-3807534a-6db8-11e7-91cf-af46a7b3a96c.png

As converting Prefab to Blueprint, thanks for the suggestion. I’ll do some test see how feasible it will be. (Not sure if ChildActorComponent supports hierarchy)

I see, thanks for clarifying @!

@:

There is an awesome plugin called Dungeon Architect. It has Snap module that requires dungeon modules to be BP actors. As-is, it’s really messy to be building modules using static meshes (or anything for that matter) inside BP Editor. Would your Prefab plugin make the task of building such BP actors (modules) a breeze?

Basically making a modules as part of the level in the Editor, then combining selected assets into a BP Actor and then edit it, if necessary, right in the Editor and not BP Editor ? (by edit I mean add/remove/move/rotate/scale components)

Thanks

Hello there :slight_smile:

Guys I’ve read you on both threads (DA and here) talking about “Modules” and “Maps”.

I’ve built a lot of them for Sacred Swords.
And we’re also building lots of them for our incoming FPS game.

None of this would have been possible without Prefab Tool. I didn’t have it while working on Sacred Swords and as you mentionned @motorsep, working within the Blueprint Editor is a big no-no (I did nevertheless).

Now that we’re working on our indie game the workflow with prefab tool is as good as it can be (we just need few more things to be fluent, as I discussed with @ - btw I didn’t forget the feedbacks from our team, they’re incoming :)).

This is exactly the kind of feature our team needs (for the same reasons).
The idea would be to be able to convert a Prefab into a Blueprint then to update the Blueprint when modifying the Prefab (else you have to delete / rebuild / replace reference of the Blueprint each time you want something to change).

This Prefab Tool is amazing, it enables so much potential Unreal 4 is lacking right now!

Maybe @ can add this feature :wink:

@Yun-Kun, thanks a lot for sharing your experiences!
@motorsep, I’m currently doing some research on the Prefab -> Blueprint conversion feature, will update here when I got something to share.

1.0.3 released on itch. Unreal marketplace is waiting final review result.

Prefab Tool - What’s new in 1.0.3

Perfect! This will greatly speed up our workflow :slight_smile:

I love the update video, makes me think of a patch spotlight for a game.

Keep up the good work, you rock.

@
Prefab tools looks really great so far and we’re excited to start trying it in our workflow.

We have run into one problem/bug so far. We sometimes get a crash involving renaming objects. At map load, Prefab calls RevertAllPrefabActorsInCurrentLevel(). This eventually goes to ReplacePrefabInstances(), and then Rename. Rename fails because there’s already something in the map with the same name. This is a fatal error.

I’m not entirely certain how the map got into this state. The objects in the map with the same name either came from or were the original source of the prefab. We will try to get better reproduction case for you. But one can imagine that even a normal revert (i.e. one by hand) might be a problem if an object with the same name happened to be created.

Cheers,
shannon

Just started using this at work and oh man, it is awesome!! Thank you for the continued support on it too- I was literally going to ask for “Add Select Parent Prefab Actor context menu” today because it was by far one of the biggest pain points when working with prefabs. Thanks again for the awesome tool- really looking forward to seeing what is to come!!

@ColdIronPoz, very sorry about the bug you run into. May I ask which line trigger the crash? And if possible, a test project for me to reproduce the bug would be much appreciated!


1503: OldActor->Rename(*OldActorReplacedNamed.ToString());
1532: NewActor->Rename(*OldActorName.ToString());
1580: OldActor->Rename(*OldActorName.ToString());


If you turn the “Update All Prefab Actors when Open Map” off, then manually click “Apply” in Prefab Actor’s detail panel, will that still trigger the bug?

28992453-100f7d0e-79cf-11e7-9ca9-34801e0e490a.png

@: We did get around the crash by toggling that option in the ini file.
We renamed the actors so the map no longer crashes, so I don’t have a handy reproduction for you. I’m not entirely sure how it got into the state. It hasn’t happened a second time (yet?) :slight_smile:

Here’s the call stack. It’s from the previous version.


Fatal error: [File:D:\src\unrealengine\branches\dev\Engine\Source\Runtime\CoreUObject\Private\UObject\Obj.cpp] [Line: 197] 
Renaming an object (SpotLight /Game/Maps/Rooms/FRE/Corridors/FRE_CO_4_Circle_A.FRE_CO_4_Circle_A:PersistentLevel.SpotLight_0) on top of an existing object (SpotLight /Game/Maps/Rooms/FRE/Corridors/FRE_CO_4_Circle_A.FRE_CO_4_Circle_A:PersistentLevel.SpotLight_3) is not allowed


UE4Editor_Core!FDebug::AssertFailed() [d:\src\unrealengine\branches\dev\engine\source\runtime\core\private\misc\assertionmacros.cpp:349]
UE4Editor_CoreUObject!UObject::Rename() [d:\src\unrealengine\branches\dev\engine\source\runtime\coreuobject\private\uobject\obj.cpp:197]
UE4Editor_Engine!AActor::Rename() [d:\src\unrealengine\branches\dev\engine\source\runtime\engine\private\actor.cpp:823]
UE4Editor_PrefabAsset!FPrefabToolEditorUtil::ReplacePrefabInstances() [d:\src\endeavor\endeavor\plugins\prefabtool\source\prefabasset\private\prefabtoolhelpers.cpp:1637]
UE4Editor_PrefabAsset!FPrefabToolEditorUtil::RevertPrefabActor() [d:\src\endeavor\endeavor\plugins\prefabtool\source\prefabasset\private\prefabtoolhelpers.cpp:2001]
UE4Editor_PrefabAsset!FPrefabToolEditorUtil::RevertAllPrefabActorsInCurrentLevel() [d:\src\endeavor\endeavor\plugins\prefabtool\source\prefabasset\private\prefabtoolhelpers.cpp:2266]
UE4Editor_PrefabAssetEditor!TBaseRawMethodDelegateInstance<0,FPrefabAssetEditorModule,void __cdecl(FString const & __ptr64,bool)>::ExecuteIfSafe() [d:\src\unrealengine\distrib\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:648]
UE4Editor_UnrealEd!TBaseMulticastDelegate<void,FString const & __ptr64,bool>::Broadcast() [d:\src\unrealengine\branches\dev\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:937]
UE4Editor_UnrealEd!FEditorFileUtils::LoadMap()

The line is


NewActor->Rename(*OldActorName.ToString());

@ColdIronPoz, thanks a lot for the call stack!

The logic behind the suspicious line is quite simple:



Step 1. rename old actor to something unique
Step 2. rename new actor to old actor's name


The only reason that Step 2 is failed (which causing the crash) is that Step 1 failed silently somehow. My theory is that unique name generator is not reliable during LoadMap call back. (Need more code digging to prove that theory)

My current solution is adding rename test before the actual rename operation to capture possible rename failure in the first place. Will be in next update.