• 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

Getcomponent

Cancel

Cancel

All Questions

  • Unanswered Questions
avatar image

rengiku commented

Access gravity modifier in the particle system by Script (C#)

Jan 25, '16 c#·gravity·getcomponent·particlesystem·modify

1 Reply

1 Votes

avatar image

DroidifyDevs commented

GetComponent in namespace cannot reference a script in no namespace

Jan 30, '16 in Help Room

1 Reply

1 Votes

avatar image

lucariolu3d commented

HasComponent

Jun 4, '20 c#·unity 5·getcomponent·type·generics

4 Replies

1 Votes

avatar image

liam1135 published

Getting typename from collection.

Feb 15, '16 in Help Room

0 Replies

1 Votes

avatar image

Teh_Keeper commented

Getting variable from instantiated clone instead of prefab C#

Mar 17, '16 in Help Room

2 Replies

1 Votes

avatar image

EvanBindz published

UNet: How to get isLocalPlayer from a parent

Aug 2, '16 networking·unity5·network·getcomponent

1 Reply

1 Votes

avatar image

TBruce edited

Trouble understanding why GameObject.Find works but declaring/initializing a GameObject and using GetComponent does not

Jun 20, '16 in Help Room

1 Reply

1 Votes

avatar image

YoungDeveloper edited

Upcast vs GetComponent

Jun 22, '16 in Help Room

1 Reply

1 Votes

avatar image

Bunny83 answered

AddComponent with parameter variable

Jul 6, '16 variable·getcomponent·parameters·type

2 Replies

1 Votes

avatar image

rodude123 edited

how i can Get component in FindGameObjectsWithTag ???

Apr 28, '20 c#·getcomponent·findgameobjectswithtag

2 Replies

1 Votes

avatar image

Reverend-Speed answered

Why does gameobject.Find/GetComponent not work when a new scene is loaded?

Sep 2, '16 getcomponent·loading·reference·cache·gameobject.find

1 Reply

1 Votes

avatar image

Remyx published

GetComponent().Play(); Question(s)

Sep 2, '16 c#·audio·trigger·getcomponent

2 Replies

1 Votes

avatar image

Filhanteraren commented

Using GetComponent

Dec 23, '16 in Help Room

0 Replies

1 Votes

avatar image

anmre21 commented

Gameobject reference disappears at start

Dec 31, '16 in Help Room

1 Reply

1 Votes

avatar image

zak666 answered

Photon instantiate (Assign Instantiated . get component

Mar 15, '17 instantiate·photon·getcomponent

1 Reply

1 Votes

avatar image

AndreM1 commented

Object reference; sometimes works but sometimes doesn't???

Apr 5, '17 in Help Room

2 Replies

1 Votes

avatar image

CamCreates answered

How can I use a variable with getcomponent()?

Dec 23, '20 getcomponent·type·casting·typecasting

2 Replies

1 Votes

avatar image

Davirtuoso commented

Issue referencing a method that exists in a component that is only decided at runtime

Apr 13, '17 in Help Room

1 Reply

1 Votes

avatar image

oliver82957 commented

Problem when Getting a component from a non Mono Behavior class.

May 10, '17 c#·error·getcomponent·standard assets

1 Reply

1 Votes

avatar image

SohailBukhari answered

What is the difference between GameObject.GetComponent and Component.GetComponent?

Jun 7, '17 gameobject·getcomponent·component

1 Reply

1 Votes

avatar image

dmt_unity commented

GetComponentsInChildren only returns children if parent has them?

Oct 28, '17 getcomponent·vuforia

1 Reply

1 Votes

avatar image

Igor_Vasiak edited

New to programming - Can someone please explain getComponent?

Nov 9, '17 in Help Room

1 Reply

1 Votes

avatar image

Hellium commented

Accessing a variable using Get Component from other GameObject Script

Feb 22, '18 in Help Room

1 Reply

1 Votes

avatar image

Hellium commented

More efficient way to check if GetComponent is null before the actual GetComponent Call?

Dec 16, '20 getcomponent

2 Replies

1 Votes

avatar image

JuanuHaedo answered

Unity 2018.1 - IJobParallelFor: Getting color of object which was hit by a raycast

Nov 17, '18 color·getcomponent·raycasting·parallel

1 Reply

1 Votes

avatar image

PultroN93 answered

Get component from parent of children hittet with raycast

Oct 1, '18 in Help Room

1 Reply

1 Votes

avatar image

GreenSerpent edited

How to access a public string attached on a UI Button

Nov 26, '18 button·getcomponent·variables·string·concat

1 Reply

1 Votes

avatar image

AbubakrKhan answered

GetComponentInChildren returns null during Awake()

Feb 7, '19 getcomponent·awake·dependencies

1 Reply

1 Votes

avatar image

jimm84 answered

Issue with animator not working when key is pressed - Script and Animator communication - 2D - MissingComponentException

Jul 23, '19 button·animator·mecanim·getcomponent·state-machine

3 Replies

1 Votes

avatar image

KatieN edited

How to make an Array equal the Components of an Instantiated GameObject

Jul 26, '19 instantiate·array·beginner·getcomponent·getcomponents

1 Reply

1 Votes

  • »
  • ‹
  • 4
  • 5
  • 6
  • 7
  • 8
  • ›

Followers

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

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.

Related Topics

c# gameobject variable javascript instantiate scripting problem nullreferenceexception component error array unity 5 script. prefab variables boolean reference ui string find transform ontriggerenter text raycast type function


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