Under review

Datatype NULL bug when I use "Move Character" Action with ListVariables

JOON 4 months ago in Game Creator updated by Marti (Lead Developer) 4 months ago 4

It's a very strange bug ... I think the latest update is making this bug.


I want AI to patrol the next marker in the list, so I made behavior for this patrol logic i made simple logic like below. old one has no problem. but the new one has bug (even if it has same logic with old one)

when I make link between composite(selector) and old-one task, AI is patrolling each markers in the list.

but, when I choose new-one task, AI can't get next marker from list. it is going to (0, 0, 0)

I try to write some Debug.Log() to find which point has problem. the result of getTarget method in the ActionCharacterMoveTo class is Vector3.zero (the inital value for cPosition). it means they can't get position from the list.

the reason of why getTarget couldn't set "cPosition" is the result of "variable.GetVariableDataType(invoker)" is null. In the "GetVariableDataType" method of the  "VariableProperty" class, the "variableType" of "VariableProperty" class is correct, it is "ListVariable". but the value of "this.local.GetGameObject(invoker)" is null.

the "targetType" of "HelperLocalVariable" class is "GameObject" even I set the list variable of the "invoker". because it has wrong targetType as "gameObject" and the value of targetObject is nul, the result of getGameObjectI(invoker) is null. so it can't get any position from list, the AI will go to Vector3.zero position. :( 

please fix this bug. it is really ridiculous & sily bug.

the values of "old-correct one" is "targetType: invoker" like below logs

but the value of "new-wrong one" is "targetType: gameObject" like below logs

please fix it as soon as possible

Unity version:
Game Creator version:
Under review

There's not enough information here to assess whether this is a bug or not. Two Actions that are identical will behave the exact same way. Are you sure the List Variable you're accessing is available? When a null value is returned, it means it couldn't find the value of the list (or it was already null).

Can you provide more screenshots, showcasing the Blackboard, the List Variables and the scene Hierarchy?

yes, the List Variables has no problem. I added 4 markers into the List variables of the AI Character.

behavior must try to find "List Variable" from invoker as what I set, but behavior action keeps searching the gameObject instead of invoker. that's the reason of why they can't find List variables and return "Null"

it seems the action keep changing iterator of List as what I want. but the problem is occured when it try to get "cPosition" of the current variable (which iterator pointed) in the List Variables. please understand I set invoker as targetObject to access List Variables, not GameObject. but it keep checking "gameObject"

you need to understand there is any chances to ignore to save the option setting of "Move Character" action. 

and the most weird point of this problem is "old-one" is working well!! it is really mysterious for me

finally I got the reason. I tried to make new nodes and delete it several times and I watched how it was responsed. even when I make new node (& new actions) and set options at the inspectors of window. it has delay to save its data. if I changed to focus on another task or close beavior window before updating task data. maybe it will be ignored(or cracked)

something I feel like that, when I set which ListVariable from whom (invoker) i need to wait until it saved data and update information into task node. if I set "select" before it saved information about "Whom", it never saved "Whom" just saved select information. 

the most important reason of this situation is the "DELAY" of saving information. :(


Thanks for the detailed report. I'm opening a ticket and see what could be causing this problem. Registering changes hasn't been an issue for the pas years, but maybe something's changed in Unity 2019.3 onwards. I'll open a ticket and take a look at this. Thanks!