Quantcast
Channel: Questions in topic: "tree"
Viewing all articles
Browse latest Browse all 513

How do you make a prefab into a tree? Or is it possible?

$
0
0
I downloaded free palm trees from the asset store and when I use the terrain tree paint tool, it doesn't work with those trees. I don't understand why this is happening but I'm sure it might be that fact that it just doesn't have the right parts of a tree to be painted. But it already has a prefab( I could mass place the prefabs with a prefab brush I have, but that would lag the game). I only have 2 choices: I place the trees with the prefab brush and take on the lag OR I need to figure out how to make that tree usable in unity terrain brush tool So the question is: How do I accomplish this? How can I make the tree prefab into a valid tree so that I can use it in unity terrain tools. And it would also help if someone could tell me this: If I have to use the prefab brush, how can I prevent my game from lagging? I know it's because I there is so many prefabs but is there a way to load them and unload them when I'm in the tree's view? If this doesn't make sense look at this code: using UnityEngine; using System.Collections; public class renderGrass : MonoBehaviour { // Use this for initialization //public float drawDistance = 0.5f; void Start () { Terrain.activeTerrain.collectDetailPatches = false; //draw distance is optional //Terrain.activeTerrain.detailObjectDensity = drawDistance; } // Update is called once per frame void Update () { } } Let's say I painted a bunch of grass in my terrain. It will lag a lot right? This code makes it so the grass is not loaded or seen (rendered might be the word) until I approach it. That's its purpose. I want to do the same concept for placing trees with the prefab brush if I have to.

Viewing all articles
Browse latest Browse all 513

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>