public static void SetUpBrowserInput(Browser browser, MeshCollider mesh) { FPSCursorRenderer instance = Instance; Transform transform = instance.pointer; if (!transform) { transform = Camera.main.transform; } FPSBrowserUI fPSBrowserUI = FPSBrowserUI.Create(mesh, transform, instance); fPSBrowserUI.maxDistance = instance.maxDistance; browser.UIHandler = fPSBrowserUI; }
public static void SetUpBrowserInput(Browser browser, MeshCollider mesh) { var crossHair = Instance; var pointer = crossHair.pointer; if (!pointer) { pointer = Camera.main.transform; //nb: don't use crossHair.pointer ?? camera, will incorrectly return null } var fpsUI = FPSBrowserUI.Create(mesh, pointer, crossHair); fpsUI.maxDistance = crossHair.maxDistance; browser.UIHandler = fpsUI; }