• 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

Fixes in upcoming releases of Unity Answers

Using a good tone of voice when replying to posts

Requests for new tags/topics

How to use the META space

How to use the Moderator space

Questions in topic: getcomponent

  • Unanswered Questions
  • Recommended Questions
Once you sign in you will be able to subscribe for any updates here
avatar image

maximill101 edited

GetComponent via String name?

5 days ago getcomponent·string·type

3 Replies

2 Votes

avatar image

Fireye04 commented

GetComponent(); returning null

6 days ago scripting problem·trigger·getcomponent·triggers·interface

1 Reply

0 Votes

avatar image

TobinCavanaugh123 answered

parent.parent.parent or FindObjectWithTag?

Jun 11, '22 getcomponent·parent

2 Replies

0 Votes

avatar image

Idual commented

Can't get a component from a parent!!

Jun 11, '22 movement·getcomponent·parent

2 Replies

0 Votes

avatar image

rickymanalo asked

Singleton field getter/setter doesn't work

Jun 2, '22 getcomponent·singleton

0 Replies

0 Votes

avatar image

Draken17 published

Trying to reference script that is attached to empty state in the animator. GetComponent Not Working

May 30, '22 in Help Room

0 Replies

0 Votes

avatar image

Monsoonexe asked

How to add items to the Component references context menu?

May 27, '22 editor·editor-scripting·getcomponent·contextmenu·right click

0 Replies

0 Votes

avatar image

angelonit commented

How to get a component from an object and add it to another? (Copy components at runtime)

May 19, '22 c#·gameobject·getcomponent·component·addcomponent

12 Replies

13 Votes

avatar image

Relan42 answered

Detecting when player isn't grounded when the ground disappears?

May 3, '22 getcomponent·platformer·collision2d·disable object

1 Reply

0 Votes

avatar image

Nameelee commented

How to get first depth child components of a parent object?

Mar 31, '22 transform·getcomponent·depth·getcomponentinchildren

7 Replies

4 Votes

avatar image

DevKonsept published

I want to check if variable is missing(not null),Can't check if object has missing variable

Mar 25, '22 in Help Room

0 Replies

0 Votes

avatar image

DevKonsept asked

I wan't to check if variable on a scritp component is missing

Mar 25, '22 in Help Room

0 Replies

0 Votes

avatar image

LukeDraper edited

Is it possible to override the texture component values even though the variable is set to public?

Mar 9, '22 vr·texture2d·getcomponent·oculus

0 Replies

0 Votes

avatar image

jasoncw88888 asked

Universal Stats Class for game character/objects

Mar 7, '22 in Help Room

0 Replies

0 Votes

avatar image

rhksdn2314 published

GetComponent, TryGetComponent and NullErrorWrapper GC Question

Feb 22, '22 in Help Room

0 Replies

0 Votes

avatar image

ccd01455 edited

How to assign an image to an object at level 2

Feb 20, '22 scripting problem·getcomponent

1 Reply

0 Votes

avatar image

jimmmmmy97 published

Unity: when I use raycast, getcomponet can not work under the if statement. I think the logic is reasonable. I do not know how to collect it...

Feb 14, '22 in Help Room

0 Replies

0 Votes

avatar image

ChillyRolande answered

Differentiate between two different components of the same type in GetComponent

Feb 14, '22 in Help Room

1 Reply

0 Votes

avatar image

loconeko73 commented

Design Advice: Power Up System (static variables?)

Feb 12, '22 getcomponent·powerup·leveling·static variables·static class

1 Reply

5 Votes

avatar image

andrew-lukasik edited

GetComponents() returns null while GetComponent() returns non-null. WHY

Dec 10, '21 in Help Room

1 Reply

0 Votes

avatar image

tios published

Script doesn't take health player script

Nov 29, '21 in Help Room

0 Replies

0 Votes

avatar image

Bran-A-Silva answered

How can I access a local variable in another scope?,I cant access the gameobject variable in the scope

Nov 27, '21 instantiate·getcomponent

4 Replies

0 Votes

avatar image

Sztormu answered

Why is there no camera attached?

Oct 29, '21 camera·getcomponent·screentoworldpoint·not found·missingcomponentexception

1 Reply

0 Votes

avatar image

Michael_Berna edited

Animator.SetBool not changing

Oct 14, '21 animation·gameobject·animator·getcomponent·animations

2 Replies

0 Votes

avatar image

monkfurts edited

GetComponent without Playmode

Sep 11, '21 in Help Room

0 Replies

0 Votes

avatar image

Luettgen answered

SetActive on a different gameObject's component? Audio Source

Aug 24, '21 c#·getcomponent·audiosource·audiolistener·audio source

1 Reply

0 Votes

avatar image

Infenix answered

How to update UI image mid-game (Unity, C#)

Aug 21, '21 c#·unity 5·sprites·getcomponent·ui image

2 Replies

0 Votes

avatar image

DanubePrivateUniversity published

mars get camera position

Jul 26, '21 camera·getcomponent

0 Replies

0 Votes

avatar image

podjigateligrey commented

how do I add link script to gameobject that already exist with attached script

Jul 25, '21 in Help Room

1 Reply

0 Votes

avatar image

raha90 commented

Change SetActive(true/false) from a GameObject which is child of a different ImageTarget

Jul 16, '21 nullreferenceexception·getcomponent·setactive·image target

1 Reply

0 Votes

  • 1
  • 2
  • 3
  • 4
  • 5
  • ›
  • »

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow This Topic

Follow This Topic

Follow by RSS

8 People are following this topic.

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

Popular Topics

c# animation android unity 5 camera 2d rotation javascript scripting problem collision ui gui error shader movement gameobject physics rigidbody editor ios texture networking raycast instantiate collider transform terrain mesh prefab input
View all

Recent Badges

  • Famous Question   A_Lego
  • Notable Question   AngeloDon
  • Popular Question   PvTGreg
  • Editor   johnathan080908
  • Notable Question   jfielding74
  • Nice Answer   ItsTwelveOclock
  • Notable Question   xiaolinl
  • Famous Question   Jake398
  • Famous Question   Jake398
  • Notable Question   msaldana


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