Also remember that if you only want to allow selection from the Blackboard and not allow a direct value assignment, you can use the
[BlackboardOnly] attribute above the field.
i have a problem 🙂 i use following action. i change SourceGO to direct value in unity.i set an game object from scene. it is not prefab. it works when i play it. when i restart unity or build project SourceGO field is empty. is it normal?
I just re-checked this and works as expected. Hm…
I know you said that the game objecty you reference is not a prefab, but is the GraphOwner a prefab, or the Graph a non-bound graph reference (an Asset graph)?
This is the only thing I can think of going on here. Can you confirm?
Unity does not allow having a scene reference IN a prefab or asset reference. You can have an asset reference IN a scene object.
none of them prefab. i will also test it with an empty scene. maybe another thing cause my problem. i will also check it another platform than Android.
Graph Assets and Unity assets in general, can’t have references to scene objects. This is a Unity known limatation. It’s simply impossible 🙂
Bound Graphs exists exactly for that reason. To allow you to assign scene object references within the graph.
If you want to use Asset Graphs, the way to work with scene object references like game objects, would be to use Blackboard variables. Since the Blackboard is a component attached on the agent which is not an asset but in the scene, it CAN have references to other scene objects.
Let me know if this helps.
Cheers!
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 9 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.