Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Auto Fence Builder [Released]

Discussion in 'Assets and Asset Store' started by Two_Click_Tools, Oct 18, 2014.

  1. Buckeye88

    Buckeye88

    Joined:
    Jan 23, 2023
    Posts:
    7
    I am trying to use Auto fence, but keep getting an error when I try to use the "Finish & Start New" button. It indicates a "Moving file failed" and appears to have an extra "/" at one point in the path. I'm not sure what to do to resolve this. If you look at the second line up from the bottom, right after "11-44-18" you'll see the "//". I'm assuming that's the problem, but not sure, and further, not sure how to fix it. I've tried reinstalling Autofence a couple of times and tried various fences, but nothing is working.

    Error Message.png
     
  2. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Hi, Haven’t seen this issue before. Can you try it in a new empty project initially, my first guess is that it could be related to something else installed in the project.

    What OS and Unity version are you on?

    Joe
     
  3. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Another thing to test is giving the wall a new name such as ’X’ when Finishing, this might give aa clue if you get another directory error.
     
  4. Buckeye88

    Buckeye88

    Joined:
    Jan 23, 2023
    Posts:
    7
    Hi Joe, I'm running on a Windows platform in Unity 2018.2.8f1. I'll run a test using the "X" and see what happens.
     
  5. Buckeye88

    Buckeye88

    Joined:
    Jan 23, 2023
    Posts:
    7
    So, I tried it in a "plain vanilla" project with nothing but a flat terrain ... two different fences ... both came through and finished no issues. I'm going back into my project to try using "X" as a name.
     
  6. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Thanks for the info, at least that narrows it down a bit
     
  7. Buckeye88

    Buckeye88

    Joined:
    Jan 23, 2023
    Posts:
    7
    I just tried using "X" as the name ... still won't work.
     
  8. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Thanks for trying that. It pretty much boils it down to a GSPro or Unity 2018 conflict with AF.
    Sorry for the inconvenience.
    I’m guessing it’s GSPro that’s limiting you to an old Unity version?
    I’ll install 2018 and try a few things and get back to you. (I’m on Euro time so it will be Tomorrow now )
     
  9. Buckeye88

    Buckeye88

    Joined:
    Jan 23, 2023
    Posts:
    7
    Thanks Joe, others are obviously using it as part of GSPro and I went all the way back so other than my specific course terrain and the basic GSPro package, nothing else was in the project other than AF. I've traced all the files and paths based on the error message and it looks like everything is generating the way it's supposed to, it's just not transferring out of the temp directory for some reason.
     
  10. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Tried various tests in 2018.2.8 and was initially unable to duplicate the issue. However, I noticed that your project folder is deeply nested, creating a very long directory path:
    D:\Access_Area\GSPro Course Building\Project Folder\Heritage Course Folder\Heritage_V1\Heritage_Unity_2
    (and then AF has to create a couple more folders to save your fences)

    So I tried replicating your deeply nested project path and sure enough I got your error.
    I moved Heritage_Unity_2 directly in to Access_Area, and the problem went away.

    So between Unity and Windows, there's a problem with the long path. (Doesn't seem to happen on Mac) As I've never seen this before I suspect that it's
    been addressed in recent Unity versions, but I appreciate you're limited to 2018.

    If possible move your project up a couple of levels, or shorten some of the names.
    In the next update I'll put up an error if it detects an oversized path... it won't fix it but at least the problem will be clear.

    Even without AF, I guess you're close to the path character limit, so it could be you'd hit this problem down the line if other directories get created for any reason.

    HTH

    Joe
     
    Last edited: Jan 24, 2023
  11. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Hi Ken, and by the way, to be safe I would delete the 'Library' folder in the top level of the Unity project folder.
    This will take longer to load next time as it'll rebuild all references, but I don't know if it will have cached the old location and still thinks it's a long path. I guess you could try without deleting it first, might be OK.
     
  12. Buckeye88

    Buckeye88

    Joined:
    Jan 23, 2023
    Posts:
    7
    Sorry, I'm not familiar with the "Library" folder you're mentioning. Can you give me a bit more detail on where to find it and if it impacts only AF or other resources/assets?

    Thanks for all the work digging into this. I'll try moving the project up a few levels on my drive and see if that works.
     
  13. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    No worries, try without deleting first.

    The Library folder is in the top level of any Project folder, so I guess directly in Heritage_Unity_2.

    It will force a rebuild & reimport of everything which could take 10 minutes if it’s a big project.
    (I often do it if I’m archiving a project or transfering across a network as it also halves the size of your project folder by removing obsolete references)
     
    Buckeye88 likes this.
  14. Buckeye88

    Buckeye88

    Joined:
    Jan 23, 2023
    Posts:
    7
    Okay, I moved the project up in the directory (shortened the directory path) and did not delete the library. The AF seems to be functioning perfectly now. Thanks for the help!

    ‘Separately, what terrain does the AF app decide to use when laying out the fences? I’ve got a couple of different terrains I’m working with and would like to “tell” AF which one to use. Is that possible?

    ‘thanks again for all the help!
     
  15. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Thanks for letting me know.

    AF will build on any object with a collider attached. As Unity terrains have colliders, it will use all terrains.
     
    Buckeye88 likes this.
  16. Panchos

    Panchos

    Joined:
    Oct 31, 2012
    Posts:
    34
    Hello. I've just purchased this today, and it works great with the included assets, but I'm finding it impossible to use my own objects.

    I created an object in blender exactly like the inbuilt meshes, with the pivot at the end and to the centre of the wall. After applying all transforms I import it into Unity and drag to the 'Custom Object Import' slot, but it appears badly shaped and out of rotation.

    I click the FIX XYZ button and whichever option I click, the option doesn't change in the scene on clicking preview. I attempt other buttons in the inspector like Rebuilt, Refresh etc after changing XYZ rotations but again, nothing happens.

    I can make it the correct way up with Rail A Rotation, but then the post is marked in the center and it doesn't repeat correctly

    Using unity 2021.3.5, thanks
     
  17. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Hi Panchos,
    Since v3.4 it should be possible to drag in a single mesh from Blender without any preparation, just leave your model exactly as created, with the pivot unchanged.

    When you say badly shaped, has the shape been deformed or is it just incorrectly rotated?

    Are there any submeshes? If so can you merge these in Blender so it is a single mesh.
    If that doesn’t work, could you send the mesh to twoclicktools@gmail.com.
    (I’m on European time, so I’ll check it in the morning)

    Thanks
    Joe
     
  18. Sterner

    Sterner

    Joined:
    Nov 11, 2012
    Posts:
    33
    Hi.
    I've been working with AFB last days and have a bit of feedback.
    First of all, that's a great and powerful tool with a variety of features and tweaks... but as long as you stick to included presets. As soon as I started using custom poles, rails and setup, troubles came. :(

    - From the beginning it refused to work from a package. Unity 2021.3.3f1 - "script can't be loaded" error
    Ok, we fixed that manually.
    - Tried to make "Content free version" using your tutorial. After export and trying to use, I get console spamming with crit errors. Seems it still trying to find deleted assets or something.
    - Editing fence lines after finishing. If I make gaps (Shift-Right Click option) along fence line and save it. Trying to edit it afterwards leads to some weird random swap between gap segments and filled segments. In other words, pressing "Edit" on a Finished Fence makes line that was a "gap" being filled with fence asset. Which makes all the "gap" feature useless.

    Problems with Custom Fence.
    Well, it's not the critical issue, I managed to work with it eventually, but it's more User Unfriendly design, I would say.
    Examples. There Prefab Type and Custom Object slot. I drop a custom object in a slot and it instantly become a prefab type and some other mesh. How to undo it? Deleting prefab? Deleting mesh? Not working or even leads to unexpected AFB behavior. Changing Prefab type? Ok, but Custom Object slot is still occupied with asset for some reason and it's confusing. I'm using some other prefab from the list while there assigned Custom Object that is not used.
    Variations. Why it it's always 4? What if I need only 2 variations or 6? And then, Custom Object assigning makes a new prefab. Variations assigning does not make a new prefab, but still gives you an option to choose from prefab list. That's weird. Does Variations include Custom Object assigned asset or not? These and some other minor issues give me a feel of uncertainty and ruining setup flow with a bunch of dragging and tweaking.
     
  19. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Hi Sterner

    Thanks for the detailed feedback.
    What OS/hardware are you on. I can't reproduce this in 2021.3.3, and the first report of the issue so would like to track it down if possible. (I guess you're on the latest AF v3.4?)

    Apologies, that shouldn't happen, I'll try again to reproduce it and get back to you.

    That's non-destructive by design, it's a copy whose mesh will need to be deformed at some point. Your original is left untouched. You're right, the text in the custom object slot isn't being cleared, it's confusing so I'll fix that. Maybe this was giving the unnecessary impression that AF's copy needed to be deleted? You don't need to delete them, just drag a new object in or change selection. AF does indeed use prefabs.


    I agree that is a longwinded PITA, a ready-made version is included by default in the upcoming version. If you could email twoclicktools@gmail.com I'll send you a package.

    It was limited to maximum 4 variations at the time of release to be conservative with resources and performance, and to some extent not predicting the need for many more. This is no longer necessary and will be upped, thanks for the feedback on this.
    Note, you can have 2 if you want (or 1,3,4) just don't use the redundant slots.

    I'll look closer at the other points tomorrow (I'm on Euro time) and get back to you.

    Cheers

    Joe
     
  20. Sterner

    Sterner

    Joined:
    Nov 11, 2012
    Posts:
    33
    Hi, Joe
    Thank you for your reply.
    Win 10 Ent.
    Intel Core i7-7700
    GeForce RTX 2060


    I get why you made it this way. It's just not quite "friendly" to operate this way at first.
    But what if I want to delete this element from presets?
    Yes. But again, it's confusing from the UX point of view. It would be better to have some numeric choice how much variations you want to have. 1 - one additional slot appears, 4 - four slots, and so on.
     
  21. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Good idea. The bulk of this functionality is presently being moved to context menus in the Scene View, so I'll keep this in mind for the new UI

    You can delete unwanted custom prefabs them in the UserGenetatedRailMeshes folder. TBH there's no plans to add prefab deletion functionality in the UI as it could cause unfixable problems for less experienced users.

    If you're able to reproduce the missing-gap-after reediting issue - or if anyone else has encountered this - drop me a line and I'll send a fix asap.

    Thanks

    Joe
     
  22. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    268
    Is it possible to ignore a layer during the auto-grounding of fence pieces? I am trying to have a fence go into water and it's sitting on top. While I can shut off the water during construction I would prefer an exclusion layer.
     
  23. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Hi, no there's no layer-based functionality, but I guess another workaround would be to temporarily disable colliders.

    Thanks

    Joe
     
  24. DragonSix

    DragonSix

    Joined:
    Jul 2, 2013
    Posts:
    37
    Edit: Oh damn, nevermind, my gizmos were off... that's why auto fence builder wasn't working.
     
    Last edited: Apr 23, 2023
  25. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Hi, thanks for updating your message. Yep, Gizmos can be a nuisance if they get accidentally deactivated.

    Joe
     
  26. TheGamery

    TheGamery

    Joined:
    Oct 14, 2013
    Posts:
    94
    In version 3.4 the file:

    "10-12-2021 09-30-04_[Finished Fence] Template Post + 2 Walls + Subs +Extra - Subtle Variation_Template Post + 2 Walls + Subs +Extra - Subtle Variation"

    In Auto Fence Builder/Editor/PresetsForFinishedFences/Basic Templates is too long filename for Git, can you shorten it for future releases?

    (To remove the Git error I had to remove "- Subtle Variation".
     
  27. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Hi, thanks for the feedback on this. Yes, many of the preset and component names have been shortened to address the git limitation. I’ll post back here soon with a release date.

    Cheers

    Joe
     
  28. HardCoal99

    HardCoal99

    Joined:
    Aug 7, 2023
    Posts:
    1
    Would love to see a fence like the one in the attached photo at some point. Thank you.
     

    Attached Files:

  29. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250

    Hi, thanks for the suggestion, I’ll upload a couple of ideas on Monday. How did you create the one in the picture?

    Joe
     
  30. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Sorry for the delay, here's a preset made just from existing resources in AFWB. Place it in:
    Auto Fence Builder/Presets_AFWB/Wood, (importing the package should do this automatically) then do a Globals->Refresh and you'll find it under Wood presets

    Golf Fence.png

    It's hard to tell from the picture if it's real or in-game, but if you have a more detailed or close-up picture of the fence I could add a new mesh.
     

    Attached Files:

  31. indiedev37

    indiedev37

    Joined:
    Aug 31, 2013
    Posts:
    27
    is this asset still in development / maintained. Does it work with newest versions of unity?
     
  32. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Hi, yes it's still maintained and due to be updated to version 4.0 soon. Fully supported if you need help, and yes it's been tested and working up to Unity version 2023.2.17

    Cheers

    Joe
     
    julianr likes this.
  33. indiedev37

    indiedev37

    Joined:
    Aug 31, 2013
    Posts:
    27
    Nice, good to hear :)