Search Unity

Components vs Entity

Discussion in 'Scripting' started by AlbertoT, Feb 21, 2010.

  1. AlbertoT

    AlbertoT

    Joined:
    Mar 27, 2009
    Posts:
    159
    Hello

    What are the Pro's and Con's of Unity3d Component programming vs the more traditional Entity programming ?
     
  2. tomvds

    tomvds

    Joined:
    Oct 10, 2008
    Posts:
    1,028
    I can't say I ever heard the term Entity programming before, but I'm guessing that you are referring to using class inheritance to compose your game entities.

    If I guessed that correctly, there is an abundance of information on the inheritance vs composition topic available:
    http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/
    http://www.eflorenzano.com/blog/post/inheritance-vs-composition/

    Google will give you about 2 million more if you search for 'composition inheritance' :p