Announcement

Collapse
No announcement yet.

Runtime DataTable - Import text CSV or Google Sheet at runtime and fill an array of structs!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #46
    In my data table struct, I've put an actor class reference. Exporting the data table to CSV file and loading at runtime, the actor class reference is properly initialized. However, when I save out the CSV at runtime, whatever is being saved is not properly storing the actor class reference and I get an import error about that specific actor class reference on each row. Can you help me figure out how to properly save off the actor class reference?

    It should be: "BlueprintGeneratedClass'/Game/Pawn_PID.Pawn_PID_C'"
    But it comes out: "ClassProperty /Game/GainTest_Profile.GainTest_Profile:spawnSelection_121_79AB237D4B4989448F0B8799B1780D1C"

    --------------------------------------
    Update: It's all fine. I was using a regular Actor Class Reference variable and I needed to use Actor Class Soft Reference and resolve nodes where necessary.
    Last edited by MysticXSab; 12-18-2020, 08:35 PM.

    Comment


      #47
      Originally posted by MysticXSab View Post
      In my data table struct, I've put an actor class reference. Exporting the data table to CSV file and loading at runtime, the actor class reference is properly initialized. However, when I save out the CSV at runtime, whatever is being saved is not properly storing the actor class reference and I get an import error about that specific actor class reference on each row. Can you help me figure out how to properly save off the actor class reference?

      It should be: "BlueprintGeneratedClass'/Game/Pawn_PID.Pawn_PID_C'"
      But it comes out: "ClassProperty /Game/GainTest_Profile.GainTest_Profile:spawnSelection_121_79AB237D4B4989448F0B8799B1780D1C"

      --------------------------------------
      Update: It's all fine. I was using a regular Actor Class Reference variable and I needed to use Actor Class Soft Reference and resolve nodes where necessary.
      Glad you figured it out! That's what I would have advised - blueprint classes are created via internal construction script, so a hard reference will look like garbage data when it's serialized.

      Soft path is almost always the way to go. Cheers!
      iTween For UE4
      Procedural pathed animation for actors, components & UMG - $0
      Runtime DataTable
      DataTables dynamically loaded from text or Google Sheets while your game is running!
      easyCSV
      Fast, cheap, and accurate CSV parsing at runtime!

      Comment


        #48
        Hi Jared,
        thanks for the nice plugin,

        just a simple question from a noob:
        I have developed an application running on a streaming publishing platform service, furioos.
        So I do not have any access to the files generated locally from your blueprint nodes.
        They won't help me on collecting the analytics text files generated from character location.

        So the question is: is there any way to write text files directly to google drive or anywhere else? I mean by changing the In Directory Path to a remote ftp path for instance??

        Thanks
        Click image for larger version

Name:	Untitled-1.jpg
Views:	24
Size:	191.2 KB
ID:	1865896

        Comment


          #49
          Originally posted by Studiotemp View Post
          Hi Jared,
          thanks for the nice plugin,

          just a simple question from a noob:
          I have developed an application running on a streaming publishing platform service, furioos.
          So I do not have any access to the files generated locally from your blueprint nodes.
          They won't help me on collecting the analytics text files generated from character location.

          So the question is: is there any way to write text files directly to google drive or anywhere else? I mean by changing the In Directory Path to a remote ftp path for instance??

          Thanks
          Click image for larger version

Name:	Untitled-1.jpg
Views:	24
Size:	191.2 KB
ID:	1865896
          Hi Studiotemp!

          I'm afraid Google doesn't allow anonymous API write access to Google sheets at all. Regardless of the access permissions on the sheet, only JWT-authorized applications can write to a sheet, and it's not trivial to do. You'll need to create a service account with Google (it's free) and authorize your game with a JWT handshake with your service account in C++ then rebuild the CSV file in JSON format to be accepted by Google's API as sheet data.

          I am working on a separate plugin for this that's just a generic way of working with Google Sheets, but it's far from complete. In the meantime, I would suggest bypassing all that and using an FTP or email plugin to send the exported CSV to yourself. If you need to upload that exported CSV to Google Sheets, you can do so through sheets script. If you need help with the script for that, I can send you some example code I wrote a few years ago that monitors a Google email address for messages with a few keywords then looks for a csv attachment, downloads it to Google Drive then imports it to the spreadsheet in question.

          To be clear, this functionality will probably not make its way into the base Runtime Data Table plugin. The time investment to create it is frankly huge. It would almost 100% surely be a separate plugin unless it ends up becoming a 'free-for-the-month' thing in which case the lump sum would justify adding all of that to the base plugin.
          iTween For UE4
          Procedural pathed animation for actors, components & UMG - $0
          Runtime DataTable
          DataTables dynamically loaded from text or Google Sheets while your game is running!
          easyCSV
          Fast, cheap, and accurate CSV parsing at runtime!

          Comment

          Working...
          X