Search Unity

Mongodb and Unity saving player profile question

Discussion in 'Formats & External Tools' started by toon1334, Apr 17, 2017.

  1. toon1334

    toon1334

    Joined:
    Dec 11, 2013
    Posts:
    1
    Hi all,
    I have a question about mongodb and unity. I know that mongodb can save classes and I think it can save objects.I am trying to save player profiles in a collection. Each profile is a class (in unity). In the profile I have a list with all of the player's collected heroes. I am trying to save a list of objects(heroes) that have a script component with information about that item. When I use mongodb to save the objects, it just returns the objects without their script component attached. Is there any way to get around this? I have tried just saving the script components in the but in unity in list, each element in the inspector says None (myChar). Mongodb doesn't seem to save them either. Any help would be greatly appreciated.

    Thanks
     
    Last edited: Apr 17, 2017
  2. OnTheCookie

    OnTheCookie

    Joined:
    Mar 7, 2017
    Posts:
    9
    First at all: I never worked with mongoDB.

    Are you using somekind of OR-mapper?

    why does a player have more profiles? or do you mean object?

    for every hero you need another table that stores informations about the hero

    because mongoDB doesn know the heros