Function AstarPath.CalculateThreadCount

CalculateThreadCount (ThreadCount count)

Calculates number of threads to use.

Public Static
int CalculateThreadCount (

ThreadCount

count

)

Calculates number of threads to use.

If count is not Automatic, simply returns count casted to an int.

Return

An int specifying how many threads to use, 0 means a coroutine should be used for pathfinding instead of a separate thread.

If count is set to Automatic it will return a value based on the number of processors and memory for the current system. If memory is <= 512MB or logical cores are <= 1, it will return 0. If memory is <= 1024 it will clamp threads to max 2. Otherwise it will return the number of logical cores clamped to 6.

When running on WebGL this method always returns 0