Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Aug 29, 2015 at 01:23 AM by getyour411 for the following reason:

Problem is not reproducible or outdated

avatar image
0
Question by Cubed-Studios · Mar 26, 2015 at 07:46 AM · editorterraintrees

Terrain Object Distance

Just tried to create a editor script for unity 5 to change the tree distance the code i'm using is giving me the error active.terrain is not a member of terrain any help would be appreciated.

  var distance = 5000;
  
  function Start () {
         Terrain.activeTerrain.detailObjectDistance = 40;
     }
Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Cubed-Studios · Mar 29, 2015 at 11:24 PM 0
Share

I have but i still keep getting the error active.terrain is not a member of terrain...Its really starting to bug me that i cannot figure it out.

avatar image MakakWasTaken · Mar 29, 2015 at 11:26 PM 0
Share

You shouldn't have a script called Terrain, this will give some errors in terms of referring the class.

avatar image Cubed-Studios · Apr 02, 2015 at 04:54 PM 0
Share

Oh sorry miss read, So if i name it something else it should work, I would also put this in the editor folder right, Thank your for you help greatly appreciate it .

avatar image Tehnique · Apr 02, 2015 at 06:12 PM 0
Share

Converted comment to answer; if it was ok and it works, please mark the answer so we can close the question.

1 Reply

  • Sort: 
avatar image
0

Answer by Tehnique · Mar 26, 2015 at 07:47 AM

Have you, by any chance, made a new script called "Terrain"? Otherwise, the code should work.

The editor will think you are trying to refer to your custom script named "Terrain", instead of the static Terrain object, and it will try to find the "activeTerrain" property on your script, that's why you get the error.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Why is my tree so gigantic? 2 Answers

Do all trees sway the same? And do bushes for that matter? 1 Answer

Scripts on tree prefab don't respond? 1 Answer

Where are my trees? 1 Answer

Tree color variation 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges