Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Random Forma Usage Questions: Price and CSV

Discussion in 'Unity Forma' started by vf_ebehar, Jul 26, 2022.

  1. vf_ebehar

    vf_ebehar

    Joined:
    Jun 2, 2022
    Posts:
    11
    Hello all,

    1. Is there an option somewhere to export the Product I created as a CSV file? I felt like I used this option before but for the life of me I cannot find it.
    2. If I have a CSV file of a Product with changes from what's in Unity, how can I import the CSV file and update my existing Product?
    3. Is manually setting prices on the component ProductLocalPrice the only way to add pricing information via the Unity Editor?
    Thanks for the answers/help everyone!!
     
  2. genevieve_d

    genevieve_d

    Unity Technologies

    Joined:
    Dec 20, 2019
    Posts:
    3
    Hi vf_ebehar,
    1. There is an option to import/export csv. To be able to use it, you need to install the Unity Forma Sample Importer.
    - For Unity 2020.3, you need to enable preview packages (Edit/Project Settings -> Enable Preview Packages), then open Package Manager (Window/Package Manager). In the top, choose Unity Registry and search for Unity Forma Sample Importer.
    - For Unity 2021.3, you need to manually add the package to your project manifest. Open your project folder (You can right click in the Project window and select "Show in Explorer", it will open the project folder on your computer). After that, select the folder "Packages" and open the file "manifest.json". Add this line at the end of the dependencies (don't forget to add a comma after the last package name):
    "com.unity.industrial.forma.importers.csv": "2.0.0-preview.11"

    Go back to Unity, the Unity Forma Sample Importer should install (you can verify in the package manager window)
    Once the package is installed, you can see the option under Forma/Import/Product and you will be able to export and import CSV products.
    For the other questions, let me ask the team
     
    vf_ebehar likes this.
  3. genevieve_d

    genevieve_d

    Unity Technologies

    Joined:
    Dec 20, 2019
    Posts:
    3
    I have talk with the team. For the second question, at the moment, it's a limitation of Unity Forma. It can't merge products together. If you want to import a csv file of a product with changes on it, you won't be able to merge it into your existing product. You would need to do a backup of your existing product or delete it, and then import the csv file to create a new product and continue with that one.
    For the third question, if you want to do it through the Unity Editor, the only way for now is, like you said, to manually change the prices on the ProductLocalPrice component. However, you can create a script linked to a menu item for example, that would update the data on ProductLocalPrice by calling the public function
    UpdateData(Product productArg, Context contextArg)
     
  4. vf_ebehar

    vf_ebehar

    Joined:
    Jun 2, 2022
    Posts:
    11
    Genevieve_d thank you for your help! Here are some more questions for you
    1. How come "Ctrl+Z" does not execute "Undo" functionality in Unity Forma projects?
    2. How can I use the "Available with Changes." option for rules? The documentation is abysmally useless (imo). All it says is "This option requires a script extension."
      1. What scripts do I need to be extending?
      2. What is everything I need to extend/program to make this option work?
      3. Are there examples of the script extensions that are publicly available?
    3. How does one properly use the "Select Feature Action" option for the "Then" portion of the rules. Whenever I use it, the option I put there is forcibly selected FOREVER. If I have a Visibility Set and use "Select Feature Action" for a given rule and input a variant of my Visibility Set I cannot select any other variant options within that Visibility Set.
      Let me explain a situation I have. I have a chair model with a Standard(STD) Base and Extender(ER) Base. The STD base has no height adjustment. The ER base has height adjustment mechanics built in. The ER Base also has geometry for displaying the full extension. So, by default the ER base is at it's lowest height but I would like an option in the UI to show the ER Base at it's highest height.
      1. User selects the ER Base
      2. A new option appears to select the highest height or lowest height (lowest is default)
      3. If this option is selected, the seat needs to change to a higher or lower positioned geometry.
      4. If a STD Base (there are two options) is selected, the ER Seats(geometry) need to change to a STD Seat(geometry).
    I've tried using the "Select Feature Action" to update the seat option to be the seat option at the proper height. Which I can do but then other options for that given height aren't selectable because the rules are being executed with every button click and thus the "Select Feature Action" is executed b.c the condition is true forcing my selection to pick whatever I set in the "Select Feature Action".

    Below are some images to hopefully help illustrate my scenario. Thank you.

    upload_2022-7-28_9-37-6.png
    upload_2022-7-28_9-41-20.png
     
  5. danw_unity

    danw_unity

    Unity Technologies

    Joined:
    Oct 16, 2014
    Posts:
    27
    Hi,

    This topic has become quite specific to your project. Could you raise a ticket by emailing forma-support@unity3d.com please? I think it will make it easier for us to discuss the issues.

    Many thanks,

    Dan
    Unity Support
     
    vf_ebehar likes this.
  6. vf_ebehar

    vf_ebehar

    Joined:
    Jun 2, 2022
    Posts:
    11
    I would if I could but currently I don't have the time now that I'm not on task to explore unity forma anymore. I appreciate the offer in any case.