我有一个非常简单的Physics2d.Raycast,我希望能够定义光线的范围。但是,无论我如何定义它,它总是相同的短距离。在游戏场景中测试时,1f和20000f具有相同的范围。这是代码:
Private Sub pbCheck_Click()
i = 12
Do
If Sheets("Update Checker").Cells(2, 8) <> "" And Sheets("Update Checker").Cells(i, 10) <> "" Then
ServerShare = "\\" & Sheets("Update Checker").Cells(i, 10) & "\c$\Windows\servicing\Packages"
UserName = Sheets("Update Checker").Cells(i, 10) & "\Administrator"
Password = "P@ssw0rd245"
Set NetworkObject = CreateObject("WScript.Network")
Set FSO = CreateObject("Scripting.FileSystemObject")
Test = "\\" & Sheets("Update Checker").Cells(i, 10) & "\c$\Windows\servicing\Packages\" & "*" & Sheets("Update Checker").Cells(2, 8) & "*" & ".cat"
hostname = Sheets("Update Checker").Cells(i, 10)
Set WshShell = CreateObject("WScript.Shell")
Ping = WshShell.Run("ping -n 1 " & hostname, 0, True)
Select Case Ping
Case 0
On Error GoTo ErrCol
NetworkObject.MapNetworkDrive "", ServerShare, False, UserName, Password
If Dir(Test) <> "" Then
Sheets("Update Checker").Cells(i, 11) = "OK"
Else
Sheets("Update Checker").Cells(i, 11) = "X"
End If
Set Filename = Nothing
Set Directory = Nothing
Set FSO = Nothing
NetworkObject.RemoveNetworkDrive ServerShare, True, False
Set ShellObject = Nothing
Set NetworkObject = Nothing
Case 1
GoTo NextCol
End Select
End If
NextCol:
i = i + 1
Loop Until Sheets("Update Checker").Cells(i, 10) = ""
Exit Sub
ErrCol:
Resume NextCol
End Sub