Search Unity

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:
    379
    They appear in the Unity Properties window.
     
  2. Ryuuguu

    Ryuuguu

    Joined:
    Apr 14, 2007
    Posts:
    391
    Awesome product does way more than I expected.
    For convenience it would be nice if the spreadsheet had data validation drop downs for custom fields. That way I could use the dropdowns in the spreadsheet and not worry about typos. I can put them in myself but If I update the data in Unity and save again the data validation gets lost.
    Probably need a toggle on this feature for backward compatibility.
    Cheers
    Grant
     
  3. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Glad you like it Grant!

    That would be nice. I'll write that down so I won't forget to look into that. Thanks for the suggestion :)
     
  4. Ryuuguu

    Ryuuguu

    Joined:
    Apr 14, 2007
    Posts:
    391
    Another Suggestion.
    Custom types that are stored in the class as "string". So it would use the custom type to select the name from a drop down, but then treat it like a string. I use a lot enums in my data classes so I make custom classes and only put the name as string it it. I then can pull this name out and convert to a an enum, but it would be easier to just read then enum name from a string instead going down inside the class.

    Edit: realised that item names must be unique across all schema so the above would not work if two enums used the same value ie area.all and targer.all would conflict. So I will continue to use a name field inside my enum schema.

    Cheers,
    Grant
     
    Last edited: Nov 22, 2016
  5. frogzero

    frogzero

    Joined:
    Aug 7, 2016
    Posts:
    3
    Hello - Using the sample image shown below,

    (for example) I want to manually delete an item Weapon: Mace entirely using code in unity during runtime.

    1. How do I delete the stored entry I created (I likely used the code below to add the Weapon item (Mace) during my last runtime play-through)

    GDEDataManager.UpdateItem(newMember);
    GDEDataManager.SaveToDisk();


    2. Scenario 2 -- How do I delete the stored Weapon: Mace item after I import the spreadsheet using code?

    3. Also is it possible to only save the specific data you need? I have alot of temporary runtime data i generate after I call new GDE___Data and need to clean that up (or ignore it so it doesnt save) before I allow the user to save - but i am not sure how to do that.

    Source: http://gamedataeditor.com/en/docs/spreadsheet-format.html
     
    Last edited: Dec 19, 2016
  6. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    If your Weapon: Mace is an item that was created at runtime and does not exist in your original data set, use ResetAll() to remove that item. That will remove the item from modified data and it will not be loaded again.

    If your Weapon: Mace exists in your original data set, either imported from a spreadsheet or created using Playmode saving (as you mention in #1) in the editor with GDEDataManager.UpdateItem(newMember);
    GDEDataManager.SaveToDisk();, then you cannot delete that item. You can clear out all its fields, set them all to zero, empty strings, clear lists, etc. but that item key will always be present as it will be loaded from the data file. I'd suggest adding a "deleted" bool to the schema that can be read to see whether that item is valid or not.

    On saving specific data, any changes that have been made will be saved when GDEDataManager.Save(); is called. If you generate temp data, be sure to call ResetAll() on those temp items once you are done with them and they will be removed from modified data and will not persist.
     
  7. TrashBag

    TrashBag

    Joined:
    May 7, 2014
    Posts:
    5
    Hi @Celestipoo, recently I changed my saving system and found myself in trouble.

    In the previous version of my game, updating my inventory was like that:

    GDECollectiblesData collectibleData = GetGDECollectibleDataForName(collectible.name);
    collectibleData.quantity++;
    GDEDataManager.UpdateItem(collectibleData);
    GDEDataManager.Save();

    And it was working like a charm. But now my saving system has a commit like behavior, so I wanted to just update the items in GDE but save them when the user stopped by a save pedestal. Something like:

    // when getting a new item
    GDECollectiblesData collectibleData = GetGDECollectibleDataForName(collectible.name);
    collectibleData.quantity++;
    GDEDataManager.UpdateItem(collectibleData);

    And:

    GDEDataManager.Save();

    When stopping in the save pedestal.

    I thought it was working at first glance, but then I noticed that the intermediate data was getting lost sometimes, and at totally random situations, like changing scenes or interacting with other elements of the game. When looking at the runtime data in the Item Editor, it was possible to see the quantity attribute getting higher and then being reset when the scene changed, sometimes it did not happen.

    Am I using it wrong? Is it possible to use GDE as a local commit and then "push" my changes to the disk latter on? Or will I have to have a duplicate my models for every diff?

    Thanks in advance,

    OBS: targeting Android and iOS, problem happens in both platforms and in the editor as well.
     
  8. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    UpdateItem() is for helper scripts that generate GDE data. There are three ways to enter data into GDE: Using the GDE editors in Unity, importing a spreadsheet, and using UpdateItem() and SaveToDisk() in a helper script. So, remove the UpdateItem() call, and just use Save() when you want to save your data. Also make sure that your data file has what you expect in it, and clear out any saved data before testing so there's no confusion. Let me know if this helps.
     
  9. claytoncurmi

    claytoncurmi

    Joined:
    Jul 6, 2010
    Posts:
    168
    Hi @Celestipoo,

    I am interested in buying the GDE plugin but I would like to known if there are any known issues related to Unity 5 especially for the Android and WebGL platforms.

    Thanks for you time.

    Regards,
    Clayton
     
  10. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Hi Clayton, not that I know of. The best way to confirm is too test out the free version before purchasing.
     
  11. MrIconic

    MrIconic

    Joined:
    Apr 5, 2013
    Posts:
    239
    I'm a little confused about the runtime values vs. regular values.

    When I modify an item in playmaker and then use Save All the changed values only show up under "Runtime Values."

    -Are the values saved to disc once I called Save All in Playmaker even though they only show up when "Runtime Values" is checked?

    -What happens when I modify non-runtime values? For example: Does Playmaker and regular scripts still call from the runtime values and not the modified non-runtime values?
     
  12. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Sorry for the delayed response, I've been moving. Anyhow, runtime values are the values you would get when the game is run. For example, say there is a username field in some item with a default value of "John Doe". The first time a user runs your game, they set the username to "Celeste". And your game saves that change. The runtime value for that field is now "Celeste". If that field is reset, it will return "John Doe" once again. Playmaker SaveAll action is what you need to make any changes to GDE data persist.

    Don't confuse this with the GDE editor tools in Unity. In the GDE editor, you can see local runtime values if you have that box checked. This is for debugging. You can play your game in the editor and easily see how your data is changing. So runtime values are from changes made while the game was played. Default values are the values that will be deployed when you make a build of your game.

    Does this clarify things for you?
     
  13. MrIconic

    MrIconic

    Joined:
    Apr 5, 2013
    Posts:
    239
    So in reality non-runtime values are more like default values. They exist when exported or through the reset action. Otherwise, PlayMaker will always view the runtime variables when they exist?
     
  14. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Yes, exactly.
     
    MrIconic likes this.
  15. MrIconic

    MrIconic

    Joined:
    Apr 5, 2013
    Posts:
    239
  16. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @Celestipoo ,

    Been a while since i checked in on this forum.

    GDE has come along a bit since i last looked.

    Reviewing the Playmaker actions i cant see any GDE Set or GDE Save or Load actions or actions to add or change or save items in runtime?

    Also, how would you use GDE playmaker actions to get (or set) a texture2d, a gameobject or audioclip?
     
  17. justDeek

    justDeek

    Joined:
    Dec 13, 2016
    Posts:
    12
    I would love to know what format the path to an AudioClip in Google Spreadsheet needs to be. Let's say I have a clip in Assets\Audio\test.wav
    How do I reference that in spreadsheet? The Documentation says: path/to/asset_without_an_extension
    Do I go from the Assets folder or from the drive letter (C: ) and also do I need quotes when I only reference one clip?
    It feels like I tried almost every possible combination but when I reimport it still says 'none (AudioClip)' in the Item Editor.
    Could you please give me an example or tell me what I could be doing wrong?
     
  18. Caffeen

    Caffeen

    Joined:
    Dec 25, 2013
    Posts:
    34
    Either I've discovered a bug, or I'm fundamentally misunderstanding how the GDEDataManager.Get<t> functions are supposed to work.

    Let's say I've imported a google spreadsheet, and I have an Item, "SomeItem" with a string field, "SomeField" with a value of "Hello world".

    Debug.Log (GDEDataManager.GetString("SomeItem","SomeField", "default string"));

    I would expect this to log "Hello world" to the console, but instead it logs "default string".

    If I manually set the value at runtime via the GDEDataManager.SetString method first, GetString will return the value that was set.

    Shouldn't GetString, etc, be able to return the values that were imported from the spreadsheet, or am I doing something wrong?
     
    Last edited: Feb 24, 2017
  19. MetaDOS

    MetaDOS

    Joined:
    Nov 10, 2013
    Posts:
    157
    Hello,

    Is there any solution for the countries which cannot access to Google Services such as China?

    Thanks,
    Anh
     
  20. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Sorry for the super late reply. I didn't get any notifs from the forum. Grr, these forums.

    Any references to Unity types must be in a Resources folder, or subfolder. So, if you moved Audio to Resources, it would be Audio/test.
     
  21. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    What version of GDE do you have? The Set actions should all be there. Also, Unity types are read only.
     
  22. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    No, those Get methods only return from the saved data. Those methods aren't really meant to be used directly. The generated data classes wrap all that stuff to make it easy to access the fields.

    But here's what you'd need to do if you didn't want to use the data classes:

    Code (csharp):
    1. Dictionary<string, object> dict;
    2. string someField = "default string";
    3.  
    4. // First get the spreadsheet value by loading it from the item's dictionary
    5. if (GDEDataManager.Get("someItem", out dict))
    6. {
    7.     // Then read the spreadsheet value from it
    8.     dict.TryGetString("someField", out someField);
    9. }
    10.  
    11. // Now override it with the saved data, if that's what you want to do
    12. someField = GDEDataManager.GetString("SomeItem","SomeField", someField);
     
  23. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Yes, you can use a local spreadsheet using Excel.
     
  24. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    For anyone importing GDE Free into Unity 5.5 and getting a Dictionary exception, import this patch.
     
  25. Tom_Timothy

    Tom_Timothy

    Joined:
    Nov 21, 2013
    Posts:
    132
    Need a little help getting in forwarding motion using your tool in the playmaker. I need to do the following in this order.

    Check spread sheet for enemies getting x,y cords(need help)

    Playmaker check around the character to see if there are enemies. (I can do this just fine)

    If No I spawn enemies around player.

    When enemies are spawned I need to write there x,y cords and add to a spread sheet

    Then when another player initializes I need it to check spread sheet so those enemies spawn to them also

    If the enemy is destroyed need to write to spread sheet turn bool to 0 so others don't see the monster on update or delete the entry from the spread sheet.
     
  26. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    I'm sorry, our documentation site is down at the moment (I'm investigating now). Please take a look at the offline documentation for GDE Playmaker support. You can find it in the GameDataEditor/Docs folder, I've also uploaded it here.
     
  27. Frogames

    Frogames

    Joined:
    Jun 10, 2005
    Posts:
    199
    Hi Celest,

    I'm using GDE (and LE) for my next game.
    First, I didn't noticed any problem with the new Unity 2017, except for sync from Unity to Google Drive.

    InvalidOperationException: Cannot override system-specified headers
    UnityEngine.Networking.UnityWebRequest.SetRequestHeader (System.String name, System.String value) (at C:/buildslave/unity/build/artifacts/generated/common/modules/UnityWebRequest/WebRequestBindings.gen.cs:479)
    UnityEngine.WWW..ctor (System.String url, System.Byte[] postData, System.Collections.Generic.Dictionary`2 headers) (at C:/buildslave/unity/build/Runtime/WebRequestWWW/UWRWWW.cs:62)
    GameDataEditor.GDEDriveHelper.UploadToExistingSheet (System.String googleSheetImportName, System.String dummyFilePath) (at Assets/GameDataEditor/Editor/ExcelImport/GDEDriveHelper.cs:257)
    UnityEngine.Debug:LogException(Exception)
    GameDataEditor.GDEDriveHelper:UploadToExistingSheet(String, String) (at Assets/GameDataEditor/Editor/ExcelImport/GDEDriveHelper.cs:310)
    GameDataEditor.GDEExcelManager:DoExport(Boolean) (at Assets/GameDataEditor/Editor/GDEExcelManager.cs:96)
    GameDataEditor.GDEManagerWindowBase:DrawSpreadsheetSection() (at Assets/GameDataEditor/Editor/GDEManagerWindowBase.cs:438)
    GameDataEditor.GDEManagerWindowBase:DrawHeader() (at Assets/GameDataEditor/Editor/GDEManagerWindowBase.cs:351)
    GameDataEditor.GDEManagerWindowBase:OnGUI() (at Assets/GameDataEditor/Editor/GDEManagerWindowBase.cs:306)
    GDESchemaManagerWindow:OnGUI() (at Assets/GameDataEditor/Editor/GDESchemaManagerWindow.cs:46)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    So, I'm using Playmaker, and I would like to know if there is way to clone a GDECustomData item in a FSM? Or do I have to clone the item in a side script?

    Thank you and keep up the good work!
     
  28. Nada101

    Nada101

    Joined:
    Aug 3, 2017
    Posts:
    2
  29. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Those actions are deprecated. Please send me an email (celeste@stayathomedevs.com) with your invoice # and I will send you a link to the beta that contains the new playmaker list actions.
     
  30. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Hmm, I will take a look at that error. Cloning can only be done with the generated data classes in a script. Take a look at the end of section 6 in the quick start guide: http://gamedataeditor.com/en/docs/gde-quickstart.html

    If you are good with scripting, you could create a custom playmaker action that does the clone using the generated data class. Your action could take a string key parameter, then the action would use that key to do the cloning.
     
  31. Frogames

    Frogames

    Joined:
    Jun 10, 2005
    Posts:
    199
    Thank you very much Celest!
     
  32. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    @Frogames

    For Unity 2017 users getting an exception when exporting to Google Drive, please backup your project, then apply this patch.
     
  33. zaenuar

    zaenuar

    Joined:
    Aug 11, 2017
    Posts:
    1
    my asset store GDEExtension.css error compile at CS1929 in unity 5.50f1
     
  34. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Free or Paid? What's the error?
     
  35. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Everyone please note:

    I am located in South Florida and am dealing with preparations for Hurricane Irma. I may not respond as promptly as I normally do. I may find myself without power and internet access, so if I don't respond please be patient. I will respond when I can. Thank you for understanding.
     
    SoftwareGeezers, AGregori and hopeful like this.
  36. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,685
    Take care, and best wishes!
     
  37. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @Celestipoo ,

    Absolutely, hope you guys stay safe.
     
  38. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    902
    Just rolling out my first game to Steam and I realise that there could be an issue overwriting data. The runtime data isn't stored in the database is it? So it's safe for me to overwrite the game items without messing up the players customisations?
     
    thatscraigz likes this.
  39. GS796

    GS796

    Joined:
    Dec 16, 2016
    Posts:
    24
  40. Frogames

    Frogames

    Joined:
    Jun 10, 2005
    Posts:
    199
    Hi Celest,

    I'm not sure why, but it looks like the number of keys imported from a Google or Excel spreadsheet is limited. Or maybe the number of keys GDE can manage is limited.
    My project is data driven, and one of my shemas counts more than 100 keys. But less than half of the keys are imported in Unity.

    I noticed data columns witha name starting by A are all imported. Not imported datas start with B colums.

    Any idea?

    GDE_Import.png
     
  41. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Sorry for the long delay.
    Anyway, no your saved data should remain intact as long as you don't manually reset the data through GDE. I'm assuming you didn't run into any issues since you haven't been back to respond. Congrats on shipping your game!
     
  42. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Arraymaker support is obsolete. There are new playmaker actions that work with lists in the beta. Send me your invoice number and I'll give you access to the beta: celeste@stayathomedevs.com
     
  43. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    For anyone needing more columns: In GameDataEditor/Editor/ExcelImport/GDEExcelDataHelper.cs at the top of the class there is a range defined:

    const string KEYS_RANGE = "a:a";

    Change the range to include whatever columns you need.
     
  44. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    GDE v2.6.1 is now live. It contains new Playmaker actions that support lists, performance improvements, and bug fixes.
     
  45. vamky

    vamky

    Joined:
    Aug 9, 2014
    Posts:
    70
    Hi:

    Our first project used resources folder to manage all GDE related resources and it was working very well, but for our 2nd project we would like to switch to asset bundle to better manage all resources. I wonder can GDE access unity types stored in asset bundle? If not is there any plan to support asset bundle in the future?

    Cheers
    Kenyon
     
  46. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Hi Kenyon, no it doesn't support asset bundles. Taking on the management of an asset bundle is outside of the scope of GDE. However, it shouldn't be too much to write a couple of helper classes that manage your bundles and use GDE to load specific assets from those bundles. GDE could store the bundle names and asset paths, and your code would read that path from an item and then load it from whatever bundle it was in. So I'm copying this from Unity docs:

    Code (csharp):
    1. IEnumerator InstantiateGameObjectAsync (string assetBundleName, string assetName) {    
    2. // Load asset from assetBundle.    
    3. AssetBundleLoadAssetOperation request =
    4.         AssetBundleManager.LoadAssetAsync(assetBundleName, assetName, typeof(GameObject) );    
    5.  
    6.  if (request == null)        
    7.    yield break;    
    8.  
    9.  yield return StartCoroutine(request);    
    10.  
    11. // Get the asset.    
    12. GameObject prefab = request.GetAsset<GameObject> ();    
    13.  
    14. if (prefab != null)        
    15.   GameObject.Instantiate(prefab);
    16. }
    So assetBundleName and assetName can be stored in a GDE item as strings. You would provide the coroutine to load that asset from that bundle however you like.
     
  47. vamky

    vamky

    Joined:
    Aug 9, 2014
    Posts:
    70
    Cool! Thank you for your help!
     
  48. thomas4d

    thomas4d

    Joined:
    Sep 5, 2013
    Posts:
    56
    where are the doc's on playmaker and GDEManagerInitTextAsset ?

    and how do you create the "playmaker_readtest_data" you have in the demo scene ??

    I having trouble getting String data from game data ??? can you give an outline on the playmaker workflow please
     
  49. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Read through the playmaker quick start guide. It will highlight all the pieces and show you how it works: http://gamedataeditor.com/en/docs/playmaker-quickstart.html
     
  50. thomas4d

    thomas4d

    Joined:
    Sep 5, 2013
    Posts:
    56
    No Sorry I'm missing something I can add your distorted-reality.mp3 to a GDE but can not add any other sound file ??

    have converted to MP3
    don;t have any spaces in my File name

    I can import and export and all my text strings stay and they all work when i play my Scene

    but when i add any other audio file then distorted-reality.mp3 it get cleared when i run the scene ?

    when i import or run my scene also clears the Audio data ? but all teh text is working perfectly ? please help what am I missing ?