• 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

Addcomponent

Cancel

Cancel

Unanswered Questions

  • All Questions
avatar image

Lava444 asked

I can't pass arguments into constructor with AddComponent.

1 hour ago gameobject·addcomponent·constructor

0 Replies

0 Votes

avatar image

Keslen published

How do I make a transform on a Child (added by script) apply to that Child instead of its Parent?

Feb 17, '22 transform·parent·child·addcomponent·scripteditor

0 Replies

0 Votes

avatar image

doobywoo published

Rigid body component added without me telling it to be added,Rigid body component being added when it is never told to

May 14, '21 rigidbody·prefab·component·addcomponent·automatically

0 Replies

0 Votes

avatar image

Feathered asked

Why "AddComponent" behaves differently in "Play" and "Edit" modes?

Dec 18, '20 editor·addcomponent

0 Replies

0 Votes

avatar image

ericlclancy published

Dynamically adding Javascript to an Instantiated object using AddComponent,Using AddComponent to add a JS Monoscript Causes "NullReferenceException

Mar 14, '20 in Help Room

0 Replies

0 Votes

avatar image

GameDBharat asked

When i try to add Collider2D or Rigidbody2D through code to prefab gameObject after stopping game the added component remain added to the prefab obejct.

Nov 28, '19 gameobject·rigidbody2d·collider2d·addcomponent

0 Replies

0 Votes

avatar image

puchingeralexander asked

Access Top and Right Variables from RectTransform

Jun 17, '19 in Help Room

0 Replies

0 Votes

avatar image

XAngeled asked

Adding an unkown script dynamically

Dec 30, '17 scripting problem·gameobject·networking·addcomponent

0 Replies

0 Votes

avatar image

jamesnguyen92 commented

You are trying to create a MonoBehaviour using the 'new' keyword. This is not allowed.

Oct 25, '17 in Help Room

0 Replies

0 Votes

avatar image

RobAnthem commented

How do I set default values for inherited variables such that they keep their values when added by script?

May 14, '17 reset·addcomponent·inherited-members

0 Replies

0 Votes

avatar image

lupitul published

how to add An boxCollider to photonView in Script?

May 9, '17 getcomponent·addcomponent

0 Replies

0 Votes

avatar image

dCalle commented

Show Add Component Menu in Custom Inspector

May 6, '17 component·custom-inspector·addcomponent·popup·show

0 Replies

0 Votes

avatar image

Skatola commented

how to access to a component previously removed and readded

Apr 29, '17 in Help Room

0 Replies

0 Votes

avatar image

prodintec asked

Problem with throwable script in sphere

Mar 29, '17 in Help Room

0 Replies

0 Votes

avatar image

HumblPi published

AddComponent for RawImage not functioning as expected

Feb 23, '17 gameobject·getcomponent·component·addcomponent

0 Replies

0 Votes

avatar image

Ryzu published

Adding prefab ParticleSystem to a GameObject?

Feb 19, '17 gameobject·prefab·particlesystem·addcomponent

0 Replies

1 Votes

avatar image

JedBeryll commented

addComponent c# script by java

Dec 4, '16 in Help Room

0 Replies

0 Votes

avatar image

Maniacbob published

Add Script from a List to Instantiated GameObject

Nov 27, '16 in Help Room

0 Replies

0 Votes

avatar image

LadyPushkin published

Instantiate creating infinite clones

Nov 11, '16 c#·instantiate·clone·addcomponent

0 Replies

0 Votes

avatar image

vuwij published

AddComponent asking for type which is not a Unity engine type.

Nov 2, '16 collider2d·inheritance·addcomponent·unityengine.object

0 Replies

0 Votes

avatar image

Gann4Life asked

¿How can i add a fixed joint configured by script?

Jun 12, '16 in Help Room

0 Replies

0 Votes

avatar image

isteffy edited

GameObject receives Sprite Renderer from other GameObject

May 3, '16 in Help Room

0 Replies

0 Votes

avatar image

FurretTurret edited

Child of child of MonoBehaviour isn't a MonoBehaviour?

Mar 12, '16 in Help Room

0 Replies

0 Votes

avatar image

Riday published

Scripts worked but since 3 days its not working, please help.

Feb 24, '16 in Help Room

0 Replies

0 Votes

avatar image

sharkfinsoup asked

Trying to add a script to a parent?

Dec 7, '15 in Help Room

0 Replies

0 Votes

avatar image

ZhavShaw published

Compilation error, Unity 5

Nov 9, '15 unity 5·ai·api·addcomponent

0 Replies

0 Votes

avatar image

stjernstedt published

Adding components via parameter

Oct 23, '15 in Help Room

0 Replies

0 Votes

avatar image

Hathakas commented

Calling Method within a Method from a different Class

Sep 24, '15 referencing·addcomponent·methods

0 Replies

0 Votes

avatar image

Reagix published

NullReferenceException after AddComponent in OnMouseDown

Jul 4, '15 nullreferenceexception·onmousedown·addcomponent

0 Replies

0 Votes

avatar image

KdRWaylander commented

Select level script from a public property

Apr 3, '15 addcomponent·public variable

0 Replies

0 Votes

  • 1
  • 2
  • ›

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 instantiate getcomponent component runtime editor monobehaviour unity 5 prefab type rigidbody destroy scripting problem script. child inheritance classes nullreferenceexception javascript instance class components hingejoint error


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