1.) At editor time a want to validate if everything is setup correctly. This is only possible if you think of the behavior tree and the agents prefab as a union. This leads to the problem i descriobed above that i need a valid agent in OnValidate or some other method that i could override. Isn´t it possible to change the code, that a valid agent is passed into OnValidate in the case when i selected the Prefab with the BehaviorTreeOwneer and not the BehaviorTree asset in unity?
In OnCreate the agent is correctly set
2.) In the moment when the graph is loaded at runtime i need to setup some MonoBehaviors. Those are working like sensors communicating with the rest of the application and updating Blackboard viarables. Think about it like “PlayerIsInRangeSensor” which is a MonoBehavior and communicates with our Game, e.g. receiving events. It´s not enough to do that OnInit, because this is only called when the state is entered, which will never happen because, the sensor is not created and the blackboard is not updated
What i also don´t want to do is to add those sensors in the editor, because then you forget to add them or if you automatically add them you forget to delete them if not needed anymore.
3.) Im currently trying to figure out how the error output/console works. Sadly there is not documentation about it. What i want to have is: When OnValidate is called at editor time and detects an error, it should be displayed in the console of node canvas. Once the error is fixed it should dissapear from the console. While a node has an error it should be somehow visual highlighted, e.g. drawn with red tint or showing some error icon.
4.) I want to have a script that is executed from our build pipeline and checks all existing graphs (calls OnValidate). If one has an error it should return “Error” and the build fails
It´s no problem for me to make minor changes to your codebase, if you give me a hint where i have to look at
Thx for any help
Login
Register
By registering on this website you agree to our Privacy Policy.