• 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

superluigi commented

GetComponent for a Scrolling Background in 2D platformer?

Oct 2, '17 getcomponent

0 Replies

0 Votes

avatar image

monkfurts edited

GetComponent without Playmode

Sep 11, '21 in Help Room

0 Replies

0 Votes

avatar image

s3etch published

Component unassigned when it is

Oct 6, '20 gameobject·getcomponent

0 Replies

0 Votes

avatar image

Holmqvist edited

Referenced object child is null, but isn't null internally

Sep 29, '19 getcomponent·null

0 Replies

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

betapowers asked

Get any specifically tagged GameObject that has a specific value?

Jan 28, '18 getcomponent·if-statements

0 Replies

0 Votes

avatar image

OncaLupe answered

Trouble accessing a variable in another script, C#

Nov 28, '15 in Help Room

1 Reply

0 Votes

avatar image

MichaelHardrick published

Help, What am i doing wrong here,

Jan 31, '17 getcomponent

2 Replies

0 Votes

avatar image

Tekman03 asked

Shooting Bullets

Dec 13, '17 c#·instantiate·getcomponent·shooting

0 Replies

0 Votes

avatar image

yaourt edited

Get collision from another object?

Jun 19, '19 in Help Room

1 Reply

0 Votes

avatar image

kianniek published

problem with a list that has to store different things for multiple gameobjects Closed

Apr 29, '20 gameobject·script.·getcomponent·lists

1 Reply

0 Votes

avatar image

DanubePrivateUniversity published

mars get camera position

Jul 26, '21 camera·getcomponent

0 Replies

0 Votes

avatar image

ljhs commented

Change a string variable between scripts

Apr 30, '18 getcomponent

2 Replies

0 Votes

avatar image

magna_shogun edited

GetComponent returning null inside script, but working well outside

Jul 7, '18 in Help Room

0 Replies

0 Votes

avatar image

Logicaliber published

Null reference to instantiated object, but only in a special case Closed

Jul 26, '17 instantiate·getcomponent

0 Replies

0 Votes

avatar image

yvyv1000 commented

GetComponent

Oct 20, '15 in Help Room

1 Reply

0 Votes

avatar image

HenryStrattonFW commented

GetComponentScript

Jan 26, '17 in Help Room

1 Reply

0 Votes

avatar image

Tappo published

Object reference not set to an instance of an object

Dec 27, '15 in Help Room

0 Replies

0 Votes

avatar image

tormentoarmagedoom answered

Properly got component but it is not reading the correct value from another script?

May 11, '18 in Help Room

1 Reply

0 Votes

avatar image

Roguespine asked

Changing animation using GetComponent

May 7, '19 in Help Room

0 Replies

0 Votes

avatar image

r3flx edited

Is there a better way to check if a player is looking at a certain object?

Apr 29, '20 in Help Room

0 Replies

0 Votes

avatar image

Hollowayinc asked

For the particle system, making my stars is an issue as the script command calls are now obsolete.

Jun 17, '20 in Help Room

0 Replies

0 Votes

avatar image

rhksdn2314 published

GetComponent, TryGetComponent and NullErrorWrapper GC Question

Feb 22, '22 in Help Room

0 Replies

0 Votes

avatar image

ccd01455 edited

How to assign an image to an object at level 2

Feb 20, '22 scripting problem·getcomponent

1 Reply

0 Votes

avatar image

Nerevar commented

Which instance will be used with GetComponant?

Feb 17, '16 in Help Room

0 Replies

0 Votes

avatar image

Hellium commented

How do I access another script in Unity C# 2018.2?

Dec 19, '18 in Help Room

0 Replies

0 Votes

avatar image

liam1135 published

Getting typename from collection.

Feb 15, '16 in Help Room

0 Replies

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

Bunny83 answered

How do I improve this code stink?

Jul 2, '20 in Help Room

1 Reply

0 Votes

avatar image

MajorParts answered

Shift control b/w FPS and Ship

Jun 18, '15 getcomponent

1 Reply

0 Votes

  • »
  • ‹
  • 46
  • 47
  • 48
  • 49
  • 50
  • ›

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