So I just started production with AR Foundation, but I get that the class Foundation AR, ARSessionOrigin class doesn’t recognise the Raycast method. According to their documentation it should do. Does anyone have any ideas.
Ive tried the script on 2018.3.8 and 2019.1.3f1. I get other method to work such as MakeContentAppearAt. But the rays cast method is nowhere to be found (for me). please help!
Same issues on Unity 2019.1.0f2 with ARFoundation 2.1.
I get the following errors appearing:
‘ARSubsystemManager’ is missing in the current context
‘ARPlaneManager’ does not contain definition for ‘GetAllPlanes’
‘AROrigin’ does not contain definition for ‘Raycast’
Have tried resetting the packages but to no avail.
Hi guys, thank you so much for the explanation, but a question for @KelsoSharp , calling the raycast manager and sending the TrackableType.Planes gives me an error:
The name ‘TrackableType’ does not exist in the current context
Is something that I need to import/define in the global scope?
thank you so much
added UnityEngine.XR.ARSubsystems; at the top since TrackableType seems to be associated to it, which is misleading since the migration guide explicitly said that the ARSubsystems manager has been removed. So I don’t know if that’s helped or if that’s even the correct course of action, but it at least allows you to use TrackableType.
Hi @markl_laha I already have that imported, now I’m getting this:
NullReferenceException: Object reference not set to an instance of an object
ArTabToPlace.UpdatePlacementPose () (at Assets/scripts/ArTabToPlace.cs:57)
When you have problems with “missing” commands in scripts it seems to be because of incompatible packages. Go to the Package Manager and see which packages are not “Verified” or have dependency conflicts.
First() isn’t an available function of List — Unless I am missing something. hits[0] would do the same thing. Kinda wish ‘First’ was an option since it looks cleaner.