Search Unity

Probuilder Shape Tool settings.. saved where?

Discussion in 'World Building' started by Kreag, Feb 14, 2020.

  1. Kreag

    Kreag

    Joined:
    Dec 5, 2014
    Posts:
    7
    Hi,
    So, my dog sat on my keyboard (yeah right), and hit the 0 too many times after the 1 on the shape tool default size and made a plane that is so large, by default, that unity locks up. I can't even open the dialog. Where are the default sizes for the shape tool stored? Somewhere in the windows registry I'm guessing?

    I'm not embarrassed at all... like I said.. the dog did it... really.
     
  2. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    552
    This is my favorite bug report :)

    While trying to sort this out myself I found a bug in the Shape Editor settings, so this fix is going to be a little more involved than it should be.

    First step, let's get Unity launching again. Delete the "LastLayout.wlt" file found in either:

    Code (CSharp):
    1. macOS:
    2. ~/Library/Preferences/Unity/Editor-5.x/Layouts/default/
    3.  
    4. Windows:
    5. C:\Users\Username\AppData\Roaming\Unity\Editor-5.x\Preferences\Layouts\default\
    Next, install the patched ProBuilder package in your project. Open Package Manager, enable "Preview Packages", and install ProBuilder 4.2.4-preview.0 (it should be available about 30 minutes from the time I post this).

    With the patched version installed, open Preferences, navigate to the ProBuilder section, click the "Gear" icon and "Reset All."

    Screen Shot 2020-02-15 at 4.51.19 PM.png
     
    C0descr1pt, FernandoMK and Kreag like this.
  3. Kreag

    Kreag

    Joined:
    Dec 5, 2014
    Posts:
    7
    Woohoo! That worked, thank you :)
    First thing I'm going to do is make stairs... 'cause I can. (not because I need them)
     
    kaarrrllll likes this.
  4. EpicGamer3

    EpicGamer3

    Joined:
    Feb 17, 2020
    Posts:
    2
    Hello,
    I have the same issue, but with stairs and steps and the reset all thing is not working. Also I can't find ProBuilder 4.2.4-preview.0 and I have preview packages on. Please help.
     

    Attached Files:

  5. shohamalh

    shohamalh

    Joined:
    Apr 11, 2020
    Posts:
    1
    Hey,
    I have the same problem but the solution didn't work and I'm crying here :<
    I (not accidentally, wanted to push my limits but paid for it badly) put a REALLY large number of stairs, like exponentially large.

    opening the ProBuilder window takes 30GB of RAM, and counting.

    help ._.

    thanks,
    Shoham
     
  6. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    552
    @EpicGamer3 @shohamalh to see ProBuilder 4.2.4-preview.0 you need to enable preview packages in the Package Manager.

    Can you provide any more details as to what part is not working? Were you able to find the LastLayout.wlt file?
     
  7. pupperin

    pupperin

    Joined:
    Feb 4, 2020
    Posts:
    3

    i can't find that file can you help me find it?
     
  8. ReubenRomero

    ReubenRomero

    Joined:
    Apr 30, 2020
    Posts:
    1
    I also entered an upsettingly large amount of stairs. Unity still runs fine, just not if I try to open shape tool settings with alt+click. Resetting all did not fix it, sadly.

    Edit: I also uninstalled and reinstalled probuilder but my shape tool settings were still there somehow so it crashed again.

    Edit: I got it to resolve itself by just letting my PC build the 20,000 stair asset. Thankfully it finally did. Would be nice to have an easier fix than that though. if it would have been 1,000,000 stairs I'd be screwed.
     
    Last edited: May 14, 2020
  9. StudioPanko

    StudioPanko

    Joined:
    Jan 4, 2017
    Posts:
    1
    Well, dumbass me went to add another zero behind my 1000 length segments Plane in New Shape window, and everything came to a halt.

    Managed to get around it with this rather adhoc hack:
    1. In Project window, go to Packages/ProBuilder/Editor/EditorCore/
    2. Open ShapeEditor.cs
    3. Find the right ShapeBuilder that you have entered a dumb number in. For me, it's in Planes...


    class Plane : ShapeBuilder
    {
    static Pref<float> s_Height = new Pref<float>("ShapeBuilder.Plane.s_Height", 10, SettingsScope.User);
    static Pref<float> s_Width = new Pref<float>("ShapeBuilder.Plane.s_Width", 10, SettingsScope.User);
    static Pref<int> s_HeightSegments = new Pref<int>("ShapeBuilder.Plane.s_HeightSegments", 3, SettingsScope.User);
    static Pref<int> s_WidthSegments = new Pref<int>("ShapeBuilder.Plane.s_WidthSegments", 3, SettingsScope.User);
    static Pref<Axis> s_Axis = new Pref<Axis>("ShapeBuilder.Plane.s_Axis", Axis.Up, SettingsScope.User);

    public override void OnGUI()
    {
    s_Axis.value = (Axis)EditorGUILayout.EnumPopup("Axis", s_Axis);

    s_Width.value = EditorGUILayout.FloatField("Width", s_Width);
    s_Height.value = EditorGUILayout.FloatField("Length", s_Height);

    if (s_Height < 1f)
    s_Height.value = 1f;

    if (s_Width < 1f)
    s_Width.value = 1f;

    s_WidthSegments.value = EditorGUILayout.IntField("Width Segments", s_WidthSegments);
    s_HeightSegments.value = EditorGUILayout.IntField("Length Segments", s_HeightSegments);

    if (s_WidthSegments < 0)
    s_WidthSegments.value = 0;

    if (s_HeightSegments < 0)
    s_HeightSegments.value = 0;
    }

    //TWEAK THE RELEVANT SHAPE'S BUILD FUNCTION
    public override ProBuilderMesh Build(bool preview = false)
    {
    return ShapeGenerator.GeneratePlane(
    EditorUtility.newShapePivotLocation,
    s_Height,
    s_Width,
    s_HeightSegments,
    s_WidthSegments, //FOR ME, I CHANGED THIS VAR TO A HARD INT VALUE OF 10
    s_Axis);
    }
    }


    1. Replace the Build parameters that u entered a value too high (for me it's s_WidthSegments), with a small int value (I went with 10).
    2. Save it, now open New Shape, and you should see that even though your big number is still in the inspector, the shape generated is now generated with the hard value you replaced.
    3. Now (FFS finally), change the value in the inspector to something small, and close this window.
    4. Return to the script and replace your hard value back with the correct variable.
    5. Save and return to the peaceful world.
    Took me 2 hours to dig S*** up in probuilder. All the above didn't work for me. I'm not a coder enough to know where Probuilder (or Unity) stores all the temp window value inputs.

    Maybe a suggestion:
    1. Expose an option button in Edit/Preferences/Probuilder: 'Reset Shape Parameters'.

    Hope this can help anyone.
     
    TanksOP, Dewelly and geeosp like this.
  10. pupperin

    pupperin

    Joined:
    Feb 4, 2020
    Posts:
    3
    where do you put or where do you write the 10?
     
  11. consulardavid

    consulardavid

    Joined:
    Feb 8, 2020
    Posts:
    2
    where your messed setting is. like for me it is the steps.
     
  12. pupperin

    pupperin

    Joined:
    Feb 4, 2020
    Posts:
    3
    I also messed up at steps
     
  13. FernandoMK

    FernandoMK

    Joined:
    Feb 21, 2017
    Posts:
    178
    I had the same problem here. I just needed to fix the prefences that already worked. Thank you for the tip.

    The strange thing is that the probuilder saves the shape settings for all projects, I think this should have an option to disable this.
     
  14. Hassan_King

    Hassan_King

    Joined:
    Dec 23, 2020
    Posts:
    2
    I tried everything that you said and the other comments but still not working for me it's been 3 days but still.Any other way please
     
  15. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    552
    @Hassan_King what exactly is not working? Are you able to open Unity? What version of Unity and ProBuilder are you using?
     
  16. Hassan_King

    Hassan_King

    Joined:
    Dec 23, 2020
    Posts:
    2
    i'm sorry it's working now i could not found LastLayout file and now i deleted it and now it's working Thanks and can i use the verified version now? as i'm new in this community and Thanks again. :)
     
  17. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    552
    Glad it's working. Yes, it's always safe to update the latest verified version. Previews on the other hand may contain bugs, so it is usually not recommended to use preview packages in production.
     
  18. Brage-n

    Brage-n

    Joined:
    Jan 2, 2021
    Posts:
    1
    Where can you find the “LastLayout.wlt” file? I also have problems with to many steps on the stair and unity is now crashing.
     
  19. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    552
    macOS:
    ~/Library/Preferences/Unity/Editor-5.x/Layouts/default/

    Windows:
    C:\Users\Username\AppData\Roaming\Unity\Editor-5.x\Preferences\Layouts\default\