Announcement

Collapse
No announcement yet.

Prefab Tool - Prefab Support for Unreal Engine

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    hi, testing this tool for my company, we're running into an issue where when you first create a prefab it works as intended for that session, however if you restart the editor, you can no longer place previously created prefabs and the following message occurs when I try to place them.

    Attached Files

    Leave a comment:


  • replied
    Heads up: I'm receiving a crash with a 100% repro rate when trying to create a new prefab (either empty or from selected actors). I have no idea if it was already posted since I'm just stopping by to drop this off (but I figure it's better than ignoring it).

    I don't know if it's related but there isn't an option to create a new prefab when right-clicking in the Content Browser.

    Code:
    LoginId:2aac739445bab8780b83cbbb90e13a69
    EpicAccountId:7f51d04c6b4043f7828e49a11d0f3702
    
    Access violation - code c0000005 (first/second chance not available)
    
    UE4Editor_CoreUObject
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_Renderer
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_CoreUObject
    UE4Editor_PrefabAsset!FPrefabGEditorAdapter::ImportObjectProperties() [d:\build\++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\prefabtool\source\prefabasset\private\prefabgeditoradapter.cpp:2998]
    UE4Editor_PrefabAsset!FPrefabGEditorAdapter::ImportObjectProperties() [d:\build\++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\prefabtool\source\prefabasset\private\prefabgeditoradapter.cpp:3058]
    UE4Editor_PrefabAsset!FPrefabGEditorAdapter::LevelFactory_FactoryCreateText() [d:\build\++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\prefabtool\source\prefabasset\private\prefabgeditoradapter.cpp:1924]
    UE4Editor_PrefabAsset!FPrefabGEditorAdapter::edactPasteSelected() [d:\build\++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\prefabtool\source\prefabasset\private\prefabgeditoradapter.cpp:1035]
    UE4Editor_PrefabAsset!FPrefabToolEditorUtil::DoRevertPrefabActor() [d:\build\++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\prefabtool\source\prefabasset\private\prefabtoolhelpers.cpp:1240]
    UE4Editor_PrefabAsset!FPrefabToolEditorUtil::RevertPrefabActor() [d:\build\++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\prefabtool\source\prefabasset\private\prefabtoolhelpers.cpp:848]
    UE4Editor_PrefabAssetEditor!UPrefabActorFactory::PostSpawnActor() [d:\build\++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\prefabtool\source\prefabasseteditor\private\factories\prefabactorfactory.cpp:76]
    UE4Editor_UnrealEd
    UE4Editor_UnrealEd
    UE4Editor_PrefabAsset!FPrefabToolEditorUtil::ReplaceActorsWithPrefab() [d:\build\++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\prefabtool\source\prefabasset\private\prefabtoolhelpers.cpp:1854]
    UE4Editor_PrefabAssetEditor!UPrefabAssetFactory::FactoryCreateNew() [d:\build\++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\prefabtool\source\prefabasseteditor\private\factories\prefabassetfactory.cpp:118]
    UE4Editor_UnrealEd
    UE4Editor_AssetTools
    UE4Editor_PrefabAssetEditor!FPrefabEditorActions::NewPrefabFromSelection() [d:\build\++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\prefabtool\source\prefabasseteditor\private\prefabeditoractor\prefabeditoractions.cpp:588]
    UE4Editor_PrefabAssetEditor!SPrefabToolMainWidget::OnNewPrefabFromSelectionClicked() [d:\build\++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\prefabtool\source\prefabasseteditor\private\widgets\sprefabtoolwindow.cpp:1196]
    UE4Editor_PrefabAssetEditor!TBaseSPMethodDelegateInstance<0,SPrefabToolMainWidget,0,FReply __cdecl(void)>::Execute() [d:\rocketsync\4.21.0-4541578+++ue4+release-4.21\working\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:279]
    UE4Editor_Slate
    UE4Editor_Slate
    UE4Editor_Slate
    UE4Editor_Slate
    UE4Editor_Slate
    UE4Editor_ApplicationCore
    UE4Editor_ApplicationCore
    UE4Editor_ApplicationCore
    UE4Editor_ApplicationCore
    user32
    user32
    UE4Editor_ApplicationCore
    UE4Editor
    UE4Editor
    UE4Editor
    UE4Editor
    UE4Editor
    kernel32
    ntdll
    Please PM me if you need more info since I never browse the forums.

    Leave a comment:


  • replied
    I have prefabs inside of prefabs, with the last version the "Destroy Keep children" destroy all prefabs, not only the father.
    Please fix it in next update. Thanks
    4.20.3

    Leave a comment:


  • replied
    Is there a way to spawn a prefab outside the editor? Dynamically? For example, I want to duplicate an existing prefab at run time, and spawn that new duplicate.

    Leave a comment:


  • replied
    EXCELENT!
    Feature request : an option to import an .fbx as a prefab (or create a prefab during import), maintaining the original object hierarchy and the original pivot points. It would be awesome!

    Leave a comment:


  • replied
    Obligatory question: is a 4.22 version on the way?

    Leave a comment:


  • replied
    Hey Nate! Firstly thanks for the excellent plugin.

    I'm in the process of updating from 4.19 to 4.21, and one problem we're having is that all/most of our prefabs crash when FPrefabToolEditorUtil::RevertPrefabActor() runs on map load. Ultimately, the crash happens in FPrefabGEditorAdapter::LevelFactory_FactoryCreateText() while trying to parse all the objects stored in the prefab actor.

    We believe this is due to some physics classes that were moved and renamed as part of 4.21, and so since the tool works by using the copy/paste functionality, those references can't be correctly fixed up (and therefore can't be parsed!). I've tested and confirmed that I can fix individual prefabs by disabling the revert on map load, and then going to a map that has the prefab placed within it and hitting Apply to push the properly fixed-up version back to the uasset.

    My question is: has this ever come up in previous engine version upgrades? Based on my limited understanding of the problem, this seems like it would be an issue anytime Epic made significant changes to class names in an engine update. Is there some existing functionality or commandlet I can use to re-serialize all of our prefabs so that they'll get properly fixed up? Thank you for your time!

    Leave a comment:


  • replied
    Well, I've taken a couple stabs at this, and both involved changes to the engine to work (we're on UE 4.19 at the moment). If anyone reading this is also willing to alter the engine to get this working, here's the summary:

    1. In FPrefabToolEditorUtil::ReplacePrefabInstances, as we iterate over ActorsToReplace, I find the AInstancedFoliageActor* for the Actor's Level, and I tell it to temporarily early out in OnLevelActorMoved and OnLevelActorDeleted (first engine change).

    2. At the end of that same for loop, I turn OnLevelActorMoved and OnLevelActorDeleted back on, and I add the AInstancedFoliageActor* to a TSet.

    3. Immediately after the for loop, I iterate through the TSet of AInstancedFoliageActors and call a new function ReplaceMissingBases (second engine change). ReplaceMissingBases is based off AInstancedFoliateActor::MapRebuild, but instead of looking for bases with UModelComponents, I'm looking for bases with null component. Also, MapRebuild uses LineTraceSingleByObjectType, which unfortunately collides with LODs, which is not at all what I want, so I use LineTraceMultiByObjectType instead, and then cull out anything I don't want to collide with (see AInstancedFoliageActor::FoliageTrace for the example I pulled from).
    Last edited by ʎǝןǝʞɐɹq-ǝןoɹd; 12-21-2018, 11:10 AM.

    Leave a comment:


  • replied
    Originally posted by Nate View Post
    Hi Dan, foliage support was purposedly disabled as I ran into some issues in the implementation. I'll re-eval the problem and see if can come up with proper solution this time. Will keep you updated. Thanks for bringing it up.
    I'm going to be taking a look at the code this week as well, as our artists really want this. I'll let you know what I find!

    What did you mean by "foliage support was purposely disabled"? Are you doing something in your code to ensure foliage gets destroyed cleanly?

    Leave a comment:


  • replied
    Hi Dan, foliage support was purposedly disabled as I ran into some issues in the implementation. I'll re-eval the problem and see if can come up with proper solution this time. Will keep you updated. Thanks for bringing it up.

    Leave a comment:


  • replied
    Hey Nate, I've got a new issue for you, this time with painted foliage. I was able to repro it in UE 4.20.3 with PrefabTool version 1.2.1.1.

    Repro:
    1. In a new scene, create a new prefab with some meshes (I just used the table and chairs from the Starter Content).
    2. Switch to the Foliage Painter mode (shift+4)
    3. Add some foliage and then paint it on to the meshes in your prefab.
    3. Return to normal mode (shift+1)
    4. "UnLock" the prefab.
    5. "Apply and Lock" the prefab.

    Result:
    Any foliage that was painted on to the prefab's meshes disappear (foliage painted to non-prefab meshes remain).

    Expected:
    Foliage painted to a prefab remain after an "Apply and Lock" operation.

    Leave a comment:


  • replied



    1.2.1 Changelog

    1.2.1
    ------------------
    - Add Launch Proefab Tool Window button to prefab component detail panel
    - Now can attach selected actors to last selected prefab actor with Attach in Prefab Tool Window
    - Now always draw component visualizer for target actor even it's not selected​
    - Now can toggle Prefab View Visualizer in Prefab Tool Window
    - Color column of world outliner and prefab component visualizer now shows prefab actor with prefab un-assigned in yellow color
    - The Color of world outliner prefab color column and prefab component visualizer is customizable now
    - Mark Target now implicit make prefab's level current (and restore after UnMark)
    - Destroy in Component Detail now is Destroy Keep Children and working; Remove Destroy Hierarchy since it's default behavior now
    - Add hotkey Ctrl+Shift+End for snap selected prefab actor to floor
    - Disable most operation in Prefab Tool Window when Prefab is disconnected​
    - UnMark and Lock prefab actor in Prefab Tool Window now will select prefab actor afterward
    - Fix bug that prefab actor instance's layer visibility been set to visible after spawn
    - Fix bug that changes of instance actors' attachment not been properly reflected after apply/revert
    - Fix Prefab View Visualizer flickering issue in some cases
    - Fix Toggle Isolate only works properly while initial isolated prefab actor is selected
    1.2.0 Changelog
    1.2.0
    ------------------
    - Add Prefab View Visualizer to visualize prefab usage in level editor viewport
    - Add a sortable color column in World Outliner to indicate Prefab Actor Status (Lock/UnLock/Connected/Disconnected)
    - Add Prefab Tool Window
    - Add Mark Prefab Actor as Target Prefab Actor option, new actors will be added to a Target Prefab Actor
    - Add Toggle Isolate option to isolate current editing prefab actor in level editor viewport
    - Add New Empty Prefab option and mark it as Target
    - Add Set Prefab Pivot option to change prefab pivot base on current widget location or it's bounding box
    - Add option to move actors to compensate pivot changes after Set Prefab Pivot
    - Add proper Snap to Floor option to snap prefab actor to floor base on bounding box or pivot
    - Add ability to Lock and Collapse all Prefab Actor in World Outliner
    - Add Save/Save As in Prefab Tool Window to quickly save or duplicate current Prefab Asset
    - Add Attach/Detach in Prefab Tool Window to quickly add/remove actors to current Prefab Actor
    - Add an option in Prefab Editor Setting to always display Prefab Component Visualizer even it's not selected
    - Delete a prefab actor now also delete all it's children actors by default! (Old behavior will leave it's children intact)
    - Now lock a prefab actor (by clicking on lock widget) or click a locked prefab actor in level editor will also make it collapsed in World Outliner
    - Move prefab actor to another level now works properly (without leaving it's children behind)
    - Focus on prefab actor with F key works better since since prefab component calc bounds dynamically base on children now
    - Now try to rebuild render data of ISM/HISM actors inside Prefab when it's spawned
    - Add PrefabVersion field to PrefabAsset for future prefab format change​​
    - Thanks Nathan Cheever and Mateusz Piaskiewicz for feature suggestions and feedbacks during 1.2.0 development!

    Leave a comment:


  • replied
    motorsep here're the steps to integrate code plugins from marketplace to your own custom build:

    1. Download the closest engine version (which your custom build base on) of plugin from marketplace. e.g. your custom engine build is fork from 4.20, then download 4.20 version of the plugin
    2. Copy the plugin folder from launcher build's plugins folder to your custom build's plugins folder
    e.g. copy "C:\Program Files\Epic Games\UE_4.20\Engine\Plugins\Marketplace\PrefabTool" folder into "E:\CUSTOM_UE_BUILD\Engine\Plugins\SOME_FOLDER\PrefabTool"
    3. Run "GenerateProjectFiles.bat" in your custom engine build folder to re-generate UE4.sln
    4. Build UE4.sln in visual stuidio

    And you might also want to alter the .uplugin file to include/exclude the targeting platforms:

    e.g. one of my client are using PrefabTool in a Switch project which is not enabled by default, you can open "PrefabTool.uplugin", find the "WhitelistPlatforms" line:

    Code:
    {
          "Name": "PrefabAsset",
          "Type": "Runtime",
          "LoadingPhase": "Default",
          "WhitelistPlatforms": [ "Win64", "Win32", "Mac", "Android", "Linux" ]
        },
    Append "Switch" to the "WhitelistPlatforms" field

    Code:
    {
          "Name": "PrefabAsset",
          "Type": "Runtime",
          "LoadingPhase": "Default",
          "WhitelistPlatforms": [ "Win64", "Win32", "Mac", "Android", "Linux", "Switch" ]
        },
    Then rebuild the engine.

    Leave a comment:


  • replied
    Nate

    I am using custom engine build and I am wondering if it's possible to use your tools with it (and how?!). Thanks beforehand

    Leave a comment:


  • replied
    tib_hou you can leave project in prefab state since prefab actor is essentially an empty actor in runtime (while has "prefab" behavior in editor).

    WES_Julien Have you downloaded 4.20 version of Prefab Tool from Marketplace? Unreal marketplace servers corresponding version of plugin for different engine version. So if you have to use 4.20 engine in the launcher to download 4.20 version of the plugin.

    Leave a comment:

Working...
X