Ejemplo n.º 1
0
        private void AddVegetationStudioCamera(VegetationStudioCamera vegetationStudioCamera)
        {
            VegetationStudioCameraList.Add(vegetationStudioCamera);
            OnAddCameraDelegate?.Invoke(vegetationStudioCamera);

            RefreshColliderSystem();
            RefreshRuntimePrefabSpawner();
        }
        public void RemoveCamera(Camera aCamera)
        {
            _prepareVegetationHandle.Complete();

            VegetationStudioCamera vegetationStudioCamera = GetVegetationStudioCamera(aCamera);

            if (vegetationStudioCamera != null)
            {
                RemoveVegetationStudioCamera(vegetationStudioCamera);
            }

            SetupWindSamplers();
            SetupVegetationItemModelsPerCameraBuffers();
        }
Ejemplo n.º 3
0
        public void RemoveCamera(Camera aCamera)
        {
            _prepareVegetationHandle.Complete();

            VegetationStudioCamera vegetationStudioCamera = GetVegetationStudioCamera(aCamera);

            if (vegetationStudioCamera != null)
            {
                RemoveVegetationStudioCamera(vegetationStudioCamera);
            }

            SetupWindSamplers();
            SetupVegetationItemModelsPerCameraBuffers();

            RefreshColliderSystem();
            RefreshRuntimePrefabSpawner();
        }
        public void AddCamera(Camera aCamera, bool noFrustumCulling = false, bool renderDirectToCamera = false, bool renderBillboardsOnly = false)
        {
            _prepareVegetationHandle.Complete();

            VegetationStudioCamera vegetationStudioCamera = GetVegetationStudioCamera(aCamera);

            if (vegetationStudioCamera == null)
            {
                vegetationStudioCamera = new VegetationStudioCamera(aCamera)
                {
                    CameraCullingMode    = CameraCullingMode.Frustum,
                    RenderDirectToCamera = renderDirectToCamera,
                    RenderBillboardsOnly = renderBillboardsOnly,
                    VegetationSystemPro  = this
                };

                AddVegetationStudioCamera(vegetationStudioCamera);
            }

            SetupWindSamplers();
            SetupVegetationItemModelsPerCameraBuffers();
            //PrepareRenderLists();
        }
 private void RemoveVegetationStudioCamera(VegetationStudioCamera vegetationStudioCamera)
 {
     vegetationStudioCamera.Dispose();
     VegetationStudioCameraList.Remove(vegetationStudioCamera);
     OnRemoveCameraDelegate?.Invoke(vegetationStudioCamera);
 }
 private void AddVegetationStudioCamera(VegetationStudioCamera vegetationStudioCamera)
 {
     VegetationStudioCameraList.Add(vegetationStudioCamera);
     OnAddCameraDelegate?.Invoke(vegetationStudioCamera);
 }