• 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

varosi commented

How to get a variable value from another script(C#)? Closed

Jul 14, '17 c#·gameobject·getcomponent

1 Reply

5 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

meat5000 edited

gameObject.GetComponent("Script").enabled = true not working

Apr 16, '16 gameobject·getcomponent·bool·enabled

5 Replies

2 Votes

avatar image

CrowaL edited

Get the child gameObject of a parent and not the Transform

Apr 30, '17 gameobject·getcomponent

4 Replies

3 Votes

avatar image

olejuer answered

How to find child with tag?

Jan 3, '20 getcomponent

5 Replies

1 Votes

avatar image

RomanorumLegio edited

Object Reference not Set to an Instance of an Object in C# (Closed)

Aug 15, '13 c#·bug·getcomponent·nullreferenceexeption

1 Reply

0 Votes

avatar image

BinaryCaveman asked

How to Access Components in Children of GameObject?

Aug 9, '10 gameobject·getcomponent·child·children·getcomponentinchildren

1 Reply

0 Votes

avatar image

JeevanjotSingh answered

Get slider value?

Jan 14, '15 getcomponent·slider·value

2 Replies

3 Votes

avatar image

ammirea edited

GetComponentInChildren Returning a Component in Parent Closed

Dec 2, '19 c#·getcomponent·getcomponentinchildren

4 Replies

4 Votes

avatar image

Asritha published

enable/disable script from another script c#?

Jun 18, '15 getcomponent·another script

2 Replies

1 Votes

avatar image

ahsen35813 converted comment to answer

Get variable from other GameObject's script Closed

Mar 30, '20 variable·getcomponent·other script

3 Replies

0 Votes

avatar image

ContinentalChamp commented

Can't Understand GetComponent C#

May 4, '21 gameobject·getcomponent·how·to·another

2 Replies

1 Votes

avatar image

steakPinball answered

Object reference not set to an instance of an object

Feb 3, '12 gameobject·getcomponent·public variable·findwithtag

3 Replies

0 Votes

avatar image

Lipis edited

If/else statements inside a function...

Mar 9, '10 getcomponent

5 Replies

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

daggertok commented

How to change image of button when clicked?

Mar 31, '20 in Help Room

2 Replies

2 Votes

avatar image

g4tobauer published

How to get all children gameobjects

Apr 28, '15 transform·getcomponent·children

5 Replies

0 Votes

avatar image

aldonaletto edited

Changing variables in another script

Dec 31, '11 variable·getcomponent·change

3 Replies

1 Votes

avatar image

saadali211 answered

How do I call an enum from another script?

Apr 16, '20 c#·getcomponent·boolean·enum

3 Replies

3 Votes

avatar image

solutionlab commented

GetComponent in parent question

Jun 4, '19 getcomponent·component·getcomponentinchildren

3 Replies

1 Votes

avatar image

patrick-holder published

How can I increase Health Value on trigger enter, to another game object?

Aug 13, '14 getcomponent·ontriggerenter

3 Replies

0 Votes

avatar image

Lfs1992 answered

How to GetComponent Image, color,alpha.

May 18, '17 in Help Room

2 Replies

2 Votes

avatar image

ujjavalmoradiya commented

Get Rigidbody2D component in script (c#)

Jun 4, '15 c#·rigidbody2d·beginner·getcomponent·reference

1 Reply

1 Votes

avatar image

Tseng commented

Acessing a Script Instance from Another Object Closed

Apr 18, '12 gameobject·getcomponent·component·singleton

3 Replies

2 Votes

avatar image

Bunny83 commented

GetComponent and interfaces

Nov 5, '15 getcomponent

3 Replies

4 Votes

avatar image

ConsciousCoder commented

C# GetComponent / change values throught other script

Feb 27, '14 c#·gameobject·getcomponent

3 Replies

2 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

dhawalbanker_g published

Trying to change Source Image of UI Image via Script

Oct 31, '16 in Help Room

2 Replies

0 Votes

avatar image

OP_toss commented

Any way to 'GetComponent' as a base class?

Aug 22, '13 prefab·getcomponent·subclass

2 Replies

5 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

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

Followers

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

Related Topics

c# gameobject variable javascript instantiate scripting problem nullreferenceexception component error array unity 5 prefab script. variables boolean reference ui find string transform ontriggerenter raycast text 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