neuecc / UniRx

Reactive Extensions for Unity
MIT License
7.01k stars 895 forks source link

AOT error on reflection with il2cpp build #460

Open honobonoK opened 4 years ago

honobonoK commented 4 years ago

An error occurs when starting the actual machine under the following conditions.

1.Unity version 2017. 2.Call a function that requires a parameter by reflection. (Observable Class Zip) 3.Use generics for parameters when calling reflection.

https://docs.unity3d.com/ja/2018.4/Manual/ScriptingRestrictions.html

honobonoK commented 4 years ago

revised part

  1. https://github.com/neuecc/UniRx/blob/master/Assets/Plugins/UniRx/Scripts/System/Tuple.cs#L138

  2. https://github.com/neuecc/UniRx/blob/master/Assets/Plugins/UniRx/Scripts/System/Tuple.cs#L209

  3. https://github.com/neuecc/UniRx/blob/master/Assets/Plugins/UniRx/Scripts/System/Tuple.cs#L304

  4. https://github.com/neuecc/UniRx/blob/master/Assets/Plugins/UniRx/Scripts/System/Tuple.cs#L414

  5. https://github.com/neuecc/UniRx/blob/master/Assets/Plugins/UniRx/Scripts/System/Tuple.cs#L541

  6. https://github.com/neuecc/UniRx/blob/master/Assets/Plugins/UniRx/Scripts/System/Tuple.cs#L683

  7. https://github.com/neuecc/UniRx/blob/master/Assets/Plugins/UniRx/Scripts/System/Tuple.cs#L842

phobos2077 commented 3 years ago

Can you provide more details, what error did you encounter exactly? Can you show some sample code that triggers the issue? I want to make sure my project is not affected :)