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
    Any unity types you link in GDE must be in a Resources folder or subfolder.
     
  2. thomas4d

    thomas4d

    Joined:
    Sep 5, 2013
    Posts:
    56
    Ok thanks Resources folder Worked :)

    OK next how or can you load audio files from spreadsheet import ? or do you have to add to the GDE after you important the spreadsheet ?
     
  3. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Any unity types is the path *after* resources without an extension, so if your file is "Resources/Audio/wind.mp3" then what you want in the file is "Audio/wind"

    It's easier to link in gde then export your spreadsheet back to Google drive so that there's no typos but you certainly can type them in yourself.
     
  4. NicoVar

    NicoVar

    Joined:
    Sep 21, 2012
    Posts:
    40
    Hi,

    Is there a way to separate the general structure file (schemas) from the actual item data file?

    I want to give the game designer the data file for them to play around with values, but the JSON format also contains all the schemas, which if they break it could mess things up.

    I understand loading from a spreadsheet (local or google) at runtime is not available since I would need to generate the GDE Data classes, but if I could split the schema from the item data it could work fine. Or, if I could re-load a spreadsheet (just the data) in realtime that would also work.

    Here's a quick example on the gde_data file concept. This is a simple gde_data.txt file content:
    {
    "_gdeSchema_Config": {
    "_gdeType_IsConfigOn": "Bool",
    "IsConfigOn": 0
    },
    "ItemZero": {
    "_gdeType_IsConfigOn": "Bool",
    "IsConfigOn": true,
    "_gdeSchema": "Config"
    }
    }

    Is it possible to split this into two?
    The schema file:
    {
    "_gdeSchema_Config": {
    "_gdeType_IsConfigOn": "Bool",
    "IsConfigOn": 0
    }
    }

    And the data file:
    {
    "Config": {
    "ItemZero": {
    "IsConfigOn": true,
    }
    }
    }

    So the data file is clean and I could expose that file for game designers.

    Not sure if this can be done somehow.

    Thanks.
     
  5. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    What you can do is split the file up manually. To initialize, read in both the schema file and the data file into a single string. Then call GDEDataManager.InitFromText() with the string variable that contains the contents of both files.
     
  6. vamky

    vamky

    Joined:
    Aug 9, 2014
    Posts:
    70
    Hi

    I think I have encountered a bug here. I am using GDE 2.6.1 in unity 2017.3, macOS.
    Somehow when I use the playmaker GDE Manager Init Text Asset action to init multiple data files, only the last one is initialized.
    Also the brows button in preference is broken in unity 2017.3, you cannot use it to select data file.
     
  7. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Initializing with the last data file is by design.
    I'll see about the browse button. You can also browse to the data file in your project view and use the context menu to load the data file.
     
  8. Anflo

    Anflo

    Joined:
    Dec 3, 2014
    Posts:
    17
    I am testing the free version before deciding to buy the product. I am getting this error
    Assets/GameDataEditor/Editor/GDEManagerWindowBase.cs(971,18): error CS0165: Use of unassigned local variable `colorDict'
    On Unity 2017.3
    Unity will not compile with this error.
     
    Last edited: Jan 21, 2018
  9. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Apply this patch: GDE Free1.4f uninitialized dict fix
     
  10. Sylidar

    Sylidar

    Joined:
    Sep 22, 2015
    Posts:
    3
    Is there a way to change the order my data shows up in the item list?
    upload_2018-3-1_18-39-54.png
    For instance, I would like to move my enemy items to make the order ascending from 001 to 006.
     
  11. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    No, sorting is not supported in GDE editors. However, if sorting is what you are after, the best method is to use a spreadsheet.
     
  12. justDeek

    justDeek

    Joined:
    Dec 13, 2016
    Posts:
    12
    Hey Celeste,
    I currently encountered a problem removing an Item from the runtime data and hope that you could help me out:

    When I create an item with GDEDataManager.RegisterItem() it gets created in the ModifiedData dictionary, so far so good.
    But since there is no .RemoveItem() function (btw. why not? Is the GDE data structure not designed to remove items?), I try to remove a runtime item with GDEDataManager.ModifiedData.Remove(<itemname>); and as though this removes the item from the Item Editor, looping through the ModifiedData dictionary still shows that it contains that item with all of its values.
    Am I missing out on something or does the ModifiedData dictionary need to be updated afterwards somehow?
     
  13. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    The ModifiedData dictionary isn't meant to be used directly. Instead, access your data using generated data classes. Read here: http://gamedataeditor.com/en/docs/using-gde-data-classes.html

    When creating a new item, use the constructor with a unique ID.
    Code (csharp):
    1. GDEExampleData newItem = new GDEExampleData("some_guid");
    To delete that item, use Reset All:
    Code (csharp):
    1. newItem.ResetAll();
    To save your changes, whether that's saving new items or deleting items, call Save on GDE Data Manager:
    Code (csharp):
    1. GDEDataManager.Save();
     
  14. justDeek

    justDeek

    Joined:
    Dec 13, 2016
    Posts:
    12
    Good to know, but that poses another problem in my situation: Since I only use GDE in combination with PlayMaker and want to create custom actions, one for creating and one for removing an item at runtime, it would need to be independent of the user data. Is there maybe a different approach in which the user just enters any item name as a string and that item would then be removed?

    Also since I use PlayMaker (and the QuickStart guide also says to skip generating GDE Data Classes in that case), whenever I try to generate those I get the error: "DirectoryNotFoundException: Could not find a part of the path <path-to-random-location-in-Assets>\GDESchemaKeys_gde_data.cs" (already tried re-importing GDE to no avail). What could be the cause of that?
     
  15. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Ah, I see. I don't have a playmaker action that's the equivalent of ResetAll method. Here's the guide for playmaker: http://gamedataeditor.com/en/docs/playmaker-quickstart.html

    I'm not sure what that error is but if you give me the full exception, maybe I can track it down.
     
  16. justDeek

    justDeek

    Joined:
    Dec 13, 2016
    Posts:
    12
    Stacktrace:
    Code (CSharp):
    1. DirectoryNotFoundException: Could not find a part of the path "C:\<...>\Assets\__SharedAssets\Scripts\Components\_Third Party\GameDataEditor\CustomExtensions\GDESchemaKeys_gde_data.cs".
    2. System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs:292)
    3. System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share)
    4. (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
    5. System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/StreamWriter.cs:124)
    6. System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding)
    7. (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool,System.Text.Encoding)
    8. System.IO.File.WriteAllText (System.String path, System.String contents, System.Text.Encoding encoding) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:626)
    9. System.IO.File.WriteAllText (System.String path, System.String contents) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:621)
    10. GameDataEditor.GDECodeGen.WriteFile (System.Text.StringBuilder sb, System.String fileName) (at Assets/GameDataEditor/Editor/CodeGen/GDECodeGen.cs:168)
    11. GameDataEditor.GDECodeGen.GenStaticSchemaKeysClass (System.Collections.Generic.Dictionary`2 allSchemas) (at Assets/GameDataEditor/Editor/CodeGen/GDECodeGen.cs:79)
    12. GDEMenu.DoGenerateCustomExtensions () (at Assets/GameDataEditor/Editor/GDEMenu.cs:115)
    I would assume that one of the scripts is searching for the folder called "GameDataEditor" and since I named my folder for custom extensions the same as the GameDataEditor folder that might have lead to this conflict.


    Regarding my initial question: I wasn't asking if there is such an action that removes or resets an item, but rather trying to create one myself :p
    I already created several custom actions for GDE (which can be found <here>), but when it comes to removing runtime items it didn't seem to be easily do-able; which is why I would like to know if there's a way to manipulate the modified data without knowing what the data of the action-user looks like.
    Maybe some "hacky" approach, maybe there's already a function in GDE that would serve a similar purpose. My last straw would be to try to rebuild the modified data without the item that's supposed to be removed, but that seems to be terribly inefficient, especially the more data the user has.
     
  17. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    @pikmin36 It looks like its not finding the full path of your project. This "<...>" should be a full path. Anyway, that's awesome :) I was hoping you'd be able to generate the data classes because then you'd be able to see what the ResetAll method does and use that as a guide to write the action.

    In any case, I looked at one of my generated classes and here's the gist. Call ResetToDefault with the item ID you want to delete and field that exists in that item's schema

    Code (csharp):
    1. GDEDataManager.ResetToDefault(item_id, field_name);
    If your item has any custom fields, you need to follow the same convention.
    Code (csharp):
    1. // First reset the custom field
    2. GDEDataManager.ResetToDefault(item_id, custom_field_name);
    3.  
    4. // Then reset all of the custom field's fields
    5. GDEDataManager.ResetToDefault(custom_item_id, custom_fields_name_1);
    6. GDEDataManager.ResetToDefault(custom_item_id, custom_fields_name_2);
    Etc, where custom_item_id is the ID of the item that was linked in the item you are deleting.

    On the subject of removing items, curiously enough the system wasn't designed to remove items. It wasn't really designed to add items either. Originally, it was for a base set of data that is easily modified and reset to original values. Later on, the ability to create new items at runtime was added. GDE has grown mostly from user suggestions and from my own desire to create a package that's so intuitive, the support I need to provide is greatly reduced ;)
     
  18. justDeek

    justDeek

    Joined:
    Dec 13, 2016
    Posts:
    12
    I actually just obfuscated my local path with <...> :rolleyes:
    ...but I was right in assuming that it has something to do with the naming: after I changed the name of my own "GameDataEditor" folder it started correctly generating the data classes, meaning one of the scripts is searching for the first occurrence of that folder name and thinks it's the main GDE location.
    As a side note, it would probably be good if the generator script for the data classes could remove any special characters and whitespaces from the variable names or replace them with underscores, otherwise you have a hot mess like i do (see attached picture) and it just unecessarily limits how you can name items.

    Adding and removing items at runtime would seem to be a vital part of videogame data, especially when it comes to collecting items with random stats like in most RPG's or survival games, which is also what I currently needed to implement.

    Weirdly the ResetToDefault() functions seems to work, even though it's also just calling ModifiedData.Remove(itemName) like I did initially, but thanks a lot for helping me out here.
     

    Attached Files:

  19. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    That's funny. I remember writing that code and thinking to myself "If someone has two folders called GameDataEditor this isn't going to work. Why would anyone do that? They wouldn't do that..." It took 4 years to hit that case ;) FYI, You can move around those generated classes in your project and they will get updated in place if you generated them again.

    I vaguely remember having a regex that converts names to valid C# variable and class names. I'll take a look and see why that's not doing what its supposed to be doing.
     
    Last edited: Mar 7, 2018
  20. thatscraigz

    thatscraigz

    Joined:
    Mar 27, 2015
    Posts:
    100
    Hi @Celestipoo ! Quick clarifying question per @vamky on initializing data/workflow.

    Is it then only possible to have ONE file initialized at a time?

    If so, is it best to just create a mega-file with ALL the data in it vs. separate data files for parts of the game?
    example: gde_audio.txt , gde_mapData.txt, gde_equipment.txt, etc.

    Thanks for the awesome support! Looking forward to the next update! :D
     
  21. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Currently, you can only have one file initialized at a time. But you can load different files at will as you move through your game. It all depends on how you want to set it up.
     
  22. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    It may seem silly, but I was quite put off by the huge colorful "CLICK HERE TO RATE!!!!" button. Even you almost clicked it by accident in your video because it seems like it should be there the continue / done / whatever button should be.
     
  23. toykanon

    toykanon

    Joined:
    Oct 19, 2016
    Posts:
    7
    Supported Data Types

    Is there a "long" type support plan?
     
    Last edited: Jun 7, 2018
  24. thomas4d

    thomas4d

    Joined:
    Sep 5, 2013
    Posts:
    56
    I can't seem to find "GDE Set Texture2D" in playmaker actions ? there is GDE Get Texture2D

    is this possible ? I want to save screen shots and uses them in the GUI
     
  25. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Unfortunately, no. GDE cannot serialize unity types during runtime.
     
  26. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Yeah, I have a love/hate relationship with it too.
     
  27. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    There is not, but I will add it to the list.
     
  28. thomas4d

    thomas4d

    Joined:
    Sep 5, 2013
    Posts:
    56
    sorry opening an old project and I've searched this Forum but ( search is not the best here )

    My GDE Manager Init Text Asset what do i put in the GDE Data slot ?
     
  29. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    The data file you want to init with. Unless you changed the default path, you can find the GDE data file in GameDataEditor/Resources folder.
     
  30. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Hi there!

    I see no updates have been made for quite a while (Nov 13, 2017). Is GDE still in development/supported/supporting the latest stable Unity version without any warnings?
    Are there any surprises in the roadmap? :)

    I'd love to use it in my team, for an ongoing project that's going to be released Q1 2019, and would love to get that little extra info :)
     
    Last edited: Jun 22, 2018
  31. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    It is being maintained. There is an update in the pipe but not sure when it will be released. It's a solid package, as you can see from reviews and questions and comments here in this thread. I do respond faster over email than here.

    There may be some warnings, but they are from the editor gui side. There shouldn't be any warnings in the runtime code, and if there is, let me know.
     
    Sehee26 likes this.
  32. Sehee26

    Sehee26

    Joined:
    Mar 13, 2014
    Posts:
    19
    Hi there,

    then if i want to remove an item, i cant? Because i need it for my project.

    Thanks
     
  33. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    You can delete items crated at runtime by calling ResetAll() on the item but you can't delete items that exist in the original data file. You can add a bool the your items, called active (for example) to track state.
     
  34. michaeljicskon

    michaeljicskon

    Joined:
    Mar 20, 2018
    Posts:
    2
    Hi I am a developer who is using your gde program.

    I have a problem.


    For example, use the following command to create an item according to your guide.


    GDEsomeData newItem = new GDEsomeData("some_EncryptedKey");


    This will create the item at the new runtime value normally.


    But the problem is that the list data can not be loaded in the created item.

    When accessing the list error that "NullReferenceException: Object reference not set to an instance of an object"

    Please let me know how to solve it. thank you


    I'm sorry I did not have enough English
     
  35. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Ah, I see. So, before trying to access the list, initialize it:

    Code (csharp):
    1. GDEsomeData tmp = new GDEsomeData("key);
    2. tmp.my_list = new List<string>();
    Be sure to use the correct type for the list you are initializing. Let me know if that helps.
     
  36. michaeljicskon

    michaeljicskon

    Joined:
    Mar 20, 2018
    Posts:
    2
    oh! Thank you for your quick conclusion.

    When the list is initialized, it loads normally!!!!!

    But there was another problem.

    As your guide, When deleting a created item i used "ResetAll() "

    For example,
    ---------------------------------------------------------------------------------------------------
    GDEsomeData newItem = new GDEsomeData("some_EncryptedKey");

    newItem.my_list = new List<string>();

    .... load item data..success... and when deleting item...

    newItem.ResetAll();
    ---------------------------------------------------------------------------------------------------
    At runtime, the item data is not remove and the data in item values are all 0

    How do I get remove of items at runtime?

     
  37. Jhon_smith023

    Jhon_smith023

    Joined:
    Sep 1, 2018
    Posts:
    7
    Hi@Celestipoo
    Although data is inserted, somehow the following makers can not be selected by the play maker.
    Do you need any special processing?

    gde.jpg
     
  38. Frogames

    Frogames

    Joined:
    Jun 10, 2005
    Posts:
    199
    Hi @Celestipoo

    I just noticed 2 problems using GDE/LE in the new 2018.3 Unity3D version. The 2 problems are probably related.
    You can reproduce the bugs creating a blank 2D project in Unity 2018.3 and importing GDE/LE.

    First, GDE and LE are no longer available in the Window menu :



    Second, 3 error messages pop in the console




    Thank you for your help Celeste!
     
  39. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    I'm busy through the holidays and will get back to this when I'm done with my travels. However, in the meantime you can temporarily remove the ExcelImport folder until I patch it. Sorry for the inconvenience.
     
    Sehee26 likes this.
  40. Frogames

    Frogames

    Joined:
    Jun 10, 2005
    Posts:
    199
    Thank you Celeste!
     
  41. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Unity 2018.3 users, if you happened to apply the last patch I posted, here's a better one with no issues:

    GDEv2.6.1_EPPlusUpdated.unitypackage

    You only need these 3 Dlls in GDE:
    dlls.JPG
     
    Last edited: Dec 30, 2018
    sqallpl likes this.
  42. LordMoonstone

    LordMoonstone

    Joined:
    Feb 8, 2018
    Posts:
    1
    Hey Celeste,

    Thanks for the wonderful asset. I'm seriously loving it. I ran into an issue with the Playmaker commands though. I can't find any of the Array actions in my action list? I have all the Get, Get Custom, and Set, but no array actions. Is there something I'm missing? I'm using 2018.3.

    Thank you!
     

    Attached Files:

    Last edited: Jan 9, 2019
  43. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    I think you emailed me, but in case that wasn't you, apply this patch: GDEv2.6.1_Playmaker1.9Fix.unitypackage
     
  44. thatscraigz

    thatscraigz

    Joined:
    Mar 27, 2015
    Posts:
    100
  45. toykanon

    toykanon

    Joined:
    Oct 19, 2016
    Posts:
    7
    When are 'Long' supported among Supported Data Types?
    I have made a request, but it has not been supported for a long time. :(
     
  46. KentaurosEnt

    KentaurosEnt

    Joined:
    Jun 6, 2017
    Posts:
    1
    I am not a programmer I am a game graphic designer.

    I am using GDE 2.7 in Unity 5.6. And I'm using playmaker.

    I would like to add the Saved Game feature of Google Play Service. To enable this, you need to send and receive runtime data files to google cloud.
    But I can not do this now.
    This is because you do not know where the runtime data file is stored. What I want to know

    1. Is it possible to store runtime data files in Google Cloud?

    2. If it is possible to store in the cloud, is it possible to load the runtime data file normally when loading it?

    What I want to implement is When a player saves a game save file in the Google cloud, and the device changes or wants to recover old data, it loads the saved file from the cloud Normally it applies to the gde runtime data.

    I've been doing this for months. I have not solved it yet. Please have a clear answer.
     
  47. RobinopdeBeek

    RobinopdeBeek

    Joined:
    Jan 17, 2018
    Posts:
    23
    Hi,

    I have been working with GDE on a project for a while and today I had to reimport the GDE (because of stupid reasons). I replaced the EPPlus.dll again with the fix for 2018.3, but now I am getting these errors:
    upload_2019-4-1_15-2-20.png

    The GDE menu also does not appear under 'window'.

    please help!
     
  48. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Try importing GameDataEditor/APIScripts manually by right clicking on that folder and importing.
     
  49. RobinopdeBeek

    RobinopdeBeek

    Joined:
    Jan 17, 2018
    Posts:
    23
    Not sure what you mean. I now deleted the folder and imported that folder again from the asset store (still same issue). Right-clicking the folder only shows "import new asset" and "import custom package".
     
  50. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    I don't know. Follow the steps you did when you first got the asset. This version of unity has a host of errors.