Version: 2017.2
public static float Infinity ;

Descripción

Una representación de infinito positivo (Lectura solamente).

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Update() { Debug.DrawLine(Vector3.zero, Vector3.forward * 100); if (Physics.Raycast(Vector3.zero, Vector3.forward, Mathf.Infinity)) print("There is something in front of the object!"); } }