Beispiel #1
0
        void PrepareScene(Transform locationRoot, Dictionary <string, string> savedStandardMeshes, Dictionary <string, string> savedObjectMeshes)
        {
            for (int i = 0; i < locationRoot.childCount; i++)
            {
                Transform             loc           = locationRoot.GetChild(i);
                WG_LocationController locController = loc.GetComponent <WG_LocationController>();
                if (locController != null)
                {
                    locController.PrepareLocation("Assets" + assetMeshPath,
                                                  "Assets" + assetMaterialPath,
                                                  "Assets" + assetTexturePath,
                                                  "Assets" + assetMinimapPath,
                                                  lightMapShader,
                                                  minimapSize, minimapCamera, minimapCameraHeight, exportLightmapHDR,
                                                  savedStandardMeshes, savedObjectMeshes);
                }
            }

            //prepare navmesh
            WG_TerrainBuilder builderComponent = builder.gameObject.GetComponent <WG_TerrainBuilder>();
            NavMeshData       data             = builderComponent.GetNavmeshData();

            if (data != null)
            {
                SaveNavmeshAsset(data);
                localNavMesh = data;
            }
        }
        void PrepareScene(Transform locationRoot, Dictionary <string, string> savedStandardMeshes, Dictionary <string, string> savedObjectMeshes)
        {
            for (int i = 0; i < locationRoot.childCount; i++)
            {
                Transform             loc           = locationRoot.GetChild(i);
                WG_LocationController locController = loc.GetComponent <WG_LocationController>();
                if (locController != null)
                {
                    locController.PrepareLocation("Assets" + assetMeshPath,
                                                  "Assets" + assetMaterialPath,
                                                  "Assets" + assetTexturePath,
                                                  "Assets" + assetMinimapPath,
                                                  lwrpShader, stdShaders, lmMode,
                                                  minimapSize, minimapCamera, minimapCameraHeight, exportLightmapHDR, ldrAmbientCompensation, ldrLightmapMultiplier,
                                                  savedStandardMeshes, savedObjectMeshes);
                }
            }

            PrepareNavmesh();
        }