Skip to content

Conversation

@mmgaw113
Copy link
Collaborator

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

  • PR title follows convention - keyword: Short description of change
  • PR targets the correct branch
  • Self-review of changes
  • There are no warnings related to changes
  • A build was made and tested on all relevant platforms
  • No unrelated changes have been made to any other code or project files
  • No unnecessary includes or namespaces added
  • Code follows plugin coding style
  • New code and changed code has proper formatting
  • No unintentional formatting changes
  • Commits have descriptive titles

ArcGIS Maps SDK Version

Maps SDK 1.7 w/ Unity 6000.0 LTS

mmgaw113 and others added 30 commits October 4, 2024 07:42
…-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
…-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
@mmgaw113 mmgaw113 requested a review from a team November 26, 2024 17:50
@mmgaw113 mmgaw113 self-assigned this Nov 26, 2024
@mmgaw113 mmgaw113 changed the base branch from Release/1.7 to main November 26, 2024 21:12
Copy link
Collaborator

@ZackAllen ZackAllen left a 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.

{
Debug.Log("Requesting the fine location permission.");
Permission.RequestUserPermission(Permission.FineLocation);
yield return new WaitForSeconds(3.0f);
Copy link
Collaborator

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)
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

[SerializeField] private Material outlineMaterial;

[Header("Mini Map")]
private Button expandButton;
Copy link
Collaborator

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?

Copy link
Collaborator Author

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";
Copy link
Collaborator

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.

Copy link
Collaborator Author

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);
Copy link
Collaborator

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)
Copy link
Collaborator

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?

@mmgaw113 mmgaw113 marked this pull request as draft January 7, 2025 16:17
mmgaw113 and others added 4 commits January 9, 2025 13:33
…samples into mas12517/ARSample

# Conflicts:
#	README.md
#	xr_sample_project/Assets/SampleViewer/SampleViewer.asmdef
#	xr_sample_project/ProjectSettings/EditorBuildSettings.asset
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

Successfully merging this pull request may close these issues.

3 participants