Search Unity

  1. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  2. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Participate with students all over the world and build projects to teach people. Join now!
    Dismiss Notice
  5. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    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:
    334
    Not right now. You could update the data held in the auto generated data classes, but once those objects are destroyed or GDE data is reloaded, those changes will be lost. Modifying data during runtime is on the list for a future update.
     
  2. PKrawczynski88

    PKrawczynski88

    Joined:
    Nov 14, 2013
    Posts:
    15
    @Celestipoo

    I moved my game data editor folder around. Pointed out in settings to new place where gde_data.txt can be found. Cant generate custom extensions because it cant find file I generated earlier (wchich makes sense because I changed path)

    May I suggest fixing this? User should be able to move their files without fear that something will break. I suspect also if I try to load my unity project on another pc I'm working on it just wont work. Because username and path are entirely different between those pc's.

    To clarify - error says that it cant find .cs file that was created with "Generate extensions".
     
  3. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    Would you mind sending me an email celeste@stayathomedevs.com, and copy/paste the error you're getting? I'll look into it and get you back up and running again.
     
  4. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    The path to gde_data.txt is relative to your Unity data path specified by the Unity API. As long as you are loading the gde_data.txt file from within your Unity project folder, it should find it provided that the path to the data file is correct in the Preferences. Were you able to load the data file from the new path?
     
  5. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    After reading your post again, I think the only thing you need to do is set the new path in Preferences. Go go Window->Game Data Editor->Preferences and browse to the new path where you placed your gde_data.txt file. After doing that, you should be able to open your project on both computers and have the data file load correctly. If not, let me know so I can sort it out.
     
  6. PKrawczynski88

    PKrawczynski88

    Joined:
    Nov 14, 2013
    Posts:
    15
    @Celestipoo
    Let me rephrase if I was confusing at first :)

    When you move gde folders around (in my case from root/assets to root/assets/external) changing where gde_data.txt can be found solves only half of a problem. If you generated earlier extensions and try to generate them once again (after additions/changes) unity throws error to console. Error says that it cant find previously generated extensions files.

    So steps to reproduce:
    1. create new project, put game data editor folder in assets, create schema, create data, generate extensions.
    2. move game data editor to another folder inside assets, change gde_data.txt path in preferences to one matching new hierarchy
    3. generate extensions and observe how error is thrown
    4. move game data editor back to assets root, change gde_data.txt path in preferences to original
    5. generate extensions and observe how everything proceeds as intended

    If you wish we may continue over private message here on unity forums to not clutter your thread :)
     
  7. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    Nah, don't worry. This might help someone else with the same problem. Ok, I know what the problem is. The code generation expects the path Assets/GameDataEditor/CustomExtensions to exist. If you move any part of that, the code gen throws an error when it tries to write to the missing directory. There's two ways I can fix this.

    1) Create the directory if it does not exist. This is not ideal because if the user moved GDE, then the code gen files will be outside of the new path.

    2) Require the user to specify the code generation path. Also not ideal because having to set so many options is kind of a pain.

    3) Detect where the IGDEData.cs interface is and use that path as the output path. Sounds cool and streamlined, but potentially error prone. I'll have to think about this more.

    For now, open up GDECodeGenConstants.cs and replace the following constants at the top with this:
    Code (csharp):
    1.  
    2. public static string CustomCodeGenPathPrefix = Application.dataPath + "/MoveTest/GameDataEditor/CustomExtensions";
    3. public static string ClassFilePathFormat = CustomCodeGenPathPrefix + "/{0}.cs";
    4. public static string CustomExtensionFilePath = CustomCodeGenPathPrefix + "/GDECustomExtensions.cs";
    5. public static string StaticKeysFilePath = CustomCodeGenPathPrefix+ "/GDEItemKeys.cs";
    6.  
    Change the first constant, CustomCodeGenPathPrefix, to where you want your generated scripts to go. Just make sure that prefix path exists. That path will resolve to "Assets/MoveTest/GameDataEditor/CustomExtensions" so if you moved GDE to Assets/Externals, then you would change it to "/Externals/GameDataEditor/CustomExtensions".

    Let me know if this fixes your problem.
     
  8. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    Game Data Editor v1.4 is now live on the Asset Store!

    For those that are updating, some notes:

    * Namespaces GameDataEditor.GDECustomExtensionMethods and GameDataEditor.GDEExtensionMethods have been removed. All GDE code is under a single namespace GameDataEditor.

    * Check out v1.4 Documentation to see how to import from DLC or URLs
     
    Last edited: Dec 17, 2014
  9. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    356
    Watching for future purchase list!

    Can this asset merge data that are not of "Default" value if we have a second data file?
    (I am imagining a super easy save/load).

    or, what save/load methods are available to be integrated with the asset.?

    Sorry for this nooby questions, as I don't have any access to Unity Editor for a few weeks to play around with the free version.

    I am considering to purchase because this seems very flexible seeing the rpg examples.

    Thanks!
     
    Last edited: Dec 17, 2014
  10. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    Hmm, do you mean merging in the editor? Or do you mean during runtime?
    Currently, you can load from the default resource bundle, you can load from a TextAsset (useful for DLC), or you can load from a text string (useful for data files hosted on a server). Once initialized, you can't initialize again in the same session. But that's going to change to be more flexible.

    It is very flexible! If you want more detail about the asset and how it works, you can check out www.gamedataeditor.com. I'm in the process of building it, but lots of content is already published so you can browse and get a feel for how it works. The quick start guides are live, playmaker related docs, and spreadsheet docs are up too.
     
  11. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    New site for GDE is live!
     
  12. Bronco78th

    Bronco78th

    Joined:
    Apr 30, 2011
    Posts:
    86
    Great tool and Great support from the Author.

    Id love to see some example projects now just for noobs like me. A scene for example where you pull data (like your tunic example) and apply it to an object in Unity....so you cover the full process from start to finish....again so noobs like me don't waste your valuable development time :).

    Great work anyway and look forward to seeing more !
     
  13. dkoontz

    dkoontz

    Joined:
    Aug 7, 2009
    Posts:
    198
    I have a question about Google Spreadsheet importing. Do you support spreadsheets with multiple sheets? For example I have a single Google Spreadsheet for my game's data but inside it are 6 different sheets all relating to different things in the game, does your import pull in all of the sheets or can I choose which ones? I often have sheets that are used by the other sheets as lookup tables or are works in progress and are not in the right format to be imported.
     
  14. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    Spreadsheet import will attempt to import all sheets. If a sheet is not in the correct format, it is skipped and the next sheet is processed. You will be able to import even if some sheets are not GDE data. Only valid sheets will appear as GDE data after importing.
     
  15. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    GDE Version 2.0 has now been submitted for review! Update notes:

    * Save data during runtime!
    * Added right click context menu shortcut to load GDE data files
    * New Playmaker GDESet Actions for saving data with Playmaker
    * Minimum Unity version supported is now 4.3.4

    Here's a link to Version 2.0's GDE QuickStart Guide or Playmaker QuickStart Guide.

    Happy 2015!
     
  16. dkoontz

    dkoontz

    Joined:
    Aug 7, 2009
    Posts:
    198
    I'm trying to authenticate with Google (version 1.4 as 2.0 hasn't hit the asset store yet). When I paste in the code Google provides into GDE I get the error:

    Code (CSharp):
    1. ArgumentException: An element with the same key already exists in the dictionary.
    2. System.Collections.Generic.Dictionary`2[System.String,System.String].Add (System.String key, System.String value) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
    3. GameDataEditor.Google.GDEDriveHelper.DoFileListQuery () (at /Users/dkoontz/dev/Emberscape/GroveUnityProject/Assets/GameDataEditor/Editor/ExcelImport/GDEDriveHelper.cs:121)
    4. GameDataEditor.Google.GDEDriveHelper.GetSpreadsheetList () (at /Users/dkoontz/dev/Emberscape/GroveUnityProject/Assets/GameDataEditor/Editor/ExcelImport/GDEDriveHelper.cs:78)
    5. GDEImportExcel.DrawAuthenticateView () (at /Users/dkoontz/dev/Emberscape/GroveUnityProject/Assets/GameDataEditor/Editor/ExcelImport/GDEImportExcel.cs:369)
    6. GDEImportExcel.OnGUI () (at /Users/dkoontz/dev/Emberscape/GroveUnityProject/Assets/GameDataEditor/Editor/ExcelImport/GDEImportExcel.cs:147)
    7. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    8. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    9. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    10. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    11. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:244)
    12. UnityEditor.HostView.Invoke (System.String methodName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:237)
    13. UnityEditor.HostView.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:129)
    14.  
    This was on OSX, I tried it on Windows and got a different error:

    Code (CSharp):
    1. WebException: Error writing request: The authentication or decryption has failed.
    2. System.Net.WebConnectionStream.WriteHeaders ()
    3. System.Net.WebConnectionStream.SetHeaders (System.Byte[] buffer)
    4. (wrapper remoting-invoke-with-check) System.Net.WebConnectionStream:SetHeaders (byte[])
    5. System.Net.HttpWebRequest.SendRequestHeaders (Boolean propagate_error)
    6. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    7. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    8. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    9. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:244)
    10. UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:237)
    11. UnityEditor.HostView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:129)
    Any ideas?
     
  17. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    The error in OSX means you have multiple files with the same file name in your google drive account. I'll have to fix that bug. But for now, open up GameDataEditor/Editor/ExcelImport/GDEDriveHelper.cs around line 121 and replace it with this:

    Code (CSharp):
    1.  
    2. _spreadSheetNames[index++] = fileName;
    3. try
    4. {
    5.   spreadSheetLinks.Add(fileName, fileUrl);
    6. }
    7. catch(Exception ex)
    8. {
    9.   Debug.LogWarning(ex.ToString());
    10. }
    That should get you past the exception and able to choose a file to import. Let me know if you have any other issues.
     
  18. dkoontz

    dkoontz

    Joined:
    Aug 7, 2009
    Posts:
    198
    Yes that did get me past the authentication issue, the next problem is that I only see sheets I own, not the ones that are shared with me.
     
  19. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    Hmm. I will have to read more about the google drive API to see if/how they allow access to shared files. Can you download the file and import it locally? Sorry for the hassle.

    I'll look into that and get a fix in for both of these issues.
     
  20. dkoontz

    dkoontz

    Joined:
    Aug 7, 2009
    Posts:
    198
    Yeah that's what I've been doing so far and that is working.
     
  21. dkoontz

    dkoontz

    Joined:
    Aug 7, 2009
    Posts:
    198
    I'm getting errors when a sheet isn't in the correct format. So yes I get that the sheet is technically skipped, but it floods the console with tons of errors and makes it really hard to determine if any of the sheets I expect to be imported had problems. Could there be a way to opt-in or opt-out of certain sheets being imported?
     
  22. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    Sorry for the delay, I missed your reply. I've made some changes to the import logic so that you can restrict import to sheets with names that start with "GDE_". This prefix will be stripped out when imported so if your sheet name is GDE_TestImport, the Schema name will become TestImport. I will send you the updated script in a private message.
     
  23. IOZO

    IOZO

    Joined:
    Jun 26, 2010
    Posts:
    52
    Hi,

    I just updated my version to 2.0
    What happened to GDE_GetArray ... Playmaker function.
    How to replace it with new APIs ?

    thx
     
  24. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    Oh sorry about that. They are not part of the official package yet since playmaker hasn't released it's new update. I'll send them to you again.
     
  25. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    GDE Users:

    GDE Version 2.0.1 was submitted to the asset store. It fixes a couple bugs with Google auth when importing google spreadsheets.
     
  26. tconti

    tconti

    Joined:
    Apr 12, 2013
    Posts:
    3
    when I import from spreadsheet the data file ends up one directory above the Assets folder
     
  27. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    Unless you moved your data file by changing the path in Preferences, it should be saved as /Assets/GameDataEditor/Resources/gde_data.txt

    Note that the excel file you import should not be the path set in Preferences. Check out this link to see how to change the data file path: http://gamedataeditor.com/docs/where-is-data-file.html

    And if it still appears in the wrong path, you can move it to your Assets directory manually, right click the data file in the Unity Project Window and select Game Data Editor->Load Data in the context menu. That will load the data in the GDE Editor Windows and also set the data path correctly in your Preferences.
     
    Last edited: Feb 4, 2015
  28. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    GDE v2.0.1 is now live in the Asset Store. This small update fixes some issues with Google spreadsheet import.
     
  29. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    356
    Purchased this yesterday, Only 1 complaints I had was that there is no sample scene for it.

    But great work~!
     
  30. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    Ah, yes. I need to fix up the sample scene and put that back in. I will work on that next. Thanks :)
     
  31. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    356
    Simple question, how do I get list size from scripts?
    So that I can loop through the lists.
     
    Last edited: Feb 8, 2015
  32. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    Here's how you load an item using the data classes: http://gamedataeditor.com/docs/using-gde-data-classes.html
    To use the example from that link, and you loaded an item like this:
    Code (csharp):
    1. GDEArmorData tunic;
    2. GDEDataManager.TryGetCustom(GDEItemKeys.Armor_LeatherTunic, out tunic);
    Say there was a float list called "some_float_list". GDE lists are Generic Lists. You can see what you can do with generic lists on MSDN docs.
    Here's two ways to loop through it:
    Code (csharp):
    1. // using foreach loop
    2. foreach (float currentFloat in tunic.some_float_list) {
    3.     // do something with currentFloat ...
    4. }
    5.  
    6. // using a for loop
    7. for (int index=0;  index<tunic.some_float_list.Count;  index++) {
    8.     float currentFloat = tunic.some_float_list[index];
    9.     // do something with currentFloat ...
    10. }
    11.  
    12. // to just read the size, use
    13. int size = tunic.some_float_list.Count;
     
    Gekigengar likes this.
  33. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    356
    Thanks for the quick response!

    Any plans on "Export to spreadsheet" feature?
    I also suggest a way to copy Schemas from the editor.
    That would be great!
     
  34. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    Np. I will work on an export to spreadsheet feature. It's been requested a couple of times already.
    When you say you want to copy Schemas from the editor, what do you mean? What are you wanting to do when you copy a schema?
     
  35. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    356
    Cut/Copy/Pasting a Schema/Item

    I think it can be easily done if I start working FROM Spreadsheet,
    But sadly, I use the in-editor interface to work with the data.

    Though, I am really glad I purchased this asset,
    It is extremely easy to work in scripts with the GDE!
     
  36. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    I'm glad you are finding it helpful and easy to use!

    Oh, I see. I will note that down as well. The editors do need some more feature love.
    Have you been using the search and filters while editing? It could help when editing. Look here to see how searching and filtering works: http://gamedataeditor.com/docs/search.html
     
  37. ioSoftSmith

    ioSoftSmith

    Joined:
    May 22, 2014
    Posts:
    4
    Thought this might help someone:

    Am using VS2012 UnityVS tools and the Newtonsoft JSON dll that comes with Game Data Editor causes the following exceptions in Visual Studio:

    Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor'

    Since I am also using Full Inspector (which had the same problem some time ago and fixed the dll, see here: https://github.com/jacobdufault/fullinspector/issues/18)

    I was able to replace the dll in Game Data Editors package with Full Inspector's JSON dll to fix.
     
  38. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    Thanks for the tip! I will update the dll in the next update. That dll is only used for importing Google spreadsheets, so you can remove that subdirectory (GameDataEditor/Editor/ExcelImport) if you do not plan to use that feature.
     
  39. kjuanlu

    kjuanlu

    Joined:
    Dec 4, 2011
    Posts:
    100
    Hello

    Good work with the plugin ;)

    I was trying to add new entries by code, but I figured that all modifications are saved into PlayerPref instead json file. All methods/functions on GDEDataManager only reads the json file (don't write). I was trying to copy the editor functions, but I can't compile the script if it is outside Editor folder.

    I was trying to create a couple of random entries by code, to modify later in gameDataEditor window, but it seems that's not possible...

    Can you help on this topic?

    Regards
     
  40. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    Hmm, I think your best bet is to write a helper script that will run in editor mode that generates the random items for you. If bulk item generation is your goal, can you try using a spreadsheet to create the items and import them that way?
     
  41. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    GDE is March 9th's 24 Hour Deal, be sure to pick up a copy!

     
    Last edited: Mar 9, 2015
  42. Wismgari

    Wismgari

    Joined:
    Mar 1, 2015
    Posts:
    3
    Hey Celeste,

    24 hour deal hooked me, knowing I need something like this I clicked buy... and got the attached image as I'm in Unity 5. Any idea how minor/major any incompatibilities are likely to be?

    Thanks!
     

    Attached Files:

  43. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    I tested GDE with Unity 5 and have found no issues. I have a couple of users that have been using GDE with Unity 5 for a while and haven't heard about any compatibility issues from them. Let me know if you run into anything but it should import smoothly.
     
  44. Wismgari

    Wismgari

    Joined:
    Mar 1, 2015
    Posts:
    3
    Downloaded, imported great, ran through the quick start guide with no obvious issues. Seems to work perfectly!

    Thanks for a great tool :)
     
  45. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    Perfect :)
     
  46. Mikeedee

    Mikeedee

    Joined:
    Jan 5, 2015
    Posts:
    42
    Bought and am a happy customer. :)
     
  47. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,543
    How do you do item upgrades? eg. say your RPG set example, the Weapon can bbe upgraded so I store them in an array Weapon [WeaponType] [weaponLevel]. How does your setup handle this?
     
  48. Nikaas

    Nikaas

    Joined:
    May 30, 2013
    Posts:
    71
    Can the data be saved in binary form?
     
  49. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    Fantastic! A rating and review would be much appreciated! :)
     
  50. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    334
    Not right now, unless you implement that yourself. You could encode the data file during your build process, then before you initialize GDE, decode the data file and read its contents into a string. Pass the string to GDEDataManager.InitFromText.

    I am thinking about implementing encryption, and in doing so I will move to a binary format.
     
    Last edited: Mar 18, 2015