示例#1
0
        void ShowNextSemanticType()
        {
            ViveSR_SceneUnderstanding.HideAllSemanticBoundingBoxAndIcon();
            StaticMeshScript.HideAllSemanticCollider();

            int type;

            type = (int)currentShowing;
            do
            {
                type = ++type % (int)SceneUnderstandingObjectType.NumOfTypes;
                if (type == (int)SceneUnderstandingObjectType.NONE)
                {
                    ViveSR_SceneUnderstanding.ShowAllSemanticBoundingBoxAndIcon();
                    break;
                }
                else
                {
                    if (ViveSR_SceneUnderstanding.ShowSemanticBoundingBoxAndIconWithType((SceneUnderstandingObjectType)type, true, true))
                    {
                        break;
                    }
                }
            } while (!ViveSR_SceneUnderstanding.ShowSemanticBoundingBoxAndIconWithType((SceneUnderstandingObjectType)type, true, true));

            StaticMeshScript.ShowSemanticColliderByType((SceneUnderstandingObjectType)type);
            if (type == (int)SceneUnderstandingObjectType.NONE)
            {
                StaticMeshScript.ShowAllSemanticCollider();
            }
            currentShowing = type;
            if (currentShowing == (int)SceneUnderstandingObjectType.NONE)
            {
                HintText.text = "Showing All";
            }
            else
            {
                HintText.text = "Showing " + ViveSR_SceneUnderstanding.SemanticTypeToString((SceneUnderstandingObjectType)currentShowing);
            }
        }