How to map prefabs?

How to map prefabs?
0

#1

Hi dear community,
I made ->
image
image

but i want something like ->
image

I mean i’m looking for a way to have mapped prefabs with typed objects like enums.

enum GurikoType {
    NINJA,
    GENTLEMAN,
    BUNNY,
    JAPANESE,
    CHINESE,
    EXPLORER,
    INDIAN,
    ZOMBIE,
    COW_BOY,
    MERMAID,
    SHERLOCK,
    ELECTRIC,
    PIRATE,
    FAIRY,
    TRAP
} 

I tryed something like -> image

but nothing works with maps

I need that because at start of the game i’m parsing a json with the type of the prefabs and i need to map the prefab with an type to instanciate the correct object. I don’t want to do 300 if.

Any idea?