Comments (10)
IEnumerator enumerator()
{
string path = "";
#if UNITY_IOS
#elif UNITY_ANDROID
path = @"http://172.31.100.84:80/Assembly-CSharp.patch.bytes";
#elif UNITY_EDITOR
path = @"http://localhost/Assembly-CSharp.patch.bytes";
#endif
var request = UnityWebRequest.Get(path);
yield return request.SendWebRequest();
if (request.isHttpError)
{
text.text = path + "isHttpError";
}
else if(request.isNetworkError) {
text.text = path + "isNetworkError";
}
else
{
text.text = "有下载到更新内容";
byte[] bytes = request.downloadHandler.data;
PatchManager.Load(new MemoryStream(bytes));
}
}
根据文档操作,在Unity实现了热修复,但是导出apk包有下载到更新文件但是不执行热更新的内容,查阅入门文档未找到答案,望大佬指点迷津!!
from injectfix.
版本是2018.2.14f1
是否是导apk包需要做什么特殊处理
用静态初始方法调用IFixEditor.InjectAllAssemblys也没有见到效果
from injectfix.
看下加载补丁有没报错
from injectfix.
看下加载补丁有没报错
Exception: can not load method [get_red] of UnityEngine.Color
E/Unity ( 3320): at IFix.Core.PatchManager.readMethod (System.IO.BinaryReader reader, System.Type[] externTypes) [0x00000] in :0
E/Unity ( 3320): at IFix.Core.PatchManager.Load (System.IO.Stream stream) [0x00000] in :0
E/Unity ( 3320): at LoadFixByte+c__Iterator0.MoveNext () [0x00000] in :0
E/Unity ( 3320): at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in :0
E/Unity ( 3320):
E/Unity ( 3320): (Filename: currently not available on il2cpp Line: -1)
E/Unity ( 3320):
这是报的错
结合我的代码
//更新前
text.text = "更新前为蓝色";
image.color = Color.blue;
//更新后
text.text = "更新为红色";
image.color = Color.red;
如果不对color进行改值的话 apk跑热修复是正常的
这是为什么 大佬方便的话可以解答一下吗 谢谢!!!
from injectfix.
unity剪裁了Color.red属性
from injectfix.
unity剪裁了Color.red属性
有什么办法避免吗
from injectfix.
一般你新逻辑不会用到老逻辑没用过的api。
from injectfix.
真要避免就用link.xml配置一下。怎么配置看unity的文档
from injectfix.
真要避免就用link.xml配置一下。怎么配置看unity的文档
收到 感谢!!!
from injectfix.
请问楼主这是在editor下的还是打包Windows的?
from injectfix.
Related Issues (20)
- 催更 HOT 3
- [Bug] 文档错误Doc/quick_start.md
- 包含 as 的函数 Inject 不成功,不能对函数热更 HOT 1
- 为何不能直接使用await Task.Delay呢 HOT 1
- 如何定位到Injectfix的文件代码位置 HOT 1
- Unity 2021.3.26 无法热更 async/await HOT 5
- Unity3d 2022.3.7f1c1 IFixToolKit/IFix.exe.mdb doesn't match image HOT 1
- 对UI事件函数制作补丁,在load补丁的时候会报错
- unity2019.4.17f 安卓打包注入失败 HOT 2
- Unhandled Exception:System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. HOT 9
- InjectFix的使用范围建议? HOT 2
- InvalidProgramException: no closure wrapper for CallbackSignal`2+Action`2[Unit,System.Int32,Unit,System.Int32]
- 是否支持WebGL平台 HOT 3
- 自动化打包流程安卓生成patch文件失败
- 在unity 2022.3.14f1版本建立空工程,打包APK无法Inject。大佬可以看下问题么。
- [Unity2022.3.16]在Unity2022下Inject成功,但是在dll中没有看到IFix相关内容,热更新失效
- 如果通过 patch 文件判断是否有方法调用了处于不同程序集的 base 方法
- Tuple 数组作为参数或返回值时,不生效,但是List 可以
- 打包到客户端System.Exception: assembly may be not injected yet, cat find IFix.ILFixInterfaceBridge, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null HOT 3
- 针对Unity2022.3版本Editor下可以注入,真机注入失败(assembly may be not injected yet)的解决方法 HOT 7
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 injectfix.