Table of Contents

Field viewDistance

Namespace
GrindFest
Assembly
GrindFest.dll

How far around this object the world should be loaded, in metres. The one number this grid takes.

[NonSerialized]
public float viewDistance

Returns

float
How far around this object the world should be loaded, in metres. The one number this grid takes.

Remarks

Whoever drives the grid sets this, and nothing inside this component second-guesses it:

  • PlayerInput maps the zoom onto it (15 m closest, 106 m farthest - both measured as the half- extent of the camera's ground footprint),
  • a remote party asks for a third of a tile, because the local player's zoom says nothing about how much world a hero standing somewhere else needs (see AsynchronousMultiplayerManager),
  • a DevTest run gets a fixed 5 m, because the tests work within a few metres of the hero.

NOT serialized: a serialized copy in the scene silently beat the code once - the grid went on loading 49 markers and 50 tiles for a camera that cannot see past 168 m, and correcting the default here changed nothing. Whatever the value is, it is the caller's, not the scene's.