Comments (3)
///
/// 初始化Behavic
///
///
private bool InitBehavic()
{
behaviac.Debug.LogWarning("InitBehavic");
behaviac.Workspace.Instance.FilePath = ExportedFilePath;
behaviac.Workspace.Instance.FileFormat = behaviac.Workspace.EFileFormat.EFF_xml;
return true;
}
private static string ExportedFilePath
{
get
{
string relativePath =
#if UNITY_EDITOR
"/StreamingAssets/BehaviacSpace/Skill/exported";
#elif UNITY_ANDROID
"/StreamingAssets/BehaviacSpace/Skill/exported";
#elif UNITY_STANDALONE
"/StreamingAssets/BehaviacSpace/Skill/exported";
#endif
if (Application.platform == RuntimePlatform.WindowsEditor)
{
return Application.dataPath + relativePath;
}
else if (Application.platform == RuntimePlatform.WindowsPlayer)
{
return Application.dataPath + relativePath;
}
else if (Application.platform == RuntimePlatform.Android)
{
return "jar:file://" + Application.dataPath + "!/assets/" + relativePath;
}
else
{
return Application.dataPath + relativePath;
}
}
}
from behaviac.
遇到同样的问题。请问如何解决。
from behaviac.
其实需要把导出的行为树放在resources文件夹下 比如 public static string ExportedFilePath
{
get
{
string relativePath =
#if UNITY_EDITOR
"/Resources/BehaviacSpace/Skill/exported";
#elif UNITY_ANDROID
"/Resources/BehaviacSpace/Skill/exported";
#elif UNITY_IPHONE
"/Resources/BehaviacSpace/Skill/exported";
#elif UNITY_STANDALONE
"/Resources/BehaviacSpace/Skill/exported";
#elif UNITY_WEBGL
"/Resources/BehaviacSpace/Skill/exported";
#endif
//if (Application.platform == RuntimePlatform.WindowsEditor)
//{
// return Application.dataPath + relativePath;
//}
//else if (Application.platform == RuntimePlatform.WindowsPlayer)
//{
// return Application.dataPath + relativePath;
//}
//else
if (Application.platform == RuntimePlatform.Android)
{
return "jar:file://" + Application.dataPath + "!/assets/" + relativePath;
//return "Assets" + relativePath;//能攻击 Resources 前地址没用
}
else if (Application.platform == RuntimePlatform.WebGLPlayer)
{
// LogWrapper.LogInfo("webgl路径:" + Application.dataPath + "/Release" + relativePath);
return Application.dataPath + "/Release" + relativePath;
}
else
{
// LogWrapper.LogInfo("路径:" + Application.dataPath + relativePath);
return Application.dataPath + relativePath;
}
}
}
from behaviac.
Related Issues (20)
- 请问这个项目后期还会迭代更新吗 HOT 1
- linux C++加载行为树报错 [ 编译成功,运行报错 ] HOT 1
- 官网,文档网址挂了吗 HOT 3
- BehaviacDesigner还有在维护吗?我私底下优化了BehaviacDesigner的性能,打算看情况提PullRequest HOT 3
- 条件执行节点的动作子节点下返回running状态的问题
- 接口支持
- 导出的C#行为树代码尝试调用Agent的internal方法导致跨项目编译失败
- 官方访问不了 HOT 1
- 无符号64位和0比较编译不过
- 关于C#版本Agent实例的内存泄漏问题 HOT 3
- 官网彻底没了,是否有可能恢复? HOT 3
- 连接c++游戏 HOT 3
- debug 内存泄漏 连调 HOT 4
- 关于预编译头
- 行为节点无法使用“决定状态的函数”方式 HOT 1
- 最近打开的工作区,储存路径问题 HOT 1
- 在哪里可以找到一款能够连接到Behaviac进行C++可视化调试的小游戏? HOT 2
- 离线调试功能
- 我有个动作节点接收int类型参数,并定义了一个方法返回int,动作节点可以接收一个方法的返回值作为参数输入吗? HOT 1
- 双参数event的参数异常问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from behaviac.