Search Unity

Yade Sheet - Spreadsheet Based Data Tool

Discussion in 'Assets and Asset Store' started by Amlovey, Jun 7, 2020.

  1. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Main.png

    Yade (Yet Another Data Editor) is a spreadsheet inside Unity Editor.

    Yade has two components:
    1. Spreadsheet Editor: Edit data in Unity Editor, which supports Unity 2019.3.0 +
    2. Runtime: Read sheet data in runtime games, which supports almost all version of Unity that support ScriptableObject


    What's The Main Features

    ■ Content Search
    ■ Edit Operations: Redo/Undo, Copy/Cut/Paste, Auto Fill, Add/Delete Row, Add Delete Column etc.
    ■ Supports Formula. And can add your own functions.
    ■ Support column header alias
    ■ Import Data from Excel (.xls and .xlsx) and CSV files and can add own your data importer
    ■ Export Data To CSV Files and can add your own data exporter

    Video Preview


    Online documents: https://www.amlovey.com/YadeDocs/
    Asset Store: https://assetstore.unity.com/packages/slug/171399
     
    Last edited: Dec 14, 2020
    P3ndragonLLC likes this.
  2. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
  3. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
  4. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Search feature is added into new release 1.0.4
     
  5. Minimilian

    Minimilian

    Joined:
    Jan 19, 2021
    Posts:
    23
    Hi, immediately after install I get this error...

    Assets\Yade\Editor\Components\CellInputEditor.cs(66,40): error CS0117: 'Wrap' does not contain a definition for 'NoWrap'


    I opened VS, checked what "Wrap" is with F12 and found an enum that doesn't in fact contain a "NoWrap" option.

    Code (CSharp):
    1. public enum Wrap
    2. {
    3.     Once = 0,
    4.     Loop = 1,
    5.     PingPong = 2
    6. }
    I have no idea if you ever had other inquiries about this, but could you help me?
    I can postpone the use of your asset for now, but I'd like to be able to use it at some point in this project.

    Modifying a script doesn't scare me, as long as I have at least vague indications :)

    Thanks, regards.
     
  6. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Hi Minimilian,

    There might be a Wrap enum definition in your project in somewhere, which has same same as Wrap enum in UnityEngine.UIElements namespace, but the enum without include in a namespace. It's the conflict that make the error happen.

    Here is a workaround for the fix: adding `using Wrap = UnityEngine.UIElements.Wrap;` on the top of the CellInputEditor.cs file.

    But it's the not correct way to fix the error. The correct way is to place the Wrap enum in the project to a namespace to avoid the conflict.

    Thanks,
    Amlovey
     
    Minimilian likes this.
  7. Minimilian

    Minimilian

    Joined:
    Jan 19, 2021
    Posts:
    23
    Thanks, I actually came back here to let you know I've just found such an issue (and felt kinda silly lol).
    It's another asset doing that, I solved for now; thanks for the quick reply and for the workaround.

    I'll let the other dev know, hopefully this will be solved at its root. :)

    Have a nice day/night/whatever it is where you live! :)
     
  8. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Glad to hear it's solved now :D.
     
  9. romsite97

    romsite97

    Joined:
    Jan 26, 2019
    Posts:
    1
    Can I edit data in runtime with Yade sheet?
     
  10. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Yes. But we have to save data to local by serialization and reload them again from local in next app run.
     
  11. GrenadeTree

    GrenadeTree

    Joined:
    May 26, 2014
    Posts:
    29
    Does this support cloud sync? I would like to update the values without recompiling the game.
     
  12. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Hi, what do you mean cloud sync? Yade supports load online CSV or public Google Sheets on application launch.
     
  13. ibompuis

    ibompuis

    Joined:
    Sep 13, 2012
    Posts:
    100
    @Amlovey Hi, I try to load, save and use data from csv but have a error when I load after saved:

    Code (CSharp):
    1.  
    2.  
    3. StartCoroutine(CheckCsvUpdate("http://localrc.local/wp-content/uploads/CitiesKeyValue.csv", "CitiesKeyValue"));
    4.         LoadCsvFromDisk("CitiesKeyValue");
    5.  
    6. IEnumerator CheckCsvUpdate(string url, string csvName)
    7.     {
    8.         var dataFromCsv = new OnlineCSVSheet(url);
    9.         yield return dataFromCsv.DownloadSheetData();
    10.         var datas = dataFromCsv.GetYadeSheetData();
    11.      
    12.         datas.BinarySerializerEnabled = true;
    13.         var settings = new BinarySerializationSettings();
    14.         settings.Mode = BinarySerializationMode.Full;
    15.         var csv = datas.Serialize(settings);
    16.         File.WriteAllBytes(Path.Combine(Application.persistentDataPath, csvName), csv);
    17.     }
    18.  
    19.     void LoadCsvFromDisk(string csvName)
    20.     {
    21.         YadeSheetData sheet = ScriptableObject.CreateInstance<YadeSheetData>();
    22.         sheet.BinarySerializerEnabled = true;
    23.         sheet.Deserialize(File.ReadAllBytes(Path.Combine(Application.persistentDataPath, csvName)));
    24.      
    25.         var cikvs = sheet.AsList<CitiesKeyValues>();
    26.         foreach (var cikv in cikvs)
    27.         {
    28.             if(cikv.city_name != "")
    29.                 _CitiesClassDictionary.Add(cikv.key_dictionary, new CitiesDataClass(cikv.country_name, cikv.city_name, cikv.type, cikv.lat, cikv.lng));
    30.         }
    31.     }
    32.  
    33. public class CitiesKeyValues {
    34.         [DataField(0)] public int key_dictionary;
    35.         [DataField(1)] public string country_name;
    36.         [DataField(2)] public string city_name;
    37.         [DataField(3)] public int type;
    38.         [DataField(4)] public float lat;
    39.         [DataField(5)] public float lng;
    40.     }
    41.  
    error at this line: var cikvs = sheet.AsList<CitiesKeyValues>();
    What is the problem ?

    Code (CSharp):
    1. FormatException: Input string was not in a correct format.
    2. System.Number.ThrowOverflowOrFormatException (System.Boolean overflow, System.String overflowResourceKey) (at <4ba27aa039714eafa1e8892e51af2932>:0)
    3. System.Number.ParseInt32 (System.ReadOnlySpan`1[T] value, System.Globalization.NumberStyles styles, System.Globalization.NumberFormatInfo info) (at <4ba27aa039714eafa1e8892e51af2932>:0)
    4. System.Int32.Parse (System.String s) (at <4ba27aa039714eafa1e8892e51af2932>:0)
    5. Yade.Runtime.ParseMethodGeneric`1[T].Execute (System.String s) (at Assets/Yade/Runtime/Extensions/SheetDataExtensions.cs:57)
    6. Yade.Runtime.SheetDataExtensions.GetCellValue (System.Type dataType, Yade.Runtime.Cell cell) (at Assets/Yade/Runtime/Extensions/SheetDataExtensions.cs:315)
    7. Yade.Runtime.SheetDataExtensions+<>c__DisplayClass4_1`2[T,MT].<GetAndUpdateSetValueActions>b__4 (T instance, System.Int32 row) (at Assets/Yade/Runtime/Extensions/SheetDataExtensions.cs:277)
    8. Yade.Runtime.SheetDataExtensions.AsList[T] (Yade.Runtime.YadeSheetData sheetData) (at Assets/Yade/Runtime/Extensions/SheetDataExtensions.cs:146)
    9. InitMainEarth.LoadCsvFromDisk (System.String csvName) (at Assets/_Main/Scripts/InitMainEarth.cs:192)
    10. InitMainEarth.Awake () (at Assets/_Main/Scripts/InitMainEarth.cs:105)
     
  14. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Hi @ibompuis , thank you for feedback. your code seems have no issues so it may happen in data side. Would you mind check if there are non-number strings in cell of column A or D of origin CSV? I have also received your mail and will communicate with you via email in the next. thank you again!
     
  15. ibompuis

    ibompuis

    Joined:
    Sep 13, 2012
    Posts:
    100
    Thanks Amlovey,

    Please find my csv file, I send you email now too and for next exchange with you
     

    Attached Files:

  16. JongSookKim

    JongSookKim

    Joined:
    Jan 23, 2017
    Posts:
    4
    Hi, @Amlovey.
    After updating to version 1.5.5, the following code no longer works:

    Code (CSharp):
    1. yade.SetRawValue(rowIndex, 0, $"=ASSET(\"{AssetDatabase.GetAssetPath(item.Value.GetInstanceID())}\")");
    I encountered the following error in the Unity engine:

    GrammarException: Grammar exception: NotSupport type token error, at position 4, current value is 'ASSET'
    Yade.Runtime.Formula.Tokenzier.GetTokens (System.String formula, System.Collections.Generic.HashSet`1[T] functionsOverride) (at Assets/Yade/Runtime/Formula/FormulaEngine.cs:359)
    Yade.Runtime.Formula.FormulaEngine.GetTokens (System.String formula) (at Assets/Yade/Runtime/Formula/FormulaEngine.cs:609)
    Yade.Runtime.YadeSheetData.UpdateToRefTreeIfNeeds (System.Int32 row, System.Int32 col, System.String rawText) (at Assets/Yade/Runtime/Core/YadeSheetData.cs:119)
    Yade.Runtime.SheetDataExtensions.SetRawValue (Yade.Runtime.YadeSheetData sheet, System.Int32 rowIndex, System.Int32 columnIndex, System.String rawText) (at Assets/Yade/Runtime/Extensions/SheetDataExtensions.cs:456)


    This was a code that worked fine in the previous version. Can you check what the problem is?
     
  17. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253
    Hi, What's the real path the the asset? May be there are some issue for the engine parse the file path.
     
  18. JongSookKim

    JongSookKim

    Joined:
    Jan 23, 2017
    Posts:
    4
    Are you saying that if the path is incorrect, it would cause an error? If that's the case, I'll check it out.
     
  19. JongSookKim

    JongSookKim

    Joined:
    Jan 23, 2017
    Posts:
    4
    @Amlovey
    Real Asset path is,

    Assets/MGameResources/ScriptableTable/Chapter/Chapter_000.asset

    I checked the path, but couldn't find anything problematic.
    Could there have been changes that now prevent the use of slashes or commas?
    There wasn't an issue with this before version 1.5.5.
     
  20. Idealisers

    Idealisers

    Joined:
    Jun 26, 2014
    Posts:
    10
    How can I load all the sheets that are present inside a shared google sheet? I have a usecase that needs to load all the available sheets and parse them.
     
  21. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    253