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.
  2. Dismiss Notice

Question Can't work with VS AOT List in script

Discussion in 'Visual Scripting' started by Unfortunate2, Jul 6, 2021.

  1. Unfortunate2

    Unfortunate2

    Joined:
    May 19, 2021
    Posts:
    2
    Pretty new with writing an actual script, mostly just doing it for the UI Builder stuff. Anyways, I'm trying to access a Visual Scripting variable, however it's an AOT List which is recognized in the script as object Unity.VisualScripting.AotList. It seems that since further integrating into Unity using Ludiq and using Bolt doesn't appear to work which is what seems to be needed for working with AOT Lists.

    Is there a method to work with that in script that I just can't manage to find? Or will I just have to find another way to do what I want entirely?
     
  2. MasterSubby

    MasterSubby

    Joined:
    Sep 5, 2012
    Posts:
    252
    You have to change namespaces to Unity.VisualScripting in the Using statements when using the integrated version. Ludiq and Bolt are all integrated into that single namespace.
     
  3. Unfortunate2

    Unfortunate2

    Joined:
    May 19, 2021
    Posts:
    2
    I have, AotList isn't part of that.
     
  4. MasterSubby

    MasterSubby

    Joined:
    Sep 5, 2012
    Posts:
    252
    Are you certain you don't have either both Bolt and UVS in a project at once, or other console errors? What version of UVS and unity are you on? I'm able to create an AOT List in code just fine by integrating that namespace. Just tried it.

    If your using an assembly definition, make sure you added the assemblies for Unity VS to it.