Hello, I am creating content using your API.
What I want to do is create a widget UI in Unreal,
and pass the selected sentence to convAI as text.
It’s like selecting one of the user’s lines in the dialogue window between the user and NPC in an RPG game.
So, I first created UMG,
and wrote Blueprint code to execute the SendText function in ConvAIBasePlayer when the button is pressed.
However, when I run the code as shown in the photo,
I get a Blueprint Runtime Error: “Accessed None trying to read property Chatbot”. Node: SendText Graph: EventGraph Function: Execute Ubergraph WBP MMCA Blueprint: WBP_MMCA
the part above where I said “Question by Voice” is code I wrote to speak while pressing the button, and that works normally.
It references the same Chatbot component.
When I first created the voice function, I simply used the StartTalking and Stop Talking events as shown in the figure above.
At that time, I had to attach a chatbot, but it worked normally even if it was empty, or I upgraded it to a variable and used it.
Similarly, using the SendText function or Send Text Dispatcher Event will cause an error.
Server logged in
Play in editor total start time 0.201 seconds.
Mobility of /Game/00_Curator/UEDPIE_0_LV_MMCA.LV_MMCA:PersistentLevel.BP_ViewerPawn_C_1 : CollisionCylinder has to be ‘Movable’ if you’d like to move it with CharacterMovementComponent.
Blueprint Runtime Error: “Accessed None trying to read property Chatbot”. Node: SetMainCharacter Graph: F_UpdateMainCharacterInEnvironment Function: F Update Main Character in Environment Blueprint: ConvaiBasePlayer
Blueprint Runtime Error: “Accessed None”. Node: SetMainCharacter Graph: F_UpdateMainCharacterInEnvironment Function: F Update Main Character in Environment Blueprint: ConvaiBasePlayer
Blueprint Runtime Error: “Accessed None trying to read property Chatbot”. Node: SendText Graph: Type Text Function: Execute Ubergraph Convai Base Player Blueprint: ConvaiBasePlayer
Blueprint Runtime Error: “Accessed None trying to read property K2Node_CustomEvent_Character”. Node: Assign On Text Received Graph: BindCharacterEvents Function: Execute Ubergraph Convai Base Player Blueprint: ConvaiBasePlayer
Blueprint Runtime Error: “Accessed None trying to read property K2Node_CustomEvent_Character”. Node: Assign On Transcription Received Graph: BindCharacterEvents Function: Execute Ubergraph Convai Base Player Blueprint: ConvaiBasePlayer
Blueprint Runtime Error: “Accessed None trying to read property K2Node_CustomEvent_Character”. Node: Assign On Failure Graph: BindCharacterEvents Function: Execute Ubergraph Convai Base Player Blueprint: ConvaiBasePlayer
Blueprint Runtime Error: “Accessed None trying to read property Chatbot”. Node: SendText Graph: EventGraph Function: Execute Ubergraph WBP MMCA Blueprint: WBP_MMCA
It appears the the chatbot variable is null, you will need to set it to the character’s chatbot component, one way is using the Convai Get Looked at Character that @K3 shared, another is to use the function anmed `Convai Get All Chatbot Components` which will return an array of chatbot components, if you have only 1 character in then scene then picking up the first element of the array would be sufficent.