// Copyright © 2018 Procedural Worlds Pty Limited. All Rights Reserved.
using UnityEngine;
using System.Collections.Generic;
using static Gaia.GaiaConstants;
using System.Linq;
/*
* Scriptable Object containing the stored terrain metadata for loading terrain scenes plus additional world metadata like terrain tilesize etc.
*/
namespace Gaia
{
[System.Serializable]
public class TerrainSceneStorage : ScriptableObject
{
///
/// Enables / Disables Terrain Loading on a global level.
///
public bool m_terrainLoadingEnabled = true;
///
/// Controls if a warning popup will be shown if terrain loading is disabled but loading a terrain is still attempted.
///
public bool m_showTerrainLoadingDisabledWarning = true;
///
/// Uses the unity addressable system to manage terrain loading during runtime. This can make it easier to update the terrain content of the project after release. Requires the unity addressable package to be installed in the project.
///
public bool m_useAddressables = false;
///
/// Uses the unity addressable system to manage terrain loading during runtime. This can make it easier to update the terrain content of the project after release. Requires the unity addressable package to be installed in the project.
///
public bool m_preloadAddressablesWithImpostors = true;
///
/// Enables a special mode where the terrain loading will only load in collider terrain scenes instead of the regular scenes.
/// These collider scenes can be built with the terrain mesh exporter. This allows to run a scene with collisions only without terrain rendering e.g. for a server application
///
public bool m_colliderOnlyLoading = false;
///
/// The number of terrain tiles on the X axis
///
public int m_terrainTilesX = 1;
///
/// The number of terrain tiles on the Z axis
///
public int m_terrainTilesZ = 1;
///
/// The size of the individual terrain tiles
///
public int m_terrainTilesSize;
///
/// Set to true if the scene uses the floating point fix
///
public bool m_useFloatingPointFix;
///
/// Set to true if the scene has a world map. Used to not unneccessarily look for a world map in the scene.
///
public bool m_hasWorldMap;
///
/// The relative size of the world map in comparison to the actual terrain, e.g. 0.25% of the size of the full terrain.
/// This info is used to calculate things like the relative sea level on the world map.
///
public float m_worldMaprelativeSize = 0.5f;
///
/// The relative size to heightmap pixel ratio between world map and local map
/// This info is used to calculate heightmap relative things between world map and local map, e.g. stamper size
///
public float m_worldMapRelativeHeightmapPixels = 1f;
///
/// The heightmap resolution for the world map preview
///
public int m_worldMapPreviewHeightmapResolution = 2049;
///
/// The Range in unity units for the world map preview
///
public float m_worldMapPreviewRange = 1024;
///
/// The hypothetical terrain height on the world map preview
///
public float m_worldMapPreviewTerrainHeight = 1024;
///
/// Holds all terrain scenes in a multi-terrain scenario with exported terrains.
///
public List m_terrainScenes = new List();
///
/// Toggles if the terrain loader should deactivate the player at runtime
///
public bool m_deactivateRuntimePlayer = false;
///
/// Toggles if the terrain loader should deactivate the lighting at runtime
///
public bool m_deactivateRuntimeLighting = false;
///
/// Toggles if the terrain loader should deactivate the audio at runtime
///
public bool m_deactivateRuntimeAudio = false;
///
/// Toggles if the terrain loader should deactivate the weather at runtime
///
public bool m_deactivateRuntimeWeather = false;
///
/// Toggles if the terrain loader should deactivate the water at runtime
///
public bool m_deactivateRuntimeWater = false;
///
/// Toggles if the terrain loader should deactivate the ScreenShotter at runtime
///
public bool m_deactivateRuntimeScreenShotter = false;
}
}