• 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

Rennat commented

Cache GetComponent correctly in C#

Aug 15, '11 c#·button·getcomponent·elevator

2 Replies

1 Votes

avatar image

Ted-Brown commented

Can you shorten "GameObject.GetComponent(Script)" to a variable?

Aug 9, '11 getcomponent

3 Replies

0 Votes

avatar image

FTheCloud edited

Talking To Other Scripts

Aug 4, '11 getcomponent·parent·child·communication

1 Reply

1 Votes

avatar image

Mathias commented

GetComponent(); in Awake cant be accessed in Update

Aug 1, '11 getcomponent·awake

1 Reply

0 Votes

avatar image

ConfinedDarkness answered

Accessing and using another objects script variable

Jul 26, '11 getcomponent·accessing·other object variables

1 Reply

0 Votes

avatar image

DaveA answered

Cannot get script component while the game object has a refered script

Jul 21, '11 camera·javascript·getcomponent

1 Reply

0 Votes

avatar image

AdamOwen answered

Variable Access Problem (Javascript)

Jul 16, '11 javascript·getcomponent·weapon·explosion·remote

3 Replies

0 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

fireDude67 edited

How can I check a variable in one script from another one in c#?

Jul 11, '11 c#·variable·getcomponent·cs0103

2 Replies

0 Votes

avatar image

GuyTidhar commented

Having to use the inspector during run time

Jul 7, '11 variable·getcomponent

1 Reply

0 Votes

avatar image

dibonaj commented

disabling a script when collide with a cube

Jul 7, '11 error·instantiate·getcomponent·collide·bce0018

3 Replies

0 Votes

avatar image

cregox commented

GetComponent and AddComponent with variables for Collider type

Apr 26, '13 c#·editor-scripting·getcomponent·addcomponent·cs0246

2 Replies

1 Votes

avatar image

solutionlab commented

GetComponent in parent question

Jun 4, '19 getcomponent·component·getcomponentinchildren

3 Replies

1 Votes

avatar image

zachypin commented

Reference Not Set toInstance of Object

Jun 27, '11 getcomponent·component·reference

1 Reply

0 Votes

avatar image

Skuzzbag commented

Trying to set MeshRenderer to false

Jun 27, '11 getcomponent·meshrenderer·enabled

1 Reply

0 Votes

avatar image

McMutton commented

Difficulties accessing other components

Jun 26, '11 array·getcomponent·component·accessing

4 Replies

0 Votes

avatar image

GuyTidhar commented

C# GetComponent

Jun 22, '11 getcomponent·c#-and-js

3 Replies

0 Votes

avatar image

dookos commented

C# how to make a script talk to a Coroutine in another script

Feb 21, '19 coroutine·getcomponent

2 Replies

0 Votes

avatar image

Kourosh commented

How to use getcomponent when there is more than one component with same name is assigned to the gameObject?

Jun 11, '11 getcomponent·unique

1 Reply

4 Votes

avatar image

christinayyma commented

How to get material name from instance

Jul 7, '17 material·getcomponent·name

3 Replies

1 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

Jesus_Freak commented

AddComponent not working

Jun 18, '11 getcomponent·addcomponent·ignore

3 Replies

1 Votes

avatar image

Grasshorse commented

Passing a Variable to an Instance

Jun 9, '11 instantiate·variable·getcomponent

2 Replies

0 Votes

avatar image

Eli-Davis commented

getting a variable from another script problem

Jun 5, '11 player·getcomponent·reference·level

1 Reply

0 Votes

avatar image

Eric5h5 answered

GetComponent - Root Hierachy

Jun 4, '11 getcomponent·hierarchy·root

2 Replies

0 Votes

avatar image

Savethewindfish edited

Error when using GetComponent<> in a C# script, on a javascript

Jul 2, '16 c#·javascript·getcomponent

2 Replies

0 Votes

avatar image

EOrbiter answered

How could you access a script of varying name?

May 20, '11 javascript·variable·getcomponent·type

5 Replies

0 Votes

avatar image

ina asked

Better to assign components to variables or reference directly each time

May 13, '11 mobile·getcomponent·component·find·assign

3 Replies

1 Votes

avatar image

Eric5h5 commented

Are .transform .gameObject .rigidbody component calls or just pointers?

Jul 9, '11 optimization·getcomponent·properties

3 Replies

2 Votes

avatar image

joseph b asked

error on script getcompnent function

May 9, '11 javascript·getcomponent

1 Reply

0 Votes

  • »
  • ‹
  • 44
  • 45
  • 46
  • 47
  • 48
  • ›
  • »

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