• 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

All Questions

  • Unanswered Questions
avatar image

atomodelfinal commented

Can't add sprite to instantiated GameObject

Jan 9, '20 instantiate·getcomponent·spriterenderer·addcomponent

2 Replies

0 Votes

avatar image

keinabel commented

Why do I have to re-add my Script on every Unity start?

Jan 29, '13 startup·addcomponent·awake

2 Replies

1 Votes

avatar image

JedBeryll commented

addComponent c# script by java

Dec 4, '16 in Help Room

0 Replies

0 Votes

avatar image

highpockets commented

Best way to find appropriate script for random enemy?

Mar 12, '14 random·enemy·component·class·addcomponent

1 Reply

0 Votes

avatar image

WavyRancheros answered

How to add network components to entities at runtime?

Aug 23, '17 in Help Room

1 Reply

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

Gnarf commented

Public variables empty when adding script dynamically

Jul 28, '15 script.·addcomponent·public variable

1 Reply

0 Votes

avatar image

BuckyBall edited

How to add Canvas Scaler and Graphic Raycaster to Canvas in code

Feb 25, '19 in Help Room

1 Reply

0 Votes

avatar image

umut91c answered

Attach a non-MonoBehaviour Class from another Script to an Instantiated Button

Jan 9, '18 in Help Room

1 Reply

0 Votes

avatar image

Vipirak published

Destroying Object when Adding Component

Feb 22, '14 c#·addcomponent

2 Replies

0 Votes

avatar image

sniper43 answered

Destroying Rigidbody component (Actor::updateMassFromShapes error)

Mar 4, '15 rigidbody·mesh·mesh collider·addcomponent

1 Reply

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

HumblPi published

AddComponent for RawImage not functioning as expected

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

0 Replies

0 Votes

avatar image

mechanicarts commented

Script component gets attached multiple times

Jun 3, '18 addcomponent

1 Reply

0 Votes

avatar image

dagon published

Error in AddComponent

Jun 14, '14 addcomponent

1 Reply

0 Votes

avatar image

WhoRainZone1 published

How do I add Projector component by code/programatically?

Jul 5, '14 projector·addcomponent

1 Reply

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

LadyPushkin published

Instantiate creating infinite clones

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

0 Replies

0 Votes

avatar image

Myth edited

Auto Build Script Closed

Aug 19, '14 prefab·addcomponent

2 Replies

0 Votes

avatar image

EggQuiz857 published

how add script by script to gameObject

Oct 18, '14 addcomponent

1 Reply

0 Votes

avatar image

Kensei commented

AddComponent deletes the game object.

Nov 17, '14 c#·addcomponent·awake·game-object

1 Reply

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

GregoryNeal commented

AddComponent() is adding 64 instances of my script to my GO

Apr 30, '15 script error·addcomponent

1 Reply

0 Votes

avatar image

labmonkey398 commented

How to add a component of unknown type in the Editor

Jun 26, '17 unityeditor·addcomponent

1 Reply

1 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

kevinrocks_786 answered

Unity 5 C#, having a script show up in a path in the Editor

Feb 3, '16 c#·unity 5·editor·script.·addcomponent

1 Reply

0 Votes

avatar image

Deculsion edited

Getting invalid rank specifier when adding component from array

Jul 1, '15 c#·scripting problem·addcomponent

1 Reply

0 Votes

avatar image

Reagix published

NullReferenceException after AddComponent in OnMouseDown

Jul 4, '15 nullreferenceexception·onmousedown·addcomponent

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

greggman edited

Creating a component without a type dependency Closed

Mar 16, '15 unityeditor·dll·addcomponent

1 Reply

0 Votes

  • »
  • ‹
  • 4
  • 5
  • 6
  • 7
  • 8
  • ›

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