Skip to content

Commit 71f3f07

Browse files
PhysicsSamples Update
1 parent f904357 commit 71f3f07

78 files changed

Lines changed: 773 additions & 108 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

UnityPhysicsSamples/Assets/Common/InputActions.cs

Lines changed: 55 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1-
#if UNITY_INPUT_SYSTEM_EXISTS
2-
// GENERATED AUTOMATICALLY FROM 'Assets/Common/InputActions.inputactions'
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
4+
// version 1.3.0
5+
// from Assets/Common/InputActions.inputactions
6+
//
7+
// Changes to this file may cause incorrect behavior and will be lost if
8+
// the code is regenerated.
9+
// </auto-generated>
10+
//------------------------------------------------------------------------------
311

412
using System;
513
using System.Collections;
614
using System.Collections.Generic;
715
using UnityEngine.InputSystem;
816
using UnityEngine.InputSystem.Utilities;
917

10-
public class @InputActions: IInputActionCollection, IDisposable
18+
public partial class @InputActions : IInputActionCollection2, IDisposable
1119
{
1220
public InputActionAsset asset { get; }
1321
public @InputActions()
@@ -25,31 +33,35 @@ public @InputActions()
2533
""id"": ""351f2ccd-1f9f-44bf-9bec-d62ac5c5f408"",
2634
""expectedControlType"": ""Vector2"",
2735
""processors"": """",
28-
""interactions"": """"
36+
""interactions"": """",
37+
""initialStateCheck"": true
2938
},
3039
{
3140
""name"": ""Look"",
3241
""type"": ""Value"",
3342
""id"": ""6b444451-8a00-4d00-a97e-f47457f736a8"",
3443
""expectedControlType"": ""Vector2"",
3544
""processors"": """",
36-
""interactions"": """"
45+
""interactions"": """",
46+
""initialStateCheck"": true
3747
},
3848
{
3949
""name"": ""Fire"",
4050
""type"": ""Value"",
4151
""id"": ""6c2ab1b8-8984-453a-af3d-a3c78ae1679a"",
4252
""expectedControlType"": ""Button"",
4353
""processors"": """",
44-
""interactions"": """"
54+
""interactions"": """",
55+
""initialStateCheck"": true
4556
},
4657
{
4758
""name"": ""Jump"",
4859
""type"": ""Value"",
4960
""id"": ""69752feb-cc7c-4543-91d2-0ace8d69c4d5"",
5061
""expectedControlType"": """",
5162
""processors"": """",
52-
""interactions"": """"
63+
""interactions"": """",
64+
""initialStateCheck"": true
5365
}
5466
],
5567
""bindings"": [
@@ -219,63 +231,71 @@ public @InputActions()
219231
""id"": ""c95b2375-e6d9-4b88-9c4c-c5e76515df4b"",
220232
""expectedControlType"": ""Vector2"",
221233
""processors"": """",
222-
""interactions"": """"
234+
""interactions"": """",
235+
""initialStateCheck"": true
223236
},
224237
{
225238
""name"": ""Submit"",
226239
""type"": ""Value"",
227240
""id"": ""7607c7b6-cd76-4816-beef-bd0341cfe950"",
228241
""expectedControlType"": ""Button"",
229242
""processors"": """",
230-
""interactions"": """"
243+
""interactions"": """",
244+
""initialStateCheck"": true
231245
},
232246
{
233247
""name"": ""Cancel"",
234248
""type"": ""Value"",
235249
""id"": ""15cef263-9014-4fd5-94d9-4e4a6234a6ef"",
236250
""expectedControlType"": ""Button"",
237251
""processors"": """",
238-
""interactions"": """"
252+
""interactions"": """",
253+
""initialStateCheck"": true
239254
},
240255
{
241256
""name"": ""Point"",
242257
""type"": ""PassThrough"",
243258
""id"": ""32b35790-4ed0-4e9a-aa41-69ac6d629449"",
244259
""expectedControlType"": ""Vector2"",
245260
""processors"": """",
246-
""interactions"": """"
261+
""interactions"": """",
262+
""initialStateCheck"": false
247263
},
248264
{
249265
""name"": ""Click"",
250266
""type"": ""PassThrough"",
251267
""id"": ""3c7022bf-7922-4f7c-a998-c437916075ad"",
252268
""expectedControlType"": """",
253269
""processors"": """",
254-
""interactions"": """"
270+
""interactions"": """",
271+
""initialStateCheck"": false
255272
},
256273
{
257274
""name"": ""ScrollWheel"",
258275
""type"": ""PassThrough"",
259276
""id"": ""0489e84a-4833-4c40-bfae-cea84b696689"",
260277
""expectedControlType"": """",
261278
""processors"": """",
262-
""interactions"": """"
279+
""interactions"": """",
280+
""initialStateCheck"": false
263281
},
264282
{
265283
""name"": ""MiddleClick"",
266284
""type"": ""PassThrough"",
267285
""id"": ""dad70c86-b58c-4b17-88ad-f5e53adf419e"",
268286
""expectedControlType"": """",
269287
""processors"": """",
270-
""interactions"": """"
288+
""interactions"": """",
289+
""initialStateCheck"": false
271290
},
272291
{
273292
""name"": ""RightClick"",
274293
""type"": ""PassThrough"",
275294
""id"": ""44b200b1-1557-4083-816c-b22cbdf77ddf"",
276295
""expectedControlType"": """",
277296
""processors"": """",
278-
""interactions"": """"
297+
""interactions"": """",
298+
""initialStateCheck"": false
279299
}
280300
],
281301
""bindings"": [
@@ -522,39 +542,44 @@ public @InputActions()
522542
""id"": ""1d611fd2-67a0-4ee2-b7a3-96e070d338c8"",
523543
""expectedControlType"": ""Vector2"",
524544
""processors"": """",
525-
""interactions"": """"
545+
""interactions"": """",
546+
""initialStateCheck"": true
526547
},
527548
{
528549
""name"": ""Throttle"",
529550
""type"": ""Value"",
530551
""id"": ""1f2945fb-7e12-4645-a84b-bd123610202e"",
531552
""expectedControlType"": ""Axis"",
532553
""processors"": """",
533-
""interactions"": """"
554+
""interactions"": """",
555+
""initialStateCheck"": true
534556
},
535557
{
536558
""name"": ""Previous"",
537559
""type"": ""Value"",
538560
""id"": ""bec1b536-c041-4325-8ff1-34380f345179"",
539561
""expectedControlType"": """",
540562
""processors"": """",
541-
""interactions"": """"
563+
""interactions"": """",
564+
""initialStateCheck"": true
542565
},
543566
{
544567
""name"": ""Next"",
545568
""type"": ""Value"",
546569
""id"": ""4f50fbd5-6011-4b9c-9146-3be1bd7a7cd9"",
547570
""expectedControlType"": """",
548571
""processors"": """",
549-
""interactions"": """"
572+
""interactions"": """",
573+
""initialStateCheck"": true
550574
},
551575
{
552576
""name"": ""Look"",
553577
""type"": ""Value"",
554578
""id"": ""ceff8213-609d-4166-a10b-77644780add8"",
555579
""expectedControlType"": ""Vector2"",
556580
""processors"": """",
557-
""interactions"": """"
581+
""interactions"": """",
582+
""initialStateCheck"": true
558583
}
559584
],
560585
""bindings"": [
@@ -857,6 +882,16 @@ public void Disable()
857882
{
858883
asset.Disable();
859884
}
885+
public IEnumerable<InputBinding> bindings => asset.bindings;
886+
887+
public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false)
888+
{
889+
return asset.FindAction(actionNameOrId, throwIfNotFound);
890+
}
891+
public int FindBinding(InputBinding bindingMask, out InputAction action)
892+
{
893+
return asset.FindBinding(bindingMask, out action);
894+
}
860895

