Search Unity

Question getting an Object Variable

Discussion in 'Visual Scripting' started by MrMajorThorburn, Oct 22, 2022.

  1. MrMajorThorburn

    MrMajorThorburn

    Joined:
    Dec 15, 2014
    Posts:
    89
    I am continuing my activity in the VS tutorial and at the stage of trying to allow my player to move and am having a problem with getting a variable I need in order to calculate its rotation speed.
    The variable is a graph object int with value of 45.
    I setup the variable and then drag the = icon onto the graph and I get a get Variable node not a Get Variable with a name.
    I have restarted unity editor, unity hub and editor and my w10 system but problem persists.
    I have added screen prints of what I am getting before and after the drag drop and an example of what I am expecting from the tutorial document.
    Anyone any hints for me?
     

    Attached Files:

  2. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222
    you just need to plug in a reference to the object with the script/vars

    Capture.PNG
     
  3. MrMajorThorburn

    MrMajorThorburn

    Joined:
    Dec 15, 2014
    Posts:
    89
    Thank you for that. It looks like a work round that might help me if I cannot get the root cause of this problem.
    I have another visual script app that I developed as part of the previous section of the tutorial and that one works fine.
    This one is not behaving the same as the last one.
    I will resort to deleting this graph and create a new one from scratch to see if this is a side effect of using a previously developed graph in another app.