ARwayKit SDK
❱ HOMEPAGE⚎ DEVELOPER PORTAL
  • Introduction
  • Change Log
  • FAQ
  • ARWAY SDK
    • Getting Started
    • Building from the Source Code
    • Integrating the Unity Package
    • Managing App Localizations
      • Enabling Right-to-Left (RTL) Text
    • Sample Scenes
      • Dashboard
      • AR Map Session
    • Branding the Sample App
      • Replacing ARway Logos in the Sample App
    • Third Party
    • SDK Upgrade Guide
      • 3.1.0 -> 3.1.4
      • 3.0.1 -> 3.1.0
      • 3.0.0 -> 3.0.1
      • 2.5.1 -> 3.0.0
      • 2.3.1 -> 2.5.1
      • 2.3 -> 2.3.1
    • Enhancing the Sample App
      • Instant Location Pin Navigation
      • Customizing the Default Navigation Arrow
      • Initializing AR Using an IAP
  • Maps Studio
    • Overview
    • Maps Studio
      • Creating a Map
      • Editing Map Details
      • Uploading Content
      • QR Codes
      • Image Access Points (IAPs)
      • Floorplans
      • Using the Editor
      • Occlusion
      • Analytics
  • ARwayKit SDK Integrations
    • Flutter
      • Quickstart in Flutter
    • React Native
      • Quickstart in React Native
    • Android Kotlin
      • Quickstart in Android Kotlin
    • Android Java
      • Quickstart in Android Java
    • iOS Swift
      • Quickstart in iOS Swift
  • Deep Linking
    • What is Deep Linking?
    • Creator Portal Changes
    • Modifying the SDK
    • Configuring Server Files
  • DEVELOPER FEEDBACK
    • Support
Powered by GitBook
On this page
  1. ARWAY SDK
  2. Enhancing the Sample App

Initializing AR Using an IAP

By default, in the ARwayKit SDK, visitors can start navigation from IAPs only if they enter the map through the map list tab, select a map from the list, tap "Enter Map," and then tap the "Scan Access Point" button. This is because the map ID must first be selected so that the scanner can load the possible IAPs to the device.

To modify this functionality so map visitors can scan IAPs from the main button on the homepage, some additional code can be added. Keep in mind that this modification will only allow the selected map to be opened by the map visitor.

Steps:

  1. Get the Selected Map ID and Map Code:

    • From the Creator Portal, navigate to the Maps tab, select a map, and copy the Map ID and Map Code from the map details page.

  2. Modify the ARwayKit SDK:

    • Open the following file to begin making the modifications: Assets\ARWay\ViewerMode\2_Scripts\dashboard\MapListManager.cs.

    • Scroll down to the function named StartARSession() and modify it as follows:

public void StartARSession(bool isFromScanButton)
{
    SelectedMap map = new()
    {
        mapId = "2397c3394a5c475aa861e87d", // Replace with your own map id
        mapCode = "8184917418531", // Replace with your own map id
        isOwnMap = false,
        isVenueMap = false,
        isConnectedMap = false
    };
    EventManager<SelectedMap>.TriggerEvent("GetSelectedMapInfo", map);
    m_SceneLoader.LoadLevel("ARMapSession");
}

Now, with this change added, you can initialize AR using an IAP for the selected map. Keep in mind that you will only be able to open the selected map from the sample app.

PreviousCustomizing the Default Navigation ArrowNextOverview

Last updated 11 months ago