Search Unity

Simple Fence Builder

Discussion in 'Assets and Asset Store' started by smada-luap, Oct 14, 2015.

  1. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    Once fences are created, I remove the scripts, etc. that are on the anchor so that I'm effectively left with an empty game object with lots of child fence prefabs. You could just as easily move the instantiated prefabs into another gameobject to fix their positions if you don't want to setup new anchors each time but are wanting to create lots of fences with the same prefabs.

    I've never come across this problem before and it has me stumped.
     
  2. GEOMETRICBYTES

    GEOMETRICBYTES

    Joined:
    Aug 23, 2016
    Posts:
    37
    Well, It has me stumped too, stumped, and with a lot of work to redo.
     
  3. Eitrius

    Eitrius

    Joined:
    Dec 30, 2013
    Posts:
    19
    Hello, I'm looking into getting this asset but am curious if it would work with something like a barbed wire fence on hilly terrain, since the end of each wire has to line up with the next. Can it rotate a section rather than offset the position (or other solutions)? Thank you
     
  4. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    It works by placing one prefab next to another, adding in a random amount of rotation (if you want any) along the route it's taking. A lot of the 'joins' are usually hidden by the geometry of the prefab in question (ie. the fence posts).

    The accuracy you may be looking for with regards to the wires matching up with each other may be down to how well they've been designed and how rapid the change from one prefab to the next is.

    You can manually adjust each prefab that is placed to get finer control over the placement should it not quite get it placed exactly where you want it. A word of caution if you do this - ensure that the anchor isn't moved again as the 'fence' will be recreated again and all manual changes will be lost. If you've got your fence where you want it, then you can remove the scripts, etc. on the anchor object so that you're then effectively left with an empty gameobject and then tweak each prefab if you need to.
     
  5. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
  6. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    To celebrate being a publisher for 2 years now, I've put this on a 20% off sale for October.
     
    mons00n likes this.
  7. radman5

    radman5

    Joined:
    Apr 26, 2017
    Posts:
    3
    Hi im really interested in this asset, can this be used during runtime? to build walls in an rts style game.
     
  8. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    It's main design is for scene building in the editor. Owing to the way it randomly places each piece, you'd get different results if you instantiated a prefab that had all the settings pre-determined and the terrain wasn't the same at each point you wanted to start at.
     
  9. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    The sale's coming to an end soon - don't know when but it'll be whenever the (re)submission to the asset store is approved.
     
  10. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Omg this fence building tool is soooooooooooo awesome lmao.
    Its just so crazy good.


    One issue i do have is the limit of 100 fence length. Trying to find where thats set.

    Random.seed is deprected btw.
     
    Last edited: Aug 31, 2018
  11. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    Alter the value of maxFencePieces in SimpleFenceBuilderEditor.cs

    You may have to restart Unity for it to reinitalise the arrays. I set it to 100 as I never envisaged anyone creating a fence with so many pieces.
     
  12. nankink

    nankink

    Joined:
    May 6, 2017
    Posts:
    15
    hey, i bought it expecting to use my mesh as terrain but it only supports unity terrain :(
    Is there anyway to detect the geometry instead of terrain? Or dunno.. maybe a refund?

    And thanks for the tool! It looks awesome! although it's not what I was hoping for..
     
  13. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    Sorry you're not happy with this. It was only ever designed to work with unity terrains.

    If you still want a refund, PM me with your invoice number and I'll get the process started with unity.
     
  14. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Honestly I wouldn't use mesh terrains. Now that Unity is focused on Terrain updates.
    Its gonna kick you real hard in a few months when you realize Unity is gonna be able to do everything mesh terrains does.
     
  15. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    @smada-luap I purchased this asset and ran into some errors importing into a Unity 2018.3.9 project.



    Any chance of getting an update for this?
     
  16. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    No idea as to what has happened here as there's no namespace usage at all in the asset. As for the second one, there's no such script in the asset and would appear to be something else from the initial pathname.
     
  17. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    @smada-luap Had a chance to experiment a little more with it. I think something must be bugging out with the project I tried to import into. I created a blank project and it worked out fine afterwards.