Search Unity

BG Database (inMemory database | Excel/Google Sheets syncing | CodeGen | Save/Load support)

Discussion in 'Assets and Asset Store' started by BansheeGz, May 3, 2018.

  1. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
    My goodness you are so proactive! ok, I´ll let you know.
     
  2. NoConscience

    NoConscience

    Joined:
    Mar 16, 2019
    Posts:
    13
    Hi, When I using BGDataBinderFieldGo for localization I got an error. And Database window does not shown up. It seems to be related with the depth of gameobject. If it is right, is there any other way to fix it without adjusting the depth?
    Here is the error log.

    BGException: Recursion check fail! Unacceptable Nesting Level 11
    BansheeGz.BGDatabase.Editor.BGTreeNode`1[T].set_Parent (BansheeGz.BGDatabase.Editor.BGTreeNode`1[T] value) (at <edf82145fb4b479e8c7362a993564f24>:0)
    BansheeGz.BGDatabase.Editor.BGTreeViewSceneExplorer.Add[T] (T go, System.Action`1[T] action, System.Collections.Generic.Dictionary`2[TKey,TValue] scene2Node, System.Collections.Generic.Dictionary`2[TKey,TValue] id2Go) (at <edf82145fb4b479e8c7362a993564f24>:0)
    BansheeGz.BGDatabase.Editor.BGTreeViewSceneExplorer.Rebuild () (at <edf82145fb4b479e8c7362a993564f24>:0)
    BansheeGz.BGDatabase.Editor.BGTreeViewSceneExplorer..ctor () (at <edf82145fb4b479e8c7362a993564f24>:0)
    BansheeGz.BGDatabase.Editor.BGSplitPaneSceneExplorer.Init () (at <edf82145fb4b479e8c7362a993564f24>:0)
    BansheeGz.BGDatabase.Editor.BGSplitPaneSceneExplorer..ctor () (at <edf82145fb4b479e8c7362a993564f24>:0)
    BansheeGz.BGDatabase.Editor.BGRepoWindow.Init () (at <edf82145fb4b479e8c7362a993564f24>:0)
    BansheeGz.BGDatabase.Editor.BGRepoWindow.OnEnable () (at <edf82145fb4b479e8c7362a993564f24>:0)
     
  3. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hi!

    Indeed it was related to the object's depth (i.e. the number of parent objects)
    I've sent you a private message with a fixed package.
    Sorry for the inconvenience!
     
  4. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
    I´m having more of those problems with unreliable execution, and now its even more crazy.
    Believe it or not the problem just happens o android, and just if I install the apk from google, crazy stuff aside, the error involves a "Get by Index" poping out 1 instead of the correct value, in this case "6", I´v build a log with the imputs and outputs. Capturar.JPG

    Here the apk installed manually.

    Screenshot_2021-02-17-20-53-38-602_com.DunaGames.ZionDefenders.jpg

    And here the one from Google play:

    Screenshot_2021-02-18-12-08-05-103_com.DunaGames.ZionDefenders.jpg

    The error here is the "Islands parts Get by name" there is no row with name "1"

    For some reason, and probably the fact I´m calling this logic 150 times in the loop, is interfering somehow.
     
  5. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hi,

    1) Do you change "CurrentTemplate" variable value inside your loop?

    2) Could you please provide additional screenshots of your Flow Graph (the missing parts)?

    3) According to your graph, "1" value comes from "SelectedBlueprints" table's "FieldBlueprint" int field.
    Does your "SelectedBlueprints" table have a row with value=1 for "FieldBlueprint" field?
     
  6. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
    1) No, I didn't changed it, its always zero, there is some chance it changed from zero to zero "got updated".

    2) ok will do.

    3) I have a 1 value in the index 6, but there is no way any integer number multiplied by 7 to result in 6.

    upload_2021-2-18_13-46-54.png
     
  7. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
  8. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
    This is the final part of the graph:
    upload_2021-2-18_14-4-24.png
     
  9. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
    Maybe its interesting to add that there is another graph giving the exact same error in the exact same unit:
    upload_2021-2-18_14-13-10.png

    The red circled guy is receiving 1 too, you can see this log in the screenshots from the android device too.
     

    Attached Files:

  10. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Thank you, we will look into these screenshots

    Meanwhile- since there is no way 1 value could be returned using current database state and there are no other errors- maybe you have a duplicate database file inside your project?

    Could you please, search for "bansheegz_database.bytes" file inside your project to ensure this file have no duplicates?
    Also, please, let me know what is the path to your bansheegz_database.bytes file? (for example, Assets/Resources)
     
  11. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
    There is only one file, the path is: Assets\1-Zion\Database\Resources
     
  12. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
    I´v tried to move the problematic code to a separate graph and run it once, before the 150x loop, now I´m getting the error on a small piece of logic, and again, only if I install from google play, the game runs ok otherwise:

    https://imgur.com/ZCpvHG8

    The macro here:
    https://imgur.com/ubiVZf7
     
  13. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
    Running only the last logic I´v sent, and removing the 150x loop seemed to solve the problem! I believe that multiple Graphs accessing the database at the same time in loops, is not something super safe, but no sure about the precise reason.
     
  14. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    1) Using BGAddressablesGetAsset unit inside the loop will not work.
    Probably, it should work correctly only if you used the preloader script.
    Much better to use events, as described here (method #2): https://www.bansheegz.com/BGDatabase/Downloads/RuntimeAddressablesBolt/ for loading multiple assets inside the loop

    2) it's very confusing why GetByIndex return 1 instead of 6, though returning 1 is not possible technically (unless you change database values and I suppose you don't)
    I see that "SelectedBlueprints" table is a nested table to "PlayerData" table.
    On the screenshot, there are only rows, related to the first "PlayerData" row (PlayerData0)

    Maybe there are other rows in "PlayerData" table (PlayerData1, PlayerData2 etc.), which has connected "SelectedBlueprints" rows with Blueprint value =1?
     
  15. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Is it possible to isolate the issue and reproduce with small setup?
    If yes, please, send a unity package or zipped project to our support email so we could investigate this issue
    We do not need any assets, only Bolt graph(s) and part of the database they use
     
  16. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
    Only one row in the parent:
    upload_2021-2-19_9-22-21.png

    Thanks! I was not aware of the Event Loading, that's great. Thanks for the feedback.

    Unfortunately, isolating the issue "witch involves publishing to google play" is very time consuming, but the "get via event" seems a nice solution to this kind of issue if I or any one have it, thanks for all.

    EDIT (I believe that solving the addressable part will reflect in the node giving the wrong result)
    EDIT2 (unfortunately, changing the addressables to event nodes in the loops that were giving wrong values didn't solve the issue)
    EDIT3 (what really fixed it was removing the problematic node from the loops)
    EDIT4(False alarm, did not solve the issue yet)
     
    Last edited: Feb 19, 2021
  17. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Thanks for the updates!
    Did you manage to resolve the issue?
    If yes, what was the cause of it?
     
  18. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
    Sorry for the time wasted, but it seems the problem is more related to the loop itself than to the BG database, after removing the problematic nodes, the error appeared in the same flow, but now as a literal variable going null to a multiplier node, what makes even less sense, I´ll try to copy all the content to a new .asset file,... and restructure the logic too.
     
  19. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Not a problem at all, thank you for the update!
    If you encounter any issue that may be related to our asset- please, do not hesitate to contact me
     
  20. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
    Hi Ms. Banshee, one question plz, the save/load plugin, when saved a DB state, what's the most adequate approach to erase this savefile?

    Erasing the Player prefs will have any effect on this matter?

    PlayerPrefs.DeleteAll

    Thank you.
     
  21. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
    Ps. Found the issue, the fact is that installing from the apk and from the google store will keep 2 separate application data, even if you uninstall the app, the application data will remain, and if you erase all data from the manual install, the google play version will remain, and those saved data files were responsible for all errors.
     
  22. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hi!

    Do you use our plugin for Bolt and SaveLoad addon https://www.bansheegz.com/BGDatabase/Downloads/RuntimeSaveLoadBolt/ ("SaveGame"/"LoadGame" units)?

    Save files are located under the Unity persistent folder (Application.persistentDataPath) https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html
    PlayerPrefs is not used

    1) To locate Application.persistentDataPath folder location for your project (each project has its own folder) use this code
    Code (CSharp):
    1. Debug.Log(Application.persistentDataPath);
    2) To delete a save file- you can use "DeleteSave" Bolt unit (you need to provide the file's name without extension)

    3) Alternatively use this C# code to delete a single save file:
    Code (CSharp):
    1. //replace fileName.sav with your file's name
    2. System.IO.File.Delete(System.IO.Path.Combine(Application.persistentDataPath, "fileName.sav"));
    4) If you want to delete all save files- use the following C# code (all files with "sav" extension under Application.persistentDataPath folder will be deleted)
    Code (CSharp):
    1. foreach (var file in System.IO.Directory.GetFiles(Application.persistentDataPath, "*.sav")) System.IO.File.Delete(file);
    Thank you for the update!
     
  23. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
  24. I_Dont_See_Sharp

    I_Dont_See_Sharp

    Joined:
    Jan 30, 2018
    Posts:
    5
    Any idea why the Buttons attribute for Odin no longer works when your script is extending a BGDatabase generated class?
     
  25. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Thank you for reporting the issue
    It looks like the Odin inspector does not show up if a component has a custom editor (all our classes do).
    We've created a little plugin to enable Odin inspector features for classes, extended from generated classes (I've sent it to you in a private message)
     
    Last edited: Mar 3, 2021
  26. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    @pravinyadav
    Thank you for reporting the issue
    The wrong exception was thrown so the original error message was lost
    Most probably the error reason is an invalid ID or duplicate IDs in your excel file

    Please, download and upgrade the excel runtime plugin here: https://www.bansheegz.com/BGDatabase/Downloads/RuntimeExcelMonitor/

    We have added proper error handling, the error reason now printed to the console and also shown in the overlaying window GUI

    We also added "ignoreRowsErrors" parameters for export and import.
    If you toggle them on - no exception will be thrown, rows with errors will be skipped and a warning message will be added to the log

    Sorry for the inconvenience
     
    Last edited: Mar 3, 2021
  27. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    64
    Hello,
    I would like to update my BGDB with the liveupdate addon + via a JSON file, but BGDatabase 1.6.5 is required and the last version in the assetstore is 1.6.4 ?
    (as explained on this page : https://www.bansheegz.com/BGDatabase/Addons/LiveUpdate/)
    So is there a way to get the 1.65, even in a beta version, to try this feature ?
    Best regards
    Philippe
     
  28. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hello, sure, I've sent it to you in a private message
     
  29. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    64
    Thanks a lot, it works fine !!!
     
  30. motuproprio3000

    motuproprio3000

    Joined:
    Oct 1, 2016
    Posts:
    6
    Hello,
    I'm trying to read the rows of a nested table, could you please help me?
    This is the code for reading from Master Table, when I find my row I'd like to read the rows of the nested table
    Code (CSharp):
    1. BGField campo1 =  BGRepo.I["SQUADS"].GetField("SquadId");
    2.         var count = table.CountEntities;
    3.         for (var i = 0; i < count; i++)
    4.         {
    5.             var record = table.GetEntity(i);
    6.             if (record.Get<int>(campo1) == 3)
    7.             {
    8.  
    9. //                recordAgents = (BGEntity)record.Get<BGFieldNested>("AGENTS").GetValue(record.Id);
    10.                 Debug.Log("TROVATO");
    11.             }
    12.  
    13.         }
    Thanks!
     
  31. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hello,

    The C# value type of the nested field is List<BGEntity>
    Value types for all fields are listed here (Field Type column): https://www.bansheegz.com/BGDatabase/SupportedFields/

    1) Option #1: ( get value using row's API )
    Code (CSharp):
    1. List<BGEntity> recordAgents = record.Get<List<BGEntity>>("AGENTS");
    or
    Code (CSharp):
    1. BGFieldNested agentField =  (BGFieldNested) table.GetField("AGENTS");
    2. List<BGEntity> recordAgents = record.Get<List<BGEntity>>(agentField);
    Code (CSharp):
    1.         BGMetaEntity table = BGRepo.I["SQUADS"];
    2.         BGField campo1 =  table.GetField("SquadId");
    3.         var count = table.CountEntities;
    4.         for (var i = 0; i < count; i++)
    5.         {
    6.             var record = table.GetEntity(i);
    7.             if (record.Get<int>(campo1) == 3)
    8.             {
    9.                 List<BGEntity> recordAgents = record.Get<List<BGEntity>>("AGENTS");
    10.                 if (recordAgents != null)
    11.                 {
    12.                     foreach (var recordAgent in recordAgents) print(recordAgent.Name);
    13.                 }
    14.                 Debug.Log("TROVATO");
    15.             }
    16.         }
    2) Option #2 ( get value using field's API )
    Code (CSharp):
    1. List<BGEntity> recordAgents = agentField[record.Index];
    Code (CSharp):
    1. BGMetaEntity table = BGRepo.I["SQUADS"];
    2. BGField campo1 =  table.GetField("SquadId");
    3. BGFieldNested agentField =  (BGFieldNested) table.GetField("AGENTS");
    4. var count = table.CountEntities;
    5. for (var i = 0; i < count; i++)
    6. {
    7.     var record = table.GetEntity(i);
    8.     if (record.Get<int>(campo1) == 3)
    9.     {
    10.         List<BGEntity> recordAgents = agentField[record.Index];
    11.         if (recordAgents != null)
    12.         {
    13.             foreach (var recordAgent in recordAgents) print(recordAgent.Name);
    14.         }
    15.         Debug.Log("TROVATO");
    16.     }
    17. }

    But I would highly recommend using Code Generator instead of basic API: https://www.bansheegz.com/BGDatabase/CodeGeneration/ExtensionClasses/

    basic API is a little bit clunky and verbose
    Just compare the same code side by side:
    Code generator settings in case you are interested

    Please, let me know if you have any questions
     
    motuproprio3000 likes this.
  32. motuproprio3000

    motuproprio3000

    Joined:
    Oct 1, 2016
    Posts:
    6
    Really helpful!

    Thanks:)
     
  33. motuproprio3000

    motuproprio3000

    Joined:
    Oct 1, 2016
    Posts:
    6
    Just another question:)

    One of my field is of type ObjectReference, where I store gameObject from the scene.
    When I retrieve the record how can I convert to a gameObject in script?
    This is my code, but it seems that it cant be casted :

    Code (CSharp):
    1. GameObject ag = (GameObject)agent.Get<BGObject>("AgentGO");
    Thanks.
     
  34. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
    Hi, does BG Database works with WebGl?
     
  35. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hi,
    The core package should work just fine.
    Some features/addons/plugins may require special setup or not supported

    Here is a list of restrictions, we are aware of so far:
    1) StreamingAssets database loader should not be used: https://www.bansheegz.com/BGDatabase/Setup/
    2) LiveUpdate addons ( https://www.bansheegz.com/BGDatabase/Addons/LiveUpdate/#webgl ) requires special setup (asynchronous loading) and "Excel file" export type does not work
    3) Save/Load actions for Playmaker require special setup https://www.bansheegz.com/BGDatabase/Downloads/RuntimeSaveLoadPlaymaker/
    4) Save/Load units for Bolt ( https://www.bansheegz.com/BGDatabase/Downloads/RuntimeSaveLoadBolt/ ) do not support saving/loading from/to a file, cause WebGl platform does not provide access to file system.
    Earlier we released save/load support for Playmaker+WebGl, using IndexedDB database ( https://en.wikipedia.org/wiki/Indexed_Database_API ) instead of file system, so we could release the same units for Bolt
    5) Database runtime editor ( https://www.bansheegz.com/BGDatabase/Downloads/RuntimeEditor/ ) can not save/load database (no access to file system)
    6) Excel file monitor ( https://www.bansheegz.com/BGDatabase/Downloads/RuntimeExcelMonitor/ ) does not work (no access to file system)
     
    DG_Adriano likes this.
  36. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,566
    Hi! Question. So I want to move an object along it and I'm currently working on it. I'm using your movement script on the examples from your website. But it requires a math/curve script on the object. Is there a way to be independent of this?
     
  37. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    64
    I confirm, it does !
     
    BansheeGz likes this.
  38. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hello,
    Code (CSharp):
    1.         BGWithId idComponent = agent.Get<BGWithId>("AgentGO");
    2.         GameObject go = idComponent.gameObject;
    3.  
     
    motuproprio3000 likes this.
  39. pravinyadav

    pravinyadav

    Joined:
    Jan 24, 2010
    Posts:
    30
    After setting up everything as you described. I received another error in BGExcelImportGo.
    Please help!

    ExitException: Exception of type 'BansheeGz.BGDatabase.BGDBTextProcessor+ExitException' was thrown.
    BansheeGz.BGDatabase.BGExcelSheetReaderEntityRT+<>c__DisplayClass9_0.<Read>b__0 (System.String s) (at Assets/BansheeGz/BGDatabaseExcelRuntime/Scripts/Excel/BGExcelSheetReaderEntityRT.cs:160)
    BansheeGz.BGDatabase.BGExcelSheetReaderART.ReadNotNull (NPOI.SS.UserModel.IRow row, System.Int32 index, System.Action`1[T] action) (at Assets/BansheeGz/BGDatabaseExcelRuntime/Scripts/Excel/BGExcelSheetReaderART.cs:56)
    BansheeGz.BGDatabase.BGExcelSheetReaderEntityRT.Read (NPOI.SS.UserModel.IRow row, System.Int32& existingCount, System.Int32& newCount) (at Assets/BansheeGz/BGDatabaseExcelRuntime/Scripts/Excel/BGExcelSheetReaderEntityRT.cs:143)
    BansheeGz.BGDatabase.BGExcelSheetReaderEntityRT+<>c__DisplayClass0_3.<ReadEntities>b__1 (NPOI.SS.UserModel.IRow row) (at Assets/BansheeGz/BGDatabaseExcelRuntime/Scripts/Excel/BGExcelSheetReaderEntityRT.cs:60)
    BansheeGz.BGDatabase.BGExcelSheetReaderART.ForEachRowNoHeader (NPOI.SS.UserModel.ISheet sheet, System.Action`1[T] action) (at Assets/BansheeGz/BGDatabaseExcelRuntime/Scripts/Excel/BGExcelSheetReaderART.cs:26)
    BansheeGz.BGDatabase.BGExcelSheetReaderEntityRT+<>c__DisplayClass0_2.<ReadEntities>b__0 () (at Assets/BansheeGz/BGDatabaseExcelRuntime/Scripts/Excel/BGExcelSheetReaderEntityRT.cs:57)
    BansheeGz.BGDatabase.BGLogger.SubSection (System.Action action, System.String message, System.Object[] parameters) (at <a91be2624ba648639187f3602280baad>:0)
    BansheeGz.BGDatabase.BGExcelSheetReaderEntityRT.ReadEntities (NPOI.SS.UserModel.IWorkbook book, BansheeGz.BGDatabase.BGBookInfo info, BansheeGz.BGDatabase.BGRepo repo, BansheeGz.BGDatabase.BGLogger logger, System.Boolean ignoreNew) (at Assets/BansheeGz/BGDatabaseExcelRuntime/Scripts/Excel/BGExcelSheetReaderEntityRT.cs:29)
    BansheeGz.BGDatabase.BGExcelReaderRT.ReadEntities (BansheeGz.BGDatabase.BGRepo repo, System.Boolean ignoreNew) (at Assets/BansheeGz/BGDatabaseExcelRuntime/Scripts/Excel/BGExcelReaderRT.cs:42)
    BansheeGz.BGDatabase.BGExcelImportManager+<>c__DisplayClass4_0.<Import>b__1 (BansheeGz.BGDatabase.BGRepo repo) (at Assets/BansheeGz/BGDatabaseExcelRuntime/Scripts/Excel/BGExcelImportManager.cs:35)
    BansheeGz.BGDatabase.BGExcelImportManager+<>c__DisplayClass5_0.<Import>b__0 () (at Assets/BansheeGz/BGDatabaseExcelRuntime/Scripts/Excel/BGExcelImportManager.cs:44)
    BansheeGz.BGDatabase.BGLogger.Section (System.String message, System.Action action) (at <a91be2624ba648639187f3602280baad>:0)
    BansheeGz.BGDatabase.BGExcelImportManager.Import (System.Action`1[T] readEntity, System.Func`2[T,TResult] readerInfo) (at Assets/BansheeGz/BGDatabaseExcelRuntime/Scripts/Excel/BGExcelImportManager.cs:44)
    BansheeGz.BGDatabase.BGExcelImportManager.Import (System.String path, BansheeGz.BGDatabase.BGMergeSettingsEntity settings) (at Assets/BansheeGz/BGDatabaseExcelRuntime/Scripts/Excel/BGExcelImportManager.cs:35)
    BansheeGz.BGDatabase.BGExcelImportGo.Import () (at Assets/BansheeGz/BGDatabaseExcelRuntime/Scripts/BGExcelImportGo.cs:235)
    UnityEngine.Debug:LogException(Exception)
    BansheeGz.BGDatabase.BGExcelImportGo:Import() (at Assets/BansheeGz/BGDatabaseExcelRuntime/Scripts/BGExcelImportGo.cs:248)
    BansheeGz.BGDatabase.BGExcelImportGo:Start() (at Assets/BansheeGz/BGDatabaseExcelRuntime/Scripts/BGExcelImportGo.cs:88)
     
  40. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hello,

    It seems like it is exactly the same exception as the earlier one.
    Most probably you did not update the Excel runtime monitor: https://www.bansheegz.com/BGDatabase/Downloads/RuntimeExcelMonitor/
    Please, download it and import it to your project.
    After importing make sure there are no errors printed to the Unity console.
    If some error is printed to the console and you do not know how to get rid of it- please, post it here (along with the stacktrace)

    Please, let me know if my answer was helpful.
     
  41. pravinyadav

    pravinyadav

    Joined:
    Jan 24, 2010
    Posts:
    30
    Sorry, It's my bad.
    After installing Excel runtime monitor, there is no error.
    Thanks for the guideline.
     
    BansheeGz likes this.
  42. Studiomaurer

    Studiomaurer

    Joined:
    Sep 5, 2012
    Posts:
    43
    Hi, first of all thank you for your asset, It is great and quickly becoming the standard solution for my projects.
    This time I'm using it in a mac build for the first time and it's not working as expected. I'm doing live update from an .xlsx file. This is working fine in the editor (Mac 2020.2.7f1), in the build however the system is confirming the existence of the file but will not import updated data. I'm getting the Error: "Encoding 437 data could not be found. Make sure you have correct interational codeset assembly installed and enabled". Looks like I have to add additional files to the build. Can you tell me which ones?
     
    Last edited: Mar 15, 2021
  43. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hi, thank you for supporting us

    Please, try solution #1 from the "Troubleshooting" section of this page: https://www.bansheegz.com/BGDatabase/Downloads/RuntimeExcelMonitor/ (at the very bottom of the page)
    In short, you need to locate internationalization DLL files (I18*.DLL) under your Unity installation folder and copy them to your Unity project folder
    Note, there are at least 3 different versions of these DLLs
    On Windows they are located under these folders:
    1) Editor\Data\MonoBleedingEdge\lib\mono\unity\
    2) Editor\Data\MonoBleedingEdge\lib\mono\unityaot\
    3) Editor\Data\MonoBleedingEdge\lib\mono\unityjit\
    Try AOT/Jit versions first

    Also, I know that somebody managed to fix this error by upgrading ICSharpCode.SharpZipLib.dll Dll file, bundled with the NPOI library (Assets\BansheeGz\BGDatabaseExcelEditor\Editor\Libs\ICSharpCode.SharpZipLib.dll), to the latest version, but we did not try this solution

    Usually, the solution with copying I18 DLLs to the project folder works fine
     
  44. Studiomaurer

    Studiomaurer

    Joined:
    Sep 5, 2012
    Posts:
    43
    Thanks a lot for the quick help, first solution worked on the first try. Keep up the good work.
     
    BansheeGz likes this.
  45. tomraegan

    tomraegan

    Joined:
    Mar 28, 2016
    Posts:
    114
    Hi there.

    Well done on the app. It's really useful.

    I've got the app with the excel addon working perfectly on my PC. I've got the app and the excel addon installed on my Mac, but when I try to import a Data Source on the Mac, I can't select the XLSX file. It remains unselectable.

    Any ideas why?

    Cheers.
     
  46. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hi,
    Indeed, there is an issue with the excel file extensions on MacOS, thank you for letting me know about it
    I've sent you a package with a fix in a private message.
    Also, please, note, you can edit a file's path directly in the text field
    Sorry for the inconvenience
     
  47. tomraegan

    tomraegan

    Joined:
    Mar 28, 2016
    Posts:
    114
    You're a good dev. Thanks.
     
    BansheeGz likes this.
  48. inkyphilospher

    inkyphilospher

    Joined:
    Aug 26, 2014
    Posts:
    13
    Is there an editor method to Export Data to Google Sheets? I see the runtime plugin and I will try that should this fail. I need to conditionally add lines to a database, and then upload it back up to the Google Sheet in an automated process, without interacting with the GUI.
     
  49. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hello,

    You want to export data from Unity Editor, correct?

    1) First, create and setup "Google Sheets" job using our Editor GUI.
    Give it a unique name.
    Include the table you want to export data from.
    Optionally, run it once to make sure it's set up correctly and it's working properly

    2) Now you can run this job using this C# method.
    Pass your job's name ("Google") as a parameter
    This code should be placed in Editor assembly (under Editor folder)
    Code (CSharp):
    1.     public static void RunTask(string googleJobName)
    2.     {
    3.         var googleJob = BGSettingsEditor.Model.SyncList.Find(model => string.Equals(model.Name, googleJobName));
    4.         var googleDatasource = (BGDsGoogleSheets) BGSettingsEditor.Model.DataSourceList.Find(model => string.Equals(model.DataSourceId, googleJob.DataSourceId)).DataSource;
    5.         var logger = new BGLogger();
    6.         var googleService = googleDatasource.TryToCreateService(logger);
    7.    
    8.         //if you want to export
    9.         googleService.Export(logger, BGRepo.I, googleJob.SettingsEntity, new BGMergeSettingsMeta(), googleJob.TransferRowsOrder);
    10.    
    11.         //if you want to import
    12.         // googleService.Import(logger, BGRepo.I, googleJob.SettingsEntity, new BGMergeSettingsMeta(), googleJob.UpdateIdsOnImport, googleJob.TransferRowsOrder);
    13.     }
    Alternatively, if you do not want to use our Jobs/DataSources, you can create them from your C# code, but you will need to pass all the required parameters (like client ID/secret etc.)

    If you want to run export/import at runtime, you can use our GoogleSheets runtime plugin: https://www.bansheegz.com/BGDatabase/Downloads/RuntimeGoogleSheets/
    To run export/import from code use BGGoogleSheetsManagerGo.Export() or BGGoogleSheetsManagerGo.Import() methods
    Please, keep in mind, our export procedure is not meant to be called simultaneously from multiple devices
     
    Last edited: Mar 23, 2021
  50. inkyphilospher

    inkyphilospher

    Joined:
    Aug 26, 2014
    Posts:
    13
    This appears to be working for me, thank you!
     
    BansheeGz likes this.
unityunity