Search Unity

GraphPointerException: Following Unity Bolt tutorial > Enemes & AI

Discussion in 'Visual Scripting' started by dojo9, Dec 8, 2020.

  1. dojo9

    dojo9

    Joined:
    Sep 18, 2020
    Posts:
    12
    When did as instructed by Unity official Tutorial on Bolt, Enemies & AI > Walk

    walk.png

    Got this Error

    error.png

    But the error disappeared when Update was passed in to EnemyWalk SuperUnit as a Control Input, (though the tutorial does not instruct to do so.)

    EnemyMovement-SuperUnit.png

    Can someone explain the error since the Tutorial does not mention it ?
    Does this mean the Tutorial needs to be updated ?
     
  2. ashley_unity

    ashley_unity

    Unity Technologies

    Joined:
    Dec 18, 2016
    Posts:
    21
    You don't need to add a control input for this Super Unit. Based on that error, it seems you may have added this Macro directly onto the enemy game object with a Flow Machine component? If so, remove it.

    It should only be added within a State in the enemy's State Machine. The tutorial shows how to use the EnemyWalk Super Unit in a state machine starting with Step 6 here: https://learn.unity.com/tutorial/en...09f0edbc2a00215f1fa5#5ea9775fedbc2a001f2997ca

    Hope this helps!

    upload_2020-12-8_12-46-4.png
     
  3. dojo9

    dojo9

    Joined:
    Sep 18, 2020
    Posts:
    12
    I dont understand what the error says,
    but here is how the Enemy FSM is applied in my project, exactly as instructed by the Tutorial

    ememenemy.gif
     
  4. ashley_unity

    ashley_unity

    Unity Technologies

    Joined:
    Dec 18, 2016
    Posts:
    21
    @dojo9 Thanks for the great and helpful screencapture. =) I see what's causing your error, you need to delete the highlighted component in this screenshot:
    upload_2020-12-8_20-48-25.png
    Graphs that contain Input/Output units are intended to be placed inside graphs, and not directly in a game object's Flow or State Machine component. If you do add a super unit onto an object directly like in your screencapture, you'll get a Graph Pointer error like the one you posted earlier.

    After you delete that component, also remove the control flow input you added to your Super Unit and the Update units you added within your states. After removing these, the insides of your Idle / Walk Left / Walk Right states should only have the single super unit node inside, like this:
    upload_2020-12-8_20-49-35.png
     
    dojo9 likes this.
  5. dojo9

    dojo9

    Joined:
    Sep 18, 2020
    Posts:
    12
    Thank you very much.
     
    ashley_unity likes this.