Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullReferenceException: ResolveCloudAnchorPromise.AssignResult() #215

Open
santhakumarGit opened this issue Aug 30, 2024 · 7 comments
Open

Comments

@santhakumarGit
Copy link

I am using unity 2022.3.25.
ARCore Extension: 1.45
Once i place the anchor and go back click the Resolve button i am getting this error
Screenshot 2024-08-30 at 3 09 33 PM

Screenshot 2024-08-30 at 3 09 33 PM

@swardle
Copy link

swardle commented Aug 30, 2024

I wonder if your session or origin is null. This might get nulled out as you switch between arf4 and arf5 as you change from ARSessionOrigin to XROrigin for example.

https://docs.unity3d.com/Packages/[email protected]/manual/version-history/migration-guide-5-x.html

What I mean is as you switch the code the data might get nulls if you re-import the data and have changed your types.

session_and_origin

@ParisKaman
Copy link

I can confirm my project's Origin gets cleared out on this newest release. Previously I could drag in type XROrigin and the new release makes me unable to. This is whether I use the scripting symbol ARCORE_USE_ARF_5 or not (since the release says this symbol is not used anymore).

Any suggestions on how to get this Origin to be serialized on the new version of ARCoreExtensions (1.45)?

@swardle
Copy link

swardle commented Sep 10, 2024

Can get this working with the 1.45 arf5 samples with no changes?

Once it is cleared out you have to manually fix each null that was caused by the bad re-serialization with an arf4 version of ARCore Extensions. You would have to look though and make sure you don't have nulls in other places too.

Given what you are saying what version of 1.45 ARCore Extensions are you using? If you use the arf5 version you should be able to drag a XROrigin on to this and it should work. If you are using the arf4 version it would not let you that sounds like what is happening.

@ParisKaman
Copy link

Ah you're right, thanks, I got it working. I think I tried manually pointing the old import of the package to "https://github.com/google-ar/arcore-unity-extensions.git#arf5" and didn't confirm that would switch the targeted commit to the right branch. Re-importing the package using that target repo with the additional arf5 tag worked for me.

@santhakumarGit
Copy link
Author

santhakumarGit commented Sep 16, 2024

Hi Guys,
I am still facing null reference exception issue. First i removed the AR foundation ,kit and core package from package manager. then i removed the "https://github.com/google-ar/arcore-unity-extensions.git#arf5". So first i import google arcore unity extenstion file. Then i install AR foundation,kit and core file. Next ARCORE_USE_ARF_5 i given to script compilation. Script also asking only ARSession Orgin not Orgin. See my last image. Again i am getting same error. Is there any solution????????????????????????
Screenshot 2024-09-16 at 3 06 34 PM
Screenshot 2024-09-16 at 3 22 03 PM
Screenshot 2024-09-16 at 3 35 10 PM

@ParisKaman
Copy link

Could you also screenshot your "com.google.ar.core.arfoundation.extensions" section in your packages-lock.json file?

@santhakumarGit
Copy link
Author

Hey Pariskaman,
I solved the issue. Now it is working. I removed the sample files and reimported then it came correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants