Search Unity

Nested Prefabs: Fully integrated, Completely automatic

Discussion in 'Assets and Asset Store' started by Visual-Design-Cafe, Mar 6, 2017.

  1. matteumayo

    matteumayo

    Joined:
    Jul 25, 2016
    Posts:
    170
    Hello,

    I've run into an issue converting prefabs with 2018.3b5. After starting the conversion, eventually unity crashes. Here's the crash dump:

    https://www5.zippyshare.com/v/Cs1IB43H/file.html


    EDIT:

    In trying to troubleshoot, I tried deleting the last attempted prefab conversion's prefab (found from the log) and re-running. However, this doesn't seem to change anything, because I found that even with no changes, the conversion process would stop and crash at a different prefab, seemingly at random.

    That's about as far as I could go in terms of troubleshooting.

    The notable things about my project:
    -Went from 2018.2.2f1 to 2018.3b5
    -Windows 7
    -Large project
    -Project used Unity Collab though the connection broke with 2018.3
    -Already tried deleting /Library folder
    -No compilation errors or anything before manually activating the conversion
     
    Last edited: Oct 15, 2018
  2. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    296
    Thank you for reporting this issue and sharing the logs. I have just pushed a new version of Nested Prefabs that should hopefully fix this crash. Please download it through the built-in updater (Window/Visual Design Cafe/Nested Prefabs/Check for Updates) and give it a try.
     
    matteumayo likes this.
  3. matteumayo

    matteumayo

    Joined:
    Jul 25, 2016
    Posts:
    170
    That seems to have solved the problem!

    Thanks so much for the excellent, fast support as always. Nested Prefabs was a joy to use and it's great of you to have put together a conversion system for those who need to use the new Unity versions. Looking forward to whatever you do next!
     
  4. Smrdis

    Smrdis

    Joined:
    Sep 19, 2016
    Posts:
    5
    Hi. Tried to upgrade Nested Prefabs to native prefabs in 2018.3 but got error:
    MissingMethodException: UnityEngine.Object UnityEditor.PrefabUtility.GetCorrespondingObjectFromSource(UnityEngine.Object)
    VisualDesignCafe.NestedPrefabs.Unity.ProjectConverter.ConvertToUnityNestedPrefabs () (at C:/Compiler/Source/Closed Source/Editor/VisualDesignCafe.NestedPrefabs.Unity/ProjectConverter.cs:397)
    VisualDesignCafe.NestedPrefabs.Unity.ProjectConverter.OnEditorUpdate () (at C:/Compiler/Source/Closed Source/Editor/VisualDesignCafe.NestedPrefabs.Unity/ProjectConverter.cs:350)
    UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:200)

    What went wrong?
     
    Last edited: Dec 17, 2018
  5. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    296
    Please try reimporting Nested Prefabs from the Asset Store/Unitypackage. The Unity API updater does not work correctly when upgrading to Unity 2018.3 and converts the wrong method. A fresh import should fix it.
    (A new version with a workaround will be released soon as well)
     
  6. Smrdis

    Smrdis

    Joined:
    Sep 19, 2016
    Posts:
    5
    Unfortunatelly reimport wont help :/.
     
  7. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    296
    We have just published a new version that should fix this issue. Please give it a try.
     
  8. Mark_01

    Mark_01

    Joined:
    Mar 31, 2016
    Posts:
    451
    I got this from the free giveaway and I set the code to false and it still gives me pop ups..
    Is there no way to get away from this behaviour ? every time it pops up it opens the browser too ..
    this seems more hassle then its worth.. If this is some DRM or what ever its called issue ?
    If so I won't buy the asset store version if this keeps popping my browser open
    every time a new prefab is imported.

    NestedPrefabsConfig.ENABLE_ANALYTICS = false;

    NestedPrefabsConfig.CHECK_FOR_UPDATES = false;

    Win 10 Unity 2018.3.0f2

    Thanks
     
  9. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    296
    Can you share a screenshot of which popup opens? It shouldn't open anything so this sounds like a bug.
     
  10. Mark_01

    Mark_01

    Joined:
    Mar 31, 2016
    Posts:
    451
    Both the pop ups happen, the first pop up is to ask to update the prefabs...even if I click to say no ... it still does ...
    then after it does that, it will open the web page every time. That's why I was wondering if the giveaway was a slightly different package ? I deleted the package. I tried to take a screen shot and paste it here .. it would not work

    Edit: I use a VPN, I don;t know if that is the reason why..
     
  11. fatswallow_bside

    fatswallow_bside

    Joined:
    Jul 18, 2018
    Posts:
    12
    It looks like Prefab converter does not cover these case :
    1. nested prefab gameobject name changed.
    prefab C has name NAMEChild, which is included in prefab P.
    A inside B* C inside P has multiple instance and have name NAMEChild1, NAMEChild2...
    After convert, all of these names will changed to NAMEChild (original prefab name).
    *Edit : mistake

    2. Serialized object points nested prefab
    Prefab C has script SC, and Prefab P has script SP.
    multiple instance of Prefab C is Included in P, and SP have some variable which points SC.
    After convert, all of those links will broken.
    upload_2018-12-27_12-10-47.png
     
    Last edited: Dec 31, 2018
  12. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    296
    Does it ask to update the Nested Prefabs plugin? Or does it ask to update the nested prefabs in your project? I noticed you are using Unity 2018.3 and you won't be able to use both our Nested Prefabs and Unity's nested prefabs at the same time. So if you open your project in 2018.3 your project will automatically be converted to Unity's nested prefabs and our plugin will be uninstalled. You can read more about the conversion process in this article.
     
    Mark_01 likes this.
  13. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    296
    Thanks for reporting this. We will look into it and makes sure those cases are converted correctly as well.
     
  14. Mark_01

    Mark_01

    Joined:
    Mar 31, 2016
    Posts:
    451
    I was using Unity 2018.3.0f2 when I reported here. This was a couple of day's before you put out the
    update for Nested Prefabs version 1.4.1 through the Devdog Christmas Giveaway.

    It was not asking to Update the Nested Prefabs plugin, but rather any time I imported or touched a prefab
    it would ask to update the prefabs and it would also open my browser window every time to the site to explain
    how to use it. I got tired of that and set the thing to " false " as said in the read me.... But that did not stop it
    from doing the same behaviour.

    Admittedly I do not know much or really understand the nested prefabs thing just yet, but I have a feeling it is very powerful when you know what it does and how to use the system.

    I have not tried the new update that you guys sent out to all the people that signed up for the Devdog giveaway.

    All that said, will this keep being free for those that signed up for the giveaway ? If so, will the update notice
    come to the email like before ? Or do we update the plugin through the interface ?

    Thanks for the Christmas gift and hard work. Happy Seasons returns and Happy New year to you!!!
     
  15. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    296
    Happy new year to you as well!

    Our Nested Prefabs can't be used in Unity 2018.3 except for migrating your project if you were using our Nested Prefabs in an older version of Unity before. Because our Nested Prefabs has the same features as Unity's built-in nested prefabs in 2018.3 it is not possible to use both at the same time.

    Therefore, our plugin is disabled in 2018.3 and does not actually install if you try to install it in Unity 2018.3. It will try to install, open the 'getting started' webpage and then show the dialog about converting your nested prefabs and stop the installation process. This will happen every time you open the project because the plugin will never fully install in 2018.3 (because it is prevented).

    However, you can use our Nested Prefabs in all versions of Unity before 2018.3 and it will be free forever. New updates will be distributed through the built-in updater and will also be sent to your email.
     
    Mark_01 likes this.
  16. qoobit

    qoobit

    Joined:
    Aug 19, 2014
    Posts:
    40
    I've been trying this and although it's a band aid fix, it's not as good as it pans out to be. It turns out that once you replace the material it uses the override at that point in time, but if you make any further modifications that causes the TextMeshPro component script to become dirty, the script refreshes again using the provided font asset in the script and replaces your initial override material. The workaround it seems would have to be that you need to duplicate a font asset (which carries both the new TMP material and a duplicate copy of the font atlas) and adjust the material properties on that in order for the override to stick.

    I'm wondering if all the material properties can be wrapped into a script component which would then alleviate this issue in the nested prefab workflow. However, the way Unity works underneath, it would probably still create a material instance to handle it I think which is not going to be the most efficient workflow. At this moment, it's not as nice to work with TMP and nested prefabs for certain features native to TMP.
     
  17. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    296
    I understand that it is not the most convenient workflow. But since this workflow is decided by TextMeshPro there is nothing we can do about it. As long as TMP saves their data in Font assets and Material assets then we have no influence over how that data is used. We are only able to modify how data is applied to a prefab, and since this data is not saved and/or applied to a prefab there is nothing we can do.

    If you are looking for a workaround then I recommend contacting the developers of TMP to see if there is a way to save the material properties in a prefab instead of in a font/material asset.
     
  18. ColtonK_VitruviusVR

    ColtonK_VitruviusVR

    Joined:
    Nov 27, 2015
    Posts:
    140
    Hey @Visual-Design-Cafe
    We are using your nested prefabs with Unity 2017.1.1. We are currently optimizing our game as it launches in 2 weeks. Going through the profiler I am seeing alot of items loadeed into the scene that have no reference to the scene, could this have something to do with your plugin?
    Cheers,
    Colton

    EDIT: We are currently using version 1.3.2
     
    Last edited: Feb 9, 2019
  19. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    296
    No additional objects should be included because of Nested Prefabs. The only thing added by Nested Prefabs are references to the prefab assets for nested prefabs. So only those original prefabs might be included.

    If you want to be completely sure that you have the best performance and that nothing is added because of Nested Prefabs then please make sure to preprocess the project before making a build. You can read more about it in this article. Preprocessing will essentially temporarily uninstall Nested Prefabs so that no additional data is included.
     
  20. kappysan

    kappysan

    Joined:
    Dec 7, 2018
    Posts:
    4
    こんにちは、Unity2018.3でイメージの機能を試してみたいと思います。しかし、Unity 2018.3では "Apply"が消えているので、画像の機能を実行する方法がわかりません。ありがとうございました。私はあなたの答えを待っています。
     

    Attached Files:

  21. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    296
    Unity 2018.3から、Unityのnested prefabsがあるので、Visual Design CafeのNested Prefabsは使えません。Visual Design CafeのNested Prefabsを使いたかったら、Unity 2018.2を使ってください。
    2018.3前にVisual Design CafeのNested Prefabsを使うプロジェクトがあったら、そのプロジェクトを2018.3にマイグラート出来ます。

    Starting from Unity 2018.3, Unity has its own nested prefabs so you can't use our Nested Prefabs anymore. If you want to use our Nested Prefabs then please use Unity 2018.2 or earlier.
    If you used our Nested Prefabs in a project before Unity 2018.3 then you can migrate that project to Unity 2018.3.
     
  22. ColtonK_VitruviusVR

    ColtonK_VitruviusVR

    Joined:
    Nov 27, 2015
    Posts:
    140
    Hey @Visual-Design-Cafe, I have removed Nest Prefabs from our project. I used your script to remove all missing scripts (which crashed the Editor). I have gone through each scene that I actually need and removed all null components (using a script similar to yours). I no longer have any null components in the scene but when playing I have 999+ warnings of missing scripts, how can I fix this?

    Cheers,
    Colton
     
  23. kappysan

    kappysan

    Joined:
    Dec 7, 2018
    Posts:
    4

    Hello, we can respond by performing later. Thank you for polite response.
     
  24. kappysan

    kappysan

    Joined:
    Dec 7, 2018
    Posts:
    4
    Hello, Even if you own, this phenomenon has occurred. How should we fix this correspondence? I am waiting for your answer.
     
  25. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    296
    We have found the cause of the issue and will release an update soon. It should be available by the end of the week.