private static void RemoveTreePlayer(TreePlayer player) { if (player.SharedTree == null) { return; } PlayersCache.Remove(player); }
private static void AddTreePlayer(TreePlayer player) { if (player.SharedTree == null) { return; } PlayersCache.Add(player); }
/// <summary> Set new behaviour tree asset in runtime </summary> public void Initialize(BehaviourTree tree) { Clear(); _tree = tree; if (_tree == null) { return; } _treePlayer = new TreePlayer(_tree, _tree.Blackboard, _coroutineRunner, "Main"); }