-
Notifications
You must be signed in to change notification settings - Fork 50
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
New Sample: AR Feature Layer #163
base: main
Are you sure you want to change the base?
Conversation
…-unity-samples into mas12517/Update-XR-Samples # Conflicts: # sample_project/Assets/SampleViewer/Resources/InputActions/TouchControls.cs.meta # sample_project/Assets/SampleViewer/Resources/Prefabs/JoystickCanvas.prefab.meta # sample_project/Assets/SampleViewer/Samples/StreamLayer/Materials.meta # sample_project/Assets/SampleViewer/Samples/StreamLayer/Materials/BASE.mat.meta # xr_sample_project/Assets/DefaultVolumeProfile.asset.meta # xr_sample_project/Assets/SampleViewer/Resources/SampleGraphicSettings.meta # xr_sample_project/Assets/SampleViewer/Resources/SampleGraphicSettings/LightingManager.cs.meta # xr_sample_project/Assets/SampleViewer/Resources/SampleGraphicSettings/SampleHDRPipeline.asset.meta # xr_sample_project/Assets/SampleViewer/Resources/SampleGraphicSettings/URP.prefab.meta # xr_sample_project/Assets/SampleViewer/Resources/Settings/SampleURPipeline Renderer.asset # xr_sample_project/Assets/Samples/XR Hands/1.4.0.meta # xr_sample_project/Assets/Samples/XR Interaction Toolkit/3.0.5/Hands Interaction Demo/HandsDemoSceneAssets/Materials/MaterialPipelineHandler.asset.meta # xr_sample_project/Assets/Samples/XR Interaction Toolkit/3.0.5/Hands Interaction Demo/HandsDemoSceneAssets/Prefabs/AudioAffordance.prefab.meta # xr_sample_project/Assets/Samples/XR Interaction Toolkit/3.0.5/Hands Interaction Demo/Scripts/ReleaseThresholdButtonReader.cs.meta # xr_sample_project/Assets/Samples/XR Interaction Toolkit/3.0.5/Starter Assets/DemoSceneAssets/Prefabs/Climb/Multi Floor Ladder.prefab.meta # xr_sample_project/Assets/Samples/XR Interaction Toolkit/3.0.5/Starter Assets/DemoSceneAssets/Prefabs/Climb/Multi-Anchor Teleport Reticle.prefab.meta
…arcgis-maps-sdk-unity-samples into mas12517/ARSample # Conflicts: # xr_sample_project/Assets/XR/Settings/OpenXR Package Settings.asset # xr_sample_project/Packages/manifest.json # xr_sample_project/Packages/packages-lock.json
…samples into mas12517/ARSample
…-unity-samples into mas12517/ARSample # Conflicts: # xr_sample_project/Assets/Images/LogoMenu.png.meta # xr_sample_project/Assets/Plugins/Android/proguard-user.txt.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Animations.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/GeoSpatialFeatureLayer.unity.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Images.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Images/Cancel_Icon.png.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Images/CircleMask.png.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Images/Handle.png.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Images/reset.png.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Input.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Input/ARTouchControls.cs.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Input/ARTouchControls.inputactions.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Materials.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Materials/HighLightMaterial.mat.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Materials/Shader Graphs_Outline.mat.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Materials/Shader Graphs_Transparent.mat.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Models.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Models/LocationMarker.fbx.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Models/LocationMarker.mat # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Models/LocationMarker.mat.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Prefabs.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Prefabs/FeatureData.prefab.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Prefabs/LocationMarker.prefab.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Scripts.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Scripts/ArcGISGeospatialController.cs.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Scripts/FeatureData.cs.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Scripts/FeatureLayerQuery.cs.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Settings/ARCoreExtensionsCameraConfigFilter.asset.meta # xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR Sample/Textures.meta # xr_sample_project/Assets/XR/Settings/ARCoreSettings.asset.meta # xr_sample_project/Assets/XR/Settings/ARKitSettings.asset.meta # xr_sample_project/Packages/manifest.json # xr_sample_project/Packages/packages-lock.json
…-unity-samples into mas12517/ARSample
…-unity-samples into mas12517/ARSample
…samples into mas12517/ARSample
…-unity-samples into mas12517/ARSample
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no consistency in the format of the image names.
...ample_project/Assets/SampleViewer/Samples/GeoSpatialAR/Scripts/ArcGISGeospatialController.cs
Outdated
Show resolved
Hide resolved
...ample_project/Assets/SampleViewer/Samples/GeoSpatialAR/Scripts/ArcGISGeospatialController.cs
Show resolved
Hide resolved
{ | ||
Debug.Log("Requesting the fine location permission."); | ||
Permission.RequestUserPermission(Permission.FineLocation); | ||
yield return new WaitForSeconds(3.0f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this delay needed? Probably worth adding a comment explaining why.
Debug.Log("Starting location service."); | ||
Input.location.Start(); | ||
|
||
while (Input.location.status == LocationServiceStatus.Initializing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have any event we can hook into for this status change? While loop here is dangerous with no timeout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately no. Location Services is still under old input and isn't available in new input. So there aren't any events. A lot of this code is just safety precautions.
xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR/Scripts/FeatureData.cs
Show resolved
Hide resolved
xr_sample_project/Assets/SampleViewer/Samples/GeoSpatialAR/Scripts/InputController.cs
Show resolved
Hide resolved
[SerializeField] private Material outlineMaterial; | ||
|
||
[Header("Mini Map")] | ||
private Button expandButton; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this button not serialized like the others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be gotten in Awake(), The others can't
{ | ||
inputField.text = featureLayerQuery.WebLink.Link; | ||
menuButton.image.sprite = upSprite; | ||
menuButton.GetComponentInChildren<TextMeshProUGUI>().text = "Touch to Hide Menu"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private const string
should be used to avoid repeatedly having this value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this string is being dynamically changed based on the status of the menu. It goes back and forth between "Touch to Show Menu" and "Touch to Hide Menu".
{ | ||
locationComponent.Position = new ArcGISPoint(cameraController.cameraGeospatialPose.Longitude, | ||
cameraController.cameraGeospatialPose.Latitude, ArcGISSpatialReference.WGS84()); | ||
locationComponent.Rotation = new ArcGISRotation(cameraController.cameraGeospatialPose.EunRotation.eulerAngles.y + northOffset,180,0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting doesn't look correct with commas/spaces. Definitely run formatter here.
### Deployment | ||
|
||
For deploying, please refer to this [document](https://developers.arcgis.com/unity/deployment/) | ||
In order for the sample to run on Meta Headsets, the device must be placed in **Developer Mode**. Please refer to this [document](https://developer.android.com/studio/debug/dev-options) for how to perform such an action. This must be done for running the sample in the Unity Engine, making a build to run on Windows, or making a build directly to the headset (Meta Quest, Meta Quest 2, and Meta Quest Pro) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this valid for this sample?
…samples into mas12517/ARSample
Sample
This sample aims to bring Real-World, Location-based AR along side use of the ArcGIS Maps SDK in order to show Feature Layer data in the real world.
Checklist
keyword: Short description of change
ArcGIS Maps SDK Version
Maps SDK 1.7 w/ Unity 6000.0 LTS