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 /
avatar image
0
Question by GoldGamerGod · Jun 01, 2013 at 10:46 PM · editorterrain

Object2Terrain error/wont work.

I named a folder 'Editor' and added a script,naming it Object2Terrain,and when I paste the script of it in there,this comes up.

Assets/Editor/Object2Terrain.js(61,14): BCE0005: Unknown identifier: 'zCount'.

And theres no button in the Terrain menu,and I'm not good with Unityscript yet (im using Unityscript/Javascript) so I can't figure it out. How do I fix this?

Comment
Add comment · Show 6
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 ExTheSea · Jun 01, 2013 at 10:50 PM 0
Share

You should post your script or at least the related part of it. What i can think of from just the message is: You're trying to use a variable called zCount but never declared it.

avatar image GoldGamerGod · Jun 01, 2013 at 10:51 PM 0
Share

Well its the script on the wiki http://wiki.unity3d.com/index.php?title=Object2Terrain

I used it before but now it wont work.

avatar image ExTheSea · Jun 01, 2013 at 10:55 PM 1
Share

There is this line in the script:

     for (zCount = 0; zCount < resolutionZ; zCount++) {

which should be changed to

     for (var zCount = 0; zCount < resolutionZ; zCount++) {

I think

avatar image GoldGamerGod · Jun 02, 2013 at 03:06 AM 0
Share

Okay,i'll try that soon,i'll get back to you if it works or not.

avatar image GoldGamerGod · Jun 04, 2013 at 04:00 AM 0
Share

Sorry it took me so long to get back to you,I'm just able to test it now,i'll re-copy everything,double checking,and see if it works... soo give me a sec..Its working now...$$anonymous$$ost likely I copied something I shouldn't have or forgot something,my bad for pasting such a simple mistake :/ Thank you though.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by ExTheSea · Jun 02, 2013 at 10:23 AM

Hm i just tried it out myself and it worked even without the change i suggested. Are you sure you copied the entire code?

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

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

15 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Custom tab of Terrain inspector, is it possible? 0 Answers

Player damage stops working over time 0 Answers

Unity Terrain button wont show up. 1 Answer

editor script makes editor crash 1 Answer

Android build fatal error 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