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. martman100

    martman100

    Joined:
    Sep 4, 2013
    Posts:
    44
    Another question. So I am looking for a tool to build a mesh that follows the contour of a terrain. Basically would like to click and have it then generate a mesh that I can export to a 3d program. The idea of my project is to have a off road track or road where I need to have more advanced texturing than what the standard unity terrain provides. I would uv map that mesh in say blender and then overlay that mesh on the terrain. Is there a way to do that with AFWB? Thanks again.
     
  2. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Interesting. AFWB only cares about the terrain height along the forward direction of the fence, i.e. It doesn’t care about any variation side-to-side. In the case of a road with width, would you need to care about that, e.g. Camber?

    If It’s enough to use a road or track that remains flat across its width, it could be possible to make a mod that does what you need. Could you contact the support address and we can discuss it, as it’s probably a bit off topic.

    Cheers

    Joe
     
  3. khushildep

    khushildep

    Joined:
    Oct 10, 2013
    Posts:
    13
    Is there an update coming? I'm using 2019.3 and there are a number of 'obsolete' warnings?
     
  4. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Yes, it will be submitted next week. Updates include a choice of section joint styles, improved realtime demo, some new motorsport-style fencing, and a basic path mode.
    In the meantime, none of those new warnings will affect functionality, but I appreciate it’s nice not to have them.

    Joe
     
    julianr likes this.
  5. khushildep

    khushildep

    Joined:
    Oct 10, 2013
    Posts:
    13
    Thanks Joe. I was trying this in latest 2018 LTS and I'm also getting obsolete warnings - same deal?
     
  6. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    That’s odd, thanks, I hadn’t checked the LTS, my understanding was they didn’t change any APIs. But yes, same deal.
    I’ll post again next week when it’’s submitted, but if you want a script update now to remove the warnings, you can drop a line to support.

    Joe
     
  7. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    There are some minor issues in the latest Unity 2019.3 with menu and button names being truncated. This will be fixed in an update soon.

    Thanks

    Joe
     
  8. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    We're ready to submit an update for any cosmetic issues and warnings found with the new Unity 2019.3 update.

    I've fixed a couple of labels that were getting their text truncated, along with the previously mentioned benign, but annoying warnings.

    If anyone has spotted anything else, please post here and I'll include it in tomorrow's bugfix submission, or a further feature update the following week (I've separated it in to two updates as one of the new features needs re-doing for 2019.3)

    Thanks

    Joe
     
  9. martman100

    martman100

    Joined:
    Sep 4, 2013
    Posts:
    44
    Ran into some problems recently when building multiple fences per scene and going back and editing them. I will suddenly start getting the errors below and the fence seems like it loses all of the control points and drops portions of the fence.

    upload_2020-2-22_11-17-52.png
     
  10. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Ok, I’ll look in to it, can you tell me AFWB, OS, and Unity versions?

    thanks

    Joe
     
  11. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Hi martman100, did you ever see this issue again? If so, could you let us have the version details (or at the least the Unity version for now).
    It would also be useful to know if this happened with preset fences, a user preset, or with user prefabs.

    Does the issue resolve if you move (or insert) one of the control points. Or change and revert the preset? Or click off Auto Fence Builder in the hierarchy, and back to it again?

    Thanks

    Joe
     
  12. visualjump3d

    visualjump3d

    Joined:
    Jun 6, 2014
    Posts:
    14
    Hi ! Can AutoFence work in realtime ( in-game ) ?

    I know the starting point and the one where the fence ends, can I generate it in runtime?
    can you reply in my mail (please)?
    visualjump3d@virgilio.it

    ThankYou !
     
  13. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Hi,

    I replied by email as requested. But for others reading...
    It is possible if you are comfortable with a little coding to supply the position node points as a list of Vector3s
    It's not currently supported to change the visual design during runtime. e.g transforming a brick wall in to a wooden fence, this is only supported in the editor.

    Thanks

    Joe
     
  14. whidzee

    whidzee

    Joined:
    Nov 20, 2012
    Posts:
    166
    Is there a way to export the generated meshes as an FBX so I could make any changes I need in my 3d program?
     
  15. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    julianr likes this.
  16. GCatz

    GCatz

    Joined:
    Jul 31, 2012
    Posts:
    284
    can the fence brake apart with collision ?
     
  17. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Hi, once the fence is designed/built and then “Finished”, it exists as a parented set of ordinary Unity Game Game Objects, so whatever you could do any other GameObject or mesh is possible. On the other hand, there is no destruction feature directly in the tool. Hope this helps.

    Cheers

    Joe
     
  18. GCatz

    GCatz

    Joined:
    Jul 31, 2012
    Posts:
    284
    ok, thanks
    btw small bug, the delete preset from favorites not working
     
  19. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    thanks very much for the info, fixed in next update.
     
  20. Haapavuo

    Haapavuo

    Joined:
    Sep 19, 2015
    Posts:
    97
  21. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Hi, thanks for the question.

    There are 2 main advantages of having a specialised tool for fences & walls.

    Speed: After importing the tool, you choose a preset then just start shift-clicking on the ground to build, there’s no learning curve or setup involved. You don’t need a lengthy preparation, and when it comes to editing, the parameters are specifically tailored for tasks related to fence design, such as distance between posts, number of cross rails etc etc.

    Assets: AFWB ships with hundreds of ready made fences and walls, meshes, textures etc. You can definitely make walls in the tool you mentioned, and similar tools (e.g. Curvy Splines), but you’ll either have to invest time modelling and texturing suitable source material, or buy from the Asset Store. Also keep in mind that if you wish to change the look/design of a wall using one of the general-purpose tools, it’s quite a big job, especially if the meshes are very different in scale. With AFWB you can change from a small picket fence to a huge castle wall with one click.

    You make a good point though. Given enough time I guess it is possible to get a similar end result with a general purpose spline tool provided you don’t need to iterate and audition multiple styles.

    Cheers

    Joe
     
  22. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Custom Prefab Issue

    A user found an issue with the latest AFWB/Unity combo which can cause users' custom objects to not correctly replace the built-in ones. There'll be an update posted soon, but in the meantime if it happens to you, you can contact us for a quick fix.

    Thanks

    Joe
     
  23. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    I get a few auto fence builder warnings:
    Autofence Builder warnings 1-28-2021.PNG
     
  24. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Thanks, this is fixed in the immanent update.
     
    wood333 likes this.
  25. Skymx99

    Skymx99

    Joined:
    Dec 12, 2015
    Posts:
    11
    I am using 2019.4 LTS and cannot use the controls to place or edit fences. Every time I try to place, it selects the object under the mouse click instead of placing a post.
     
  26. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Can you check if you have Gizmos enabled, they are needed for placement.

    Cheers

    Joe
     
  27. Mykra

    Mykra

    Joined:
    Feb 23, 2019
    Posts:
    2
    Hi, will AFWB work on my own lowpoly terrains that I've exported from Blender, or does it require that you use Unity terrains?

    Many thanks.
     
  28. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Hi, it will work on any surface that has a collider, so as long you add one after importing from Blender it’ll work ok.

    thanks

    Joe
     
  29. Mykra

    Mykra

    Joined:
    Feb 23, 2019
    Posts:
    2
    Thanks. It's working great. Amazing time-saver!
     
  30. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Thanks for the feedback!
     
  31. hodge47

    hodge47

    Joined:
    Apr 14, 2014
    Posts:
    25
    Hello,

    I am trying to create a fence profile that is just the posts. When I go to add my prefab, I immediately get a null ref for the object. Same thing if I just throw the model itself in there. Any idea why this would not work? I can edit the scriptable object directly, but it's much easier to do through the interface.
    A screenshot of the error -
    https://gyazo.com/5f68df6eb4e4b707306bfa8c42283b38
     
  32. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Hi, can you contact support and I’ll send you a fix for this.

    thanks

    Joe
     
  33. hodge47

    hodge47

    Joined:
    Apr 14, 2014
    Posts:
    25
    Sure thing, thanks!
     
  34. mtdev01

    mtdev01

    Joined:
    May 17, 2017
    Posts:
    10
    Is there API documentation somewhere?
     
  35. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    268
    I've used this successfully in the past but when opening a project with it I cannot shift-click to create a new fence. No matter what I do, I just end up selecting the object I click on. I've tried nuking the Auto Fence Builder gameobject, nuking existing fences, etc. Any ideas? Nothing interesting is showing up int he console. This is in Unity 2019.4.18f1. Same behavior happens in the Demo Scene as well. Thoughts?
     
  36. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    268
    OK I don't know what the exact cause was, but resetting my Unity layout fixed it. Something in the layout was configured in such a way that OnSceneGUI was not firing in AutoFenceEditor.cs. As soon as I reset the layout, it started hitting. /shrug
     
  37. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Hi, sorry for any apparent delay in replying, on European time here. I’m pretty sure the issue was caused by gizmos being disabled which would have got reset. Thanks for letting us know, and get in touch if you have any other questions.

    Cheers

    Joe
     
  38. ohbado

    ohbado

    Joined:
    Aug 13, 2014
    Posts:
    37
    Hello.
    I have two questions.

    1. When I use a custom object, selecting "Keep original collider" also removes the collider..Is this the correct behavior?
    2. Is it possible to keep the original prefab reference of the custom object when finishing the fence of the custom object?
    Thanks.
     
  39. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Hi, I’ve replied to your email.

    Thanks

    Joe
     
    ohbado likes this.
  40. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Auto Fence & Wall Builder 3.4 released on Asset Store

    This is mainly updates & bug-fixes to conform to changes made in Unity in the last year.

    HDRP and URP is now supported.
     
    julianr likes this.
  41. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Auto Fence & Wall Builder 3.4

    How to use with HD Render Pipeline

    In order to maintain maximum backward compatibilty, the main version uses the Standard materials/shaders, and the HDRP assets are included in an archive.
    Please delete the following two folders:

    Auto Fence Builder/AFWB_Materials
    Auto Fence Builder/FencePrefabs_AFWB

    Then import the 'AFWB HDRP Prefabs & Materials' unitypackage
     
    julianr likes this.
  42. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Auto Fence & Wall Builder 3.4

    How to use with Universal Render Pipeline

    Unity menu: Window/Rendering/Render Pipeline Converter
    Select 'Built-in to URP', enable 'Rendering Settings' and 'Material Upgrade' and press 'Convert Assets'
     
    julianr likes this.
  43. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
  44. LarsH673

    LarsH673

    Joined:
    Mar 7, 2015
    Posts:
    17
    Two_Click_Tools likes this.
  45. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    At the moment, sections that span between posts (cables in your case) can only be stacked vertically, as is normal for fences, not horizontally. Do you already have the models for the posts and cables that you would use as custom objects? If so, and you contact support I could send you a mod to do this.

    Joe
     
  46. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Cable Joint Mod

    If anyone else want the cable-joint style mod as requested by LarsH673 above, it'll be in the next update in a couple of weeks, or if you want it now you can contact support twoclicktools@gmail.com



    (The posts look slightly different to those as they were a user's asset)

    Joe
     
    PeterBaker009, dock, sjm-tech and 2 others like this.
  47. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    609
    I’m enjoy this from my first impressions, but I have quite a few project specific use cases that I’m struggling with.

    1. Can I retain prefab references for rails or posts, such as particles ? I use a lot of components for gameplay on my fences.

    2. Can I request a parent gameobject for the spline, even while building? I use code to assess child prefabs with specific components.

    3. I use an addon called Peek which uses ctrl LMB and all RMB inputs. Are there other ways to edit?

    4. Finally, I really don’t enjoy the process of minimal installation. The 2gb install is really annoying when I have to delete 90% of it. My project uses only custom fence models, so it’s a bother to install this, and I’m worried about updating. Can you streamline this by making one folder optional, or making the presets a package to unpack? Do you plan to improve this in future?
     
    Last edited: Dec 26, 2021
  48. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    Hi, thanks for the questions. Just before going through the requests individually, it might be worth mentioning that AFWB isn't suitable as a general purpose spline tool, as this might be relevant to some points. During construction there isn't a 'spline' entity that gets hooked into, rather each key-point is calculated based on the previous point, elevation, slope, and direction to the next user's click-point. The end result is sort-of similar but restricts its use as an advanced spline tool.

    1. Each sub-section of a fence/wall is built from the ground up to deform with the ground/terrain and has its own uniquely constructed mesh, therefore the references to your custom models are not needed or retained. It's targeted at walls/fences models, and not a suitable tool to lay out arbitrary components along a spline. Sorry to be black & white on this point, but also for any other users who might read this, it's such a fundamental part of the tool's design, it's not a feature we plan to add/change.

    2. Yes, there's no explicit spline, but I could add a feature for you to request a list of key-points if you let us know what the most convenient method for your use-case would be.

    3. Yes, if you'd like to suggest a key/mouse combo for Insert/Delete (the 2 ops that use ctrl) I'll add it for you.

    4. Yes, we can include a separate package with a minimal install for you to extract, then put aside for each use. You would only have to do this once on first use any time there is an update. Have you already prepared one, or would you like me to send you an initial one now?

    If 2,3,4 could help you, please contact support at twoclicktools@gmail.com with the extra details. But I understand if point 1 is a deal-breaker for your project, in which case a refund is no problem if you'd rather use a spline tool.

    Thanks

    Joe
     
    PeterBaker009 likes this.
  49. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    609
    Thanks for the detaied reply! I probably need to spend more time with AFWB to fully understand its strengths and quirks. I don't need a refund, I just need to get used to it. Every tool is different.

    It would probably be best if you exposed the shortcuts to Unity's Shotcuts mapper, but I don't know what's involved in this. One of my clashes was using the right mouse button for example. I'll see how I get on over the next month or so.

    I followed the instructions on creating a minimal install, but it made me rather dread any updates in the future!! I'm used to addons that have either an optional folder of content, or a unitypackage file that users must double click to extract. I appreciate the effort that has been put into the premade assets, but unfortunately we are trying to keep this project clean of unused meshes and textures.

    Can you list the steps necessary for 'content free' users to upgrade AFWB without deleting their own presets?
     
    Two_Click_Tools likes this.
  50. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    250
    (Other users can disregard this unless you require a zero-content version of AFWB)

    I'll post again re. your other points, but for peace of mind in case you're experimenting with content-free upgrades:

    • Export these 3 folders as a single package: FencePrefabs_AFWB, Presets_AFWB, and UserGeneratedRailMeshes. Include Dependencies (If you already have the content-free version + custom stuff, these will be quite small.)
    • After upgrading, import the package from the previous step.
    • In AFWB Inspector: Globals->Refresh/Unload->Refresh Prefabs & Presets

    Thanks for the feedback on this. Having just tested by creating a minimal install, adding custom stuff, then upgrading, it works but is no fun! It will be improved before you need to upgrade to a new version. Working on it now.