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 Luci85 · Apr 11, 2012 at 04:25 PM · transform.positionmissingfieldexception

Field 'UnityEngine.Vector3.transform' not found

I get a MissingFieldException for this line, even though I can even print the transform.position in the console:

     uniqueRubberBand =  Instantiate(rubberBand, transform.position, transform.rotation);

And yes the script is attached to a gameobject.

Comment
Add comment · Show 7
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 Kleptomaniac · Apr 11, 2012 at 04:31 PM 0
Share

What is the type of rubberBand? GameObject? Or Transform?

avatar image Luci85 · Apr 11, 2012 at 04:32 PM 0
Share

It's a GameObject

avatar image Luci85 · Apr 11, 2012 at 04:37 PM 1
Share

600 Lines would be a little too much :-D

avatar image Kleptomaniac · Apr 11, 2012 at 04:44 PM 1
Share

Ah ... O$$anonymous$$ ... well this line is most definitely fine ...

Basically what the error is telling you is that somewhere you are using .transform on a variable of type Vector3, of which there is no such command. Thus, the compiler is generating a $$anonymous$$issing$$anonymous$$ethodException(). That's all I can tell you though ...

avatar image aldonaletto · Apr 11, 2012 at 04:48 PM 1
Share

Thanks for saving us of reading 600 lines! Post just the relevant lines: where rubberBand and uniqueRubberBand are declared, for instance. Check also if the error is really in the line you've posted - this error looks very weird!

Show more comments

1 Reply

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

Answer by Luci85 · Apr 11, 2012 at 06:08 PM

Found the error! Had a typo in the prefab script which was attached to the rubberband.

 Debug.Log(anchor.transform.position) //anchor:Vector3

So in retrospect the error message is right.

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

6 People are following this question.

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

Related Questions

Move different objects from point A to B with objects having different time to move b/w these points. 2 Answers

object reference not set to an instance of an object 1 Answer

Simple script to move object doesn't work 1 Answer

Script for passing and shooting a ball 1 Answer

fixed distance for Vector3.moveTowards ? 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