Welcome to the Game Creator support forum! 


This a place to ask questions, discuss ideas and report bugs. Please, provide your Unity and Game Creator versions as well as clear reproduction steps when opening a topic and full console logs.

+1

Behaviour Bug

Andi Rutz 1 day ago in Behavior 0

For some reason, the invoker passes as null and won't detect the character.

Error coming. 

NullReferenceException: Object reference not set to an instance of an object
GameCreator.Melee.ActionMeleeAttack.InstantExecute (UnityEngine.GameObject target, GameCreator.Core.IAction[] actions, System.Int32 index) (at Assets/Plugins/GameCreator/Melee/Mono/Actions/ActionMeleeAttack.cs:21)
GameCreator.Core.IAction.InstantExecute (UnityEngine.GameObject target, GameCreator.Core.IAction[] actions, System.Int32 index, System.Object[] parameters) (at Assets/Plugins/GameCreator/Core/ScriptableObjects/Interaction/IAction.cs:21)
GameCreator.Core.IActionsList+<ExecuteCoroutine>d__9.MoveNext () (at Assets/Plugins/GameCreator/Core/ScriptableObjects/Interaction/IActionsList.cs:107)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <d815b7efac424eeb8e053965cccb1f98>:0)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
GameCreator.Core.IActionsList:Execute(GameObject, Action, Object[]) (at Assets/Plugins/GameCreator/Core/ScriptableObjects/Interaction/IActionsList.cs:91)
GameCreator.Core.IActionsListEditor:OnInspectorGUI() (at Assets/Plugins/GameCreator/Core/Editor/Interaction/IActionsListEditor.cs:204)
GameCreator.Behavior.NodeEditor:PaintInspectorActions() (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/Nodes/NodeEditor.cs:251)
GameCreator.Behavior.NodeTaskEditor:OnInspectorGUI() (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/Nodes/NodeTaskEditor.cs:37)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

+1
Under review

Object reference not set to an instance of an object

赵西瓜 3 weeks ago in Behavior updated by Marti (Lead Developer) 2 weeks ago 3

