playMaker

Author Topic: CSV read / write (Absolute path)  (Read 368 times)

mahesh0806

  • Playmaker Newbie
  • *
  • Posts: 2
CSV read / write (Absolute path)
« on: July 19, 2023, 02:58:07 AM »
I want to read from and write to a CSV file. (CamData.csv as shown in the attached image). The said CSV file is to be placed in some absolute path (e.g. Desktop for now). I want to read/override the camera Position and Rotation values, in the CSV file at runtime.

I am using the Left and Right arrow keys to Jump/Switch to the Active Viewpoints. Any one of the ViewPoints will be active at a time.
And am using Mouse LeftClick to rotate and MiddleClick to PAN the Camera angle as I want.
Finally to record the camera angle I am using the R Key. This should record the current Camera angle data in the CSV file.

Currently, I can read the CSV file values and animate/set the camera accordingly. (Using Playmaker/ Datamaker CSV read actions)
My main need is how to record/write values in the said CSV file per active Viewpoint.
Please help.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: CSV read / write (Absolute path)
« Reply #1 on: July 19, 2023, 04:20:20 PM »
Hi.
Can you give more info on what you want to do with it?

Maybe a better solution might be to use a scriptable object with an array (or multiple arrays)

mahesh0806

  • Playmaker Newbie
  • *
  • Posts: 2
Re: CSV read / write (Absolute path)
« Reply #2 on: July 19, 2023, 11:25:45 PM »
I am building a product presentation app. The client wants to save multiple viewpoints (camera angles, etc.) and also wants them to be editable at runtime.
Use case:
1. Ability to navigate camera View Using Mouse (LeftClick-Orbit/ MiddleClick-Pan)
2. Record camera viewpoints using R Key (Saving camera transforms in a CSV) (I need help here)
3. Left/ Right key to switch to recorded viewpoints.
In my case the CSV needs to be on some absolute path, e.g. C:/desktop/data/CamData.csv.
So, If we switch between the viewpoints (Using the Left/Right keys) then the camera should animate to the stored values. I am able to do the camera stuff, if the values are already in the CSV. But was looking for writing the CSV.
I am not a coder hence using Unity VS, Playmaker, etc.
Thanks!