Scripts on Terrain Trees

I noticed that when my trees in my game have colliders, the framerate drops by something like 100 (the trees are part of the terrain). What I would like to do is to have the trees check the distance from the tree itself to any moving object, and if the object comes close to it, then turn on the collider, and if the object is farther away, turn it off. I tried attaching the script to the tree asset and then updating it in the terrain engine, but the script doesn’t run. Is that because the trees aren’t actually GameObjects? In that case, is it possible for me to:

  1. Add a script to a terrain tree
  2. Reduce overhead by disabling tree colliders

Thanks in advance!

Hmm… well

You could get the location of the trees from here (pretty sure…I think).
And then have OTHER game objects at those locations, and turn THEIR collision boxes on and off. Best I got. Good luck.

I have colliders on a terrain with a lot of terrain trees without frame rate drop.
The best solution seems to put LODs on your trees with billboards and then culling as the distance grows.
SpeedTrees include these functions, but you can make it with any custom tree by getting LOD and billboard (I use Amplify Impostor) tools from the asset store.