• 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

Michel Verheughe commented

How to address scripts without knowing their names?

Jan 17, '13 getcomponent·name

2 Replies

0 Votes

avatar image

rajavamsidhar_gvs edited

[solved]how can i enable or disable a component of instantiated objects?

Mar 3, '16 instantiate·getcomponent·disable·enable

5 Replies

0 Votes

avatar image

MachCUBED commented

'thrust' is not a member of UnityEngine.Component

Mar 30, '12 getcomponent·component·hud

1 Reply

1 Votes

avatar image

sdgd commented

I'm having more problems accessing a variable from another script in c#

Jan 19, '13 c#·variable·nullreferenceexception·getcomponent

2 Replies

0 Votes

avatar image

tothemario answered

How to FindChild RectTransform and access its Text

Dec 4, '19 array·text·getcomponent·recttransform·findchild

2 Replies

0 Votes

avatar image

ppddgg published

C# Access to a variable by another script attached in a gameObject in the scene.

Jul 3, '12 c#·getcomponent·variables

2 Replies

0 Votes

avatar image

madmike6537 answered

Trouble with OnTriggerEnter and GetComponent

Feb 25, '13 getcomponent·ontriggerenter

3 Replies

0 Votes

avatar image

kecaj asked

changing variable in other script

Feb 13, '11 getcomponent·syntax

2 Replies

0 Votes

avatar image

duck edited

How should I use the Generic versions of GetComponent and AddComponent?

Oct 13, '10 getcomponent·addcomponent·generics

3 Replies

0 Votes

avatar image

Ricky Stefani asked

Deactivate Script

Apr 11, '11 gameobject·getcomponent

1 Reply

0 Votes

avatar image

aon9426 published

Argument Exception: GetComponentFastPath? built .exe of the game crashes!

Oct 26, '16 in Help Room

3 Replies

1 Votes

avatar image

pickledzebra asked

Adding Arbitrary Properties to GameObjects

Jan 19, '11 gameobject·getcomponent·properties·addcomponent·arraylist

1 Reply

0 Votes

avatar image

Lairinus answered

Methods of Accessing scripts - performance & neatness

May 14, '13 performance·getcomponent·reference·static·access

1 Reply

0 Votes

avatar image

jasonmgeorge commented

Print current Transform of an instance in the debug log

Mar 22, '13 transform·getcomponent

1 Reply

0 Votes

avatar image

Krish-Vikram commented

Passing a string from Javascript to C#

Sep 19, '13 javascript·getcomponent·order

1 Reply

1 Votes

avatar image

Margallo published

Trigger animation

Mar 29, '17 animation·getcomponent·scriptingbasics·triggers

2 Replies

0 Votes

avatar image

Danixos published

Resources.load absolute path

Jan 18, '16 unity 5·getcomponent·resources.load

2 Replies

1 Votes

avatar image

Pierre 1 commented

Instantiate ID

Jan 27, '12 instantiate·getcomponent·id

2 Replies

0 Votes

avatar image

Eric5h5 edited

error CS0308: The non-generic method `GetComponent' cannot be used with type arguments

Aug 16, '10 getcomponent·type·argument·cs0308

2 Replies

0 Votes

avatar image

ZouBi27 edited

GetComponent null reference C#

Oct 4, '13 getcomponent·exception·null reference exception·accessing scripts

1 Reply

0 Votes

avatar image

runevision edited

Why can't I set GetComponent(Some_Component).enabled = false; ?

May 6, '10 audio·getcomponent

2 Replies

1 Votes

avatar image

Jesus_Freak commented

AddComponent not working

Jun 18, '11 getcomponent·addcomponent·ignore

3 Replies

1 Votes

avatar image

POiD commented

Getting a component of an instantiated object returns an error

Mar 4, '15 instantiate·getcomponent

1 Reply

0 Votes

avatar image

tank26677 published

Accessing instantiated GOs nested in prefabs with GetComponent

Feb 6, '12 gameobject·instantiate·getcomponent

4 Replies

1 Votes

avatar image

gameCoder asked

GetComponent Errors

Aug 20, '10 getcomponent·cs0029

2 Replies

1 Votes

avatar image

RoR edited

What's the difference between the two GetComponents?

Feb 17, '11 getcomponent·scriptingbasics

1 Reply

1 Votes

avatar image

uberokeer commented

Disabling a script in c# not working for some reason

Jul 26, '13 c#·getcomponent·enable·mousewheel

1 Reply

0 Votes

avatar image

ina asked

GameObject.Find() GetComponent() based assigns vs others?

Apr 11, '11 getcomponent·find·structure·theory

2 Replies

1 Votes

avatar image

fafase edited

Calculating the lowest number

Aug 22, '12 array·getcomponent·int

3 Replies

0 Votes

avatar image

Bunny83 answered

How to use GetComponent in a foreach loop? Closed

Nov 5, '19 getcomponent·foreach

3 Replies

0 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