NullReferenceException: Object reference not set to an instance of an object
GameCreator.Core.MultiSubEditor`2[TEditor,TTarget].UpdateSubEditors (TTarget[] subInstances) (at Assets/Plugins/GameCreator/Core/Editor/Extensions/MultiSubEditor.cs:30)
GameCreator.Behavior.NodeEditor.ActionsAvailable () (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/Nodes/NodeEditor.cs:691)
GameCreator.Behavior.NodeEditor.GetBodyHeight () (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/Nodes/NodeEditor.cs:307)
GameCreator.Behavior.NodeEditor.GetNodeHeight () (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/Nodes/NodeEditor.cs:597)
GameCreator.Behavior.NodeEditor.GetNodeRect (GameCreator.Behavior.BehaviorWindow window, GameCreator.Behavior.Node node) (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/Nodes/NodeEditor.cs:656)
GameCreator.Behavior.NodeEditor.GetNodeInputRect (GameCreator.Behavior.BehaviorWindow window, GameCreator.Behavior.Node node) (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/Nodes/NodeEditor.cs:666)
GameCreator.Behavior.NodeEditor.PaintNodeOutputConnections (GameCreator.Behavior.BehaviorWindow window) (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/Nodes/NodeEditor.cs:637)
GameCreator.Behavior.NodeEditor.PaintNode (GameCreator.Behavior.BehaviorWindow window) (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/Nodes/NodeEditor.cs:428)
GameCreator.Behavior.BehaviorWindow.PaintNodes () (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/BehaviorWindow.cs:160)
GameCreator.Behavior.BehaviorWindow.OnGUI () (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/BehaviorWindow.cs:108)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <437ba245d8404784b9fbab9b439ac908>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <9a184ab867bb42c296d20ace04f48df3>:0)
UnityEditor.HostView.Invoke (System.String methodName) (at <9a184ab867bb42c296d20ace04f48df3>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <9a184ab867bb42c296d20ace04f48df3>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <9a184ab867bb42c296d20ace04f48df3>:0)
UnityEditor.DockArea.OldOnGUI () (at <9a184ab867bb42c296d20ace04f48df3>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Boolean canAffectFocus) (at <57fa7f4ad1c34ed185465e0a9f71c244>:0)
UnityEditor.AssetDatabase:SaveAssets()
GameCreator.Behavior.BehaviorGraphEditor:CreateNode(Node) (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/BehaviorGraphEditor.cs:233)
GameCreator.Behavior.BehaviorGraphEditor:CreateTask(Object) (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/BehaviorGraphEditor.cs:171)
UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32)

+1
Answered

Behavior Graph - Visual Debug

Rodrigo Machado 1 month ago in Behavior updated by Marti (Lead Developer) 1 month ago 1

First of all, sorry for the work that I must be generating for you lately with so many doubts. I'm sorry.

I believe this is not a failure, but my "Behavior Graph" is not transmitting a visual debug as shown in the examples, videos and tutorials.

I think I needed to enable some option, what could it be?

Thanks for the quality support

Answer

Hi Rodrigo; 

In order to make the graph appear like in the video (with blue, red and green outlines), two conditions must be met:


- You have the Behavior Graph opened

- You have a character with the Behavior component  selected

Your issue is most likely the latter one. You need to select a scene game object with this behavior graph attached in order for the Behavior module to know which object you're referring to. Remember that a Behavior Graph can be attached to as many scene objects as you want.

Cheers!

0
Under review

Unity Hard Crashes When Editing Behavior Graphs

Hot Wing 1 month ago in Behavior updated 1 month ago 3

Unity shuts down when creating simple behavior graphs in a new project/scene. Unfortunately I don't have concrete steps to reproduce this issue, but it happens fairly quickly (after a minute or two) on Unity 2019.3 and 2020.1. The crash happens on 2018.4, but it takes longer... after ~15 minutes. I'm developing on a Macbook running Mojave (if that makes a difference).

0
Under review

ProblemBehavior

Daniel Sousa 2 months ago in Behavior updated by Marti (Lead Developer) 2 months ago 1
Em relação ao comportamento (sim, eu tenho o GameCreator instalado e importado e sim, instalei a versão mais recente do GameCreator), ele não aparece no painel para criar o comportamento da árvore, nem os componentes que aparecem nos addcomponets, eu já testei nas versões mais recentes da antiga (2018.4) à mais recente (2019.2), você poderia me dizer onde posso encontrar a árvore de comportamento e seus componentes ou se você pode me dizer se ela não está mostrando erros ou bugs? porque não consigo encontrar nada.
0
Answered

How Can I Make AI Detect and Open Doors Blocking NavMesh Path (Behavior Module + Conditions)

Cr4shBarcode 2 months ago in Behavior updated by Marti (Lead Developer) 2 months ago 3

I have enemy AI following a patrol pattern via the Behavior Module. I'm trying to give him the ability to open closed doors that are blocking his path in the NavMesh. I have the idea to put a trigger box around the doors and use an "On Enter" kind of trigger, but I'm not sure how to reconcile this with the behavior module. Each door has a local "Is Open" bool. If "Is Open" is false, but the AI needs to go through it to reach its destination via the NavMesh, I want him to pause his Behavior, trigger an open door animation, and continue the Behavior where he left off. That way, when enemy AI is chasing the Player, they will not be deterred if the Player shuts a door in its face. I'm new to the Behavior Module and have absolutely no idea how to pull this off. Can anyone give any suggestions?

Answer
Marti (Lead Developer) 2 months ago

I would do this the other way around. The character should not be aware there's a door there. Just let him or her follow the patrol path.

The door, however, can have a big Trigger "On Enter" as you mention that detects when a character enters and when a character exists "On Enter" Trigger and "On Exit" Trigger. These should play the open door and close door respectively.

If you don't want the doors to appear like automatic doors, you can always play the gesture on the Invoker (character entering the door zone) like it's opening the door with the hand. If you limit the animation to play only on the upper body (using an Avatar Mask) it should look pretty good.

Cheers!

0
Answered

How to Organize Behavior Tree With Parallel Actions for Each Task?

Cr4shBarcode 2 months ago in Behavior updated by Marti (Lead Developer) 2 months ago 3

I'm using the Behavior Module and I've been following the online tutorial. My enemy has two types of banter set to run parallel to his actions: banter running parallel to his patrol action, and banter running parallel to when he is following the player. I don't know enough about behavior trees to be sure, but do I need to change the selector node into a sequence node in order to have different parallel actions for both the follow and the patrol actions?

Answer
Marti (Lead Developer) 2 months ago

Depends really. If you use a Selector:

It will execute the follow Player as long as the enemy sees it. Otherwise it will enter a patrol state. Selector nodes work like an "IF" condition: "If the conditions on the left are true, execute the left node. Otherwise execute the right node".

If you use a Sequence node it will first execute the left node actions. Once these are finished, it will jump to executing the right node actions. A Sequence would be roughly translated to: "After you finish left node, execute the next one".

Selectors are more suitable for your case. On the other hand, Sequence nodes are usually meant to be used for actions that are executed one after another. For example; when you're patrolling, you may want to make the character stop near a table, grab a cup of coffee, play the animation of drinking it and continue with the patrol. This would be a sequence: Move to table, play gesture "grab coffee", play gesture "drink coffee", continue patrol.

0
Answered

How to Make Audio Come From a Character or Game Object?

Cr4shBarcode 3 months ago in Behavior updated 2 months ago 5

I am making an enemy that will follow the Player around the level and taunt him. I put an Audio Source component on his head. But when I go to use the "Play Sound 3D" action, there are options to attach audio to the Player, a position, and Invoker (not sure what that is), a transform, and a bunch of variables, but I can't see how any of that will help me attach the sound to a moving character who is not the Player. What should I do?

0
Under review

how to make perception sight to see any part of a model or a custom collider?

Niukeh 3 months ago in Behavior updated by Marti (Lead Developer) 3 months ago 1

Im not sure, but it seems the perception component detects only the center of the character controller collider, please correect me if im wrong. I want to be able to use  any part of the  collider  or a custom collider to check if its visible beacause right now my 1.8 meters tall player can hide behind a 1m wall just because the center of the character controller is below the 1 meter tall wall. Any thoughts or solutions apreciated. hope it makes sense , Thanks.

0
Answered

Using Markers in 2D with Behaviours

Oliver Marshall 3 months ago in Behavior updated by Marti (Lead Developer) 3 months ago 9

Hi

I want to create a patrol route for an NPC in my 2D game. However, I can't see a way to refer to Markers within Behaviours. 

There's nothing really in the docs on how to use Markers other than to explain what they are. 

Does anyone have any guidance on how to use Markers and make an NPC move to one?

Olly