• 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

Fixes in upcoming releases of Unity Answers

Using a good tone of voice when replying to posts

Requests for new tags/topics

How to use the META space

How to use the Moderator space

Questions in topic: getcomponent

  • Unanswered Questions
  • Recommended Questions
Once you sign in you will be able to subscribe for any updates here
avatar image

realcyberleon answered

what the heck do you put in the object reference!? all i need is a variable!

Jul 2, '21 getcomponent·instance·object reference

2 Replies

0 Votes

avatar image

awsapps edited

Accessing Animator Component from tagged objects in an Array in Start and then triggering its bool in Update

Jun 20, '21 animator·getcomponent·tag·array of gameobjects

1 Reply

0 Votes

avatar image

RLin commented

groundcheck function returns a NullReferenceException error when the player is airborne

Jun 11, '21 raycast·getcomponent·null reference exception

1 Reply

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

emsaigon12 published

I want to create a bookmark function using the toggle button,I want to develop the bookmark function

May 3, '21 getcomponent·toggle·singleton

0 Replies

0 Votes

avatar image

JetixBoy asked

how to get a string from another script in OnTriggerEnter2D

Apr 8, '21 in Help Room

0 Replies

0 Votes

avatar image

Voltonik_ edited

Is it possible to change CustomPass variables via other script?

Apr 4, '21 in Help Room

0 Replies

0 Votes

avatar image

KoenigX3 commented

Is it possible to use a variable as a Type?

Apr 4, '21 c#·variable·getcomponent·type

1 Reply

1 Votes

avatar image

jackmw94 answered

Most efficient way to check if a component is null for a canvas or UI?

Mar 22, '21 c#·ui·canvas·getcomponent

1 Reply

0 Votes

avatar image

rh_galaxy answered

how do I change the properties of a material that are on the children of an object on script?

Mar 21, '21 material·getcomponent·renderer·foreach·getcomponentinchildren

1 Reply

0 Votes

avatar image

unity_3rwby93b8roxIQ edited

Access variable from another script without GetComponent

Mar 9, '21 in Help Room

0 Replies

0 Votes

avatar image

Hellium answered

Faster way to check if object has component?

Feb 28, '21 in Help Room

1 Reply

0 Votes

avatar image

NMJ_GD edited

Is it overkill to RequireComponent then check if GetComponent isnt Null in Awake?

Feb 14, '21 in Help Room

1 Reply

0 Votes

avatar image

Stryder2384 asked

Random audio clips from array on prefab crash

Feb 12, '21 in Help Room

0 Replies

0 Votes

avatar image

kemnet asked

Difficulty setting script on gameObject from another script.

Feb 2, '21 in Help Room

0 Replies

0 Votes

avatar image

Coldary commented

Get Component Script not working on some scripts

Jan 31, '21 in Help Room

1 Reply

0 Votes

avatar image

Louisicraft edited

How to get script component of an object with out using its name?

Jan 18, '21 getcomponent

2 Replies

0 Votes

avatar image

Mercuri commented

GetComponent() failing for enemy colliders from OverlapSphereNonAlloc array, but working fine from Raycast output

Jan 10, '21 getcomponent·physics.raycast·physics.overlapsphere

2 Replies

0 Votes

avatar image

Sarmad110 commented

Cannot use GetComponent on NetworkIdentity

Jan 9, '21 networking·getcomponent

1 Reply

0 Votes

avatar image

xGoldenK commented

Avoid using GetComponent to check if RayCast hit is interactable

Jan 3, '21 in Help Room

0 Replies

0 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

atulvi answered

Why is this generic "Get component if null" code not working

Dec 16, '20 getcomponent·component·null·generics

5 Replies

3 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

islesofurth commented

GetComponent returning null with no errors

Dec 7, '20 in Help Room

1 Reply

0 Votes

avatar image

elrohirgt edited

GetComponent returns null when using a generics class for T

Dec 6, '20 2d game·nullreferenceexception·getcomponent·generics

1 Reply

0 Votes

avatar image

aiden_unity18 answered

getcomponent works in script editor but not in game

Dec 4, '20 getcomponent

1 Reply

0 Votes

avatar image

beets0426 commented

Setting thrown object to kinematic after hitting target?

Nov 24, '20 vr·scripting beginner·getcomponent·ontriggerenter·kinematic

1 Reply

0 Votes

avatar image

Erickson76 published

How to activate and deactivate an enemy Rigidbody,

Nov 23, '20 getcomponent

3 Replies

0 Votes

avatar image

Bunny83 answered

I want to access Vector.down of my array Object but, I am unable to find a way to access it............ Have any clue??

Oct 18, '20 vector3·getcomponent·find·access·delegate

1 Reply

-1 Votes

avatar image

Verilyzed edited

Help with GetComponent

Oct 8, '20 getcomponent

2 Replies

0 Votes

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

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.

Follow This Topic

Follow This Topic

Follow by RSS

8 People are following this topic.

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

Popular Topics

c# animation android unity 5 camera 2d rotation javascript scripting problem collision ui gui error shader movement gameobject physics rigidbody editor ios texture networking raycast instantiate collider transform terrain mesh prefab input
View all

Recent Badges

  • Famous Question   A_Lego
  • Notable Question   AngeloDon
  • Popular Question   PvTGreg
  • Editor   johnathan080908
  • Notable Question   jfielding74
  • Nice Answer   ItsTwelveOclock
  • Notable Question   xiaolinl
  • Famous Question   Jake398
  • Famous Question   Jake398
  • Notable Question   msaldana


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