Apex.Steering.Components.SteerForPathComponent.MoveTo is giving null ref except.

  • September 14, 2018 at 07:27 #23785
    EatMyTime
    Participant

    I have a scene using the simple setup navigating unit, gameworld with node canvas patrol action (for apex), and it works… sometimes. At first it didn’t work, then the next day it did with no changes, just re-opened the scene. I duplicated the unit using ctrl+d a few times, and got the error turn up again. Is this a problem with script execution order? That’s what seems to cause “random” working/not working of scripts.

    this is the line that gives the error:

    it appears that both _currentDestination.position and _transform.position are null when the error occurs

    I am getting this error:

    NullReferenceException: Object reference not set to an instance of an object
    Apex.Steering.Components.SteerForPathComponent.MoveTo (Vector3 position, Boolean append) (at Assets/Apex/Apex Path/Scripts/Steering/Components/SteerForPathComponent.cs:268)
    Apex.Units.UnitFacade.MoveTo (Vector3 position, Boolean append) (at Assets/Apex/Apex Path/Scripts/Units/UnitFacade.cs:543)
    NodeCanvas.Tasks.ApexPath.Patrol.MoveNext () (at Assets/ParadoxNotion/NodeCanvas Resources/Integrations/ApexPath/Tasks/Patrol.cs:55)

    • This topic was modified 1 month ago by EatMyTime.
    September 14, 2018 at 07:50 #23788
    EatMyTime
    Participant

    After setting Node Canvas’ BehaviourTreeOwner to execute last problem seems solved.

    September 14, 2018 at 11:27 #23792
    Geminior
    Keymaster

    Ok it seems to be an issue with the third party integration, but glad you got it sorted.

    September 15, 2018 at 02:41 #23795
    EatMyTime
    Participant

    Cheers, yes some vars weren’t being assigned in time if the script execution order wasn’t set manually. Happens a lot with asset integration, but easy to spot if your scene is working/not working in a random fashion

You must be logged in to reply to this topic.