• 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

Oop

Cancel

Cancel

All Questions

  • Unanswered Questions
avatar image

SteenPetersen answered

Pass class as parameter without doing new Class()

May 3, '23 inheritance·monobehaviour·parameters·warning·oop

1 Reply

1 Votes

avatar image

sacredgeometry edited

How to properly make multiple enemy types?

Jan 4, '23 c#·monobehaviour·classes·oop·custom class

2 Replies

0 Votes

avatar image

docgonzzo edited

How to use a parent's method with parameters in child

Dec 15, '22 in Help Room

2 Replies

0 Votes

avatar image

logicandchaos commented

Really simple question about inheritance

Nov 13, '22 beginner·inheritance·oop

2 Replies

0 Votes

avatar image

Morgun71 answered

Zenject injecting upon instantiation

Jul 14, '22 c#·oop·dependency injection

2 Replies

1 Votes

avatar image

garycampbell3690 published

Handling different combinations of enum selection

Feb 6, '22 c#·classes·enum·scriptable object·oop

1 Reply

0 Votes

avatar image

Shaky6bones commented

Item data structure - Scriptable Object Inheritance problems

Jan 30, '22 scripting problem·scriptableobject·inheritance·oop·datastructure

1 Reply

0 Votes

avatar image

Jean-Michel_Houbre answered

Best practice for adding specific attributes to an object but not all of them

Nov 2, '21 c#·objects·design·oop·design-patterns

2 Replies

0 Votes

avatar image

eirikamb edited

OOP with specialized classes as subclasses

Aug 3, '21 oop

0 Replies

0 Votes

avatar image

Llama_w_2Ls answered

In Unity how can I set a value to property while initializing a prefab with Instantiate() method like OOP constructor with parameters?

Apr 1, '21 prefab·enum·initialization·oop·spawning-enemies

1 Reply

0 Votes

avatar image

gamerangoli published

IAP function not calling

Mar 24, '21 in Help Room

0 Replies

0 Votes

avatar image

TwoHeadedFetus asked

GameObject changing position when changing reference

Mar 11, '21 c#·instantiate·transform.position·object reference·oop

0 Replies

0 Votes

avatar image

shyxiaolong commented

RPGStatSystem tutorial problem with clases visibility?

Feb 23, '21 c#·unity 5·rpg·oop·polymorphism

1 Reply

0 Votes

avatar image

sacredgeometry edited

,C# question: how to add sentences via script

Dec 29, '20 c#·dialogue·oop

1 Reply

0 Votes

avatar image

Limnage asked

Mapping input objects to effect objects in a typesafe way

Dec 2, '20 in Help Room

0 Replies

0 Votes

avatar image

jackmw94 answered

How to translate a OOP class diagram to a unity game/unity code

Nov 9, '20 c#·3d·scripting beginner·components·oop

1 Reply

0 Votes

avatar image

Pangamini commented

Singelton ScriptableObject or Static class?

Aug 15, '20 scripting problem·oop

2 Replies

0 Votes

avatar image

Chepee73 published

Organization question

Mar 31, '20 c#·oop·organization

1 Reply

2 Votes

avatar image

Miki_505 asked

Refactoring code for S.O.L.I.D principles

Feb 14, '20 in Help Room

0 Replies

0 Votes

avatar image

Major answered

Does ECS is supposed to replace oop in unity?

Sep 2, '19 oop

1 Reply

1 Votes

avatar image

blakemontaque33 asked

Cyclist script bug?

Apr 14, '19 in Help Room

0 Replies

0 Votes

avatar image

xxmariofer answered

How to add default behavior of OnDestroy function for all MonoBehavior scripts?

Mar 4, '19 unity 5·inheritance·monobehaviour·oop

1 Reply

0 Votes

avatar image

gdbjohnson3 answered

What is the purpose of ScriptableObject versus normal class?

Mar 1, '19 scriptableobject·memory management·oop

4 Replies

37 Votes

avatar image

OfficeThrashing commented

How to send Color.black as a string but it will act like code. See description for more.

Sep 17, '18 c#·string·parameters·oop

1 Reply

0 Votes

avatar image

Pan_Migo commented

OOP architexture analysis

Jul 24, '18 programming·oop

1 Reply

0 Votes

avatar image

ShadyProductions edited

Upgrading a Custom Class into an Inheriting Class

Jun 4, '18 inheritance·casting·oop

2 Replies

0 Votes

avatar image

winterfluxstudio edited

How to make Ui based on how many Ai agents are attacking / following ?

May 19, '18 c#·ai·ui image·oop

2 Replies

0 Votes

avatar image

Xarbrough answered

Does polymorphism apply here?

Mar 10, '18 oop·polymorphism

1 Reply

0 Votes

avatar image

ShadyProductions commented

c# How do I search by virtual Type variable in parent classes? (inheritance)

Mar 9, '18 c#·inheritance·oop

1 Reply

0 Votes

avatar image

Kresnadhanu asked

how to planning n designing game structure/architecture?

Jan 29, '18 c#·design·oop·structure·plan

0 Replies

0 Votes

  • 1
  • 2
  • 3
  • 4
  • ›

Update about the future of Unity Answers

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta later in June. Please note, we are aiming to set Unity Answers to read-only mode on the 31st of May in order to prepare for the final data migration.

For more information, please read our full announcement.

Related Topics

c# inheritance classes unity 5 scriptingbasics javascript design polymorphism monobehaviour programming gameobject scripting problem objects class design-patterns referencing interface script. enum scriptableobject object components parameters prefab


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