Global Vars in AssetBundle

Hi, the doc says I need to put Global vars in Resources, but what if it's in an asset bundle instead, bundled with the behavior tree objects(AIs)? How does it work?
 
That's actually a good question - I haven't used asset bundles much so don't know the internals of how they work. Do you know how Unity handles the Resources folder with Asset Bundles?
 
I just know that Unity loads stuff from Resources folder like this:
Object o = Resources.Load(...);

and loads Asset Bundles like this:
AssetBundle b = DownloadHandlerAssetBundle .... [ some code ] Object o = b.LoadAsset(..);

I'm loading my NPCs that have BehaviorTree components from AssetBundles, but not sure how I should load the global vars, or if Behavior Tree knows to look for that somehow?
 
For the global variables Behavior Designer uses Resources.Load. Have you tried including the global variables in an asset bundle to see if they are loaded correctly?
 
I have the same problem. I am using asset bundles which seem to work fine with behavior trees and local variables - but global variables are not working - even if they are included in the asset bundle build.
:(
Do you have any idea? Using behavior designer in asset bundles could be very powerful if they work correctly - being able to make logic changes later when an app is already out in store seems to be a cool thing!
 
Top