i am practicing instantiating BT by sample sceane Demo1.
i made prefab CommmonBehaviourTree, CommonBlackboard in resource folder.
but loaded is null.
what’s wrong?
here is the code.
void Start () {
GameObject clone = Instantiate(Resources.Load(“Soldier”)) as GameObject;
BehaviourTree bt = Instantiate(Resources.Load(“CommonBehaviourTree”)) as BehaviourTree;
Blackboard bb = Instantiate(Resources.Load(“CommonBlackboard”)) as Blackboard;
Can you please clarify what is null?
Are you certain that the naming is correct and is matching the name of the prefab into the resources folder?
Thanks
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.