Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by Lewance · Jan 11, 2016 at 11:53 PM · c#script.gameobjectstagstutorials

[solved] Survival Shooter - 'Player' tag mysteriously filled

I'm working through the Survival Shooter Tutorial for Unity 5.x - using the PDF adjustments. I have just finished adding the first enemy, who uses a Nav Mesh Agent to chase the player.

When I ran the program the enemy simply moved towards the origin point.

The player''s position is identified in the zombunny's controller script by the line "player = GameObject.FindGameObjectWithTag("Player").transform;" in awake and "player.postion;" in update So the first thing i tried doing was to log the player position.

The debug log kept returning even when i moved the player (0.0, 0.0, 0.0) so I tried changing both the player's tag and the searched for tag to "PlayerActual", this worked and made the zombunny chase the player.

I wanted to see what was wrong with the original however so I tried returning the code to it's original state and adding a new line using the FindGameObjectsWithTag command instead, this found a list of 6 objects (the last of which was my player)

The other 5 objects do not move from origin, i don't know how to find out other information about them. But the thing I've checked the project heirarchy and there is no other object in it with the player tag (i've even checked all the child objects of things like "Environment").

So my question is how can i find out more about these other objects, or how can i get rid of them?

Many thanks,

Martha

p.s. I can upload my project if that'd be handy

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Lewance · Jan 15, 2016 at 04:05 PM

This turned out to be a bug or something in Unity, after rebooting my computer it was no longer there.

Comment
Add comment · Show 1 · 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 mnutsch · Aug 01, 2016 at 02:18 PM 0
Share

Thank you for posting this! You saved me a lot of time.

avatar image
0

Answer by gameengineer2016 · Sep 08, 2016 at 10:42 PM

I had the same problem and I was following the tutorial word for word (as well as the PDF for Unity 5.x fixes). The Zombunny only headed for the origin 0,0,0 which is the starting point for the Player. The player position was not being updated therefore the Zombunny simply went toward the origin.

The fix was simply closing and restarting Unity. I don't think rebooting the PC was necessary.

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

59 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 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 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 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

How to correctly count number of objects? 2 Answers

Destroy gameobjects several times in a scene. Also destroy other instances of that gameobject. 2 Answers

How to get the tags of objects if they aren't in the scene? 0 Answers

I want my script to wait 2 seconds before continue in a condition, in update, using C# 2 Answers

Need help with c# 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