Comments (4)
收到,会改JBehaviour,如果gameObject.active==false
那就会等待到true
,然后再进行Init
from jengine.
加油,绑定这块我认为可以再改进一下.我刚刚尝试把他改成自动绑定.大概思路是对需要绑定的gameobject后面加上@符号,然后收集,根据自定义的优先级和名字前缀取到优先的组件.根据排除表去除不用收集的组件.用来收集到AssemblyQualifiedName也就是xx.GetType().AssemblyQualifiedName;最后通过Type t = Type.GetType(field.AssemblyQualifiedName);数组和变量我项目里基本没有,所以不处理.
//判断变量的值是在热层还是引擎层
if (isHotScript)
{
string tName = varField.FieldType.Name;
var classBind = targetGo.GetComponent(); //变量指向了HotLayer中的类时,对其进行初始化
if (classBind)
{
classBind.Bind();
varField.SetValue(ilInstance, classBind.mIlInstance);
}
_class.BoundData = true;
}
else
{
//将Unity对象赋值给热层的脚本变量
Type t = Type.GetType(field.AssemblyQualifiedName);
if (t == null)
{
Debug.LogError($"gameobject : {field.gameObject} 无法找到 {hTypeFullName}变量名为:{field.fieldName}的dll路径为空");
continue;
}
Component component = targetGo.GetComponent(t);
_class.BoundData = true;
varField.SetValue(ilInstance, component);
}
}
from jengine.
自动绑定的话,绑定组件没什么问题吧,对UnityComponent进行赋值,有判断类型在哪里的操作
from jengine.
JBehaviour生命周期的地方已经修复,等提交
ClassBind这块,没什么问题,会判断热更类和本地类
from jengine.
Related Issues (20)
- 加密秘钥存到lock文件里,方便迁移项目到不同电脑
- ClassBind绑定不了基类里的属性
- JAction在webgl下无法正常运行 HOT 1
- 关于JPrefab的bug问题 HOT 1
- 调节实例的enabled无作用
- 现在第一次onEnable方法会调用两次
- enabled=false后Update还是会调用
- 在第二次enabled=true时不会调用OnEnabled
- Start实例化出来的热更脚本的Update不会调用
- unity2022版本直接进入Init场景运行会报InitJEngine为空,从其他场景运行正常跳转没有问题
- 切换IL2Cpp API:.net 4.x JPrefab报错 HOT 2
- 可否在框架里提供选择开启yoo的边玩边下功能? HOT 1
- ChangeScene脚本中 获取不到InitJEngine类,报空指针错误。v0.8
- ChangeScene类加载DoChange找不到InitJEngine脚本的问题 HOT 1
- -
- DoInstantiate 无调用
- 2022下捕获不到异常 HOT 1
- 什么时候集成hybridclr那就完美了
- 项目导出WebGL格式之后,运行在网页上报了一个错误,错误内容:82cf9b30-ff7d-4030-b9f0-7ea20ca2cafb:3 KeyNotFoundException: Cannot find method:add_UnobservedTaskException in type:System.Threading.Tasks.TaskScheduler, token=System.Void System.Threading.Tasks.TaskScheduler::add_UnobservedTaskException(System.EventHandler`1<System.Threading.Tasks.UnobservedTaskExceptionEventArgs>) at ILRuntime.Runtime.Enviorment.AppDomain.GetMethod (System.Object token, ILRuntime.CLR.TypeSystem.ILType contextType, ILRuntime.CLR.Method.ILMethod contextMethod, System.Boolean& invalidToken) [0x00000] in <00000000000000000000000000000000>:0
- 微信小游戏端报这个问题: plugin.js:93 exception thrown: RuntimeError: function signature mismatch,RuntimeError: function signature mismatch at <anonymous>:wasm-function[16131]:0x5032b0 at <anonymous>:wasm-function[9709]:0x2fbe8e at <anonymous>:wasm-function[21528]:0x6a6366 at Qs (<anonymous>:wasm-function[27648]:0x86f82e) at invoke_iii (http://127.0.0.1:14067/game/webgl.wasm.framework.unityweb.js:1269:223735) at <anonymous>:wasm-function[3580]:0xc40b4 at <anonymous>:wasm-function[4407]:0xff2e0 at <anonymous>:wasm-function[8565]:0x2855b9 at <anonymous>:wasm-function[12722]:0x3d9be1 at <anonymous>:wasm-function[49173]:0xc7d45e (env: Windows,mg,1.06.2401020; lib: 3.2.5)
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 jengine.