• 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

Constructor

Cancel

Cancel

All Questions

  • Unanswered Questions
avatar image

unity_F0403435985067FC0201 published

AndroidJavaObject Builder Class

May 26, '23 android·object·class·java·constructor

1 Reply

0 Votes

avatar image

Mr_LoFtY commented

How to call a public list from a Constructor class into a Monobehavior class

Feb 25, '23 list·variables·monobehaviour·classes·constructor

1 Reply

0 Votes

avatar image

logicandchaos commented

Constructor issue with base class

Jan 22, '23 constructor·subclass

1 Reply

0 Votes

avatar image

canklot edited

Class constructor

Jan 16, '23 class·addcomponent·constructor

2 Replies

5 Votes

avatar image

epoHless published

Adding parameter to instance of a class during runtime

Jan 12, '23 c#·runtime·class·constructor·at

1 Reply

0 Votes

avatar image

slimkool published

How can I instantiate a object with a constructor?

Jan 2, '23 instantiate·array·class·constructor

4 Replies

0 Votes

avatar image

weareandrei asked

Parameterless constructor always invoked. Even if parameter is passed during class instantiation.

Jan 1, '23 in Help Room

0 Replies

0 Votes

avatar image

tgienger commented

How to create instance of ScriptableObject and pass its constructor a parameter?

Sep 30, '22 scriptableobject·constructor·pass·parameter·initialise

6 Replies

18 Votes

avatar image

guluerechan answered

Code only runs when object is selected in the editor

Sep 21, '22 in Help Room

1 Reply

0 Votes

avatar image

Orion_78 answered

Create a Transform without a GameObject

Jul 21, '22 gameobject·instantiate·transform·constructor

3 Replies

2 Votes

avatar image

JSaginario asked

(0,0): error - Material can't be deserialized because a default constructor could not be found. Create a default constructor or a custom serializer/deserializer.

Jun 23, '22 in Help Room

0 Replies

0 Votes

avatar image

TheTrueDuck answered

I can't pass arguments into constructor with AddComponent.

Jun 21, '22 gameobject·addcomponent·constructor

1 Reply

0 Votes

avatar image

jerobarraco commented

How do i reference a path as a sprite?

Jun 15, '22 sprite·referencing·constructor·class instance

1 Reply

1 Votes

avatar image

Colin_Brilliant_Labs asked

Override constructor of list of classes when creating a new element from the inspector

Jun 7, '22 in Help Room

0 Replies

0 Votes

avatar image

Llama_w_2Ls commented

How do i edit a constructor array in the inspector?

Apr 4, '21 arrays·class·constructor

1 Reply

0 Votes

avatar image

Flappy37 edited

Setting Parent Value in Child Class Constructor

Mar 16, '21 in Help Room

0 Replies

0 Votes

avatar image

G_hi3 commented

Non-MonoBehaviour object with SerializableField

Nov 26, '20 startup·serializedproperty·constructor

2 Replies

0 Votes

avatar image

GrayedFox edited

How to I ensure my scriptable object constructor gets called?

Nov 19, '20 in Help Room

0 Replies

0 Votes

avatar image

corapeca asked

Can i set class vars automatically when calling class constructor with attributes?

Oct 22, '20 c#·class·constructor

0 Replies

0 Votes

avatar image

evu edited

Hitting Serialization depth, need a better way to access parent class

Oct 1, '20 in Help Room

1 Reply

0 Votes

avatar image

unity_cm1CZyqtqsCsfA published

Instantiate GameObject with parameters Closed

Jul 18, '20 in Help Room

2 Replies

13 Votes

avatar image

HasTeroiDe published

How to create random values ​​at each instantiation of a class ?

May 26, '20 random.range·values·constructor

0 Replies

0 Votes

avatar image

Damnsatinist answered

Serialized Parameter Constructor?

Nov 16, '19 serialization·custom editor·parameters·constructor·custom class

1 Reply

0 Votes

avatar image

Bunny83 answered

How to add GameObject to List using a constructor method

Oct 29, '19 instantiate·list·class·constructor

1 Reply

0 Votes

avatar image

Bunny83 commented

URGENT - Cannot be serialized because it does not have a default public constructor.... Closed

Aug 28, '19 error·serialization·xml·constructor·xmlserializer

1 Reply

0 Votes

avatar image

browne11 edited

Constructor in Monobehaviour

Mar 10, '19 monobehaviour·constructor

2 Replies

0 Votes

avatar image

SMathew asked

How to register an interface using constructor,Equivalent of container.RegisterInstance(new AutoMapperServiceConfiguration().Configure()); in unity config file

Mar 8, '19 constructor

0 Replies

0 Votes

avatar image

xxmariofer commented

Assigning a GameObject Script Variable Before Start is Called

Mar 6, '19 instantiate·initialization·constructor·reference-other-object

1 Reply

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

WarmedxMints commented

error with a constructor

Mar 4, '19 enum·constructor·constructors

2 Replies

0 Votes

  • 1
  • 2
  • 3
  • 4
  • 5
  • ›

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta on June 13. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Related Topics

c# class classes javascript array list instantiate serialization parameters monobehaviour gameobject enum inheritance scriptableobject error editor transform nullreferenceexception vector3 variable initialization scripting problem object prefab addcomponent


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