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 /
avatar image
0
Question by seth_slax · Oct 22, 2015 at 12:01 PM · gameobjectanimatormecanimfindgameobjectwithtag

Non-existent gameObjects appearing.

Hey everyone. I've looked through the forums and nobody seems to have any answers to this, but the common factor seems to be the Mecanim Animator component.

So I have a player object with an Animator component, tagged "Player". Quite frequently when I try to reference it via FindGameObjectWithTag("Player"), it will find a non-existent gameobject in the scene called Player(Clone) that can't actually be found anywhere in the scene. It has a Transform and Animator components that can't be accessed or changed.

This happens practically every time I try to reference it, to the point where I've added a child object to the Player and referenced it instead, which even still occasionally references a non-existent clone. Does anyone know why this happens, and better yet a solution to this? I'm using v5.2.1f1, and scripting in UnityScript.

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
0
Best Answer

Answer by seth_slax · Oct 26, 2015 at 02:27 AM

Ok, so I'm not entirely sure what causes the problem (possibly just something in the way Mecanim works), but it seems to work if you reference tagged mecanim objects in the Awake() function as opposed to the Start() function. I've tested it a few times and it doesn't seem to throw errors or create non-existent references.

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 seth_slax · Oct 27, 2015 at 12:35 AM 0
Share

Some additional discoveries - This does work most of the time, however it seems changing anything in the Animator component (trees, states etc.) causes this to happen again. Saving/Exiting and reopening fixes the problem again. A bit of a pain though.

avatar image
0

Answer by chaneya · Dec 30, 2015 at 05:07 PM

I'm having the same problem in Unity 5.3.0f4. I recently made a duplicate of my animator controller and I wonder is that has something to do with it.

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

34 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

Related Questions

Problems with Animator(Mecanim) 1 Answer

Can a Gameobject that is controlled by Animator be dragged by a non animator controlled object 1 Answer

Mecanim Transition-Arrow Pulsing 2 Answers

Get list of parameters of an AnimatorController 3 Answers

is it possible to read states / transitions from mecanim in runtime ? 2 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