861896
// CharacterController
862897
private readonly InputActionMap m_CharacterController;
@@ -1113,4 +1148,3 @@ public interface IVehicleActions
11131148
void OnLook(InputAction.CallbackContext context);
11141149
}
11151150
}
1116-
#endif

UnityPhysicsSamples/Assets/Common/Scripts/CameraSmoothTrack.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ struct CameraSmoothTrackSettings : IComponentData
5252
}
5353

5454
[UpdateAfter(typeof(TransformSystemGroup))]
55-
class SmoothlyTrackCameraTarget : SystemBase
55+
partial class SmoothlyTrackCameraTarget : SystemBase
5656
{
5757
struct Initialized : ISystemStateComponentData {}
5858

UnityPhysicsSamples/Assets/Common/Scripts/DemoInputGatheringSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
[AlwaysUpdateSystem]
1010
[UpdateInGroup(typeof(InitializationSystemGroup))]
11-
class DemoInputGatheringSystem : SystemBase
11+
partial class DemoInputGatheringSystem : SystemBase
1212
#if UNITY_INPUT_SYSTEM_EXISTS
1313
,
1414
InputActions.ICharacterControllerActions,

UnityPhysicsSamples/Assets/Common/Scripts/EntityTracker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
public class EntityTracker : MonoBehaviour {}
1010

1111
[UpdateInGroup(typeof(TransformSystemGroup))]
12-
[UpdateAfter(typeof(EndFrameLocalToParentSystem))]
13-
class SynchronizeGameObjectTransformsWithEntities : SystemBase
12+
[UpdateAfter(typeof(LocalToParentSystem))]
13+
partial class SynchronizeGameObjectTransformsWithEntities : SystemBase
1414
{
1515
EntityQuery m_Query;
1616

UnityPhysicsSamples/Assets/Common/Scripts/InitializeSamples.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This class sets the upper limit of FPS of a demo that is being run.
55
// It is used as a workaround for JobTempAlloc issues on CI and to make
66
// measuring performance easier.
7-
public class InitializeSamplesSystem : SystemBase
7+
public partial class InitializeSamplesSystem : SystemBase
88
{
99
protected override void OnCreate()
1010
{

UnityPhysicsSamples/Assets/Common/Scripts/LifeTimeAuthoring.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public void Convert(Entity entity, EntityManager dstManager, GameObjectConversio
1919

2020
[UpdateInGroup(typeof(FixedStepSimulationSystemGroup))]
2121
[UpdateBefore(typeof(BuildPhysicsWorld))]
22-
public class LifeTimeSystem : SystemBase
22+
public partial class LifeTimeSystem : SystemBase
2323
{
2424
protected override void OnUpdate()
2525
{

UnityPhysicsSamples/Assets/Common/Scripts/MousePick/MousePickBehaviour.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void IConvertGameObjectToEntity.Convert(Entity entity, EntityManager dstManager,
8484

8585
// Attaches a virtual spring to the picked entity
8686
[UpdateInGroup(typeof(SimulationSystemGroup))]
87-
public class MousePickSystem : SystemBase
87+
public partial class MousePickSystem : SystemBase
8888
{
8989
const float k_MaxDistance = 100.0f;
9090

@@ -219,7 +219,7 @@ protected override void OnUpdate()
219219
// Applies any mouse spring as a change in velocity on the entity's motion component
220220
[UpdateInGroup(typeof(FixedStepSimulationSystemGroup))]
221221
[UpdateBefore(typeof(BuildPhysicsWorld))]
222-
public class MouseSpringSystem : SystemBase
222+
public partial class MouseSpringSystem : SystemBase
223223
{
224224
EntityQuery m_MouseGroup;
225225
MousePickSystem m_PickSystem;

UnityPhysicsSamples/Assets/Common/Scripts/RandomMotionAuthoring.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void Convert(Entity entity, EntityManager dstManager, GameObjectConversio
4040

4141
[UpdateInGroup(typeof(FixedStepSimulationSystemGroup))]
4242
[UpdateBefore(typeof(BuildPhysicsWorld))]
43-
public class RandomMotionSystem : SystemBase
43+
public partial class RandomMotionSystem : SystemBase
4444
{
4545
private BuildPhysicsWorld m_BuildPhysicsWorld;
4646

UnityPhysicsSamples/Assets/Common/Scripts/RayTracer/RayTracerSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Unity.Physics.Extensions
1111
{
1212
[UpdateInGroup(typeof(FixedStepSimulationSystemGroup))]
1313
[UpdateAfter(typeof(BuildPhysicsWorld))]
14-
public class RayTracerSystem : SystemBase
14+
public partial class RayTracerSystem : SystemBase
1515
{
1616
BuildPhysicsWorld m_BuildPhysicsWorldSystem;
1717
JobHandle m_OutputDependency;

UnityPhysicsSamples/Assets/Common/Scripts/SceneCreationSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public virtual void Convert(Entity entity, EntityManager dstManager, GameObjectC
4141
}
4242

4343
[UpdateInGroup(typeof(InitializationSystemGroup))]
44-
public abstract class SceneCreationSystem<T> : SystemBase
44+
public abstract partial class SceneCreationSystem<T> : SystemBase
4545
where T : SceneCreationSettings
4646
{
4747
private EntityQuery m_ScenesToCreateQuery;

0 commit comments

Comments
 (0)