private void ProcessBeginPoint()

    /* process state and sent display
     * trigger when got new marker, app state change (for call display)*/
    {
        toastmsg = "ขณะนี้คุณอยู่ที่: " + this.beginPoint.GetComponent <NodeData>().GetParentObjectData().roomName;
        if (this.destinationPoint == null && this.reachedPoint == null)
        {
            appState = AppState.Idle;
        }
        else if (this.destinationPoint == null && this.reachedPoint != null)
        {
            appState = AppState.Idle;
            if (IsSameRoom(this.beginPoint, this.reachedPoint))
            {
            }
            else
            {
            }
        }
        else if (this.destinationPoint != null)
        {
            if (IsSameRoom(this.beginPoint, this.destinationPoint))
            {
                appState                 = AppState.Idle;
                this.reachedPoint        = this.destinationPoint;
                this.destinationPoint    = null;
                this.oldDestinationPoint = null;
            }
            else
            {
                appState = AppState.Navigate;
                Navigate();
            }
        }
        //another case    else if (this.destinationPoint != null && this.reachedPoint != null)
        SetDisplay();
        stateDisplay.ChangeActionText(appstring);
        stateDisplay.PlaySoundQueue();
        stateDisplay.ShowToastMessage(toastmsg, 1);
    }
    public void StartCanvas()
    {
        Screen.fullScreen = false;
        building          = GameObject.FindWithTag("Building").GetComponent <BuildingData>();
        Debug.Log(building.name);
        showingFloor   = building.floorList[0];
        searchShowList = new List <GameObject>();

        //canvasResolutionScript = gameObject.GetComponent<CanvasResolutionScript>();
        toastMessageScript = gameObject.GetComponent <ToastMessageScript>();
        stateDisplay       = gameObject.GetComponent <StateDisplayController>();
        stateDisplay.ShowToastMessage("ส่องกล้องไปยังจุดต่างๆ เช่น ป้ายบอกทาง เลขห้อง เพื่อเริ่มต้นระบุตำแหน่งของคุณ", false);
        stateDisplay.AddSound(SoundManager.SoundType.InitApp, 0);
        stateDisplay.PlaySoundQueue();

        hambergerButton = actionBar.gameObject.transform.Find("HambergerButton").gameObject;
        mapButton       = actionBar.gameObject.transform.Find("MapButton").gameObject;
        searchButton    = actionBar.gameObject.transform.Find("SearchButton").gameObject;
        appName         = actionBar.gameObject.transform.Find("AppName").gameObject;
        appNameText     = appName.GetComponent <Text>();

        backButton       = actionBar.gameObject.transform.Find("BackButton").gameObject;
        searchInputField = actionBar.gameObject.transform.Find("SearchInputField").gameObject;
        clearButton      = actionBar.gameObject.transform.Find("ClearSearchButton").gameObject;

        /* search */
        searchHelpText = searchPanel.transform.Find("HelpText").gameObject;
        searchList     = searchPanel.transform.Find("Scroll View").gameObject;
        viewPort       = searchList.gameObject.transform.Find("Viewport").gameObject;
        scrollbar      = searchList.gameObject.transform.Find("Scrollbar Vertical").gameObject;
        searchContent  = viewPort.gameObject.transform.Find("Content").gameObject;
        //searchContent.GetComponent<GridLayoutGroup>().cellSize = new Vector2(Screen.width - 50, 100);
        roomDataPanel      = searchPanel.transform.Find("RoomDataPanel").gameObject;
        roomDataDialog     = roomDataPanel.transform.Find("RoomDataDialog").gameObject;
        roomNameTitle      = roomDataDialog.transform.Find("RoomNameTitle").gameObject;
        roomMapImage       = roomDataDialog.transform.Find("RoomMapImage").gameObject;
        roomDesData        = roomDataDialog.transform.Find("RoomData").gameObject;
        roomNavigateButton = roomDataDialog.transform.Find("NavigateButton").gameObject;

        /* map */
        mapImage    = mapPanel.transform.Find("MapScrollViewArea").gameObject;
        rightButton = mapPanel.transform.Find("RightButton").gameObject;
        leftButton  = mapPanel.transform.Find("LeftButton").gameObject;
        mapControl  = mapImage.transform.Find("Mask/MapImage").gameObject.GetComponent <MapControlScript>();

        backButton.SetActive(false);
        searchInputField.SetActive(false);
        clearButton.SetActive(false);
    }
 /* start canvas in readable data mode */
 public void StartNormalStateAppCanvas()
 {
     try
     {
         building = GameObject.FindWithTag("Building").GetComponent <BuildingData>();
         Debug.Log(building.name);
         showingFloor   = building.floorList[0];
         searchShowList = new List <GameObject>();
         stateDisplay.AddSound(SoundManager.SoundType.InitApp, 0);
         stateDisplay.PlaySoundQueue();
         isErrorCantReadFile = false;
         stateDisplay.ShowToastMessage("ส่องกล้องไปยังจุดต่างๆ เช่น ป้ายบอกทาง เลขห้อง เพื่อเริ่มต้นระบุตำแหน่งของคุณ", 5);
     }
     catch (System.Exception e)
     {
         dbtext.text = Random.Range(10, 99) + ": startnormalstate Error " + e.Message + "\n" + e.StackTrace;
     }
 }