public bool IsCharacterInsideScene(ParcelScene scene) { bool result = false; if (scene.IsInsideSceneBoundaries(DCLCharacterController.i.characterPosition)) { result = true; } return(result); }
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++; } }
private void Update() { if (!isBuilderInWorldActivated) { return; } if (checkerInsideSceneOptimizationCounter >= 60) { if (!sceneToEdit.IsInsideSceneBoundaries(DCLCharacterController.i.characterPosition)) { ExitEditMode(); } checkerInsideSceneOptimizationCounter = 0; } else { checkerInsideSceneOptimizationCounter++; } }
bool IsVoxelAtValidPoint(VoxelPrefab voxelPrefab, List <DCLBuilderInWorldEntity> entitiesToCheck) { if (!currentScene.IsInsideSceneBoundaries(voxelPrefab.meshRenderer.bounds)) { return(false); } Bounds bounds = voxelPrefab.meshRenderer.bounds; bounds.size -= Vector3.one * VOXEL_BOUND_ERROR; foreach (DCLBuilderInWorldEntity entity in entitiesToCheck) { if (entity.rootEntity.meshesInfo == null || entity.rootEntity.meshesInfo.renderers == null) { continue; } if (bounds.Intersects(entity.rootEntity.meshesInfo.mergedBounds)) { return(false); } } bounds.size += Vector3.one * VOXEL_BOUND_ERROR; return(true); }
public bool IsCharacterInsideScene(ParcelScene scene) { return(scene.IsInsideSceneBoundaries(DCLCharacterController.i.characterPosition)); }