BNM-Android icon indicating copy to clipboard operation
BNM-Android copied to clipboard

Have you considered handling different versions of unity during runtime

Open qiaozhi-4 opened this issue 1 year ago • 6 comments

Have you considered handling different versions of unity during runtime

When a universal tool module is needed

qiaozhi-4 avatar Oct 29 '25 02:10 qiaozhi-4

This could be done by possibly using a "if extern method failed" method in return, so you use the class instead. I've already tried to make something like this, but it isn't that great.

DaMostDevious avatar Nov 05 '25 11:11 DaMostDevious

You can already choose what version of Unity you're on in GlobalSettings.hpp?

YummyBacon5 avatar Nov 05 '25 11:11 YummyBacon5

您现在可以在哪个界面选择您使用的 Unity 版本GlobalSettings.hpp?

I don't know. I just saw that libTool could.

qiaozhi-4 avatar Nov 06 '25 08:11 qiaozhi-4

这可以通过添加一个“如果外部方法失败”的返回方法来实现,这样就可以直接使用类本身。我已经尝试过类似的方法,但效果并不理想。

Ok. Thank you for your answer

qiaozhi-4 avatar Nov 06 '25 08:11 qiaozhi-4

This is a difficult matter, which means that dynamically determining the Unity version is required. The best case is to use only the IL2CPP API without using IL2CPP structures, because the structures change with versions. You can refer to my project: https://github.com/eternalfuture-e38299/IL2CppReflector

eternalfuture-e38299 avatar Nov 08 '25 00:11 eternalfuture-e38299

This is a difficult matter, which means that dynamically determining the Unity version is required. The best case is to use only the IL2CPP API without using IL2CPP structures, because the structures change with versions. You can refer to my project: https://github.com/eternalfuture-e38299/IL2CppReflector

thank you

qiaozhi-4 avatar Nov 08 '25 01:11 qiaozhi-4