Search Unity

  1. Tune in to get all the latest Unity news live from Berlin on June 19, 6pm CEST. Set up a YouTube reminder!
    Dismiss Notice
  2. Unity 2018.1 has arrived! Read about it here
    Dismiss Notice
  3. Scriptable Render Pipeline improvements, Texture Mipmap Streaming, and more! Check out what we have in store for you in the 2018.2 Beta.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  5. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  6. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Game Data Editor: The Visual Data Editor [Released]

Discussion in 'Assets and Asset Store' started by Celestipoo, Jun 6, 2014.

  1. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    Hmm, when you say it like that I could see how that could be implemented in the editors. Right now we at least have default values that you can set when creating your schema. Of course, that doesn't really help in the cause of wanting multiple different default values. Like Rogues and Warriors are the same Character schema (let's say) but they would probably want very different default values. That's where your parent attribute idea could help. I'll think about that more.

    Lists and custom types are already supported. 2D lists are not. I think I'm going to just output the json formatted 2d list in the spreadsheet. It sucks for editing, but I don't see any other way around it. At least that will give everyone a way to edit most everything else in spreadsheet format. But the best way to manipulate a 2d list will be using the GDE editor.

    If anyone else has ideas on this, I'm all ears :)
     
  2. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    877
    @ Celestipoo,

    Another thing which might help with Schema is a 'Sort' and/or 'Truncate' button near the 'Save' button - to sort things in to order. And perhaps something similar within the Schema, and when designing items?

    Also, what about a default element within the List as a field in a Schema?
     
  3. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    Sorting is on the list of features to get to. It's been asked for a couple of times.

    I'm not sure I follow what you're asking.
     
  4. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    877
    re Lists, the default [] number is x...? Probable still doesnt make sense...
     
  5. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    Yeah, you can set the default list length, and also set the values within that list if that's what you mean.
     
  6. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    A quick update:

    Localization Editor has been submitted for review! That means I can get back to working on GDE :) Here's what I'm thinking.

    I want to include:
    * Export to Spreadsheet (Either to a local file or to Google Drive)
    * New base types (GameObject, Texture 2d, material, audio clip, Sprite, anything else?)

    I promise to take a look at:
    * Sorting/Copy/Paste in the GDE Editors
    * Runtime window that will show values that are saved in PlayerPrefs

    If there is a feature that I've forgotten about, now is the time to tell me!

    In other awesome news, GDE is in the June Level11 Sale! Tell your friends to pick up a copy! 70% off :)
     
    playa1337 likes this.
  7. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    439
    Any chance you could add an encrypted field within a short while? If I want to use the database to record collectables, say, I don't want to use simple numbers as they're editable. The current encryption is for the full-fat database. It'd be nice to have an option that encrypts/decrypts data on access to prevent trivial data hacking.

    I'd want this implemented soon and it's probably unfair of me to ask! I suppose creating my own support methods isn't too tricky.
     
  8. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    How soon is "soon" :)
    Best thing about GDE is it easily bends to your will. Do you want to modify these values during runtime or do you want them to be readonly encrypted fields?
     
  9. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    439
    Modified at runtime, to record how much junk the player has picked up. I just want a basic security to prevent save-file hacks adding inventory. So I'd have an internal number of widgets collected (maybe doohickies too), and save these to the DB encrypted. Soon would be a few weeks. Only need it working come final release (which'll no doubt be much later than I imagine to to be still!).

    Also, when importing a changed spreadsheet it'd be nice to have no-longer-used-data-extensions removed from the project. If I rename an Excel sheet, the sheet gets imported as a new type but the old one gets left behind and references point to this. Presently I can delete the old data extension and then Mono points me to null references to replace with the new named extension, but it'd be easy to miss this and get weird results.
     
  10. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    There are a couple of layers of protection right now. Saved data is stored in PlayerPrefs; which is hackable. Even so, its not a simple thing to do, which keeps most all players from doing it. GDE only stores the values that have changed. The hacker would need to know which key to modify (quite unlikely). If they do happen upon the correct key/value pair, they would need to decode the value. Not a huge deal since its Base64 encoded to save some space. But the result will be a byte array. They would then need to interpret the bytes correctly, modify the value, write out the result, encode to base64, write it back to their hacked PlayerPrefs, and hope they haven't corrupted their game. If a person can figure out how to do all that, maybe they should be able to cheat a little ;)

    There are some users that have multiple data files. Each data file can contain different schemas. In that case, the generated data classes are still valid. I can see about writing an extension just for you. Or perhaps I can include it as an optional action that can be run. A clean and regenerate data classes. Hmm, I'll write that down.
     
    Last edited: Jun 7, 2015
  11. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    439
    Thanks. I'll not worry about the data then.
     
  12. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    439
    I'm getting different data from my Database than I have in it for one table. Using...

    Code (CSharp):
    1.         List<string> dbk_items;
    2.         GDEDataManager.GetAllDataKeysBySchema("Consumables", out dbk_items);
    3.         stores = new List<GDEConsumablesData>();
    4.    
    5.         // cache database to stores list
    6.         dbk_items.ForEach(key => {
    7.             GDEConsumablesData current;
    8.             GDEDataManager.DataDictionary.TryGetCustom(key, out current);
    9.             print ("Add item "+current.Name+"   "+current.Inventory);
    10.             stores.Add(current);
    11.         });
    The output has the correct values for Name but not for Inventory. The first item shows 2 items; it should be seven. The next three items have a value of -1 where they should be various amounts. In the GDE Data Editor (Create Data option), source spreadsheet, and GDE text file, the values are correct, so it appears something is getting messed up with the above code, lifted from the manual.

    Edit: Okay, solved. From the documentation, changes are autosaved, and from the above conversation, changes are held in the player prefs. So at some point in testing where I changed the data values, these were saved. I deleted the corresponding registry keys and it works.
     
    Last edited: Jun 12, 2015
  13. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    I was going to ask if you had saved. Next time you want to reset your data items, the data classes have a ResetAll() method that you can call. That way you don't have to manually go deleting keys in PlayerPrefs. I'll also add a clear GDE PlayerPrefs action in the next update to make testing easier. Resetting Fields Docs.
     
  14. jprocha101

    jprocha101

    Joined:
    Apr 8, 2015
    Posts:
    134
    It would be nice to add a custom schema to an item on the Item List without having to create a new item and reference it. If I want dozens of one time enemies per level it will clutter up the Item List. Example below.

    Other than that this is a great asset so far and I look forward to the updates mentioned in this thread.

    I wanted to add an enemy to Level1 in the Enemies list. It would be nice to not have to create a new Enemy item, in this case I created Level1_Enemy1. That enemy will never repeat so I have no need to create a reference for it. The custom extension could read something like "Enemies1", "0", or have some other generic name that would let us know it is not referencing a predefined item. Or possibly not have a custom extension. Or maybe if I could just create the new Enemy item and name it right there from within the Level item, that would make it easier to manage as well.

    upload_2015-6-18_3-45-51.png
     
    Last edited: Jun 19, 2015
  15. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    877
    I agree... Blueprint or template items a great idea.

    When's the next update release and what's in it?
     
  16. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    I'm working on the update now. So far its got

    * Nice perf boost to GDE Editors (this will be welcome for working with large spreadsheets)
    * Export spreadsheet (to local excel file or to google drive)

    Other things on the list not done yet:
    * New basic types
    * Schema/Item Cloning (In the editor, but it sounds like there's some runtime methods that would be helpful here too)
    * Bug fixes

    On the subject of blueprints/templates, a schema is exactly that. Items are specific instances of a schema. When you say you want to spawn a million enemies, did you want to spawn a bunch of items that load a predefined data, but then can be modified independently? For example, if you defined a Enemy1 item, you'd like to spawn 100 Enemy1's but once they are spawned, they will keep track of their own stat changes (like how much health they have left)?

    What if I made added helper methods:
    Code (csharp):
    1. // If spawning items
    2. GDEDataType myClone = TryGetClone<GDEDataType>(Key);
    3. GDEDataType myClone = TryGetClone<GDEDataType>(Instance);
    4.  
    5. List<GDEDataType> myClones = TryGetClones<GDEDataType>(Key, Num_Instances);
    6. List<GDEDataType> myClones = TryGetClones<GDEDataType>(Instance, Num_Instances);
    7.  
    8. // If spawning schema type
    9. GDEDataType myClone = TryGetClone<GDEDataType>();
    10. GDEDataType myClones = TryGetClones<GDEDataType>(Num_Instances);
    11.  
    Using the above methods, you could define a Custom field, and then at runtime you could pass the key of the item in that custom field, or pass the instance of that item itself. Or you could use the static key class:
    Code (csharp):
    1. GDEItemData myItem;
    2. GDEDataManager.DataDictionary.TryGetCustom("some_item", out myItem);
    3. List<GDEItemData> myClones = GDEDataManager.DataDictionary.TryGetClones(myItem, 100);
    4.  
    5. // Or using the static key class
    6. List<GDEItemData> myClones2 = GDEDataManager.DataDictionary.TryGetClones(GDEItemKeys.Item_Enemy1, 100);
    7.  
    Is that on the path you guys are needing?
    As far as release date, probably not until July. I'm hoping to submit at the end of June.
     
  17. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    877
    @Celestipoo ,

    That sounds totally spot-on.

    Very easily usable templates/blueprints of items/objects/characters/spells etc that you could then use to spawn new independent ones with their own independent stats etc (in runtime, easily, as well as in the editor, easily) would be fantastic!

    Will this be with the July release?

    With the export to spreadsheet thing, what data will be exportable (lists? 2d lists? texture2d, vector3, vector3)? What are the new (hopefully) basic types? ;)
     
  18. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    I can try to put in a first pass on those runtime methods for this release (shush don't tell my partner. He might blow a gasket. He really, really, really wants to get this release out like yesterday ;) You would be responsible for keeping track of spawn IDs if you want to load them again at some later point. You could add a List<string> field to a config schema that saves the IDs. Woah. That would totally work :)

    I just finished up cloning in the editor. You'll be able to push a button and clone any item or schema. At the very least, the update will have that.

    My aim is to make all supported types exportable. Right now, all types (lists and 2d lists) are exported. 2d lists are not easily modified in its spreadsheet form (its raw json in a single cell) but at least you'll be able to have an import/export/import flow.

    The new types to investigate that I currently have on my list are:
    Texture2d
    Material
    Audio clip
    Sprite
    Prefab

    If there are others that you'd like, now's the time to ask :)
     
  19. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    877
    Hell, that covers the ones I was worried about...
     
    Celestipoo likes this.
  20. jprocha101

    jprocha101

    Joined:
    Apr 8, 2015
    Posts:
    134
    That is not exaaaactly what I was hoping for, but that is still very helpful for other things. On a different note, the new export spreadsheet functionality will be awesome!

    The setup I was trying to do is define all the enemy positions, scale, color, etc. ahead of time for each level. Then I am looping through the enemy list when the user reaches said level and spawning each one and adjusting it based on the data in the enemy list. They are prefab clones, but have different predefined component values. So right now if I have 100 levels total with 10 enemies each, I would need 1,000 items on my list, all with their own unique "List Item". If I could just define the 10 instances of enemy data directly within the Enemies list of the Level item I would not have to go back and forth between different items on the "Item List". I could pop open the list of enemies and define them all right there instead of going back and forth between items. It's more of an issue of missing organizational features that make it cumbersome to manage lots of lists at once.
     
    Last edited: Jun 19, 2015
  21. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    Can you reuse the same 10 enemy instances in each level? At the start of the level you can reset the enemies to their starting values. Maybe each level has delta values that you can apply to the enemies to bring them up to that level. For example, each enemy has base health. To make them more difficult, each level can define how much more health each enemy in that level should have. That way you only need to tweak the base stats of 10 enemies, and then focus on each level independently, rather than duplicating the 10 instances across all your 100 levels.
     
    jprocha101 likes this.
  22. jprocha101

    jprocha101

    Joined:
    Apr 8, 2015
    Posts:
    134
    @Celestipoo
    Thanks for the response. The main difference is the position of the enemy. Out of 100 only a couple will repeat. I think for now I can get rid of the level node and just add an INT value to the enemy referencing the level, that can make it easier to organize. Thanks!
     
    Celestipoo likes this.
  23. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    877
    @Celestipoo,

    Is next release this week including incorporation of new types and if yes, which new types/game objects?
     
  24. mensch-mueller

    mensch-mueller

    Joined:
    Nov 25, 2014
    Posts:
    153
    Hi Celestipoo,

    In the newest list GameObject is missing ;)

    Thanks
     
  25. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    @mensch.mueller @Duffer123

    It will include some new types, not sure exactly how many yet. I'm working through them now. On the list:
    Prefab/GameObject (I called the type Prefab, but maybe I should rename it to GameObject)
    Texture2d
    Material
    Audio clip
    Sprite
     
  26. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    877
    @Celestipoo , excellent - can you tell from the above posts that we are keen.... ;)
     
  27. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    Haha, yes :)

    I can cut you guys an early build that you can check out if you don't want to wait for the official release.
     
  28. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    877
    @Celestipoo ,

    Very kind thanks. However, if next release out in next week or so then I am sure I can bide my time... ;)

    [edit]

    Is there / will there be a way to copy an old row/dataset from a schema to create a new one, both (a) in the editor but also (b) in runtime?
     
  29. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    The update probably won't be out until sometime in July. I'm still working on it and the Asset Store has been sloooooooooow to approve.

    I have a way to clone an entire schema or item (not a particular field) in the editor. I have on my list to implement cloning items at runtime but I will see if time allows.
     
  30. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    877
    @Celestipoo ,

    Great thanks. Think I can wait til July.... ;)

    Cloning in editor and in runtime would be great.

    Inheriting from parent types, would be fantastic - but suspect with everything else that is August ++ ;)
     
    Celestipoo likes this.
  31. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    @mensch.mueller and anyone else that asked for GameObject, I'm not sure saving a GameObject applies. Or am I wrong there? I'm saving the GO by reference, meaning it will need to be a prefab that will be loaded from Resources at runtime. But saving a GO, what would that mean? Having the GO field point to another prefab? I'm not sure I can find the path of a prefab at runtime but I'll check. Thoughts?
     
  32. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    In other good news, Localization Editor has been approved (finally!). You can check it out here: http://u3d.as/fNK

    For any of my GDE users that need to support multiple languages, I suggest you check it out. And of course, expect the same level of support for LE that you enjoy with GDE. Thanks for your support!
     
  33. jprocha101

    jprocha101

    Joined:
    Apr 8, 2015
    Posts:
    134
    Could I get a preview of the next build? I'm super excited about the export feature. I just bought the full version and I'm loving it.
     
  34. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    Sorry for the late reply. I've been away from my computer. I'll PM you a link.
     
    jprocha101 likes this.
  35. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    877
    @Celestipoo ,

    I think most applications just drop in the GO Resource folder reference to the GameObject or Prefab.

    Would be nice if you could drag n drop the game asset to the GDE editor and it would then insert the string of the Resource path to it...

    [edit] Perhaps something more intuitive for inserting and displaying the images then for Texture2D or 'Icon' as well - you can see in a small box what image you've selected.

    [edit] and being able to sample/play sounds.

    [edit] and have a view of 3d models.
     
    Last edited: Jun 27, 2015
  36. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    877
    @Celestipoo ,

    Just experimenting and noted that I cannot seem to be able to assign different colors to different elements within a database...? Once you select one colour for one element when creating data it just sticks to that colour for all the elements, no matter how many you add?

    [edit]

    Would also be great if you could prioritise and sort in to any order the fields in any schema...

    And perhaps also if the whole database could be sorted and ordered on save?
     
    Last edited: Jun 27, 2015
  37. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    I have drag/drop functionality in the editor for GO. I was asking about runtime. During runtime, to update a GO field, what would that mean in terms of saving? I'm not sure. I'm leaning towards having GO fields be read only for now. Modifying GOs seems outside of the scope of GDE.

    I'll look into putting in a preview window, maybe under a foldout. Space is limited in the editors. Under a foldout might be alright though, that way you can focus on that one item and have all the info you need.

    For Texture2D, I did plan on putting a small display showing the texture. I didn't think about sampling sounds, I'll write that down.
     
  38. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    Were you not able to change the color field once you created the item? Or are you having trouble with a color list?

    Sorting will be easier done with a spreadsheet. Using an import/export spreadsheet flow, you'll be able to define whatever order you want for items in the sheet. On import, the order of the items should reflect the order they appeared in the sheet. Fields are still ordered by type, but maybe I'll change that.
     
  39. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    877
    @Celestipoo ,

    I think you are taking the right direction re references/GO and great to hear about the rest.

    With the colour thing, I've designed a scheme where one of the fields is Color.

    When I go to Create Game Data for that scheme and set the color field in an item, the color field in all other items is set just the same. I've uploaded a screenie. If I change to select a different color in one item then the other item (and all items) in the same schema seem to inherit that color...

    I hope the attached screenie shows what I mean. If I were to change the color selection from that lurid green to another color, the other item you can see would auto-switch to that color too. I cannot have each item have it's own selected color.
     

    Attached Files:

  40. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    Arg, yes I've seen this before and haven't been able to track it down. Do you know the exact steps you took? Can you repeat it easily? Are the fields still linked even after you reload your data?
     
  41. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    877
    Everything the same and ok save for this one bug. The only thing that might have caused this is that I went back in to the design of the schema and added the color field AFTER I had created several items of data.... that's all I can think it is...?
     
    Celestipoo likes this.
  42. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    Ah, that's it! Ok, I'll have that fixed. Thanks for the info.
     
  43. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    877
    Hope that squashes that bug! How is next version coming along?
     
  44. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    It's moving along at a steady pace. I'm adding GameObjects to the sample scenes. Then need to add the Playmaker & ICode actions to support GameObject fields.

    Also bumping the min Unity version to 4.5. Exciting ;)
     
  45. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    877
    Great. I was thinking about Texture2Ds, Models, GameObjects - you could always serialise them to binary as 10101 string, then put that in JSON, then pull it out as binary? The thing is you'd only really want to do that once in the database or you'd have a massive database... actually, stick with the GO reference route.... ! ;)
     
    Celestipoo likes this.
  46. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    330
    GO reference route all the way :)
     
  47. RichCodes

    RichCodes

    Joined:
    Apr 3, 2013
    Posts:
    142
    Not sure if this was mentioned already, but it doesn't allow you to add items of the same name to different schema's.
    For example I have a building named Torch, and a craftable item named Torch.
    "Buildings_Data: Torch" imported just fine
    I try to add "Torch" to "Crafted_Items_Data" schema, and it says that the item already exits...

    "Crafted_Items_Data: Torch" does not exist :p

    upload_2015-7-3_9-16-19.png

    Other than that issue, great asset so far, thank you!
     
  48. stevebu56

    stevebu56

    Joined:
    Apr 16, 2014
    Posts:
    26
    Right, all items IDs need to be unique. We usually append a prefix or suffix. Maybe like "Torch_bld" or "Torch_cft".
     
  49. stevebu56

    stevebu56

    Joined:
    Apr 16, 2014
    Posts:
    26
    Just a note I'm the other half of Stay at Home Devs. I'm going to respond to questions here about GDE while Celeste is working on other stuff for now. I'll try to be as quick as her :)
     
  50. RichCodes

    RichCodes

    Joined:
    Apr 3, 2013
    Posts:
    142
    They are unique inside of their schema. I might be alone in this, but since sheet = schema, I take that to mean a schema is like a table schema in sql.
    You can have a primary key "Torch" inside the table "Buildings", and the table "Items", at the same time because they are different tables.
    Logically I would think a primary key would only have to be unique inside of its schema, but again, that might just be me...

    If I'm wrong, could you just point me to the class where the first column data is imported so I can change it myself to just prefix it with the schema name as it imports, then I'll make it so I can pass a schema name it will prefix my request with later? (Making it so I don't have to manually make sure thousands of records are unique across all my sheets)
    Thanks
     
    Last edited: Jul 3, 2015