private void Update()
    {
        if (!isEditModeActivated)
        {
            return;
        }

        if (Time.timeSinceLevelLoad >= nexTimeToReceiveInput)
        {
            if (Utils.isCursorLocked || isAdvancedModeActive)
            {
                CheckEditModeInput();
            }
            if (currentActiveMode != null)
            {
                currentActiveMode.CheckInput();
            }
        }

        if (checkerInsideSceneOptimizationCounter >= 60)
        {
            if (!sceneToEdit.IsInsideSceneBoundaries(DCLCharacterController.i.characterPosition))
            {
                ExitEditMode();
            }
            checkerInsideSceneOptimizationCounter = 0;
        }
        else
        {
            checkerInsideSceneOptimizationCounter++;
        }

        if (checkerSceneLimitsOptimizationCounter >= 10)
        {
            checkerSceneLimitsOptimizationCounter = 0;
            CheckPublishConditions();
        }
        else
        {
            checkerSceneLimitsOptimizationCounter++;
        }
    }
예제 #2
0
 public void CheckInput()
 {
     currentActiveMode?.CheckInput();
 }