Search Unity

Prefab Evolution Plugin(nested prefabs)

Discussion in 'Works In Progress - Archive' started by PrefabEvolution, Mar 27, 2014.

  1. super77gg

    super77gg

    Joined:
    Sep 25, 2014
    Posts:
    46
    Hello -

    We love Prefab Evolution - it's become vital to our workflow. However we are having a similar problem with custom scripts as @Mr Asset . Sometimes when we apply changes to a prefab evolution prefab that has a custom script - it duplicates that script across all objects. Not the end of the world - but I do have to go through 400+ prefabs and remove the superfluous scripts.
     
    Mr Asset likes this.
  2. podonne5

    podonne5

    Joined:
    Aug 26, 2014
    Posts:
    2
    Hi

    Ive been using Prefab Evolution in my project for a while and I havent had any real issues to date. Now Im getting the error below everytime the Unity Editor refreshes. Im wondering if you have any idea what could be causing the issue. Im using Unity 5.0.1f1 Its not actually causing any issues that I can see however it does cause unity to hang until the stack overflows which can be annoying. Note I have tried removing all prefabs that are using Prefab Evolution from the scene but the issue persists.

    StackOverflowException
    PrefabEvolution.PEPrefabScriptExt.<PEPrefabScriptExt>m__1C (System.String guid) (at Assets/PrefabEvolution/Sources/Editor/PEPrefabScriptExt.cs:16)
    PrefabEvolution.PEPrefabScript.get_Prefab () (at Assets/PrefabEvolution/Sources/PEPrefabScript.cs:59)
    PrefabEvolution.PEPrefabScriptExt+<OnValidate>c__AnonStorey11.<>m__1D () (at Assets/PrefabEvolution/Sources/Editor/PEPrefabScriptExt.cs:27)

    Thanks
    Paul
     
  3. widdi

    widdi

    Joined:
    Apr 20, 2015
    Posts:
    1
    I think I may have found a bug:
    1. Create an new Unity project (Version 4.6.4f1).
    2. Import current Version (1.3.6) of Prefab Evolution
    3. Rightclick in Hierarchy Window, create an Cube, remove Mesh Filter component from cube
    4. Create a prefab of cube by dragging it into a Project Window folder
    5. Click 'Allow this prefab to be nested' in cube's inspector and Menu -> Create Child (a prefab is created automatically)
    6. Add Mesh Filter component to the child prefab, save scene
    7. disable the Box Collider component on the (parent) Cube prefab, press apply
    => the child prefab loses the Mesh Filter component

    While writing (and testing) this bug report I found a solution to my problem, but I'm still not sure if the observed behavior is a bug or wanted. When I press Apply on the child prefab in step 6 the Mesh Filter is not overwritten.

    If this is not a bug, can you tell me the purpose of this behavior?

    Greetings,
    Mathias
     
  4. ValkaVales

    ValkaVales

    Joined:
    Dec 5, 2012
    Posts:
    2
    Does it support Unity 5?
    I'l like to buy it, but only if it supports Unity 5.

    Best Regards,
    Oleksii
     
  5. super77gg

    super77gg

    Joined:
    Sep 25, 2014
    Posts:
    46
    @ValkaVales We've been using Prefab Evolution 1.3.6 in 5 and it works great. We've only encountered the one issue I mentioned above -


    Nate
     
  6. codewing

    codewing

    Joined:
    Jan 8, 2014
    Posts:
    9
    Is it still in developement? Or do we have to fix errors now on our own?
     
  7. PrefabEvolution

    PrefabEvolution

    Joined:
    Mar 27, 2014
    Posts:
    225
    Hi. Thank you for your bug report. Today i solve this puzzle)) All last week I trying to find the way how to make it work. And its funny that i need just a 4 lines of code in 3 files to fix it) 1 week = 4 lines. Its most productivity week of my life))
    The problem is that Unity after you change m_Script property of any MonoBehaviour object will destroy it(because you can't change type of object in runtime, its crazy). And all this week i try to find the way to get the reference to the new instance of the object.

    So little bit later this fix will be available on Asset Store. But now you can send me a mail to prefabevolution@gmail.com with your Invoice ID and i send you recent build of the plugin.
     
    Last edited: May 5, 2015
  8. jiguangdongyu

    jiguangdongyu

    Joined:
    May 4, 2015
    Posts:
    2
     
  9. Nikolay-Shaporin

    Nikolay-Shaporin

    Joined:
    Mar 30, 2015
    Posts:
    1
    Do not work correctly with [SelectionBase], when one prefab nested in other prefab. It do not select parent prefab, when i click on Cube3D in scene.
     
  10. Mistborn

    Mistborn

    Joined:
    Mar 6, 2014
    Posts:
    2
    Hi,

    I am recently using Prefab Evolution 1.3.6 in Unity 4.6.5. It's a great plugin and works perfectly! It DOES really help me a lot! But I have noticed a little annoying problem. Everytime I restart Unity editor then import some assets, I'll get a "Checking prefab dependencies" dialog. It's really a long process if you have a tons of assets in project. I am wondering if there is an option or some way to turn it off or make it not be triggered so frequently?
     
  11. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Same problem, and i don't even have yet the big scene content assets in my project. Then i would wait about a half hour for the check...
     
  12. PrefabEvolution

    PrefabEvolution

    Joined:
    Mar 27, 2014
    Posts:
    225
    Got it. I will try to make this process much faster. And you will see that in next release.

    Cheers...
     
  13. TimK_personal

    TimK_personal

    Joined:
    Jul 30, 2014
    Posts:
    18
    I had never seen that keynote before. Watching that presentation made me die a little inside.
     
  14. bin3d

    bin3d

    Joined:
    Sep 10, 2013
    Posts:
    2
    After the new update I get these three errors, and am unable to play my game, or build to android. Great app, but please help me out!
     

    Attached Files:

  15. PrefabEvolution

    PrefabEvolution

    Joined:
    Mar 27, 2014
    Posts:
    225
    You are probably have another copy of plugin in your project. Just find another copy and remove it.
     
  16. Deleted User

    Deleted User

    Guest

    Has that bug been fixed? And does it work for Unity 5?
     
  17. PrefabEvolution

    PrefabEvolution

    Joined:
    Mar 27, 2014
    Posts:
    225
    Yes, bug is fixed in last version. And its work well with unity 5
     
  18. paskal007r

    paskal007r

    Joined:
    Sep 6, 2013
    Posts:
    68
    Hi, possible bug over here.
    situation:
    I have a few variables over a script used to keep track of routing information over a map.
    Each instance of the (nested) prefab has its own component with the data (the RoutingData below). It gets written via an editor-script call by a function of the same component (addLink).
    I check visually the inspector (said variables are exposed with [SerializeField]), the data is right. Also the "evolve prefab" component lists them in the "modifications".
    As I press "play" all the data disappears, all routing fields get a "nice" None as a value. Also, no trace of it in the "modifications".

    As for the script side I'm pretty sure nothing is clearing it on start: the fields are private and I commented the "clear" function just to be sure no-one would call it and cause the trouble.

    Data:
    Code (CSharp):
    1. public class RoutingData : MonoBehaviour {
    2.     [SerializeField]Transform nord;
    3.     [SerializeField]Transform sud;
    4.     [SerializeField]Transform est;
    5.     [SerializeField]Transform ovest;
    6.     [HideInInspector]public Transform Nord{get{return nord;}}
    7.     [HideInInspector]public Transform Sud{get{return sud;}}
    8.     [HideInInspector]public Transform Est{get{return est;}}
    9.     [HideInInspector]public Transform Ovest{get{return ovest;}}
    10.  
    11.  
    12.     public void Clear(){
    13. //        nord=null;
    14. //        sud=null;
    15. //        est=null;
    16. //        ovest=null;
    17.     }
    18.     public void addLink(routingDirection dir, RoutingData nextElem){
    19.         switch (dir) {
    20.         case routingDirection.nord:nord =nextElem.transform;        break;
    21.         case routingDirection.sud:sud =nextElem.transform;            break;
    22.         case routingDirection.est:est =nextElem.transform;            break;
    23.         case routingDirection.ovest: ovest=nextElem.transform;        break;
    24.         default:
    25.             break;
    26.         }
    27.     }
    inspector before "play":
    pre.png
    after "play":
    post.png

    Please, help, the deadline is near and without this we are struck.
     
  19. PrefabEvolution

    PrefabEvolution

    Joined:
    Mar 27, 2014
    Posts:
    225
    Hi. Some advice: when you change serializable properties from the scripts you have to call SetDirty(you can find it in Unity api reference). Of you don't, this changes could be lost when play or at any time. This function mark object as changed and commit this changes to serialized object.
     
    paskal007r likes this.
  20. ripridehi

    ripridehi

    Joined:
    Mar 27, 2015
    Posts:
    15
    Hi. I am building up a large prefab with 3 levels so far in the hierarchy, with a total of about 120 child prefabs. When I make a change and click Apply on the top level parent, it hangs and takes about 5-10 minutes to update. The apply does eventually finish. Is this expected? What is it doing that takes so long? Is there an opportunity for optimization here?

    I can see in Process Explorer that one core of my cpu is maxed out running Unity while it is updating.
     
  21. jscottml

    jscottml

    Joined:
    Mar 18, 2015
    Posts:
    1
    I see the same thing, with fewer child prefabs. Unfortunately, this makes the plugin mostly useless for big, deadline driven projects.
     
  22. junk1er

    junk1er

    Joined:
    Feb 11, 2014
    Posts:
    4
    Hi!

    I would like to make a feature request for next releases :)

    First, there is an annoying strange behavior: PE starts to check prefab dependencies when I exit Editor. It happens when that check hasn't been done before for that Editor session.

    Second, it's question more than a request: is it real do not keep PE's data in prefabs bodies in runtime? I mean as they are used only in Editor so why they kept for runtime? At least that data tries to be deserialized, it may increase prefab instantiation time and prefab size.

    Cheers!
     
  23. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Comon guys, this asset is not usable in medium/big projects. This asset still check 5 min long my files/prefabs and i really dont have about 95% of the prefabs in my asset folder. Im just coding at the time, but if it comes to map design, then i have to remove this asset in this state. If someone start a game based on this asset and then later recognize how much impact this asset has to the development time, then it would be real trap. Did you do something against this non acceptable long prefab checking? By the way, my Unity-Game is on a fast SSD, i don't even want to know how it would be under a rotating HD. I'am not sure, does this asset just check 1 time after i open Unity? But still then, i would need half hour if i would insert my level design assets...

    The only one feature i need in this asset is, that the GameObject changes (e.g. made/changed by Blender) in my prefab are synchronized, nothing else. Also if i install a new asset, this check starts, which makes incredible long install processes.

    I like this asset, also for the small reason, that the cloned prefabs have a unique name, which helps me to trace the prefabs in the log window.

    Improve it/fix it as soon as possible!
     
  24. Stals

    Stals

    Joined:
    Dec 1, 2014
    Posts:
    8
    Hi, I was used Prefab Evolution and it is an amazing tool, but recently I needed to build for iOS, I didn't know of the power of /Editor folder in Unity and just used it from the root for some time. Now when deploying it has plenty of error regarding the using UnityEditor; and other things. After googling I understood that you actually could hide that type of libraries and personal code inside /Editor folder - but when moving prefab evolution to that folder all prefabs with Evolve Prefab script that was auto-attached to them just start saying that "the associated script could not be loaded". (If I move it to some other folder it seems to work fine though). Could you please tell if there is a way to fix it?
    If it shouldn't be inside Editor folder, than how do I deploy to iOS with it?
     
    Last edited: Jul 8, 2015
  25. PrefabEvolution

    PrefabEvolution

    Joined:
    Mar 27, 2014
    Posts:
    225
    Short answer: scripts that attached to GameObjects in your projects and code that should executed in game must be outside Editor folder.
     
  26. PrefabEvolution

    PrefabEvolution

    Joined:
    Mar 27, 2014
    Posts:
    225
    Hi. New version of the plugin will be available on AssetStore soon. Key feature: now prefabs dependency check will be lighting fast. My benchmarks show that now its 11x times faster. But you should note that first time when dependency check occurs its will take same time as before.
    If you want to get new version right now just mail me to prefabevolution@gmail.com
     
    junk1er and dreasgrech like this.
  27. whitebai

    whitebai

    Joined:
    Dec 12, 2014
    Posts:
    2
    sometimes it will stop like this
     

    Attached Files:

  28. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    I met the problem for all prefab meta file:
    Unable to parse YAML file: [mapping values are not allowed in this context] at line 4
     
  29. PrefabEvolution

    PrefabEvolution

    Joined:
    Mar 27, 2014
    Posts:
    225
    Fixed version is on AssetStore review. Just mail me prefabevolution@gmail.com and you will got fie version of the plugin
     
  30. christianalthaus

    christianalthaus

    Joined:
    Jul 13, 2015
    Posts:
    1
    bought it and not getting it to work in unity 5.0.3p3
    when clicking on "Menu" i get UnautorizedAccessException .... building_f_03_prefab.prefab.meta
    also the watsonsong mentioned YAML error occures when allowing a prefab to be nested
     
  31. PrefabEvolution

    PrefabEvolution

    Joined:
    Mar 27, 2014
    Posts:
    225
    Mail me to prefabevolution@gmail.com with your invoice id and i send you fixed version
     
  32. Mistborn

    Mistborn

    Joined:
    Mar 6, 2014
    Posts:
    2
    The dependency check procedure in PrefabEvolution 1.3.9.2 is truly fast right now. Nice works! :)
    But sometimes the progress bar still remains after the procedure finished.
     
  33. DickFeynman

    DickFeynman

    Joined:
    Jul 17, 2015
    Posts:
    16
    Same problem here. It is faster, but sometimes the dependency check process will stuck. Too bad, it could be a terrific asset but it is sometimes stressful to work with in not small projects (above 2000 scripts).
     
  34. Deleted User

    Deleted User

    Guest

    I'm getting some warnings about deprecated stuff in Unity 5.1.1. Will this be fixed?
     
  35. PrefabEvolution

    PrefabEvolution

    Joined:
    Mar 27, 2014
    Posts:
    225
    Just mail me an you got fixed version. Bit later it will be avaliable on asset store
     
  36. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Hello,

    how to update the prefab with the changed/enhanced mesh? The referenced mesh has now 1-2 more objects.

    I have the following: A mesh with more objects, therefore unity create a root node. Then I changed the root node to a Prefab Evo. Prefab in the scene view and now I made some changes on the mesh. I was in beliving that the mesh could be upated in the prefab.
     
  37. PrefabEvolution

    PrefabEvolution

    Joined:
    Mar 27, 2014
    Posts:
    225
    I'm not realy understand your problem. Can you describe your problem in greater detail?
     
  38. Sarudan

    Sarudan

    Joined:
    May 21, 2011
    Posts:
    65
    Hey, with the last update there is an issue with prefabs breaking now.

    I've had many cases now where I've created a new prefab in the project, and all of a sudden the prefab is empty and all instances in the scene are broken and red. It just does this out of the blue shortly after making a new prefab.
     
  39. PrefabEvolution

    PrefabEvolution

    Joined:
    Mar 27, 2014
    Posts:
    225
    Please send me a email to prefabevolution@gmail.com and i will send to you a fixed version.

    This version will be avaliable on Asset Store bil later. Its on review now.
     
  40. After updating to Unity 5.1.2 from 5.0.x, I started getting the following errors doing apply on prefab containing other prefab that uses PE.

    Camera : Diff Object is not exists
    UnityEngine.Debug:LogError(Object)
    PrefabEvolution.PEPrefabScriptExt:BuildModifications(PEPrefabScript) (at Assets/Plugins/Editor/PrefabEvolution/Sources/Editor/PEPrefabScriptExt.cs:282)
    PrefabEvolution.PEGameObjectInspectorOverride:DefaultApply(GameObject) (at Assets/Plugins/Editor/PrefabEvolution/Sources/Editor/PEGameObjectInspectorOverride.cs:188)
    PrefabEvolution.PEGameObjectInspectorOverride:Apply(GameObject) (at Assets/Plugins/Editor/PrefabEvolution/Sources/Editor/PEGameObjectInspectorOverride.cs:157)
    PrefabEvolution.PEGameObjectInspectorOverride:Apply(GameObject[]) (at Assets/Plugins/Editor/PrefabEvolution/Sources/Editor/PEGameObjectInspectorOverride.cs:176)
    PrefabEvolution.PEGameObjectInspectorOverride:Apply() (at Assets/Plugins/Editor/PrefabEvolution/Sources/Editor/PEGameObjectInspectorOverride.cs:146)
    PrefabEvolution.PEGameObjectInspectorOverride:OnHeaderGUI() (at Assets/Plugins/Editor/PrefabEvolution/Sources/Editor/PEGameObjectInspectorOverride.cs:85)
    UnityEditor.DockArea:OnGUI()

    Any ideas?
     
  41. DickFeynman

    DickFeynman

    Joined:
    Jul 17, 2015
    Posts:
    16
    Is it possible that PE makes some small changes on the project prefabs when you save the current scene?

    Whenever I save the scene and I have made a change in some prefab, which is NOT even a PE prefab, in my version control system most of my prefabs are seen as changed, but I didn't actually change them.

    That cause annoying problems when working in team. We are a little sad about it, we use PE just for one big structured prefab in our project, but we are sadly considering eliminating it, since it seems to cause more harm than good.
     
  42. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,619
    What version is the fixed one? I'm getting the issue at the moment and it's a bit of a roadblock...

    Edit: Actually, this is pretty bad. Although it's only happening to one GameObject/Prefab, it seems to be breaking it even when I remake it as a vanilla Unity prefab. 1: Delete the broken Prefab file. 2: Break prefab instance on the GameObject in the Scene. 3: Make it into a completely new prefab without using PrefabEvolution. 4: Run the scene, that prefab is loaded via script, it works. 5: Stop the scene, that prefab same turned red. I ran through the same steps again and it didn't happen a second time, but still... that's a little concerning.
     
    Last edited: Aug 7, 2015
  43. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,619
    Good news, things seem to have returned to normal now.
     
  44. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,619
    So, this has been on and off for over a week now, and it's pretty painful. Any word on a fix?
     
  45. PrefabEvolution

    PrefabEvolution

    Joined:
    Mar 27, 2014
    Posts:
    225
    Mail me please. And i send a recent version.
     
  46. wangbenchong

    wangbenchong

    Joined:
    Apr 24, 2015
    Posts:
    3
    Someone like me have found the problem --- too many prefabs have changed when use this tool first time. And I try to solve it:
    upload_2015-8-23_17-19-8.png
    and
    upload_2015-8-23_17-20-7.png

    But I don't know if I do this will cause any bug or not. So far I use it well(seemly).
     
    Last edited: Aug 23, 2015
  47. PrefabEvolution

    PrefabEvolution

    Joined:
    Mar 27, 2014
    Posts:
    225
    This will not cause any problem for new users of the plugin. Anyway this plugin not changing prefab itself, only its meta file. And this will not cause any merge conficts or anything else.
     
  48. jdswg

    jdswg

    Joined:
    Jan 8, 2015
    Posts:
    1
    Hello,
    I have been using this plugin for a while and overall really like it, however I have recently been having an issue. If I make any child prefab, go to another program and back to Unity, the prefab connection breaks. The prefab file in the project tab has a white box with nothing showing in the inspector. The box in the scene tab goes red and says its missing its reference. My only fix is dragging the prefab onto the white box one, but this is annoying to deal with. Is this a random bug I am getting? I do have a purchased copy of the plugin.
     
  49. PrefabEvolution

    PrefabEvolution

    Joined:
    Mar 27, 2014
    Posts:
    225
    Today i have send new version to asset store to review. You can send me a mail with your invoice id to prefabevolution@gmail.com and i send you a recent version of the plugin
     
  50. ptblk

    ptblk

    Joined:
    Mar 27, 2015
    Posts:
    57
    keep getting this error

    NullReferenceException: Object reference not set to an instance of an object
    PrefabEvolution.PEUtils.BuildMenu (UnityEditor.GenericMenu menu, PrefabEvolution.PEPrefabScript prefabInstance, Boolean rootPrefab, System.String path, Boolean showParent, Boolean showInstances) (at Assets/PrefabEvolution/Sources/Editor/PEUtils.cs:233)
    PrefabEvolution.PEUtils.BuildMenu (UnityEditor.GenericMenu menu, PrefabEvolution.PEPrefabScript prefabInstance, Boolean rootPrefab, System.String path, Boolean showParent, Boolean showInstances) (at Assets/PrefabEvolution/Sources/Editor/PEUtils.cs:248)
    PrefabEvolution.PEUtils.OnItemGUI (Int32 instanceID, Rect rect) (at Assets/PrefabEvolution/Sources/Editor/PEUtils.cs:215)
    UnityEditor.SceneHierarchyWindow.OnGUIAssetCallback (Int32 instanceID, Rect rect) (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:248)
    UnityEditor.TreeView.OnGUI (Rect rect, Int32 keyboardControlID) (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeView.cs:430)
    UnityEditor.SceneHierarchyWindow.DoTreeView (Single searchPathHeight) (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:349)
    UnityEditor.SceneHierarchyWindow.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:197)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)