Definition
double GetSelectionDistance()
Description
This function returns the maximum distance from the camera that you can select a prefab instance using the SelectPrefabInstances function. You can set the maximum distance for selection through the SetSelectionDistance function.
Return Value
Returns the maximum distance from the camera that you can select a prefab instance using the SelectPrefabInstances function.
Example
selection_distance = 0.0 function Init() SetSelectionDistance(5.5) selection_distance = GetSelectionDistance() message = string.format("\nSelection distance is > %.2f" , selection_distance) PrintConsole(message) end function Update() end
First, we set the maximum distance for selection to 5.5 using the SetSelectionDistance function. Then, using the GetSelectionDistance function, we return the maximum selection value, which in our example is equal to 5.5. Finally, using the PrintConsole function, we display the selection value in the console. Below is the message displayed:
Selection distance is > 5.50
GetSelectionDistance