It just seems like the derived classes need their own sets of hints as well. Is this something that you have tested and would it possibly be fixed in a newer release? (we are using v 2.6.2)
Hmm. If you access the method through the interface instead of the class itself, then the original hints using the interface should work with AOT, like for example:
1
2
3
4
varbb=GetComponent<IBlackboard>();
bb.SetValue("myFloat",10f);
Of course, even if you have a Blackboard object reference, you could do something like this, and should work as well with AOT:
1
2
3
4
varbb=GetComponent<Blackboard>();
(bb asIBlackboard).SetValue("myFloat",10f);
Please let me know if that is a valid solution for you, or whether you have to use the Blackboard class itself.
Thanks!
Actually, we are accessing the blackboard via the Task.blackboard accessor. In theory it returns an IBlackboard, so it should be the same use case as you posted. I’m wondering if there’s differences in how the vtable is handled that leads to this.
FYI I added the SpoofAOT attribute to the actual blackboard class and that worked.
Thanks for the follow up.
That’s interesting. I am pretty sure that the last time I tested AOT, it was working just by having the hints for IBlackboard when you access the methods as an IBlackboard type, but for the shake of convenience, I will add [SpoofAOT] to Blackboard class as well for the next version, so that the problem you are facing is avoided.
Thanks for letting me know that 🙂
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.