Beispiel #1
0
        void ClearVegetationItemModels()
        {
            for (int i = 0; i <= VegetationStudioCameraList.Count - 1; i++)
            {
                if (VegetationStudioCameraList[i].WindSampler)
                {
                    foreach (Transform child in VegetationStudioCameraList[i].WindSampler.transform)
                    {
                        if (Application.isPlaying)
                        {
                            Destroy(child.gameObject);
                        }
                        else
                        {
                            DestroyImmediate(child.gameObject);
                        }
                    }
                }
            }

            for (int i = 0; i <= VegetationPackageProModelsList.Count - 1; i++)
            {
                VegetationPackageProModelsList[i].Dispose();
            }
            VegetationPackageProModelsList.Clear();
        }
Beispiel #2
0
        public void SetupVegetationItemModels()
        {
            List <GameObject> windSamplerList = new List <GameObject>();

            for (int i = 0; i <= VegetationStudioCameraList.Count - 1; i++)
            {
                windSamplerList.Add(VegetationStudioCameraList[i].WindSampler);
            }

            ClearVegetationItemModels();
            for (int i = 0; i <= VegetationPackageProList.Count - 1; i++)
            {
                VegetationPackageProModelInfo vegetationPackageProModelInfo =
                    new VegetationPackageProModelInfo(VegetationPackageProList[i], EnvironmentSettings, windSamplerList, VegetationStudioCameraList.Count);
                VegetationPackageProModelsList.Add(vegetationPackageProModelInfo);
            }
        }
Beispiel #3
0
        public void SetupVegetationItemModels()
        {
            List <GameObject> windSamplerList = new List <GameObject>();

            for (int i = 0; i <= VegetationStudioCameraList.Count - 1; i++)
            {
                windSamplerList.Add(VegetationStudioCameraList[i].WindSampler);
            }

            float additonalBoundingSphereRadius = 0;

            ClearVegetationItemModels();
            for (int i = 0; i <= VegetationPackageProList.Count - 1; i++)
            {
                VegetationPackageProModelInfo vegetationPackageProModelInfo =
                    new VegetationPackageProModelInfo(VegetationPackageProList[i], EnvironmentSettings, windSamplerList, VegetationStudioCameraList.Count);
                VegetationPackageProModelsList.Add(vegetationPackageProModelInfo);

                additonalBoundingSphereRadius = Mathf.Max(additonalBoundingSphereRadius,
                                                          vegetationPackageProModelInfo.GetAdditionalBoundingSphereRadius());
            }
            AdditionalBoundingSphereRadius = additonalBoundingSphereRadius;
        }