• 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

YetiMoon edited

fix script to get C# var from another object instead of object this script is attached to

Mar 27, '18 c#·gameobject·getcomponent·variables

2 Replies

0 Votes

avatar image

mani3307 edited

hi, how to get component with raycast, with the component havin different names on each object?

Mar 27, '18 getcomponent

2 Replies

0 Votes

avatar image

Bunny83 commented

Enemy variable remains null

Mar 22, '18 c#·variable·enemy·getcomponent·reference

1 Reply

0 Votes

avatar image

poppysilvers1997 commented

Inputting another scripts variable as a float

Mar 21, '18 in Help Room

1 Reply

0 Votes

avatar image

rd_mcn commented

How to use inputmanger while scripting?

Mar 17, '18 scripting problem·getcomponent·newbie

1 Reply

0 Votes

avatar image

Bunny83 commented

How to distinguish between multiple components of same type

Mar 16, '18 getcomponent

5 Replies

5 Votes

avatar image

EtherealPineapple edited

How do you access the transform of a gameobject and put it in a variable?

Mar 14, '18 in Help Room

3 Replies

0 Votes

avatar image

prateems commented

When or where do I set a prefab script subclass property?

Feb 28, '18 scripting problem·getcomponent·prefabs·inheritance·properties

2 Replies

0 Votes

avatar image

nedvdd42 asked

Trying to get doors to close after x time since the player has passed through the previous?

Feb 26, '18 in Help Room

0 Replies

0 Votes

avatar image

Harinezumi commented

Trigger not getting GameObject

Feb 23, '18 c#·gameobject·collider·trigger·getcomponent

2 Replies

0 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

RayDart commented

Can I use a varaible with Getcomponent

Feb 20, '18 in Help Room

1 Reply

0 Votes

avatar image

Bonfire-Boy commented

How to call GetComponent by name? GetComponents?

Feb 15, '18 getcomponent·audiosource·getcomponentinchildren

2 Replies

0 Votes

avatar image

mintza commented

How can i change bool of other gameobject? Closed

Feb 15, '18 in Help Room

1 Reply

0 Votes

avatar image

Newbie100 asked

Cannot figure out how to find animation in animator by name.

Feb 12, '18 animation·animator·scripting beginner·getcomponent·animator controller

0 Replies

0 Votes

avatar image

Jaywalker answered

Getcomponent returns null on ios

Feb 10, '18 ios·getcomponent·null reference exception·awake

1 Reply

0 Votes

avatar image

Harinezumi commented

Referencing to an initiated Text

Feb 9, '18 ui·text·getcomponent·instance·find

1 Reply

-2 Votes

avatar image

BAXENATOR asked

How do I import access to a script into another script?

Feb 8, '18 in Help Room

0 Replies

0 Votes

avatar image

hamin94 commented

GameObject Class understanding

Feb 7, '18 getcomponent·class·gameobjects·basics

1 Reply

0 Votes

avatar image

Servail commented

this.GetComponent() won't return gameObject? How to get it without using this.gameObject?

Feb 2, '18 in Help Room

3 Replies

0 Votes

avatar image

fimaaa edited

getcomponent cant find every button script in every gameobject

Feb 2, '18 in Help Room

1 Reply

0 Votes

avatar image

KnottyDreadLox commented

Help with script , Change tag depending on material attached Closed

Jan 28, '18 in Help Room

1 Reply

0 Votes

avatar image

betapowers asked

Get any specifically tagged GameObject that has a specific value?

Jan 28, '18 getcomponent·if-statements

0 Replies

0 Votes

avatar image

Harinezumi edited

Referencing in a prefab

Jan 26, '18 c#·instantiate·prefab·getcomponent·reference

1 Reply

0 Votes

avatar image

chadfranklin47 edited

Problem Destroying Component

Jan 24, '18 in Help Room

0 Replies

0 Votes

avatar image

NeoTott commented

Inability to access the properties of a clone.

Jan 24, '18 in Help Room

1 Reply

0 Votes

avatar image

Odinmiranda asked

problems with GetComponent,Problems with GetComponent

Jan 19, '18 in Help Room

0 Replies

0 Votes

avatar image

W01Fi3 commented

Making a 3d text object represent the "health" of an object?

Jan 19, '18 c#·getcomponent·score·textmesh·3d text

1 Reply

0 Votes

avatar image

peachpieproductions edited

Upcasting via GetComponent()

Jan 18, '18 getcomponent·cast·casting

0 Replies

0 Votes

avatar image

Bunny83 answered

GetComponent in Start not getting the component.

Jan 18, '18 getcomponent·start

1 Reply

0 Votes

  • »
  • ‹
  • 7
  • 8
  • 9
  • 10
  • 11
  • ›
  • »

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