Unable to find extern FindObjectFromInstanceID
While using BNM on a Unity 6 game, I get this error while calling hit.GetCollider() from a RaycastHit.
Extern method UnityEngine.Object::FindObjectFromInstanceID isn't found. Please check the code.
Please fix!
Fixed in v2.5.1, but untested
Fixed in v2.5.1, but untested
Thank you for the update, but I believe the problem is that FindObjectFromInstanceID and FindObjectFromInstanceID_Injected simply aren't extern in some versions.
Can you tell what version of Unity it is?
Can you tell what version of Unity it is?
I think 2023+ versions have it as non-extern, but versions under requires extern I think aswell. If anyone can fact check me please do!
Can you tell what version of Unity it is?
I think 2023+ versions have it as non-extern, but versions under requires extern I think aswell. If anyone can fact check me please do!
Unity 2023.2.0 and 6000.0.0 have extern FindObjectFromInstanceID_Injected.
Can you tell what version of Unity it is?
I think 2023+ versions have it as non-extern, but versions under requires extern I think aswell. If anyone can fact check me please do!
Unity 2023.2.0 and 6000.0.0 have
extern FindObjectFromInstanceID_Injected.
I might be wrong, but I'd say do GetMethod instead of GetMethodExtern for versions under 2023 if FindObjectFromInstanceID isn't extern on the versions under
Can you tell what version of Unity it is?
The unity version for the game I was doing was 6000.2.2f1. I've seen it in some other 6000 versions too though. Is there any way you can make it fallback to using class methods instead of extern?
fallback to using class methods
I don't like use BNM API for extern methods that calls libunity. This is a bit overhead.
I was doing was 6000.2.2f1
I checked 6000.0.0f1, 6000.2.2f1 and 6000.2.6f2. All have extern FindObjectFromInstanceID_Injected
Can you send game or app that you working on? This is strange. Unity's _Injected methods should be extern, this is Unity API design.