Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Making a card game. Cards as prefabs vs generated classes

Discussion in 'Getting Started' started by Mirvini, Nov 27, 2021.

  1. Mirvini

    Mirvini

    Joined:
    Jul 25, 2013
    Posts:
    11
    I am working on a card game and am pretty new to unity.

    I like how when you make an object with a script you can fill out all the public properties from the editor and save it as a prefab. However having access to these cards as c# classes is preferable for me.
    What is the standard recommend way to do something like this, when filling out details of lots of similarly typed objects (like cards)
    Should I learn to work with a large set of prefabs?

    Alternatively
    Is it easy enough to make an editor script that acts like the inspector but let's me save to a generated c# file? I have no experience with editor scripts at this time
     
  2. Mirvini

    Mirvini

    Joined:
    Jul 25, 2013
    Posts:
    11
    For anyone who comes across this, I used Scriptable Objects