void Start() { _instance = this; _oceanBuilder = FindObjectOfType <OceanBuilder>(); _oceanBuilder.GenerateMesh(_baseVertDensity, _lodCount); _collProvider = new CollProviderDispTexs(); if (_cachedCpuOceanQueries) { _collProvider = new CollProviderCache(_collProvider); } if (_viewpoint == null) { if (Camera.main != null) { _viewpoint = Camera.main.transform; } else { Debug.LogError("Please provide the viewpoint transform, or tag the primary camera as MainCamera.", this); } } }
void Start() { _instance = this; _oceanBuilder = FindObjectOfType <OceanBuilder>(); _oceanBuilder.GenerateMesh(_baseVertDensity, _lodCount); _collProvider = new CollProviderDispTexs(); if (_cachedCpuOceanQueries) { _collProvider = new CollProviderCache(_collProvider); } if (_viewpoint == null) { _viewpoint = Camera.main.transform; } }