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 Cool Dave · Nov 13, 2012 at 05:00 PM · androiddynamic typing

Switching Platform to Android creates script errors

I have been running my game, (destined for Android) on my PC up until now. But I finally decided to go Build Settings>click on Android>Switch Platform. After reimporting tons of assets, it racks up 358 script errors, plus some warnings.

They are almost all either

BCE0005 'randomVar' is not a member of 'UnityEngine.Collider' or

BCE0019 Unknown identifier: 'finalTorque'

I can't go through all 358 of course, but is there something I'm doing wrong? I think all of my scripts are affected by this, so I'm pretty sure there's just something I'm not doing right.

Dynamic Typing? Something missing at the top of my scripts? Do I need #pragma strict or something?

Please help! I'm stuck right now.

Dave

Comment
Add comment · Show 9
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 SolidSnake · Nov 13, 2012 at 05:34 PM 0
Share

From my experience, most likely you are using generic var only? use the exact type for each variable ins$$anonymous$$d...

avatar image Cool Dave · Nov 13, 2012 at 05:38 PM 0
Share

I will do that. Thanks! BTW, do I need #pragma strict at the top? Also, do I need any namespaces or anything? Right now, my Javascripts have nothing at the top.

avatar image SolidSnake · Nov 13, 2012 at 05:41 PM 0
Share

its optional to have the pragma strict on top but its better to optimize your code

avatar image Cool Dave · Nov 13, 2012 at 05:43 PM 0
Share

Warnings come up on the top of my scripts that say that Namespaces "System.Collections" and "UnityEditor" are never used. Is that a problem?

avatar image SolidSnake · Nov 13, 2012 at 05:55 PM 0
Share

it shouldnt be a problem.. this might explains:

http://forum.unity3d.com/threads/103287-How-can-i-do-Warning-message-Namespace-System.Collections-is-never-used-%28BCW00

Show more comments

3 Replies

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

Answer by SolidSnake · Nov 13, 2012 at 06:07 PM

motorTorque in member of WheelCollider not Collider

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
avatar image
0

Answer by roymeredith · May 24, 2017 at 07:38 AM

I have same pRoblem it's ok in pc build, but when switched to Android it's shows an errors. Did you sort it out..it's doing my head in!!! ,I have same pRoblem it's find in pc build, when I switch to android it's shows errors..did you work it out?

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
avatar image
0

Answer by LSongulija · Sep 21, 2020 at 10:01 PM

Yes i had same problem. I bought game from asset store. Couldn't understand what was the reason that it throws like 30 errors when Switching to Android platform. In my case almost all errors were CS0246. So i find solution in https://support.unity3d.com/hc/en-us/articles/212065246-Why-does-integrating-Unity-IAP-result-in-compiler-errors-. In-App-Purchasing was turned of. When i turned in on almost all errors solved.

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

11 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

Related Questions

Can't add script - need to fix all compile errors 1 Answer

Level Button And Quit Button Android 2 Answers

Why are these errors messing with me? 2 Answers

[Re-Edited] Clone Of Bejeweled for Android 3 Answers

Script stops working when switching to Android 1 Answer


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