forked from Unity-Technologies/UnityCsReference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQueryCommand.deprecated.cs
More file actions
127 lines (119 loc) · 6.26 KB
/
Copy pathQueryCommand.deprecated.cs
File metadata and controls
127 lines (119 loc) · 6.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using System;
namespace UnityEngine
{
public partial struct RaycastCommand
{
[Obsolete("This struct signature is no longer supported. Use struct with a QueryParameters instead", false)]
public RaycastCommand(Vector3 from, Vector3 direction, float distance = float.MaxValue, int layerMask = Physics.DefaultRaycastLayers, int maxHits = 1)
{
this.from = from;
this.direction = direction;
this.physicsScene = Physics.defaultPhysicsScene;
this.queryParameters = QueryParameters.Default;
this.distance = distance;
this.layerMask = layerMask;
}
[Obsolete("This struct signature is no longer supported. Use struct with a QueryParameters instead", false)]
public RaycastCommand(PhysicsScene physicsScene, Vector3 from, Vector3 direction, float distance = float.MaxValue, int layerMask = Physics.DefaultRaycastLayers, int maxHits = 1)
{
this.from = from;
this.direction = direction;
this.physicsScene = physicsScene;
this.queryParameters = QueryParameters.Default;
this.distance = distance;
this.layerMask = layerMask;
}
[Obsolete("maxHits property was moved to be a part of RaycastCommand.ScheduleBatch.", false)]
public int maxHits { get { return 1; } set {} }
[Obsolete("Layer Mask is now a part of QueryParameters struct", false)]
public int layerMask { get { return queryParameters.layerMask; } set { queryParameters.layerMask = value; }}
}
public partial struct SpherecastCommand
{
[Obsolete("This struct signature is no longer supported. Use struct with a QueryParameters instead", false)]
public SpherecastCommand(Vector3 origin, float radius, Vector3 direction, float distance = float.MaxValue, int layerMask = Physics.DefaultRaycastLayers)
{
this.origin = origin;
this.direction = direction;
this.radius = radius;
this.distance = distance;
this.physicsScene = Physics.defaultPhysicsScene;
this.queryParameters = QueryParameters.Default;
this.layerMask = layerMask;
}
[Obsolete("This struct signature is no longer supported. Use struct with a QueryParameters instead", false)]
public SpherecastCommand(PhysicsScene physicsScene, Vector3 origin, float radius, Vector3 direction, float distance = float.MaxValue, int layerMask = Physics.DefaultRaycastLayers)
{
this.origin = origin;
this.direction = direction;
this.radius = radius;
this.distance = distance;
this.physicsScene = physicsScene;
this.queryParameters = QueryParameters.Default;
this.layerMask = layerMask;
}
[Obsolete("Layer Mask is now a part of QueryParameters struct", false)]
public int layerMask { get { return queryParameters.layerMask; } set { queryParameters.layerMask = value; }}
}
public partial struct CapsulecastCommand
{
[Obsolete("This struct signature is no longer supported. Use struct with a QueryParameters instead", false)]
public CapsulecastCommand(Vector3 p1, Vector3 p2, float radius, Vector3 direction, float distance = float.MaxValue, int layerMask = Physics.DefaultRaycastLayers)
{
this.point1 = p1;
this.point2 = p2;
this.direction = direction;
this.radius = radius;
this.distance = distance;
this.physicsScene = Physics.defaultPhysicsScene;
this.queryParameters = QueryParameters.Default;
this.layerMask = layerMask;
}
[Obsolete("This struct signature is no longer supported. Use struct with a QueryParameters instead", false)]
public CapsulecastCommand(PhysicsScene physicsScene, Vector3 p1, Vector3 p2, float radius, Vector3 direction, float distance = float.MaxValue, int layerMask = Physics.DefaultRaycastLayers)
{
this.point1 = p1;
this.point2 = p2;
this.direction = direction;
this.radius = radius;
this.distance = distance;
this.physicsScene = physicsScene;
this.queryParameters = QueryParameters.Default;
this.layerMask = layerMask;
}
[Obsolete("Layer Mask is now a part of QueryParameters struct", false)]
public int layerMask { get { return queryParameters.layerMask; } set { queryParameters.layerMask = value; }}
}
public partial struct BoxcastCommand
{
[Obsolete("This struct signature is no longer supported. Use struct with a QueryParameters instead", false)]
public BoxcastCommand(Vector3 center, Vector3 halfExtents, Quaternion orientation, Vector3 direction, float distance = float.MaxValue, int layerMask = Physics.DefaultRaycastLayers)
{
this.center = center;
this.halfExtents = halfExtents;
this.orientation = orientation;
this.direction = direction;
this.distance = distance;
this.physicsScene = Physics.defaultPhysicsScene;
this.queryParameters = QueryParameters.Default;
this.layerMask = layerMask;
}
[Obsolete("This struct signature is no longer supported. Use struct with a QueryParameters instead", false)]
public BoxcastCommand(PhysicsScene physicsScene, Vector3 center, Vector3 halfExtents, Quaternion orientation, Vector3 direction, float distance = float.MaxValue, int layerMask = Physics.DefaultRaycastLayers)
{
this.center = center;
this.halfExtents = halfExtents;
this.orientation = orientation;
this.direction = direction;
this.distance = distance;
this.physicsScene = physicsScene;
this.queryParameters = QueryParameters.Default;
this.layerMask = layerMask;
}
[Obsolete("Layer Mask is now a part of QueryParameters struct", false)]
public int layerMask { get { return queryParameters.layerMask; } set { queryParameters.layerMask = value; }}
}
}