bruh
This commit is contained in:
1 parent
0d5e6b6dec
commit
c12d653cbc
647 files changed
+194585
-117
No files matched your search
@@ -0,0 +1,22 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using KinematicCharacterController;
|
||||
|
||||
public class PauseStateHandler
|
||||
{
|
||||
[RuntimeInitializeOnLoadMethod()]
|
||||
public static void Init()
|
||||
{
|
||||
EditorApplication.pauseStateChanged += HandlePauseStateChange;
|
||||
}
|
||||
|
||||
private static void HandlePauseStateChange(PauseState state)
|
||||
{
|
||||
foreach(KinematicCharacterMotor motor in KinematicCharacterSystem.CharacterMotors)
|
||||
{
|
||||
motor.SetPositionAndRotation(motor.Transform.position, motor.Transform.rotation, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23fa5eb46266f154aa2d50e3538b4eca
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 99131
|
||||
packageName: Kinematic Character Controller
|
||||
packageVersion: 3.4.4
|
||||
assetPath: Assets/KinematicCharacterController/Examples/Scripts/Editor/PauseStateHandler.cs
|
||||
uploadId: 505601
|
||||
Reference in new issue
Block a user