• 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: addcomponent

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

Jodll commented

Class constructor

Mar 28, '12 class·addcomponent·constructor

1 Reply

5 Votes

avatar image

angelonit commented

How to get a component from an object and add it to another? (Copy components at runtime)

May 19, '22 c#·gameobject·getcomponent·component·addcomponent

12 Replies

13 Votes

avatar image

Pyunityer8002 commented

How can I AddComponent() now?

Aug 1, '20 in Help Room

3 Replies

3 Votes

avatar image

juanelo commented

Can't add script behaviour ScriptName. The script class can't be abstract!

May 23, '11 addcomponent·abstract

1 Reply

1 Votes

avatar image

sisus_co answered

Passing arguments into a constructor via AddComponent

Dec 28, '21 instance·addcomponent·arguments·constructors

5 Replies

2 Votes

avatar image

Dave-Carlile answered

Addcomponent is obsolet, what should i do ? Closed

Jul 18, '17 addcomponent

3 Replies

2 Votes

avatar image

K0m1x answered

AddComponent passing variable before Start/Awake

Nov 15, '21 gameobject·variable·start·addcomponent·awake

5 Replies

5 Votes

avatar image

Bunny83 answered

Add an instance of a script as a component? Closed

Aug 3, '16 gameobject·instance·classes·addcomponent

1 Reply

0 Votes

avatar image

asafsitner commented

Instantiate a prefab and add a script to it

Oct 12, '11 c#·instantiate·addcomponent

1 Reply

2 Votes

avatar image

Corbeau commented

Adding Prefab Components

Sep 11, '11 gameobject·prefab·runtime·addcomponent

1 Reply

1 Votes

avatar image

UNDERHILL edited

C# - creating a list of classes

Sep 8, '16 in Help Room

5 Replies

0 Votes

avatar image

marek_PLH commented

Assign a variable of type "type" on the inspector or best work around

Feb 11, '21 scriptableobject·type·addcomponent·skills

2 Replies

1 Votes

avatar image

NeMewSys commented

How can I get my own gameobject?

Aug 19, '12 gameobject·parent·addcomponent·this·self

2 Replies

1 Votes

avatar image

xpecttrum published

Delete Component at Runtime

May 13, '14 runtime·component·delete·hingejoint·addcomponent

1 Reply

1 Votes

avatar image

lampshade asked

Add Texture to GameObject through code

Aug 18, '10 texture2d·addcomponent

1 Reply

0 Votes

avatar image

Fragmental edited

Unity 5.6 - "The type or namespace name `Rigidbody2d' could not be found. Are you missing an assembly reference?" when using AddComponent

Mar 19, '18 in Help Room

1 Reply

0 Votes

avatar image

Clarinet answered

How to attach a script to an instantiated object?

Mar 11, '15 instantiate·addcomponent

1 Reply

0 Votes

avatar image

burnumd edited

Why do I get a "Can't add component because class doesn't exist!" error using generic AddComponent?

Jun 24, '10 c#·addcomponent·generics

3 Replies

0 Votes

avatar image

SisterKy edited

How to add a script to an imported object

Jul 19, '11 editor·component·addcomponent

2 Replies

0 Votes

avatar image

WarmedxMints answered

Inconsistent Accessibility: Parameter type is less accessible than method

Mar 4, '19 enum·access·addcomponent·constructor·inconsistent

1 Reply

1 Votes

avatar image

Commoble answered

Attach C# Script on runtime

Apr 25, '17 c#·instantiate·runtime·addcomponent

1 Reply

1 Votes

avatar image

smirlianos commented

How to add rigidbody with script?

Mar 2, '13 javascript·collision·rigidbody·java·addcomponent

1 Reply

0 Votes

avatar image

Jeliel answered

Assign skybox in script

May 24, '12 material·skybox·find·addcomponent

3 Replies

0 Votes

avatar image

andre9875 asked

Football free kick question?

Apr 21, '10 rigidbody·velocity·addforce·addcomponent

1 Reply

1 Votes

avatar image

Immanuel-Scholz commented

C# - Disabled Script Still Runs!

Jan 12, '16 destroy·switch·addcomponent·enabled·disabled

1 Reply

0 Votes

avatar image

Clevereen commented

How to add component to a child of gameobject

Apr 22, '18 gameobject·scriptingbasics·children·addcomponent

3 Replies

0 Votes

avatar image

Molix edited

How do I create a gui text component using c# script?

Jul 16, '10 text·guitext·addcomponent

1 Reply

0 Votes

avatar image

astracat111 published

Attaching a script at runtime

Oct 14, '16 unity 5·scripting problem·addcomponent

2 Replies

2 Votes

avatar image

kmeboe commented

Can I use AddComponent to add (this.script) to an object?

Sep 20, '12 c#·gameobject·instantiate·addcomponent·attach

1 Reply

0 Votes

avatar image

cregox commented

GetComponent and AddComponent with variables for Collider type

Apr 26, '13 c#·editor-scripting·getcomponent·addcomponent·cs0246

2 Replies

1 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

No one has followed this topic yet.

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

  • Supporter   RonJonesTheArtist
  • Teacher   Frostbite23
  • Popular Question   denil98
  • Popular Question   anurooppv
  • Necromancer   Tarrag
  • Good Answer   Tarrag
  • Supporter   jaydnwlsn
  • Notable Question   Ikrambandagi
  • Notable Question   Duncan1971
  • Popular Question   Trevdevs


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