Skip to main content

StreamingSettings

A class in Root.Township, Alta.Caves.

Cave settings for chunk loading distances, the cave layer prefabs, and the A* graph used for cave pathfinding. Get it with CaveSettings<StreamingSettings>.Instance.

Constructors​

MemberWhat it is
StreamingSettings()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

22 private and internal fields
MemberWhat it is
private float caveConnectionCostCost of connections between cave layers. Nothing reads it in this build.
private NetworkPrefab caveStreamerPrefabDefault network prefab spawned for each cave layer, and always used on a simple server.
private float cellSizeCave A* recast graph cell size.
private float characterRadiusCave A* recast graph agent radius.
private float colliderRasterizeDetailCave A* recast graph collider detail.
private float contourMaxErrorCave A* recast graph contour error.
private float dynamicChunkLoadRadiusNormal client: default load radius for dynamic chunks, scaled by DynamicLoadDistanceMultiplier.
private Vector3 loadBoundsOptimised client: box size around the player that loads chunks.
private LayerMask maskLayers the cave A* recast graph rasterizes.
private float maxEdgeLengthCave A* recast graph maximum edge length.
private float maxSlopeCave A* recast graph maximum walkable slope.
private float minRegionSizeCave A* recast graph minimum region size.
private bool rasterizeCollidersWhether the cave A* graph uses colliders. On by default.
private bool rasterizeMeshesWhether the cave A* graph uses meshes.
private bool rasterizeTerrainWhether the cave A* graph uses terrain.
private StreamingSettings.SpecialLayer[] specialLayersLayers that spawn a different prefab instead of caveStreamerPrefab.
private float staticChunkLoadRadiusNormal client: default load radius for static chunks, scaled by StaticLoadDistanceMultiplier.
private int tileSizeCave A* recast graph tile size.
private Vector3 unloadBoundsOptimised client: box size around the player outside which chunks unload.
private bool useTilesWhether the cave A* recast graph is tiled.
private float walkableClimbCave A* recast graph step height.
private float walkableHeightCave A* recast graph agent height.

Properties​

MemberWhat it is
float CaveConnectionCost { get; }Cost of the connections between cave layers. Not read anywhere else in this build.
NetworkPrefab CaveStreamerPrefab { get; }The cave layer prefab used by default and always on simple servers.
float DynamicChunkLoadRadius { get; }Default dynamic load radius of a location chunk.
float DynamicLoadDistanceMultiplier { get; set; }Multiplies every chunk's dynamic load strength. Set by the dynamic-load-multiplier command.
Vector3 LoadBounds { get; set; }Box size for loading chunks on an optimised client.
StreamingSettings.SpecialLayer[] SpecialLayers { get; }Cave layers that use their own prefab, by layer number.
float StaticChunkLoadRadius { get; }Default static load radius of a location chunk.
float StaticLoadDistanceMultiplier { get; set; }Multiplies every chunk's static load strength. Set by the static-load-multiplier command.
Vector3 UnloadBounds { get; set; }Box size for unloading chunks on an optimised client.

Methods​

MemberWhat it is
RecastGraph GetCavePathfindingGraph()Adds a new recast graph to A* with the cave pathfinding settings and returns it.