This repository was archived by the owner on May 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-14
lines changed Expand file tree Collapse file tree 2 files changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ namespace UnityExplorer
16
16
public class ExplorerCore
17
17
{
18
18
public const string NAME = "UnityExplorer" ;
19
- public const string VERSION = "3.0.6 " ;
19
+ public const string VERSION = "3.0.8 " ;
20
20
public const string AUTHOR = "Sinai" ;
21
21
public const string GUID = "com.sinai.unityexplorer" ;
22
22
public const string EXPLORER_FOLDER = @"Mods\UnityExplorer" ;
Original file line number Diff line number Diff line change @@ -109,21 +109,12 @@ internal static void OnHitGameObject(GameObject obj)
109
109
internal static void RaycastWorld ( Vector2 mousePos )
110
110
{
111
111
var ray = UnityHelpers . MainCamera . ScreenPointToRay ( mousePos ) ;
112
- var casts = Physics . RaycastAll ( ray , 1000f ) ;
112
+ Physics . Raycast ( ray , out RaycastHit hit , 1000f ) ;
113
113
114
- if ( casts . Length > 0 )
114
+ if ( hit . transform )
115
115
{
116
- foreach ( var cast in casts )
117
- {
118
- if ( cast . transform )
119
- {
120
- var obj = cast . transform . gameObject ;
121
-
122
- OnHitGameObject ( obj ) ;
123
-
124
- break ;
125
- }
126
- }
116
+ var obj = hit . transform . gameObject ;
117
+ OnHitGameObject ( obj ) ;
127
118
}
128
119
else
129
120
{
You can’t perform that action at this time.
0 commit comments