acdamiani / schema

Visual intelligence for the Unity game engine
https://schema-ai.com
MIT License
53 stars 4 forks source link

BlackboardEntry references are gone after adding an entry to Blackboard #15

Closed ijisthee closed 8 months ago

ijisthee commented 8 months ago

When to remove an entry from the Blackboard, some references on Nodes are gone.

How to reproduce:

  1. Create some nodes and conditionals, add references from Blackboard.
  2. add another entry to blackboard

Then some (not all) references from nodes and conditionals are gone.

Have a look at the video: https://github.com/acdamiani/schema/assets/20422129/dc7782b0-79c2-469c-b817-1a0d93ce38ec

ijisthee commented 8 months ago

Additional Info:

If you do that again and again after you've added 2-3 more entries to Blackboard, all references are gone. I only have a few nodes but it's a lot of work to wire them all again.

I happened to me with v1.0.5, too.

ijisthee commented 8 months ago

One more: When you add one in global Blackbaord, all references in all Graph assets are gone. :-/

acdamiani commented 8 months ago

I'm having trouble reproducing this issue. In the video linked, it looks like you're referencing some Blackboard variables that are not included in the local Blackboard ($AttackDistance for example). Are they global Blackboard variables? Dynamic variables? I'd hazard a guess that it's related to the typechecking code that's run when new entries are created.

ijisthee commented 8 months ago

Hi @acdamiani,

yes I have local and global Blackboard variables. image image

I'm not sure if I'm using dynamic variables.

For instance: is the 100 radius a dynamic variable? image

ijisthee commented 8 months ago

Arrgh. I've had a working Tree and wanted to test how to reproduce it with a new tree.

When I've added a variable to the local Blackboard in the new tree, everything was fine. When I've added it to the global variables the reference in the test tree AND the working ai tree were gone :-(

Next time I create a blank project for it.

Here my global Blackboard Asset: image

I cannot find the Assets inside the Entries List. Could that be a possible reason?

I need to cry a bit in my bed now since my references are gone.

Edit: I've put a backup outside of the Assets folder. Inside there all references are still available. puuu :)

acdamiani commented 8 months ago

Glad you had a backup! Yes, this almost definitely a Global blackboard issue; I'll fix it ASAP.

ijisthee commented 8 months ago

Hi @acdamiani

Do you have any updates on this issue? It's currently blocking me. I can temporarily work without using the BlackBoard, but I'd really like to use it. 😄

Thanks in advance. I hope you're doing well and not too stressed right now.

acdamiani commented 8 months ago

Sorry about that! I've been busy recently and have not had much time to work on this project. This issue turned out to be a simple fix though--see #20.

ijisthee commented 8 months ago

I could test it today and it works. Finally I can go on with may AI.

Thank you very much. :)