void OnARModeChanged(SetARModeAction.ARMode newData)
        {
            if (m_ARmode == newData)
            {
                return;
            }

            m_ARmode = newData;
            if (newData == SetARModeAction.ARMode.None)
            {
                return;
            }

            m_CurrentIARInstructionUI = null;
            foreach (var obj in InstructionUIList)
            {
                var instructionUI = obj as IARInstructionUI;
                if (instructionUI.arMode == newData)
                {
                    m_CurrentIARInstructionUI = instructionUI;
                    break;
                }
            }

            if (m_CurrentIARInstructionUI == null)
            {
                Debug.LogError("AR Instruction UI is null");
                return;
            }

            m_CurrentIARInstructionUI.Restart();
        }
Exemplo n.º 2
0
 public UIARStateData(bool arEnabled, SetInstructionUIStateAction.InstructionUIState instructionUIState, IARInstructionUI currentARInstructionUI, int numProxyInstances,
                      int instructionUIStep, ARToolStateData arToolStateData, ARPlacementStateData placementStateData, SetARModeAction.ARMode arMode)
 {
     this.arEnabled              = arEnabled;
     this.instructionUIState     = instructionUIState;
     this.currentARInstructionUI = currentARInstructionUI;
     this.numProxyInstances      = numProxyInstances;
     this.instructionUIStep      = instructionUIStep;
     this.arToolStateData        = arToolStateData;
     this.placementStateData     = placementStateData;
     this.arMode = arMode;
 }