Under Review

PrivateReflectionDynamicObjectBase error in Unity 2019.2.0f1

rakkar 1 week ago updated 6 days ago 12

Version 1.1.1

Assets\Ludiq\Ludiq.PeekCore\Editor\Dependencies\ReflectionMagic\PrivateReflectionDynamicObjectBase.cs(109,34): error CS0121: The call is ambiguous between the following methods or properties: 'System.Reflection.TypeExtensions.GetTypeInfo(System.Type)' and 'System.Reflection.IntrospectionExtensions.GetTypeInfo(System.Type)'

Under Review

Hi Rakkar,

Sorry you're experiencing this issue and thanks for the report.

Can you provide some more details about your setup? Which target platform are you building for? That sounds like an error with Windows Store versions of reflection.

I tried Peek in a new project using the same Unity version and target and it worked. Peek failing in my main project could be due to the use of a DLL, which contains about half the code for the project.

I tried the DLL in a new project and it worked fine too. I'm not sure what the problem is, which is unfortunate since Peek is such a huge productivity booster.

Under Review

Hi Rakkar,

This used to be an error in the experimental .NET 4.x runtime from Unity, but in 2019.x, it should no longer be an issue, so I'm puzzled you're getting it in 2019.2. 

I will attempt a manual disambiguation for the next version, but in the mean time, can you confirm your project is not from an earlier version of Unity?

EDIT: It would not be trivial to disambiguate manually considering how often this method is used. My educated guess is that the DLL with half your project in it uses an outdated version of .NET or Unity references to be compiled? 

From your screenshot, I also don't understand why Scripting Backend and Api Compatibility Level are grayed out? Is this because of some configuration or target platform elsewhere? I can't seem to trigger that here.

Scripting and API compatibility level may have been greyed out due to settings not being checked out at the time of the first screenshot?

I don't think the problem is the DLL, as I exported the DLL to a new project and it worked. Here are the settings regardless.


"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.2d.tilemap": "1.0.0",
"com.unity.addressables": "1.1.7",
"com.unity.analytics": "3.3.2",
"com.unity.ext.nunit": "1.0.0",
"com.unity.ide.rider": "1.0.8",
"com.unity.ide.vscode": "1.0.7",
"com.unity.package-manager-ui": "2.2.0",
"com.unity.playablegraph-visualizer": "0.2.1-preview.3",
"com.unity.postprocessing": "2.1.7",
"com.unity.probuilder": "4.0.5",
"com.unity.progrids": "3.0.3-preview.4",
"com.unity.test-framework": "1.0.13",
"com.unity.textmeshpro": "2.0.1",
"com.unity.timeline": "1.1.0",
"com.unity.ugui": "1.0.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.cloth": "1.0.0",
"com.unity.modules.director": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.particlesystem": "1.0.0",
"com.unity.modules.physics": "1.0.0",
"com.unity.modules.physics2d": "1.0.0",
"com.unity.modules.screencapture": "1.0.0",
"com.unity.modules.terrain": "1.0.0",
"com.unity.modules.terrainphysics": "1.0.0",
"com.unity.modules.tilemap": "1.0.0",
"com.unity.modules.ui": "1.0.0",
"com.unity.modules.uielements": "1.0.0",
"com.unity.modules.umbra": "1.0.0",
"com.unity.modules.unityanalytics": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
"com.unity.modules.unitywebrequestaudio": "1.0.0",
"com.unity.modules.unitywebrequesttexture": "1.0.0",
"com.unity.modules.unitywebrequestwww": "1.0.0",
"com.unity.modules.vehicles": "1.0.0",
"com.unity.modules.video": "1.0.0",
"com.unity.modules.vr": "1.0.0",
"com.unity.modules.wind": "1.0.0",
"com.unity.modules.xr": "1.0.0"

Not sure if this is relevant, but it says "Assembly Info" Targets .NET 4.x