Simple Fence Builder

This has now been released on the Asset Store

It’s something I’ve been working on for a little while now (WIP thread is here), and came about because of the time I realised I was spending trying to position prefabs to create fences around my terrains and I thought that there must be a quicker, easier way of doing this and also allow me to create something procedurally that I found tricky to get looking ‘right’ doing it manually.

2 Likes

That’s very clever and great !!!
6R

Thanks.

It’s one of those things that you develop for your own needs, show it to a few friends who come up with other suggestions and it grows from there :slight_smile:

Before I knew it they were telling me that I should release this for everyone on the Asset Store as there were others that could get some use out of it.

Version 1.0.1 is now being submitted to the Asset Store.

I’ve spent some time updating the assets section of Simple Fence Builder to provide a preview image of prefabs that you’re using, as well as other options that can be applied if you so wish. :slight_smile:

2348930--159040--NewAssetsWindow.jpg

These extra options allow you finer control over how the prefabs will appear - very useful if you want to create a line of bushes…

… instead of a fence :), or even a row of houses …

… that could sit next to a path in your town/village :smile:

1 Like

v1.0.1 is now on the asset store

1 Like

To those who have bought this from the asset store recently, I hope you’re finding it useful :slight_smile: Could I ask you to please rate this and if you want to, leave a review? Thanks.

A minor bug came to light over the weekend if you try and compile a standalone build - it doesn’t affect the play mode from within the unity editor. This will be remedied soon and an updated version will be submitted to the asset store.

Thanks.

v1.0.2 is now on the asset store :slight_smile:

This is very interesting asset. It looking at how you placed trees and houses and was think you could also use this to place a large number of troops in lines. The US Revolutionary War comes too mind especially those British troops who only marched in straight lines.

You can use any gameobject you like :slight_smile: It was after I’d got it finished that a friend suggested I start a town builder, so just as a quick test I put in a house prefab just to see what happened

hmmmm… Wonder who that was… heheh I never have got back to try using it that way, but loved the screenies you showed it being done in.

Those straight lines date way back. Pretty sure that tactic goes back centuries and think they continued up into at least WWI… I think that is a good idea for spawning those kind of troop lines though, at least for initial spawns. Not sure how they would work at runtime though, or runtime spawning. Definitely something to play around with if you are doing that type of game.

The uses of this tool goes WAY beyond fences! Great work @smada-luap !

Thanks for the clarification. Every since Gaia came out I have been looking at so many more assets then I would have previously.

My first thought originally was being able to place guards behind the fence at different intervals.

Agreed. But since I was looking at that time period it was the first thing that came to mind. The thing I found interesting is being able to place game objects in perfect straight lines or the slight variation.

Hopefully more people will see that this tool can be used for many more things.

@longroadhwy Please feel free to post any pics of what you may be experimenting with :slight_smile:

To celebrate that Spring is almost here (hurray for slightly warmer weather here in the UK :smile: ), I’ve put the asset on sale at a 25% discount for a while.

1 Like

You should have a link from your Unity asset to this forum thread to. It seems like not all assets do that for some reason. Gaia has a link from their asset for example.

Thought I had. :face_with_spiral_eyes:

I’ll get the metadata info updated :slight_smile:

1 Like

Working on creating a simple area that would form the centre of a town and wanted to fence it off but leave entry points at each of the 4 cardinal points. Created this using a single fence by just adding in a ‘gap’ piece at regular intervals rather than putting 4 L-shaped fences at each of the corners :slight_smile:

The fence model is from @S4G4N 's exterior kit in case you were wondering.

2 Likes

Thanks for this great tool. One minor change we had to make though:-
Our terrains have a position offset in y and we found that CreateFence didn’t take this into account. We had to edit the SampleTerrain function so that it returned (terrain.SampleHeight(position)+terrain.transform.position.y);

Glad you’re liking the tool.

Hmm… I’ll admit that it never occurred to me that anyone would have the terrain at anything other than a zero value of Y :slight_smile:

I’ll make an update for the store just in case anyone else in the future is in the same position that you are.