├── .gitattributes ├── .gitignore ├── Assets ├── Example ├── Example.meta ├── InputObservable.meta └── InputObservable │ ├── InputObservable.asmdef │ ├── InputObservable.asmdef.meta │ ├── Runtime.meta │ ├── Runtime │ ├── Extensions.cs │ ├── Extensions.cs.meta │ ├── GyroInput.cs │ ├── GyroInput.cs.meta │ ├── InputObservable.cs │ ├── InputObservable.cs.meta │ ├── InputObservableBase.cs │ ├── InputObservableBase.cs.meta │ ├── InputObservableContext.cs │ ├── InputObservableContext.cs.meta │ ├── MouseInput.cs │ ├── MouseInput.cs.meta │ ├── Rectangle.cs │ ├── Rectangle.cs.meta │ ├── TouchInput.cs │ └── TouchInput.cs.meta │ ├── Samples~ │ ├── Materials.meta │ ├── Materials │ │ ├── Transparent.mat │ │ ├── Transparent.mat.meta │ │ ├── Unlint.mat │ │ ├── Unlint.mat.meta │ │ ├── blue.mat │ │ ├── blue.mat.meta │ │ ├── green.mat │ │ ├── green.mat.meta │ │ ├── red.mat │ │ └── red.mat.meta │ ├── Prefabs.meta │ ├── Prefabs │ │ ├── DragCube.prefab │ │ ├── DragCube.prefab.meta │ │ ├── DrawTarget.prefab │ │ ├── DrawTarget.prefab.meta │ │ ├── Object.prefab │ │ ├── Object.prefab.meta │ │ ├── Point.prefab │ │ └── Point.prefab.meta │ ├── Scenes.meta │ ├── Scenes │ │ ├── DoubleSequenceTest.unity │ │ ├── DoubleSequenceTest.unity.meta │ │ ├── GyroTest.unity │ │ ├── GyroTest.unity.meta │ │ ├── InputObservableTest.unity │ │ ├── InputObservableTest.unity.meta │ │ ├── MouseSpecificTest.unity │ │ ├── MouseSpecificTest.unity.meta │ │ ├── ObjectViewer.unity │ │ ├── ObjectViewer.unity.meta │ │ ├── ThrottleTest.unity │ │ ├── ThrottleTest.unity.meta │ │ ├── TouchSpecificTest.unity │ │ └── TouchSpecificTest.unity.meta │ ├── Scripts.meta │ └── Scripts │ │ ├── DoubleSequenceTest.cs │ │ ├── DoubleSequenceTest.cs.meta │ │ ├── DragCubeView.cs │ │ ├── DragCubeView.cs.meta │ │ ├── DrawTargetView.cs │ │ ├── DrawTargetView.cs.meta │ │ ├── GyroCameraController.cs │ │ ├── GyroCameraController.cs.meta │ │ ├── MouseSpecificTest.cs │ │ ├── MouseSpecificTest.cs.meta │ │ ├── ObjectViewer.cs │ │ ├── ObjectViewer.cs.meta │ │ ├── PointView.cs │ │ ├── PointView.cs.meta │ │ ├── ShapesTest.cs │ │ ├── ShapesTest.cs.meta │ │ ├── SliderController.cs │ │ ├── SliderController.cs.meta │ │ ├── TestMain.cs │ │ ├── TestMain.cs.meta │ │ ├── ThrottleTest.cs │ │ ├── ThrottleTest.cs.meta │ │ ├── TouchSpecificTest.cs │ │ ├── TouchSpecificTest.cs.meta │ │ ├── UICanvasView.cs │ │ └── UICanvasView.cs.meta │ ├── package.json │ └── package.json.meta ├── LICENSE.md ├── Packages ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset └── XRSettings.asset └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | ## Unity ## 2 | 3 | *.cs diff=csharp text 4 | *.cginc text 5 | *.shader text 6 | 7 | *.mat merge=unityyamlmerge eol=lf 8 | *.anim merge=unityyamlmerge eol=lf 9 | *.unity merge=unityyamlmerge eol=lf 10 | *.prefab merge=unityyamlmerge eol=lf 11 | *.physicsMaterial2D merge=unityyamlmerge eol=lf 12 | *.physicsMaterial merge=unityyamlmerge eol=lf 13 | *.asset merge=unityyamlmerge eol=lf 14 | *.meta merge=unityyamlmerge eol=lf 15 | *.controller merge=unityyamlmerge eol=lf 16 | 17 | 18 | ## git-lfs ## 19 | 20 | #Image 21 | *.jpg filter=lfs diff=lfs merge=lfs -text 22 | *.jpeg filter=lfs diff=lfs merge=lfs -text 23 | *.png filter=lfs diff=lfs merge=lfs -text 24 | *.gif filter=lfs diff=lfs merge=lfs -text 25 | *.psd filter=lfs diff=lfs merge=lfs -text 26 | *.ai filter=lfs diff=lfs merge=lfs -text 27 | 28 | #Audio 29 | *.mp3 filter=lfs diff=lfs merge=lfs -text 30 | *.wav filter=lfs diff=lfs merge=lfs -text 31 | *.ogg filter=lfs diff=lfs merge=lfs -text 32 | 33 | #Video 34 | *.mp4 filter=lfs diff=lfs merge=lfs -text 35 | *.mov filter=lfs diff=lfs merge=lfs -text 36 | 37 | #3D Object 38 | *.FBX filter=lfs diff=lfs merge=lfs -text 39 | *.fbx filter=lfs diff=lfs merge=lfs -text 40 | *.blend filter=lfs diff=lfs merge=lfs -text 41 | *.obj filter=lfs diff=lfs merge=lfs -text 42 | 43 | #ETC 44 | *.a filter=lfs diff=lfs merge=lfs -text 45 | *.exr filter=lfs diff=lfs merge=lfs -text 46 | *.tga filter=lfs diff=lfs merge=lfs -text 47 | *.pdf filter=lfs diff=lfs merge=lfs -text 48 | *.zip filter=lfs diff=lfs merge=lfs -text 49 | *.dll filter=lfs diff=lfs merge=lfs -text 50 | *.unitypackage filter=lfs diff=lfs merge=lfs -text 51 | *.aif filter=lfs diff=lfs merge=lfs -text 52 | *.ttf filter=lfs diff=lfs merge=lfs -text 53 | *.rns filter=lfs diff=lfs merge=lfs -text 54 | *.reason filter=lfs diff=lfs merge=lfs -text 55 | *.lxo filter=lfs diff=lfs merge=lfs -text 56 | 57 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | 12 | # MemoryCaptures can get excessive in size. 13 | # They also could contain extremely sensitive data 14 | /[Mm]emoryCaptures/ 15 | 16 | # Asset meta data should only be ignored when the corresponding asset is also ignored 17 | !/[Aa]ssets/**/*.meta 18 | 19 | # Uncomment this line if you wish to ignore the asset store tools plugin 20 | # /[Aa]ssets/AssetStoreTools* 21 | 22 | # Autogenerated Jetbrains Rider plugin 23 | /[Aa]ssets/Plugins/Editor/JetBrains* 24 | 25 | # Visual Studio cache directory 26 | .vs/ 27 | 28 | # Gradle cache directory 29 | .gradle/ 30 | 31 | # Autogenerated VS/MD/Consulo solution and project files 32 | ExportedObj/ 33 | .consulo/ 34 | *.csproj 35 | *.unityproj 36 | *.sln 37 | *.suo 38 | *.tmp 39 | *.user 40 | *.userprefs 41 | *.pidb 42 | *.booproj 43 | *.svd 44 | *.pdb 45 | *.mdb 46 | *.opendb 47 | *.VC.db 48 | .vscode 49 | 50 | # Unity3D generated meta files 51 | *.pidb.meta 52 | *.pdb.meta 53 | *.mdb.meta 54 | 55 | # Unity3D generated file on crash reports 56 | sysinfo.txt 57 | 58 | # Builds 59 | *.apk 60 | *.unitypackage 61 | 62 | # Crashlytics generated file 63 | crashlytics-build.properties 64 | 65 | Assets/MyAssets* 66 | -------------------------------------------------------------------------------- /Assets/Example: -------------------------------------------------------------------------------- 1 | InputObservable/Samples~ -------------------------------------------------------------------------------- /Assets/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27e23933ea36f4b508d42cb82efd74a1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/InputObservable.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f5e8a84e099744d1b17e85a8d2fa9c3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/InputObservable/InputObservable.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "InputObservable", 3 | "references": [ 4 | "GUID:560b04d1a97f54a4e82edc0cbbb69285" 5 | ], 6 | "includePlatforms": [], 7 | "excludePlatforms": [], 8 | "allowUnsafeCode": false, 9 | "overrideReferences": false, 10 | "precompiledReferences": [], 11 | "autoReferenced": true, 12 | "defineConstraints": [], 13 | "versionDefines": [], 14 | "noEngineReferences": false 15 | } -------------------------------------------------------------------------------- /Assets/InputObservable/InputObservable.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e1e8b35632fca4351b739021eee33dbe 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/InputObservable/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5091c8881a36e499ebb865321510aebb 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/InputObservable/Runtime/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | using UnityEngine.EventSystems; 7 | using UniRx; 8 | 9 | namespace InputObservable 10 | { 11 | public static class IInputObservableMonoBehaviourExtension 12 | { 13 | static InputObservableContext defaultContext = null; 14 | 15 | [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] 16 | static void _initDefaultContext() { defaultContext = null; } 17 | 18 | public static InputObservableContext DefaultInputContext(this MonoBehaviour behaviour, EventSystem eventSystem = null) 19 | { 20 | if (defaultContext != null) 21 | { 22 | throw new InvalidOperationException("already created defaultContext"); 23 | } 24 | #if UNITY_EDITOR || UNITY_WEBGL 25 | defaultContext = new MouseInputContext(behaviour, eventSystem); 26 | #elif UNITY_ANDROID || UNITY_IOS 27 | defaultContext = new TouchInputContext(behaviour, eventSystem); 28 | #endif 29 | return defaultContext; 30 | } 31 | } 32 | 33 | public static class IInputObservableExtension 34 | { 35 | public static IObservable Any(this IInputObservable io) 36 | { 37 | return Observable.Merge(io.OnBegin, io.OnMove, io.OnEnd); 38 | } 39 | 40 | public static IObservable Keep(this IInputObservable io, double interval, Func pred) 41 | { 42 | return io.OnBegin.SelectMany(_ => 43 | Observable.Interval(TimeSpan.FromMilliseconds(interval)) 44 | .TakeUntil(io.OnEnd) 45 | .Where(x => pred()) 46 | .Select(x => Unit.Default)); 47 | } 48 | 49 | public static IObservable MoveThrottle(this IInputObservable io, double interval) 50 | { 51 | return io.OnMove.ThrottleFirst(TimeSpan.FromMilliseconds(interval)); 52 | } 53 | 54 | public static IObservable DoubleSequence(this IInputObservable io, double interval) 55 | { 56 | return io.OnBegin.TimeInterval() 57 | .Buffer(2, 1) 58 | .Where(events => events[0].Interval.TotalMilliseconds > interval && events[1].Interval.TotalMilliseconds <= interval) 59 | .Select(events => events[1].Value); 60 | } 61 | 62 | public static IObservable LongSequence(this IInputObservable io, double interval) 63 | { 64 | return io.OnBegin.SelectMany(e => 65 | Observable.Interval(TimeSpan.FromMilliseconds(interval)) 66 | .First() 67 | .Select(_ => e) 68 | .TakeUntil(io.OnEnd)); 69 | } 70 | 71 | public static IObservable>> TakeLastTimeIntervalBuffer(this IInputObservable io, int count) 72 | { 73 | // return io.Any().TakeUntil(io.End.DelayFrame(1)) 74 | // .TimeInterval() 75 | // .TakeLast(count) 76 | // .Buffer(count) 77 | // .RepeatUntilDestroy(io.Context.gameObject); 78 | return io.OnBegin.SelectMany(e => 79 | Observable.Merge(Observable.Return(e), io.Any().TakeUntil(io.OnEnd.DelayFrame(1))) 80 | .TimeInterval() 81 | .TakeLast(count) 82 | .Buffer(count)); 83 | } 84 | 85 | public static IObservable> TakeLastVerocities(this IInputObservable io, int count) 86 | { 87 | return io.TakeLastTimeIntervalBuffer(count).Select(timeEvents => 88 | { 89 | var verocities = new List(); 90 | var prev = timeEvents.First(); 91 | for (int i = 1; i < timeEvents.Count; i++) 92 | { 93 | var t = timeEvents[i]; 94 | verocities.Add(VerocityInfo.Create(prev, t)); 95 | prev = t; 96 | } 97 | return verocities; 98 | }); 99 | } 100 | 101 | public static IObservable Difference(this IInputObservable io) 102 | { 103 | return io.OnBegin.SelectMany(e => 104 | Observable.Merge(Observable.Return(e), io.Any().TakeUntil(io.OnEnd.DelayFrame(1))) 105 | .Buffer(2, 1)) 106 | .Where(events => events.Count > 1) 107 | .Select(events => 108 | { 109 | return new Vector2 110 | { 111 | x = events[1].position.x - events[0].position.x, 112 | y = events[1].position.y - events[0].position.y 113 | }; 114 | }); 115 | } 116 | 117 | public static IObservable Verocity(this IInputObservable io) 118 | { 119 | return io.OnBegin.SelectMany(e => 120 | Observable.Merge(Observable.Return(e), io.Any().TakeUntil(io.OnEnd.DelayFrame(1))) 121 | .TimeInterval() 122 | .Buffer(2, 1)) 123 | .Where(ts => ts.Count > 1) 124 | .Select(ts => VerocityInfo.Create(ts[0], ts[1])); 125 | } 126 | 127 | public static IObservable> TimeIntervalSequence(this IInputObservable io) 128 | { 129 | return io.OnBegin.SelectMany(e => 130 | Observable.Merge(Observable.Return(e), io.Any().TakeUntil(io.OnEnd.DelayFrame(1))) 131 | .TimeInterval()); 132 | } 133 | 134 | public static Vector3 ToEulerAngle(this Vector2 diff, float horizontal_ratio, float vertical_ratio) 135 | { 136 | return new Vector3() 137 | { 138 | x = -vertical_ratio * diff.y, // axis X 139 | y = horizontal_ratio * diff.x, // axis Y 140 | z = 0 141 | }; 142 | } 143 | } 144 | 145 | public static class IInputListObservableExtension 146 | { 147 | public static IObservable> IgnoreSubtle(this IObservable> events, float delta) 148 | { 149 | return events.Where(list => 150 | { 151 | return list[1].type == InputEventType.End || 152 | (Mathf.Abs(list[0].position.x - list[1].position.x) > delta && 153 | Mathf.Abs(list[0].position.y - list[1].position.y) > delta); 154 | }); 155 | } 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /Assets/InputObservable/Runtime/Extensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a15c6402601f44109b0a1f103bbd8c57 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Runtime/GyroInput.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | using UnityEngine.UI; 6 | using UnityEngine.EventSystems; 7 | using UniRx; 8 | using UniRx.Triggers; 9 | using InputObservable; 10 | 11 | namespace InputObservable 12 | { 13 | public class GyroInputObservable: IGyroInputObservable, IDisposable 14 | { 15 | MonoBehaviour behaviour; 16 | bool initialized; 17 | 18 | #if !UNITY_EDITOR 19 | Vector3 initialRotation; 20 | #endif 21 | Vector3 extraRotation; 22 | Subject rotation = new Subject(); 23 | 24 | public IObservable EulerAngles { get => rotation; } 25 | 26 | private Quaternion GyroToUnity(Quaternion q) 27 | { 28 | q.x *= -1; 29 | q.y *= -1; 30 | return Quaternion.Euler(90, 0, 0) * q; 31 | } 32 | 33 | IEnumerator Start() 34 | { 35 | Input.gyro.enabled = true; 36 | Debug.Log($"updateInterval={Input.gyro.updateInterval}, enabled={Input.gyro.enabled}"); 37 | yield return new WaitForSeconds(Input.gyro.updateInterval); 38 | Reset(); 39 | initialized = true; 40 | } 41 | 42 | void Update() 43 | { 44 | Vector3 current; 45 | 46 | #if !UNITY_EDITOR 47 | current = GyroToUnity(Input.gyro.attitude).eulerAngles - this.initialRotation; 48 | #else 49 | current = Vector3.zero; 50 | #endif 51 | rotation.OnNext(current + this.extraRotation); 52 | } 53 | 54 | public void AddRotate(Vector3 rotate) 55 | { 56 | this.extraRotation += rotate; 57 | } 58 | 59 | public void Reset() 60 | { 61 | #if !UNITY_EDITOR 62 | this.initialRotation = GyroToUnity(Input.gyro.attitude).eulerAngles; 63 | #endif 64 | this.extraRotation = Vector3.zero; 65 | } 66 | 67 | public override string ToString() 68 | { 69 | return $"GyroInput()"; 70 | } 71 | 72 | public GyroInputObservable(MonoBehaviour behaviour) 73 | { 74 | this.behaviour = behaviour; 75 | 76 | behaviour.UpdateAsObservable() 77 | .Where(_ => initialized) 78 | .Subscribe(_ => Update()).AddTo(behaviour); 79 | behaviour.OnDestroyAsObservable() 80 | .Subscribe(_ => Dispose()) 81 | .AddTo(behaviour); 82 | 83 | behaviour.StartCoroutine(Start()); 84 | } 85 | 86 | public void Dispose() 87 | { 88 | rotation.Dispose(); 89 | } 90 | } 91 | } 92 | 93 | -------------------------------------------------------------------------------- /Assets/InputObservable/Runtime/GyroInput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd98bbbd8be254c938f831c2cc1e49b9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Runtime/InputObservable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | using UniRx; 6 | 7 | namespace InputObservable 8 | { 9 | public enum InputEventType 10 | { 11 | Begin = 1, 12 | Move = 2, 13 | End = 4, 14 | } 15 | 16 | public struct InputEvent 17 | { 18 | public long sequenceId; 19 | public long id; 20 | public InputEventType type; 21 | public Vector2 position; 22 | public IInputObservable sender; 23 | public override string ToString() { return $"[{sender}]({sequenceId}.{id},{type},{position})"; } 24 | } 25 | 26 | public interface IInputObservable 27 | { 28 | IObservable OnBegin { get; } 29 | IObservable OnEnd { get; } 30 | IObservable OnMove { get; } 31 | bool IsBegin { get; } 32 | } 33 | 34 | public struct VerocityInfo 35 | { 36 | public InputEvent @event; 37 | public Vector2 vector; 38 | public override string ToString() { return $"<{@event},{vector}>"; } 39 | 40 | public static VerocityInfo Create(TimeInterval prev, TimeInterval next) 41 | { 42 | var elapsed = next.Interval.TotalMilliseconds; 43 | return new VerocityInfo 44 | { 45 | @event = prev.Value, 46 | vector = new Vector2 47 | { 48 | x = (float)((next.Value.position.x - prev.Value.position.x) / elapsed), 49 | y = (float)((next.Value.position.y - prev.Value.position.y) / elapsed), 50 | } 51 | }; 52 | } 53 | } 54 | 55 | public struct MouseWheelEvent 56 | { 57 | public Vector2 position; 58 | public float wheel; 59 | } 60 | 61 | public interface IMouseWheelObservable 62 | { 63 | IObservable Wheel { get; } 64 | } 65 | 66 | public interface IGyroInputObservable 67 | { 68 | IObservable EulerAngles { get; } 69 | void AddRotate(Vector3 rotate); 70 | void Reset(); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Assets/InputObservable/Runtime/InputObservable.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4784ddb998a2e4f0c84e3aed2ad588e3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Runtime/InputObservableBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | using UniRx; 6 | 7 | namespace InputObservable 8 | { 9 | public abstract class InputObservableBase : IInputObservable, IDisposable 10 | { 11 | InputObservableContext context; 12 | protected long sequenceId = 0; 13 | protected long id = 0; 14 | protected bool begin = false; 15 | protected Vector2 beginPos = Vector2.zero; 16 | 17 | protected Subject beginStream = new Subject(); 18 | protected Subject endStream = new Subject(); 19 | protected Subject moveStream = new Subject(); 20 | 21 | public IObservable OnBegin { get => beginStream; } 22 | public IObservable OnEnd { get => endStream; } 23 | public IObservable OnMove { get => moveStream; } 24 | public bool IsBegin { get => begin; } 25 | 26 | public void Dispose() 27 | { 28 | beginStream.Dispose(); 29 | endStream.Dispose(); 30 | moveStream.Dispose(); 31 | } 32 | 33 | public InputObservableBase(InputObservableContext context) 34 | { 35 | this.context = context; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Assets/InputObservable/Runtime/InputObservableBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8375c229b78654c52919c9adc31ea1d3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Runtime/InputObservableContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | using UnityEngine.EventSystems; 6 | using UniRx; 7 | using UniRx.Triggers; 8 | 9 | namespace InputObservable 10 | { 11 | public abstract class InputObservableContext : IDisposable 12 | { 13 | MonoBehaviour behaviour; 14 | protected EventSystem eventSystem; 15 | 16 | public GameObject gameObject { get => behaviour.gameObject; } 17 | protected abstract void Update(); 18 | 19 | public abstract void Dispose(); 20 | public abstract IInputObservable GetObservable(int id); 21 | 22 | public InputObservableContext(MonoBehaviour behaviour, EventSystem eventSystem) 23 | { 24 | this.behaviour = behaviour; 25 | this.eventSystem = eventSystem; 26 | 27 | behaviour.UpdateAsObservable() 28 | .Subscribe(_ => Update()) 29 | .AddTo(behaviour); 30 | behaviour.OnDestroyAsObservable() 31 | .Subscribe(_ => Dispose()) 32 | .AddTo(behaviour); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Assets/InputObservable/Runtime/InputObservableContext.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e39e5128cbb184bc29e602f857c3276d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Runtime/MouseInput.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | using UnityEngine.EventSystems; 6 | using UniRx; 7 | 8 | namespace InputObservable 9 | { 10 | public class MouseInputContext : InputObservableContext, IMouseWheelObservable 11 | { 12 | MouseInputObservable[] observables = new MouseInputObservable[3]; 13 | 14 | public IObservable Wheel { get => wheelSubject; } 15 | Subject wheelSubject = new Subject(); 16 | 17 | protected override void Update() 18 | { 19 | foreach (var o in observables) 20 | { 21 | if (o != null) 22 | { 23 | o.Update(eventSystem); 24 | } 25 | } 26 | 27 | var wheel = Input.GetAxis("Mouse ScrollWheel"); 28 | if (wheel < 0 || 0 < wheel) 29 | { 30 | wheelSubject.OnNext(new MouseWheelEvent() 31 | { 32 | position = Input.mousePosition, 33 | wheel = wheel 34 | }); 35 | } 36 | } 37 | 38 | public override IInputObservable GetObservable(int id) 39 | { 40 | if (observables[id] == null) 41 | { 42 | observables[id] = new MouseInputObservable(this, id); 43 | } 44 | return observables[id]; 45 | } 46 | 47 | public override void Dispose() 48 | { 49 | for (int i = 0; i < observables.Length; i++) 50 | { 51 | if (observables[i] != null) 52 | { 53 | observables[i].Dispose(); 54 | observables[i] = null; 55 | } 56 | } 57 | } 58 | 59 | public MouseInputContext(MonoBehaviour behaviour, EventSystem eventSystem) : 60 | base(behaviour, eventSystem) 61 | { } 62 | } 63 | 64 | class MouseInputObservable : InputObservableBase 65 | { 66 | int buttonId; 67 | 68 | internal void Update(EventSystem eventSystem) 69 | { 70 | if (Input.GetMouseButtonDown(buttonId)) 71 | { 72 | if (eventSystem!=null && eventSystem.IsPointerOverGameObject()) 73 | { 74 | return; 75 | } 76 | beginPos = Input.mousePosition; 77 | if (beginPos.x < 0 || beginPos.y < 0 || beginPos.x >= Screen.width || beginPos.y >= Screen.height) 78 | { 79 | return; 80 | } 81 | begin = true; 82 | var e = new InputEvent() 83 | { 84 | sequenceId = this.sequenceId, 85 | id = this.id, 86 | type = InputEventType.Begin, 87 | position = Input.mousePosition, 88 | sender = this 89 | }; 90 | this.id++; 91 | beginStream.OnNext(e); 92 | } 93 | else if (Input.GetMouseButtonUp(buttonId)) 94 | { 95 | if (!begin) 96 | { 97 | return; 98 | } 99 | begin = false; 100 | var e = new InputEvent() 101 | { 102 | sequenceId = this.sequenceId, 103 | id = this.id, 104 | type = InputEventType.End, 105 | position = Input.mousePosition, 106 | sender = this 107 | }; 108 | this.id = 0; 109 | endStream.OnNext(e); 110 | this.sequenceId++; 111 | } 112 | else 113 | { 114 | if (begin && beginPos != (Vector2)Input.mousePosition) 115 | { 116 | beginPos = Input.mousePosition; 117 | var e = new InputEvent() 118 | { 119 | sequenceId = this.sequenceId, 120 | id = this.id, 121 | type = InputEventType.Move, 122 | position = Input.mousePosition, 123 | sender = this 124 | }; 125 | this.id++; 126 | moveStream.OnNext(e); 127 | } 128 | } 129 | } 130 | 131 | public override string ToString() 132 | { 133 | return $"MouseInput(buttonId={this.buttonId})"; 134 | } 135 | 136 | public MouseInputObservable(InputObservableContext context, int buttonId) : base(context) 137 | { 138 | this.buttonId = buttonId; 139 | } 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /Assets/InputObservable/Runtime/MouseInput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f44b8e6ce58534164bb1b3f52326a558 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Runtime/Rectangle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | using UniRx; 6 | 7 | namespace InputObservable 8 | { 9 | public static class RectangleObservable 10 | { 11 | // Rect Stream which completes when either one of io1 and io2 12 | // Client have to Repeat() for permanent stream. 13 | public static IObservable From(IInputObservable io1, IInputObservable io2) 14 | { 15 | var end = Observable.Merge(io1.OnEnd, io2.OnEnd); 16 | return Observable.CombineLatest(io1.Any(), io2.Any()) 17 | .TakeUntil(end) 18 | .Select(es => 19 | { 20 | var x = Mathf.Min(es[0].position.x, es[1].position.x); 21 | var y = Mathf.Min(es[0].position.y, es[1].position.y); 22 | return new Rect(x, y, 23 | Mathf.Abs(es[0].position.x - es[1].position.x), 24 | Mathf.Abs(es[0].position.y - es[1].position.y)); 25 | }) 26 | .DistinctUntilChanged(); 27 | } 28 | } 29 | 30 | public static class RectangleObservableExtension 31 | { 32 | public static IObservable PinchSequence(this IObservable ro) 33 | { 34 | return ro.Buffer(2, 1) 35 | .Where(rects => rects.Count > 1) 36 | .Select(rects => 37 | { 38 | var diffh = rects[1].width - rects[0].width; 39 | var diffv = rects[1].height - rects[0].height; 40 | return new Vector2(diffh, diffv); 41 | }); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /Assets/InputObservable/Runtime/Rectangle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9083f9e24990044fbb15147ef1bb6d84 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Runtime/TouchInput.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | using UnityEngine.EventSystems; 6 | using UniRx; 7 | 8 | namespace InputObservable 9 | { 10 | public class TouchInputContext : InputObservableContext 11 | { 12 | Dictionary observables = new Dictionary(); 13 | 14 | protected override void Update() 15 | { 16 | for (int i = 0; i < Input.touchCount; i++) 17 | { 18 | var touch = Input.GetTouch(i); 19 | TouchInputObservable o; 20 | if (observables.TryGetValue(touch.fingerId, out o)) 21 | { 22 | o.Update(touch, eventSystem); 23 | } 24 | } 25 | } 26 | 27 | public override IInputObservable GetObservable(int id) 28 | { 29 | if (!observables.ContainsKey(id)) 30 | { 31 | observables[id] = new TouchInputObservable(this, id); 32 | } 33 | return observables[id]; 34 | } 35 | 36 | public override void Dispose() 37 | { 38 | foreach (var o in observables.Values) 39 | { 40 | o.Dispose(); 41 | } 42 | observables.Clear(); 43 | } 44 | 45 | public TouchInputContext(MonoBehaviour behaviour, EventSystem eventSystem) : 46 | base(behaviour, eventSystem) 47 | { } 48 | } 49 | 50 | class TouchInputObservable : InputObservableBase 51 | { 52 | int index; 53 | 54 | internal void Update(Touch touch, EventSystem eventSystem) 55 | { 56 | switch (touch.phase) 57 | { 58 | case TouchPhase.Began: 59 | { 60 | if(begin) { 61 | Debug.LogError("invalid Begin"); 62 | return; 63 | } 64 | if (eventSystem!=null && eventSystem.IsPointerOverGameObject(touch.fingerId)) 65 | { 66 | return; 67 | } 68 | begin = true; 69 | beginPos = touch.position; 70 | var e = new InputEvent() 71 | { 72 | sequenceId = this.sequenceId, 73 | id = this.id, 74 | type = InputEventType.Begin, 75 | position = touch.position, 76 | sender = this 77 | }; 78 | this.id++; 79 | beginStream.OnNext(e); 80 | } 81 | break; 82 | case TouchPhase.Moved: 83 | { 84 | if (!begin) 85 | return; 86 | var e = new InputEvent() 87 | { 88 | sequenceId = this.sequenceId, 89 | id = this.id, 90 | type = InputEventType.Move, 91 | position = touch.position, 92 | sender = this 93 | }; 94 | this.id++; 95 | moveStream.OnNext(e); 96 | } 97 | break; 98 | case TouchPhase.Ended: 99 | { 100 | if (!begin) 101 | return; 102 | begin = false; 103 | var e = new InputEvent() 104 | { 105 | sequenceId = this.sequenceId, 106 | id = this.id, 107 | type = InputEventType.End, 108 | position = touch.position, 109 | sender = this 110 | }; 111 | this.id = 0; 112 | endStream.OnNext(e); 113 | this.sequenceId++; 114 | } 115 | break; 116 | default: 117 | break; 118 | } 119 | } 120 | 121 | public override string ToString() 122 | { 123 | return $"TouchInput(index={this.index})"; 124 | } 125 | 126 | public TouchInputObservable(InputObservableContext context, int index) : base(context) 127 | { 128 | this.index = index; 129 | } 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /Assets/InputObservable/Runtime/TouchInput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8683ccfe923214585b260dca98a04a21 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d36057c2dbc934d198a92f3ed4a3977c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Materials/Transparent.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Transparent 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _ALPHAPREMULTIPLY_ON 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: 3000 17 | stringTagMap: 18 | RenderType: Transparent 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BumpMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _DetailAlbedoMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailMask: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailNormalMap: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _EmissionMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _MainTex: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _MetallicGlossMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _OcclusionMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _ParallaxMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | m_Floats: 60 | - _BumpScale: 1 61 | - _Cutoff: 0.5 62 | - _DetailNormalMapScale: 1 63 | - _DstBlend: 10 64 | - _GlossMapScale: 1 65 | - _Glossiness: 0.5 66 | - _GlossyReflections: 1 67 | - _Metallic: 0 68 | - _Mode: 3 69 | - _OcclusionStrength: 1 70 | - _Parallax: 0.02 71 | - _SmoothnessTextureChannel: 0 72 | - _SpecularHighlights: 1 73 | - _SrcBlend: 1 74 | - _UVSec: 0 75 | - _ZWrite: 0 76 | m_Colors: 77 | - _Color: {r: 0, g: 0, b: 0, a: 0} 78 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 79 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Materials/Transparent.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5589cd72fca04ffea0161e05edb17d2 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Materials/Unlint.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Unlint 11 | m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0.990566, g: 0.58490276, b: 0, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Materials/Unlint.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ee2ed644f261a44288ba6c60d20c77ee 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Materials/blue.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: blue 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0, g: 0, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Materials/blue.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b14134f5684be42718fafb03699cb809 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Materials/green.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: green 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0, g: 1, b: 0, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Materials/green.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b3ed67bb42e94701a77257d92dc7036 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Materials/red.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: red 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 0, b: 0, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Materials/red.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ceda19a64d40641fa8d1d0ea4ff0e83f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab486a77513aa434c8765b0b20454d0d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Prefabs/DragCube.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &7453889594720378472 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 7453889594720378475} 12 | - component: {fileID: 7453889594720378477} 13 | - component: {fileID: 7453889594720378474} 14 | m_Layer: 0 15 | m_Name: Text 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &7453889594720378475 22 | Transform: 23 | m_ObjectHideFlags: 0 24 | m_CorrespondingSourceObject: {fileID: 0} 25 | m_PrefabInstance: {fileID: 0} 26 | m_PrefabAsset: {fileID: 0} 27 | m_GameObject: {fileID: 7453889594720378472} 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0.13, y: 0, z: 0} 30 | m_LocalScale: {x: 0.05, y: 0.05, z: 0.05} 31 | m_Children: [] 32 | m_Father: {fileID: 7453889595902700424} 33 | m_RootOrder: 1 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!23 &7453889594720378477 36 | MeshRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 7453889594720378472} 42 | m_Enabled: 1 43 | m_CastShadows: 1 44 | m_ReceiveShadows: 1 45 | m_DynamicOccludee: 1 46 | m_MotionVectors: 1 47 | m_LightProbeUsage: 1 48 | m_ReflectionProbeUsage: 1 49 | m_RayTracingMode: 2 50 | m_RenderingLayerMask: 1 51 | m_RendererPriority: 0 52 | m_Materials: 53 | - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} 54 | m_StaticBatchInfo: 55 | firstSubMesh: 0 56 | subMeshCount: 0 57 | m_StaticBatchRoot: {fileID: 0} 58 | m_ProbeAnchor: {fileID: 0} 59 | m_LightProbeVolumeOverride: {fileID: 0} 60 | m_ScaleInLightmap: 1 61 | m_ReceiveGI: 1 62 | m_PreserveUVs: 0 63 | m_IgnoreNormalsForChartDetection: 0 64 | m_ImportantGI: 0 65 | m_StitchLightmapSeams: 1 66 | m_SelectedEditorRenderState: 3 67 | m_MinimumChartSize: 4 68 | m_AutoUVMaxDistance: 0.5 69 | m_AutoUVMaxAngle: 89 70 | m_LightmapParameters: {fileID: 0} 71 | m_SortingLayerID: 0 72 | m_SortingLayer: 0 73 | m_SortingOrder: 0 74 | --- !u!102 &7453889594720378474 75 | TextMesh: 76 | serializedVersion: 3 77 | m_ObjectHideFlags: 0 78 | m_CorrespondingSourceObject: {fileID: 0} 79 | m_PrefabInstance: {fileID: 0} 80 | m_PrefabAsset: {fileID: 0} 81 | m_GameObject: {fileID: 7453889594720378472} 82 | m_Text: 83 | m_OffsetZ: 0 84 | m_CharacterSize: 1 85 | m_LineSpacing: 1 86 | m_Anchor: 0 87 | m_Alignment: 0 88 | m_TabSize: 4 89 | m_FontSize: 40 90 | m_FontStyle: 0 91 | m_RichText: 1 92 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 93 | m_Color: 94 | serializedVersion: 2 95 | rgba: 4294967295 96 | --- !u!1 &7453889595176672606 97 | GameObject: 98 | m_ObjectHideFlags: 0 99 | m_CorrespondingSourceObject: {fileID: 0} 100 | m_PrefabInstance: {fileID: 0} 101 | m_PrefabAsset: {fileID: 0} 102 | serializedVersion: 6 103 | m_Component: 104 | - component: {fileID: 7453889595176672578} 105 | - component: {fileID: 7453889595176672579} 106 | - component: {fileID: 7453889595176672576} 107 | - component: {fileID: 7453889595176672577} 108 | m_Layer: 0 109 | m_Name: Cube 110 | m_TagString: Untagged 111 | m_Icon: {fileID: 0} 112 | m_NavMeshLayer: 0 113 | m_StaticEditorFlags: 0 114 | m_IsActive: 1 115 | --- !u!4 &7453889595176672578 116 | Transform: 117 | m_ObjectHideFlags: 0 118 | m_CorrespondingSourceObject: {fileID: 0} 119 | m_PrefabInstance: {fileID: 0} 120 | m_PrefabAsset: {fileID: 0} 121 | m_GameObject: {fileID: 7453889595176672606} 122 | m_LocalRotation: {x: 0.35355338, y: 0.35355338, z: -0.1464466, w: 0.8535535} 123 | m_LocalPosition: {x: 0, y: 0, z: 0} 124 | m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} 125 | m_Children: [] 126 | m_Father: {fileID: 7453889595902700424} 127 | m_RootOrder: 0 128 | m_LocalEulerAnglesHint: {x: 45, y: 45, z: 0} 129 | --- !u!33 &7453889595176672579 130 | MeshFilter: 131 | m_ObjectHideFlags: 0 132 | m_CorrespondingSourceObject: {fileID: 0} 133 | m_PrefabInstance: {fileID: 0} 134 | m_PrefabAsset: {fileID: 0} 135 | m_GameObject: {fileID: 7453889595176672606} 136 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 137 | --- !u!23 &7453889595176672576 138 | MeshRenderer: 139 | m_ObjectHideFlags: 0 140 | m_CorrespondingSourceObject: {fileID: 0} 141 | m_PrefabInstance: {fileID: 0} 142 | m_PrefabAsset: {fileID: 0} 143 | m_GameObject: {fileID: 7453889595176672606} 144 | m_Enabled: 1 145 | m_CastShadows: 0 146 | m_ReceiveShadows: 1 147 | m_DynamicOccludee: 1 148 | m_MotionVectors: 1 149 | m_LightProbeUsage: 1 150 | m_ReflectionProbeUsage: 1 151 | m_RayTracingMode: 2 152 | m_RenderingLayerMask: 1 153 | m_RendererPriority: 0 154 | m_Materials: 155 | - {fileID: 2100000, guid: ee2ed644f261a44288ba6c60d20c77ee, type: 2} 156 | m_StaticBatchInfo: 157 | firstSubMesh: 0 158 | subMeshCount: 0 159 | m_StaticBatchRoot: {fileID: 0} 160 | m_ProbeAnchor: {fileID: 0} 161 | m_LightProbeVolumeOverride: {fileID: 0} 162 | m_ScaleInLightmap: 1 163 | m_ReceiveGI: 1 164 | m_PreserveUVs: 0 165 | m_IgnoreNormalsForChartDetection: 0 166 | m_ImportantGI: 0 167 | m_StitchLightmapSeams: 1 168 | m_SelectedEditorRenderState: 3 169 | m_MinimumChartSize: 4 170 | m_AutoUVMaxDistance: 0.5 171 | m_AutoUVMaxAngle: 89 172 | m_LightmapParameters: {fileID: 0} 173 | m_SortingLayerID: 0 174 | m_SortingLayer: 0 175 | m_SortingOrder: 0 176 | --- !u!65 &7453889595176672577 177 | BoxCollider: 178 | m_ObjectHideFlags: 0 179 | m_CorrespondingSourceObject: {fileID: 0} 180 | m_PrefabInstance: {fileID: 0} 181 | m_PrefabAsset: {fileID: 0} 182 | m_GameObject: {fileID: 7453889595176672606} 183 | m_Material: {fileID: 0} 184 | m_IsTrigger: 0 185 | m_Enabled: 1 186 | serializedVersion: 2 187 | m_Size: {x: 1, y: 1, z: 1} 188 | m_Center: {x: 0, y: 0, z: 0} 189 | --- !u!1 &7453889595902700425 190 | GameObject: 191 | m_ObjectHideFlags: 0 192 | m_CorrespondingSourceObject: {fileID: 0} 193 | m_PrefabInstance: {fileID: 0} 194 | m_PrefabAsset: {fileID: 0} 195 | serializedVersion: 6 196 | m_Component: 197 | - component: {fileID: 7453889595902700424} 198 | - component: {fileID: 4270314111508463485} 199 | - component: {fileID: 1748288367442478869} 200 | m_Layer: 0 201 | m_Name: DragCube 202 | m_TagString: Untagged 203 | m_Icon: {fileID: 0} 204 | m_NavMeshLayer: 0 205 | m_StaticEditorFlags: 0 206 | m_IsActive: 1 207 | --- !u!4 &7453889595902700424 208 | Transform: 209 | m_ObjectHideFlags: 0 210 | m_CorrespondingSourceObject: {fileID: 0} 211 | m_PrefabInstance: {fileID: 0} 212 | m_PrefabAsset: {fileID: 0} 213 | m_GameObject: {fileID: 7453889595902700425} 214 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 215 | m_LocalPosition: {x: 0, y: 0, z: 0} 216 | m_LocalScale: {x: 1, y: 1, z: 1} 217 | m_Children: 218 | - {fileID: 7453889595176672578} 219 | - {fileID: 7453889594720378475} 220 | m_Father: {fileID: 0} 221 | m_RootOrder: 0 222 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 223 | --- !u!114 &4270314111508463485 224 | MonoBehaviour: 225 | m_ObjectHideFlags: 0 226 | m_CorrespondingSourceObject: {fileID: 0} 227 | m_PrefabInstance: {fileID: 0} 228 | m_PrefabAsset: {fileID: 0} 229 | m_GameObject: {fileID: 7453889595902700425} 230 | m_Enabled: 1 231 | m_EditorHideFlags: 0 232 | m_Script: {fileID: 11500000, guid: 8f277c445468f4a91b679601f1ffe70f, type: 3} 233 | m_Name: 234 | m_EditorClassIdentifier: 235 | textMesh: {fileID: 7453889594720378474} 236 | meshRenderer: {fileID: 7453889595176672576} 237 | --- !u!120 &1748288367442478869 238 | LineRenderer: 239 | m_ObjectHideFlags: 0 240 | m_CorrespondingSourceObject: {fileID: 0} 241 | m_PrefabInstance: {fileID: 0} 242 | m_PrefabAsset: {fileID: 0} 243 | m_GameObject: {fileID: 7453889595902700425} 244 | m_Enabled: 0 245 | m_CastShadows: 1 246 | m_ReceiveShadows: 1 247 | m_DynamicOccludee: 1 248 | m_MotionVectors: 0 249 | m_LightProbeUsage: 0 250 | m_ReflectionProbeUsage: 0 251 | m_RayTracingMode: 0 252 | m_RenderingLayerMask: 1 253 | m_RendererPriority: 0 254 | m_Materials: 255 | - {fileID: 2100000, guid: ee2ed644f261a44288ba6c60d20c77ee, type: 2} 256 | m_StaticBatchInfo: 257 | firstSubMesh: 0 258 | subMeshCount: 0 259 | m_StaticBatchRoot: {fileID: 0} 260 | m_ProbeAnchor: {fileID: 0} 261 | m_LightProbeVolumeOverride: {fileID: 0} 262 | m_ScaleInLightmap: 1 263 | m_ReceiveGI: 1 264 | m_PreserveUVs: 0 265 | m_IgnoreNormalsForChartDetection: 0 266 | m_ImportantGI: 0 267 | m_StitchLightmapSeams: 1 268 | m_SelectedEditorRenderState: 3 269 | m_MinimumChartSize: 4 270 | m_AutoUVMaxDistance: 0.5 271 | m_AutoUVMaxAngle: 89 272 | m_LightmapParameters: {fileID: 0} 273 | m_SortingLayerID: 0 274 | m_SortingLayer: 0 275 | m_SortingOrder: 0 276 | m_Positions: 277 | - {x: 0, y: 0, z: 0} 278 | - {x: 0, y: 0, z: 1} 279 | m_Parameters: 280 | serializedVersion: 3 281 | widthMultiplier: 1 282 | widthCurve: 283 | serializedVersion: 2 284 | m_Curve: 285 | - serializedVersion: 3 286 | time: 0 287 | value: 1 288 | inSlope: 0 289 | outSlope: 0 290 | tangentMode: 0 291 | weightedMode: 0 292 | inWeight: 0.33333334 293 | outWeight: 0.33333334 294 | m_PreInfinity: 2 295 | m_PostInfinity: 2 296 | m_RotationOrder: 4 297 | colorGradient: 298 | serializedVersion: 2 299 | key0: {r: 1, g: 1, b: 1, a: 1} 300 | key1: {r: 1, g: 1, b: 1, a: 1} 301 | key2: {r: 0, g: 0, b: 0, a: 0} 302 | key3: {r: 0, g: 0, b: 0, a: 0} 303 | key4: {r: 0, g: 0, b: 0, a: 0} 304 | key5: {r: 0, g: 0, b: 0, a: 0} 305 | key6: {r: 0, g: 0, b: 0, a: 0} 306 | key7: {r: 0, g: 0, b: 0, a: 0} 307 | ctime0: 0 308 | ctime1: 65535 309 | ctime2: 0 310 | ctime3: 0 311 | ctime4: 0 312 | ctime5: 0 313 | ctime6: 0 314 | ctime7: 0 315 | atime0: 0 316 | atime1: 65535 317 | atime2: 0 318 | atime3: 0 319 | atime4: 0 320 | atime5: 0 321 | atime6: 0 322 | atime7: 0 323 | m_Mode: 0 324 | m_NumColorKeys: 2 325 | m_NumAlphaKeys: 2 326 | numCornerVertices: 0 327 | numCapVertices: 0 328 | alignment: 0 329 | textureMode: 0 330 | shadowBias: 0.5 331 | generateLightingData: 0 332 | m_UseWorldSpace: 1 333 | m_Loop: 0 334 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Prefabs/DragCube.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 47ed8832d774e4cb2974fa5bbfe5046a 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Prefabs/DrawTarget.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &3679204650330168672 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 3679204650330168676} 12 | - component: {fileID: 3679204650330168677} 13 | - component: {fileID: 3679204650330168674} 14 | - component: {fileID: 3679204650330168675} 15 | - component: {fileID: 3679204650330168679} 16 | m_Layer: 0 17 | m_Name: DrawTarget 18 | m_TagString: Untagged 19 | m_Icon: {fileID: 0} 20 | m_NavMeshLayer: 0 21 | m_StaticEditorFlags: 0 22 | m_IsActive: 1 23 | --- !u!4 &3679204650330168676 24 | Transform: 25 | m_ObjectHideFlags: 0 26 | m_CorrespondingSourceObject: {fileID: 0} 27 | m_PrefabInstance: {fileID: 0} 28 | m_PrefabAsset: {fileID: 0} 29 | m_GameObject: {fileID: 3679204650330168672} 30 | m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} 31 | m_LocalPosition: {x: 0, y: 0, z: 0} 32 | m_LocalScale: {x: 5, y: 5, z: 5} 33 | m_Children: [] 34 | m_Father: {fileID: 0} 35 | m_RootOrder: 0 36 | m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} 37 | --- !u!33 &3679204650330168677 38 | MeshFilter: 39 | m_ObjectHideFlags: 0 40 | m_CorrespondingSourceObject: {fileID: 0} 41 | m_PrefabInstance: {fileID: 0} 42 | m_PrefabAsset: {fileID: 0} 43 | m_GameObject: {fileID: 3679204650330168672} 44 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 45 | --- !u!23 &3679204650330168674 46 | MeshRenderer: 47 | m_ObjectHideFlags: 0 48 | m_CorrespondingSourceObject: {fileID: 0} 49 | m_PrefabInstance: {fileID: 0} 50 | m_PrefabAsset: {fileID: 0} 51 | m_GameObject: {fileID: 3679204650330168672} 52 | m_Enabled: 1 53 | m_CastShadows: 1 54 | m_ReceiveShadows: 1 55 | m_DynamicOccludee: 1 56 | m_MotionVectors: 1 57 | m_LightProbeUsage: 1 58 | m_ReflectionProbeUsage: 1 59 | m_RayTracingMode: 2 60 | m_RenderingLayerMask: 1 61 | m_RendererPriority: 0 62 | m_Materials: 63 | - {fileID: 2100000, guid: f5589cd72fca04ffea0161e05edb17d2, type: 2} 64 | m_StaticBatchInfo: 65 | firstSubMesh: 0 66 | subMeshCount: 0 67 | m_StaticBatchRoot: {fileID: 0} 68 | m_ProbeAnchor: {fileID: 0} 69 | m_LightProbeVolumeOverride: {fileID: 0} 70 | m_ScaleInLightmap: 1 71 | m_ReceiveGI: 1 72 | m_PreserveUVs: 0 73 | m_IgnoreNormalsForChartDetection: 0 74 | m_ImportantGI: 0 75 | m_StitchLightmapSeams: 1 76 | m_SelectedEditorRenderState: 3 77 | m_MinimumChartSize: 4 78 | m_AutoUVMaxDistance: 0.5 79 | m_AutoUVMaxAngle: 89 80 | m_LightmapParameters: {fileID: 0} 81 | m_SortingLayerID: 0 82 | m_SortingLayer: 0 83 | m_SortingOrder: 0 84 | --- !u!64 &3679204650330168675 85 | MeshCollider: 86 | m_ObjectHideFlags: 0 87 | m_CorrespondingSourceObject: {fileID: 0} 88 | m_PrefabInstance: {fileID: 0} 89 | m_PrefabAsset: {fileID: 0} 90 | m_GameObject: {fileID: 3679204650330168672} 91 | m_Material: {fileID: 0} 92 | m_IsTrigger: 0 93 | m_Enabled: 1 94 | serializedVersion: 4 95 | m_Convex: 0 96 | m_CookingOptions: 30 97 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 98 | --- !u!114 &3679204650330168679 99 | MonoBehaviour: 100 | m_ObjectHideFlags: 0 101 | m_CorrespondingSourceObject: {fileID: 0} 102 | m_PrefabInstance: {fileID: 0} 103 | m_PrefabAsset: {fileID: 0} 104 | m_GameObject: {fileID: 3679204650330168672} 105 | m_Enabled: 1 106 | m_EditorHideFlags: 0 107 | m_Script: {fileID: 11500000, guid: ecb04182f21ec47dea19ca791a87720d, type: 3} 108 | m_Name: 109 | m_EditorClassIdentifier: 110 | pointPrefab: {fileID: 4369279773070677511, guid: 41e7c41d7132c4e5f9a1feea61781385, 111 | type: 3} 112 | dragCubePrefab: {fileID: 7453889595902700425, guid: 47ed8832d774e4cb2974fa5bbfe5046a, 113 | type: 3} 114 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Prefabs/DrawTarget.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b95b759483322417498c923c773969db 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Prefabs/Object.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &513631887696292715 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 513631887696292714} 12 | - component: {fileID: 513631887696292695} 13 | - component: {fileID: 513631887696292692} 14 | - component: {fileID: 513631887696292693} 15 | m_Layer: 0 16 | m_Name: Capsule 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &513631887696292714 23 | Transform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 513631887696292715} 29 | m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068} 30 | m_LocalPosition: {x: 0, y: 0, z: 0} 31 | m_LocalScale: {x: 1, y: 3, z: 1} 32 | m_Children: [] 33 | m_Father: {fileID: 513631889714989935} 34 | m_RootOrder: 1 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} 36 | --- !u!33 &513631887696292695 37 | MeshFilter: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | m_GameObject: {fileID: 513631887696292715} 43 | m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} 44 | --- !u!23 &513631887696292692 45 | MeshRenderer: 46 | m_ObjectHideFlags: 0 47 | m_CorrespondingSourceObject: {fileID: 0} 48 | m_PrefabInstance: {fileID: 0} 49 | m_PrefabAsset: {fileID: 0} 50 | m_GameObject: {fileID: 513631887696292715} 51 | m_Enabled: 1 52 | m_CastShadows: 1 53 | m_ReceiveShadows: 1 54 | m_DynamicOccludee: 1 55 | m_MotionVectors: 1 56 | m_LightProbeUsage: 1 57 | m_ReflectionProbeUsage: 1 58 | m_RayTracingMode: 2 59 | m_RenderingLayerMask: 1 60 | m_RendererPriority: 0 61 | m_Materials: 62 | - {fileID: 2100000, guid: ceda19a64d40641fa8d1d0ea4ff0e83f, type: 2} 63 | m_StaticBatchInfo: 64 | firstSubMesh: 0 65 | subMeshCount: 0 66 | m_StaticBatchRoot: {fileID: 0} 67 | m_ProbeAnchor: {fileID: 0} 68 | m_LightProbeVolumeOverride: {fileID: 0} 69 | m_ScaleInLightmap: 1 70 | m_ReceiveGI: 1 71 | m_PreserveUVs: 0 72 | m_IgnoreNormalsForChartDetection: 0 73 | m_ImportantGI: 0 74 | m_StitchLightmapSeams: 1 75 | m_SelectedEditorRenderState: 3 76 | m_MinimumChartSize: 4 77 | m_AutoUVMaxDistance: 0.5 78 | m_AutoUVMaxAngle: 89 79 | m_LightmapParameters: {fileID: 0} 80 | m_SortingLayerID: 0 81 | m_SortingLayer: 0 82 | m_SortingOrder: 0 83 | --- !u!136 &513631887696292693 84 | CapsuleCollider: 85 | m_ObjectHideFlags: 0 86 | m_CorrespondingSourceObject: {fileID: 0} 87 | m_PrefabInstance: {fileID: 0} 88 | m_PrefabAsset: {fileID: 0} 89 | m_GameObject: {fileID: 513631887696292715} 90 | m_Material: {fileID: 0} 91 | m_IsTrigger: 0 92 | m_Enabled: 1 93 | m_Radius: 0.5 94 | m_Height: 2 95 | m_Direction: 1 96 | m_Center: {x: 0, y: 0, z: 0} 97 | --- !u!1 &513631888821523730 98 | GameObject: 99 | m_ObjectHideFlags: 0 100 | m_CorrespondingSourceObject: {fileID: 0} 101 | m_PrefabInstance: {fileID: 0} 102 | m_PrefabAsset: {fileID: 0} 103 | serializedVersion: 6 104 | m_Component: 105 | - component: {fileID: 513631888821523741} 106 | - component: {fileID: 513631888821523742} 107 | - component: {fileID: 513631888821523743} 108 | - component: {fileID: 513631888821523740} 109 | m_Layer: 0 110 | m_Name: Capsule 111 | m_TagString: Untagged 112 | m_Icon: {fileID: 0} 113 | m_NavMeshLayer: 0 114 | m_StaticEditorFlags: 0 115 | m_IsActive: 1 116 | --- !u!4 &513631888821523741 117 | Transform: 118 | m_ObjectHideFlags: 0 119 | m_CorrespondingSourceObject: {fileID: 0} 120 | m_PrefabInstance: {fileID: 0} 121 | m_PrefabAsset: {fileID: 0} 122 | m_GameObject: {fileID: 513631888821523730} 123 | m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} 124 | m_LocalPosition: {x: 0, y: 0, z: 0} 125 | m_LocalScale: {x: 1, y: 3, z: 1} 126 | m_Children: [] 127 | m_Father: {fileID: 513631889714989935} 128 | m_RootOrder: 2 129 | m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} 130 | --- !u!33 &513631888821523742 131 | MeshFilter: 132 | m_ObjectHideFlags: 0 133 | m_CorrespondingSourceObject: {fileID: 0} 134 | m_PrefabInstance: {fileID: 0} 135 | m_PrefabAsset: {fileID: 0} 136 | m_GameObject: {fileID: 513631888821523730} 137 | m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} 138 | --- !u!23 &513631888821523743 139 | MeshRenderer: 140 | m_ObjectHideFlags: 0 141 | m_CorrespondingSourceObject: {fileID: 0} 142 | m_PrefabInstance: {fileID: 0} 143 | m_PrefabAsset: {fileID: 0} 144 | m_GameObject: {fileID: 513631888821523730} 145 | m_Enabled: 1 146 | m_CastShadows: 1 147 | m_ReceiveShadows: 1 148 | m_DynamicOccludee: 1 149 | m_MotionVectors: 1 150 | m_LightProbeUsage: 1 151 | m_ReflectionProbeUsage: 1 152 | m_RayTracingMode: 2 153 | m_RenderingLayerMask: 1 154 | m_RendererPriority: 0 155 | m_Materials: 156 | - {fileID: 2100000, guid: b14134f5684be42718fafb03699cb809, type: 2} 157 | m_StaticBatchInfo: 158 | firstSubMesh: 0 159 | subMeshCount: 0 160 | m_StaticBatchRoot: {fileID: 0} 161 | m_ProbeAnchor: {fileID: 0} 162 | m_LightProbeVolumeOverride: {fileID: 0} 163 | m_ScaleInLightmap: 1 164 | m_ReceiveGI: 1 165 | m_PreserveUVs: 0 166 | m_IgnoreNormalsForChartDetection: 0 167 | m_ImportantGI: 0 168 | m_StitchLightmapSeams: 1 169 | m_SelectedEditorRenderState: 3 170 | m_MinimumChartSize: 4 171 | m_AutoUVMaxDistance: 0.5 172 | m_AutoUVMaxAngle: 89 173 | m_LightmapParameters: {fileID: 0} 174 | m_SortingLayerID: 0 175 | m_SortingLayer: 0 176 | m_SortingOrder: 0 177 | --- !u!136 &513631888821523740 178 | CapsuleCollider: 179 | m_ObjectHideFlags: 0 180 | m_CorrespondingSourceObject: {fileID: 0} 181 | m_PrefabInstance: {fileID: 0} 182 | m_PrefabAsset: {fileID: 0} 183 | m_GameObject: {fileID: 513631888821523730} 184 | m_Material: {fileID: 0} 185 | m_IsTrigger: 0 186 | m_Enabled: 1 187 | m_Radius: 0.5 188 | m_Height: 2 189 | m_Direction: 1 190 | m_Center: {x: 0, y: 0, z: 0} 191 | --- !u!1 &513631889591111795 192 | GameObject: 193 | m_ObjectHideFlags: 0 194 | m_CorrespondingSourceObject: {fileID: 0} 195 | m_PrefabInstance: {fileID: 0} 196 | m_PrefabAsset: {fileID: 0} 197 | serializedVersion: 6 198 | m_Component: 199 | - component: {fileID: 513631889591111807} 200 | - component: {fileID: 513631889591111804} 201 | - component: {fileID: 513631889591111805} 202 | - component: {fileID: 513631889591111794} 203 | m_Layer: 0 204 | m_Name: Capsule 205 | m_TagString: Untagged 206 | m_Icon: {fileID: 0} 207 | m_NavMeshLayer: 0 208 | m_StaticEditorFlags: 0 209 | m_IsActive: 1 210 | --- !u!4 &513631889591111807 211 | Transform: 212 | m_ObjectHideFlags: 0 213 | m_CorrespondingSourceObject: {fileID: 0} 214 | m_PrefabInstance: {fileID: 0} 215 | m_PrefabAsset: {fileID: 0} 216 | m_GameObject: {fileID: 513631889591111795} 217 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 218 | m_LocalPosition: {x: 0, y: 0, z: 0} 219 | m_LocalScale: {x: 1, y: 3, z: 1} 220 | m_Children: [] 221 | m_Father: {fileID: 513631889714989935} 222 | m_RootOrder: 0 223 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 224 | --- !u!33 &513631889591111804 225 | MeshFilter: 226 | m_ObjectHideFlags: 0 227 | m_CorrespondingSourceObject: {fileID: 0} 228 | m_PrefabInstance: {fileID: 0} 229 | m_PrefabAsset: {fileID: 0} 230 | m_GameObject: {fileID: 513631889591111795} 231 | m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} 232 | --- !u!23 &513631889591111805 233 | MeshRenderer: 234 | m_ObjectHideFlags: 0 235 | m_CorrespondingSourceObject: {fileID: 0} 236 | m_PrefabInstance: {fileID: 0} 237 | m_PrefabAsset: {fileID: 0} 238 | m_GameObject: {fileID: 513631889591111795} 239 | m_Enabled: 1 240 | m_CastShadows: 1 241 | m_ReceiveShadows: 1 242 | m_DynamicOccludee: 1 243 | m_MotionVectors: 1 244 | m_LightProbeUsage: 1 245 | m_ReflectionProbeUsage: 1 246 | m_RayTracingMode: 2 247 | m_RenderingLayerMask: 1 248 | m_RendererPriority: 0 249 | m_Materials: 250 | - {fileID: 2100000, guid: 3b3ed67bb42e94701a77257d92dc7036, type: 2} 251 | m_StaticBatchInfo: 252 | firstSubMesh: 0 253 | subMeshCount: 0 254 | m_StaticBatchRoot: {fileID: 0} 255 | m_ProbeAnchor: {fileID: 0} 256 | m_LightProbeVolumeOverride: {fileID: 0} 257 | m_ScaleInLightmap: 1 258 | m_ReceiveGI: 1 259 | m_PreserveUVs: 0 260 | m_IgnoreNormalsForChartDetection: 0 261 | m_ImportantGI: 0 262 | m_StitchLightmapSeams: 1 263 | m_SelectedEditorRenderState: 3 264 | m_MinimumChartSize: 4 265 | m_AutoUVMaxDistance: 0.5 266 | m_AutoUVMaxAngle: 89 267 | m_LightmapParameters: {fileID: 0} 268 | m_SortingLayerID: 0 269 | m_SortingLayer: 0 270 | m_SortingOrder: 0 271 | --- !u!136 &513631889591111794 272 | CapsuleCollider: 273 | m_ObjectHideFlags: 0 274 | m_CorrespondingSourceObject: {fileID: 0} 275 | m_PrefabInstance: {fileID: 0} 276 | m_PrefabAsset: {fileID: 0} 277 | m_GameObject: {fileID: 513631889591111795} 278 | m_Material: {fileID: 0} 279 | m_IsTrigger: 0 280 | m_Enabled: 1 281 | m_Radius: 0.5 282 | m_Height: 2 283 | m_Direction: 1 284 | m_Center: {x: 0, y: 0, z: 0} 285 | --- !u!1 &513631889714989923 286 | GameObject: 287 | m_ObjectHideFlags: 0 288 | m_CorrespondingSourceObject: {fileID: 0} 289 | m_PrefabInstance: {fileID: 0} 290 | m_PrefabAsset: {fileID: 0} 291 | serializedVersion: 6 292 | m_Component: 293 | - component: {fileID: 513631889714989935} 294 | - component: {fileID: 513631889714989932} 295 | - component: {fileID: 513631889714989933} 296 | - component: {fileID: 513631889714989922} 297 | m_Layer: 0 298 | m_Name: Object 299 | m_TagString: Untagged 300 | m_Icon: {fileID: 0} 301 | m_NavMeshLayer: 0 302 | m_StaticEditorFlags: 0 303 | m_IsActive: 1 304 | --- !u!4 &513631889714989935 305 | Transform: 306 | m_ObjectHideFlags: 0 307 | m_CorrespondingSourceObject: {fileID: 0} 308 | m_PrefabInstance: {fileID: 0} 309 | m_PrefabAsset: {fileID: 0} 310 | m_GameObject: {fileID: 513631889714989923} 311 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 312 | m_LocalPosition: {x: 0, y: 0, z: 0} 313 | m_LocalScale: {x: 1, y: 1, z: 1} 314 | m_Children: 315 | - {fileID: 513631889591111807} 316 | - {fileID: 513631887696292714} 317 | - {fileID: 513631888821523741} 318 | m_Father: {fileID: 0} 319 | m_RootOrder: 0 320 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 321 | --- !u!33 &513631889714989932 322 | MeshFilter: 323 | m_ObjectHideFlags: 0 324 | m_CorrespondingSourceObject: {fileID: 0} 325 | m_PrefabInstance: {fileID: 0} 326 | m_PrefabAsset: {fileID: 0} 327 | m_GameObject: {fileID: 513631889714989923} 328 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 329 | --- !u!23 &513631889714989933 330 | MeshRenderer: 331 | m_ObjectHideFlags: 0 332 | m_CorrespondingSourceObject: {fileID: 0} 333 | m_PrefabInstance: {fileID: 0} 334 | m_PrefabAsset: {fileID: 0} 335 | m_GameObject: {fileID: 513631889714989923} 336 | m_Enabled: 0 337 | m_CastShadows: 1 338 | m_ReceiveShadows: 1 339 | m_DynamicOccludee: 1 340 | m_MotionVectors: 1 341 | m_LightProbeUsage: 1 342 | m_ReflectionProbeUsage: 1 343 | m_RayTracingMode: 2 344 | m_RenderingLayerMask: 1 345 | m_RendererPriority: 0 346 | m_Materials: 347 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 348 | m_StaticBatchInfo: 349 | firstSubMesh: 0 350 | subMeshCount: 0 351 | m_StaticBatchRoot: {fileID: 0} 352 | m_ProbeAnchor: {fileID: 0} 353 | m_LightProbeVolumeOverride: {fileID: 0} 354 | m_ScaleInLightmap: 1 355 | m_ReceiveGI: 1 356 | m_PreserveUVs: 0 357 | m_IgnoreNormalsForChartDetection: 0 358 | m_ImportantGI: 0 359 | m_StitchLightmapSeams: 1 360 | m_SelectedEditorRenderState: 3 361 | m_MinimumChartSize: 4 362 | m_AutoUVMaxDistance: 0.5 363 | m_AutoUVMaxAngle: 89 364 | m_LightmapParameters: {fileID: 0} 365 | m_SortingLayerID: 0 366 | m_SortingLayer: 0 367 | m_SortingOrder: 0 368 | --- !u!65 &513631889714989922 369 | BoxCollider: 370 | m_ObjectHideFlags: 0 371 | m_CorrespondingSourceObject: {fileID: 0} 372 | m_PrefabInstance: {fileID: 0} 373 | m_PrefabAsset: {fileID: 0} 374 | m_GameObject: {fileID: 513631889714989923} 375 | m_Material: {fileID: 0} 376 | m_IsTrigger: 0 377 | m_Enabled: 1 378 | serializedVersion: 2 379 | m_Size: {x: 1, y: 1, z: 1} 380 | m_Center: {x: 0, y: 0, z: 0} 381 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Prefabs/Object.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 03647b2e7284c4ec8b0463af07e26bf5 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Prefabs/Point.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &4369279773070677511 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 4369279773070677507} 12 | - component: {fileID: 4369279773070677506} 13 | - component: {fileID: 4369279773070677509} 14 | - component: {fileID: 4369279773070677508} 15 | - component: {fileID: 5460843033584762930} 16 | m_Layer: 0 17 | m_Name: Point 18 | m_TagString: Untagged 19 | m_Icon: {fileID: 0} 20 | m_NavMeshLayer: 0 21 | m_StaticEditorFlags: 0 22 | m_IsActive: 1 23 | --- !u!4 &4369279773070677507 24 | Transform: 25 | m_ObjectHideFlags: 0 26 | m_CorrespondingSourceObject: {fileID: 0} 27 | m_PrefabInstance: {fileID: 0} 28 | m_PrefabAsset: {fileID: 0} 29 | m_GameObject: {fileID: 4369279773070677511} 30 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 31 | m_LocalPosition: {x: 0, y: 0, z: 0} 32 | m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} 33 | m_Children: 34 | - {fileID: 7234645230181039479} 35 | m_Father: {fileID: 0} 36 | m_RootOrder: 0 37 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 38 | --- !u!33 &4369279773070677506 39 | MeshFilter: 40 | m_ObjectHideFlags: 0 41 | m_CorrespondingSourceObject: {fileID: 0} 42 | m_PrefabInstance: {fileID: 0} 43 | m_PrefabAsset: {fileID: 0} 44 | m_GameObject: {fileID: 4369279773070677511} 45 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 46 | --- !u!23 &4369279773070677509 47 | MeshRenderer: 48 | m_ObjectHideFlags: 0 49 | m_CorrespondingSourceObject: {fileID: 0} 50 | m_PrefabInstance: {fileID: 0} 51 | m_PrefabAsset: {fileID: 0} 52 | m_GameObject: {fileID: 4369279773070677511} 53 | m_Enabled: 1 54 | m_CastShadows: 0 55 | m_ReceiveShadows: 1 56 | m_DynamicOccludee: 1 57 | m_MotionVectors: 1 58 | m_LightProbeUsage: 1 59 | m_ReflectionProbeUsage: 1 60 | m_RayTracingMode: 2 61 | m_RenderingLayerMask: 1 62 | m_RendererPriority: 0 63 | m_Materials: 64 | - {fileID: 2100000, guid: ee2ed644f261a44288ba6c60d20c77ee, type: 2} 65 | m_StaticBatchInfo: 66 | firstSubMesh: 0 67 | subMeshCount: 0 68 | m_StaticBatchRoot: {fileID: 0} 69 | m_ProbeAnchor: {fileID: 0} 70 | m_LightProbeVolumeOverride: {fileID: 0} 71 | m_ScaleInLightmap: 1 72 | m_ReceiveGI: 1 73 | m_PreserveUVs: 0 74 | m_IgnoreNormalsForChartDetection: 0 75 | m_ImportantGI: 0 76 | m_StitchLightmapSeams: 1 77 | m_SelectedEditorRenderState: 3 78 | m_MinimumChartSize: 4 79 | m_AutoUVMaxDistance: 0.5 80 | m_AutoUVMaxAngle: 89 81 | m_LightmapParameters: {fileID: 0} 82 | m_SortingLayerID: 0 83 | m_SortingLayer: 0 84 | m_SortingOrder: 0 85 | --- !u!135 &4369279773070677508 86 | SphereCollider: 87 | m_ObjectHideFlags: 0 88 | m_CorrespondingSourceObject: {fileID: 0} 89 | m_PrefabInstance: {fileID: 0} 90 | m_PrefabAsset: {fileID: 0} 91 | m_GameObject: {fileID: 4369279773070677511} 92 | m_Material: {fileID: 0} 93 | m_IsTrigger: 0 94 | m_Enabled: 1 95 | serializedVersion: 2 96 | m_Radius: 0.5 97 | m_Center: {x: 0, y: 0, z: 0} 98 | --- !u!114 &5460843033584762930 99 | MonoBehaviour: 100 | m_ObjectHideFlags: 0 101 | m_CorrespondingSourceObject: {fileID: 0} 102 | m_PrefabInstance: {fileID: 0} 103 | m_PrefabAsset: {fileID: 0} 104 | m_GameObject: {fileID: 4369279773070677511} 105 | m_Enabled: 1 106 | m_EditorHideFlags: 0 107 | m_Script: {fileID: 11500000, guid: a079d4d57f21e4f89af18f26991ddfc4, type: 3} 108 | m_Name: 109 | m_EditorClassIdentifier: 110 | textMesh: {fileID: 8582704455509044779} 111 | --- !u!1 &7891700576169867902 112 | GameObject: 113 | m_ObjectHideFlags: 0 114 | m_CorrespondingSourceObject: {fileID: 0} 115 | m_PrefabInstance: {fileID: 0} 116 | m_PrefabAsset: {fileID: 0} 117 | serializedVersion: 6 118 | m_Component: 119 | - component: {fileID: 7234645230181039479} 120 | - component: {fileID: 5096426771974323654} 121 | - component: {fileID: 8582704455509044779} 122 | m_Layer: 0 123 | m_Name: Text 124 | m_TagString: Untagged 125 | m_Icon: {fileID: 0} 126 | m_NavMeshLayer: 0 127 | m_StaticEditorFlags: 0 128 | m_IsActive: 1 129 | --- !u!4 &7234645230181039479 130 | Transform: 131 | m_ObjectHideFlags: 0 132 | m_CorrespondingSourceObject: {fileID: 0} 133 | m_PrefabInstance: {fileID: 0} 134 | m_PrefabAsset: {fileID: 0} 135 | m_GameObject: {fileID: 7891700576169867902} 136 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 137 | m_LocalPosition: {x: 0.13, y: 0, z: 0} 138 | m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} 139 | m_Children: [] 140 | m_Father: {fileID: 4369279773070677507} 141 | m_RootOrder: 0 142 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 143 | --- !u!23 &5096426771974323654 144 | MeshRenderer: 145 | m_ObjectHideFlags: 0 146 | m_CorrespondingSourceObject: {fileID: 0} 147 | m_PrefabInstance: {fileID: 0} 148 | m_PrefabAsset: {fileID: 0} 149 | m_GameObject: {fileID: 7891700576169867902} 150 | m_Enabled: 1 151 | m_CastShadows: 1 152 | m_ReceiveShadows: 1 153 | m_DynamicOccludee: 1 154 | m_MotionVectors: 1 155 | m_LightProbeUsage: 1 156 | m_ReflectionProbeUsage: 1 157 | m_RayTracingMode: 2 158 | m_RenderingLayerMask: 1 159 | m_RendererPriority: 0 160 | m_Materials: 161 | - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} 162 | m_StaticBatchInfo: 163 | firstSubMesh: 0 164 | subMeshCount: 0 165 | m_StaticBatchRoot: {fileID: 0} 166 | m_ProbeAnchor: {fileID: 0} 167 | m_LightProbeVolumeOverride: {fileID: 0} 168 | m_ScaleInLightmap: 1 169 | m_ReceiveGI: 1 170 | m_PreserveUVs: 0 171 | m_IgnoreNormalsForChartDetection: 0 172 | m_ImportantGI: 0 173 | m_StitchLightmapSeams: 1 174 | m_SelectedEditorRenderState: 3 175 | m_MinimumChartSize: 4 176 | m_AutoUVMaxDistance: 0.5 177 | m_AutoUVMaxAngle: 89 178 | m_LightmapParameters: {fileID: 0} 179 | m_SortingLayerID: 0 180 | m_SortingLayer: 0 181 | m_SortingOrder: 0 182 | --- !u!102 &8582704455509044779 183 | TextMesh: 184 | serializedVersion: 3 185 | m_ObjectHideFlags: 0 186 | m_CorrespondingSourceObject: {fileID: 0} 187 | m_PrefabInstance: {fileID: 0} 188 | m_PrefabAsset: {fileID: 0} 189 | m_GameObject: {fileID: 7891700576169867902} 190 | m_Text: 191 | m_OffsetZ: 0 192 | m_CharacterSize: 1 193 | m_LineSpacing: 1 194 | m_Anchor: 0 195 | m_Alignment: 0 196 | m_TabSize: 4 197 | m_FontSize: 40 198 | m_FontStyle: 0 199 | m_RichText: 1 200 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 201 | m_Color: 202 | serializedVersion: 2 203 | rgba: 4294967295 204 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Prefabs/Point.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41e7c41d7132c4e5f9a1feea61781385 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f9b8b6b43d7240cbb3dbfd39fc8c968 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scenes/DoubleSequenceTest.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52e972e7e880a44c8a520dbd1cc5ec53 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scenes/GyroTest.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7c07f4a454d0a4fd488b9ee9eafa71dd 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scenes/InputObservableTest.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eaf03659f87b046988eeeb2e3a763d95 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scenes/MouseSpecificTest.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_UseShadowmask: 1 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | debug: 122 | m_Flags: 0 123 | m_NavMeshData: {fileID: 0} 124 | --- !u!1001 &315109714 125 | PrefabInstance: 126 | m_ObjectHideFlags: 0 127 | serializedVersion: 2 128 | m_Modification: 129 | m_TransformParent: {fileID: 0} 130 | m_Modifications: 131 | - target: {fileID: 3679204650330168672, guid: b95b759483322417498c923c773969db, 132 | type: 3} 133 | propertyPath: m_Name 134 | value: DrawTarget 135 | objectReference: {fileID: 0} 136 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 137 | type: 3} 138 | propertyPath: m_LocalPosition.x 139 | value: 0 140 | objectReference: {fileID: 0} 141 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 142 | type: 3} 143 | propertyPath: m_LocalPosition.y 144 | value: 0 145 | objectReference: {fileID: 0} 146 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 147 | type: 3} 148 | propertyPath: m_LocalPosition.z 149 | value: 0 150 | objectReference: {fileID: 0} 151 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 152 | type: 3} 153 | propertyPath: m_LocalRotation.x 154 | value: -0.7071068 155 | objectReference: {fileID: 0} 156 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 157 | type: 3} 158 | propertyPath: m_LocalRotation.y 159 | value: 0 160 | objectReference: {fileID: 0} 161 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 162 | type: 3} 163 | propertyPath: m_LocalRotation.z 164 | value: 0 165 | objectReference: {fileID: 0} 166 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 167 | type: 3} 168 | propertyPath: m_LocalRotation.w 169 | value: 0.7071068 170 | objectReference: {fileID: 0} 171 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 172 | type: 3} 173 | propertyPath: m_RootOrder 174 | value: 4 175 | objectReference: {fileID: 0} 176 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 177 | type: 3} 178 | propertyPath: m_LocalEulerAnglesHint.x 179 | value: -90 180 | objectReference: {fileID: 0} 181 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 182 | type: 3} 183 | propertyPath: m_LocalEulerAnglesHint.y 184 | value: 0 185 | objectReference: {fileID: 0} 186 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 187 | type: 3} 188 | propertyPath: m_LocalEulerAnglesHint.z 189 | value: 0 190 | objectReference: {fileID: 0} 191 | m_RemovedComponents: [] 192 | m_SourcePrefab: {fileID: 100100000, guid: b95b759483322417498c923c773969db, type: 3} 193 | --- !u!1 &996365727 194 | GameObject: 195 | m_ObjectHideFlags: 0 196 | m_CorrespondingSourceObject: {fileID: 0} 197 | m_PrefabInstance: {fileID: 0} 198 | m_PrefabAsset: {fileID: 0} 199 | serializedVersion: 6 200 | m_Component: 201 | - component: {fileID: 996365731} 202 | - component: {fileID: 996365730} 203 | - component: {fileID: 996365729} 204 | - component: {fileID: 996365728} 205 | m_Layer: 0 206 | m_Name: Cube 207 | m_TagString: Untagged 208 | m_Icon: {fileID: 0} 209 | m_NavMeshLayer: 0 210 | m_StaticEditorFlags: 0 211 | m_IsActive: 1 212 | --- !u!65 &996365728 213 | BoxCollider: 214 | m_ObjectHideFlags: 0 215 | m_CorrespondingSourceObject: {fileID: 0} 216 | m_PrefabInstance: {fileID: 0} 217 | m_PrefabAsset: {fileID: 0} 218 | m_GameObject: {fileID: 996365727} 219 | m_Material: {fileID: 0} 220 | m_IsTrigger: 0 221 | m_Enabled: 1 222 | serializedVersion: 2 223 | m_Size: {x: 1, y: 1, z: 1} 224 | m_Center: {x: 0, y: 0, z: 0} 225 | --- !u!23 &996365729 226 | MeshRenderer: 227 | m_ObjectHideFlags: 0 228 | m_CorrespondingSourceObject: {fileID: 0} 229 | m_PrefabInstance: {fileID: 0} 230 | m_PrefabAsset: {fileID: 0} 231 | m_GameObject: {fileID: 996365727} 232 | m_Enabled: 1 233 | m_CastShadows: 1 234 | m_ReceiveShadows: 1 235 | m_DynamicOccludee: 1 236 | m_MotionVectors: 1 237 | m_LightProbeUsage: 1 238 | m_ReflectionProbeUsage: 1 239 | m_RayTracingMode: 2 240 | m_RenderingLayerMask: 1 241 | m_RendererPriority: 0 242 | m_Materials: 243 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 244 | m_StaticBatchInfo: 245 | firstSubMesh: 0 246 | subMeshCount: 0 247 | m_StaticBatchRoot: {fileID: 0} 248 | m_ProbeAnchor: {fileID: 0} 249 | m_LightProbeVolumeOverride: {fileID: 0} 250 | m_ScaleInLightmap: 1 251 | m_ReceiveGI: 1 252 | m_PreserveUVs: 0 253 | m_IgnoreNormalsForChartDetection: 0 254 | m_ImportantGI: 0 255 | m_StitchLightmapSeams: 1 256 | m_SelectedEditorRenderState: 3 257 | m_MinimumChartSize: 4 258 | m_AutoUVMaxDistance: 0.5 259 | m_AutoUVMaxAngle: 89 260 | m_LightmapParameters: {fileID: 0} 261 | m_SortingLayerID: 0 262 | m_SortingLayer: 0 263 | m_SortingOrder: 0 264 | --- !u!33 &996365730 265 | MeshFilter: 266 | m_ObjectHideFlags: 0 267 | m_CorrespondingSourceObject: {fileID: 0} 268 | m_PrefabInstance: {fileID: 0} 269 | m_PrefabAsset: {fileID: 0} 270 | m_GameObject: {fileID: 996365727} 271 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 272 | --- !u!4 &996365731 273 | Transform: 274 | m_ObjectHideFlags: 0 275 | m_CorrespondingSourceObject: {fileID: 0} 276 | m_PrefabInstance: {fileID: 0} 277 | m_PrefabAsset: {fileID: 0} 278 | m_GameObject: {fileID: 996365727} 279 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 280 | m_LocalPosition: {x: 0, y: 0, z: 0} 281 | m_LocalScale: {x: 1, y: 1, z: 1} 282 | m_Children: [] 283 | m_Father: {fileID: 0} 284 | m_RootOrder: 3 285 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 286 | --- !u!114 &1116235277 stripped 287 | MonoBehaviour: 288 | m_CorrespondingSourceObject: {fileID: 3679204650330168679, guid: b95b759483322417498c923c773969db, 289 | type: 3} 290 | m_PrefabInstance: {fileID: 315109714} 291 | m_PrefabAsset: {fileID: 0} 292 | m_GameObject: {fileID: 0} 293 | m_Enabled: 1 294 | m_EditorHideFlags: 0 295 | m_Script: {fileID: 11500000, guid: ecb04182f21ec47dea19ca791a87720d, type: 3} 296 | m_Name: 297 | m_EditorClassIdentifier: 298 | --- !u!1 &1747832378 299 | GameObject: 300 | m_ObjectHideFlags: 0 301 | m_CorrespondingSourceObject: {fileID: 0} 302 | m_PrefabInstance: {fileID: 0} 303 | m_PrefabAsset: {fileID: 0} 304 | serializedVersion: 6 305 | m_Component: 306 | - component: {fileID: 1747832380} 307 | - component: {fileID: 1747832379} 308 | m_Layer: 0 309 | m_Name: Directional Light 310 | m_TagString: Untagged 311 | m_Icon: {fileID: 0} 312 | m_NavMeshLayer: 0 313 | m_StaticEditorFlags: 0 314 | m_IsActive: 1 315 | --- !u!108 &1747832379 316 | Light: 317 | m_ObjectHideFlags: 0 318 | m_CorrespondingSourceObject: {fileID: 0} 319 | m_PrefabInstance: {fileID: 0} 320 | m_PrefabAsset: {fileID: 0} 321 | m_GameObject: {fileID: 1747832378} 322 | m_Enabled: 1 323 | serializedVersion: 10 324 | m_Type: 1 325 | m_Shape: 0 326 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 327 | m_Intensity: 1 328 | m_Range: 10 329 | m_SpotAngle: 30 330 | m_InnerSpotAngle: 21.80208 331 | m_CookieSize: 10 332 | m_Shadows: 333 | m_Type: 2 334 | m_Resolution: -1 335 | m_CustomResolution: -1 336 | m_Strength: 1 337 | m_Bias: 0.05 338 | m_NormalBias: 0.4 339 | m_NearPlane: 0.2 340 | m_CullingMatrixOverride: 341 | e00: 1 342 | e01: 0 343 | e02: 0 344 | e03: 0 345 | e10: 0 346 | e11: 1 347 | e12: 0 348 | e13: 0 349 | e20: 0 350 | e21: 0 351 | e22: 1 352 | e23: 0 353 | e30: 0 354 | e31: 0 355 | e32: 0 356 | e33: 1 357 | m_UseCullingMatrixOverride: 0 358 | m_Cookie: {fileID: 0} 359 | m_DrawHalo: 0 360 | m_Flare: {fileID: 0} 361 | m_RenderMode: 0 362 | m_CullingMask: 363 | serializedVersion: 2 364 | m_Bits: 4294967295 365 | m_RenderingLayerMask: 1 366 | m_Lightmapping: 4 367 | m_LightShadowCasterMode: 0 368 | m_AreaSize: {x: 1, y: 1} 369 | m_BounceIntensity: 1 370 | m_ColorTemperature: 6570 371 | m_UseColorTemperature: 0 372 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 373 | m_UseBoundingSphereOverride: 0 374 | m_ShadowRadius: 0 375 | m_ShadowAngle: 0 376 | --- !u!4 &1747832380 377 | Transform: 378 | m_ObjectHideFlags: 0 379 | m_CorrespondingSourceObject: {fileID: 0} 380 | m_PrefabInstance: {fileID: 0} 381 | m_PrefabAsset: {fileID: 0} 382 | m_GameObject: {fileID: 1747832378} 383 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 384 | m_LocalPosition: {x: 0, y: 3, z: 0} 385 | m_LocalScale: {x: 1, y: 1, z: 1} 386 | m_Children: [] 387 | m_Father: {fileID: 0} 388 | m_RootOrder: 1 389 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 390 | --- !u!1 &1865977863 391 | GameObject: 392 | m_ObjectHideFlags: 0 393 | m_CorrespondingSourceObject: {fileID: 0} 394 | m_PrefabInstance: {fileID: 0} 395 | m_PrefabAsset: {fileID: 0} 396 | serializedVersion: 6 397 | m_Component: 398 | - component: {fileID: 1865977866} 399 | - component: {fileID: 1865977865} 400 | - component: {fileID: 1865977864} 401 | m_Layer: 0 402 | m_Name: Main Camera 403 | m_TagString: MainCamera 404 | m_Icon: {fileID: 0} 405 | m_NavMeshLayer: 0 406 | m_StaticEditorFlags: 0 407 | m_IsActive: 1 408 | --- !u!81 &1865977864 409 | AudioListener: 410 | m_ObjectHideFlags: 0 411 | m_CorrespondingSourceObject: {fileID: 0} 412 | m_PrefabInstance: {fileID: 0} 413 | m_PrefabAsset: {fileID: 0} 414 | m_GameObject: {fileID: 1865977863} 415 | m_Enabled: 1 416 | --- !u!20 &1865977865 417 | Camera: 418 | m_ObjectHideFlags: 0 419 | m_CorrespondingSourceObject: {fileID: 0} 420 | m_PrefabInstance: {fileID: 0} 421 | m_PrefabAsset: {fileID: 0} 422 | m_GameObject: {fileID: 1865977863} 423 | m_Enabled: 1 424 | serializedVersion: 2 425 | m_ClearFlags: 1 426 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 427 | m_projectionMatrixMode: 1 428 | m_GateFitMode: 2 429 | m_FOVAxisMode: 0 430 | m_SensorSize: {x: 36, y: 24} 431 | m_LensShift: {x: 0, y: 0} 432 | m_FocalLength: 50 433 | m_NormalizedViewPortRect: 434 | serializedVersion: 2 435 | x: 0 436 | y: 0 437 | width: 1 438 | height: 1 439 | near clip plane: 0.3 440 | far clip plane: 1000 441 | field of view: 60 442 | orthographic: 0 443 | orthographic size: 5 444 | m_Depth: -1 445 | m_CullingMask: 446 | serializedVersion: 2 447 | m_Bits: 4294967295 448 | m_RenderingPath: -1 449 | m_TargetTexture: {fileID: 0} 450 | m_TargetDisplay: 0 451 | m_TargetEye: 3 452 | m_HDR: 1 453 | m_AllowMSAA: 1 454 | m_AllowDynamicResolution: 0 455 | m_ForceIntoRT: 0 456 | m_OcclusionCulling: 1 457 | m_StereoConvergence: 10 458 | m_StereoSeparation: 0.022 459 | --- !u!4 &1865977866 460 | Transform: 461 | m_ObjectHideFlags: 0 462 | m_CorrespondingSourceObject: {fileID: 0} 463 | m_PrefabInstance: {fileID: 0} 464 | m_PrefabAsset: {fileID: 0} 465 | m_GameObject: {fileID: 1865977863} 466 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 467 | m_LocalPosition: {x: 0, y: 1, z: -10} 468 | m_LocalScale: {x: 1, y: 1, z: 1} 469 | m_Children: [] 470 | m_Father: {fileID: 0} 471 | m_RootOrder: 0 472 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 473 | --- !u!1 &2132612957 474 | GameObject: 475 | m_ObjectHideFlags: 0 476 | m_CorrespondingSourceObject: {fileID: 0} 477 | m_PrefabInstance: {fileID: 0} 478 | m_PrefabAsset: {fileID: 0} 479 | serializedVersion: 6 480 | m_Component: 481 | - component: {fileID: 2132612958} 482 | - component: {fileID: 2132612959} 483 | m_Layer: 0 484 | m_Name: MouseSpecificTest 485 | m_TagString: Untagged 486 | m_Icon: {fileID: 0} 487 | m_NavMeshLayer: 0 488 | m_StaticEditorFlags: 0 489 | m_IsActive: 1 490 | --- !u!4 &2132612958 491 | Transform: 492 | m_ObjectHideFlags: 0 493 | m_CorrespondingSourceObject: {fileID: 0} 494 | m_PrefabInstance: {fileID: 0} 495 | m_PrefabAsset: {fileID: 0} 496 | m_GameObject: {fileID: 2132612957} 497 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 498 | m_LocalPosition: {x: 540, y: 960, z: 0} 499 | m_LocalScale: {x: 1, y: 1, z: 1} 500 | m_Children: [] 501 | m_Father: {fileID: 0} 502 | m_RootOrder: 2 503 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 504 | --- !u!114 &2132612959 505 | MonoBehaviour: 506 | m_ObjectHideFlags: 0 507 | m_CorrespondingSourceObject: {fileID: 0} 508 | m_PrefabInstance: {fileID: 0} 509 | m_PrefabAsset: {fileID: 0} 510 | m_GameObject: {fileID: 2132612957} 511 | m_Enabled: 1 512 | m_EditorHideFlags: 0 513 | m_Script: {fileID: 11500000, guid: 35eb6ac9b9e9b4df6bd49d6190b201ca, type: 3} 514 | m_Name: 515 | m_EditorClassIdentifier: 516 | target: {fileID: 996365727} 517 | draw: {fileID: 1116235277} 518 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scenes/MouseSpecificTest.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce70514aef7684f96b8a6a40d1d391ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scenes/ObjectViewer.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_UseShadowmask: 1 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | debug: 122 | m_Flags: 0 123 | m_NavMeshData: {fileID: 0} 124 | --- !u!1 &401263016 125 | GameObject: 126 | m_ObjectHideFlags: 0 127 | m_CorrespondingSourceObject: {fileID: 0} 128 | m_PrefabInstance: {fileID: 0} 129 | m_PrefabAsset: {fileID: 0} 130 | serializedVersion: 6 131 | m_Component: 132 | - component: {fileID: 401263018} 133 | - component: {fileID: 401263017} 134 | m_Layer: 0 135 | m_Name: Directional Light 136 | m_TagString: Untagged 137 | m_Icon: {fileID: 0} 138 | m_NavMeshLayer: 0 139 | m_StaticEditorFlags: 0 140 | m_IsActive: 1 141 | --- !u!108 &401263017 142 | Light: 143 | m_ObjectHideFlags: 0 144 | m_CorrespondingSourceObject: {fileID: 0} 145 | m_PrefabInstance: {fileID: 0} 146 | m_PrefabAsset: {fileID: 0} 147 | m_GameObject: {fileID: 401263016} 148 | m_Enabled: 1 149 | serializedVersion: 10 150 | m_Type: 1 151 | m_Shape: 0 152 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 153 | m_Intensity: 1 154 | m_Range: 10 155 | m_SpotAngle: 30 156 | m_InnerSpotAngle: 21.80208 157 | m_CookieSize: 10 158 | m_Shadows: 159 | m_Type: 2 160 | m_Resolution: -1 161 | m_CustomResolution: -1 162 | m_Strength: 1 163 | m_Bias: 0.05 164 | m_NormalBias: 0.4 165 | m_NearPlane: 0.2 166 | m_CullingMatrixOverride: 167 | e00: 1 168 | e01: 0 169 | e02: 0 170 | e03: 0 171 | e10: 0 172 | e11: 1 173 | e12: 0 174 | e13: 0 175 | e20: 0 176 | e21: 0 177 | e22: 1 178 | e23: 0 179 | e30: 0 180 | e31: 0 181 | e32: 0 182 | e33: 1 183 | m_UseCullingMatrixOverride: 0 184 | m_Cookie: {fileID: 0} 185 | m_DrawHalo: 0 186 | m_Flare: {fileID: 0} 187 | m_RenderMode: 0 188 | m_CullingMask: 189 | serializedVersion: 2 190 | m_Bits: 4294967295 191 | m_RenderingLayerMask: 1 192 | m_Lightmapping: 4 193 | m_LightShadowCasterMode: 0 194 | m_AreaSize: {x: 1, y: 1} 195 | m_BounceIntensity: 1 196 | m_ColorTemperature: 6570 197 | m_UseColorTemperature: 0 198 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 199 | m_UseBoundingSphereOverride: 0 200 | m_ShadowRadius: 0 201 | m_ShadowAngle: 0 202 | --- !u!4 &401263018 203 | Transform: 204 | m_ObjectHideFlags: 0 205 | m_CorrespondingSourceObject: {fileID: 0} 206 | m_PrefabInstance: {fileID: 0} 207 | m_PrefabAsset: {fileID: 0} 208 | m_GameObject: {fileID: 401263016} 209 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 210 | m_LocalPosition: {x: 0, y: 3, z: 0} 211 | m_LocalScale: {x: 1, y: 1, z: 1} 212 | m_Children: [] 213 | m_Father: {fileID: 0} 214 | m_RootOrder: 1 215 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 216 | --- !u!1 &499555602 217 | GameObject: 218 | m_ObjectHideFlags: 0 219 | m_CorrespondingSourceObject: {fileID: 0} 220 | m_PrefabInstance: {fileID: 0} 221 | m_PrefabAsset: {fileID: 0} 222 | serializedVersion: 6 223 | m_Component: 224 | - component: {fileID: 499555604} 225 | - component: {fileID: 499555603} 226 | m_Layer: 0 227 | m_Name: ObjectViewer 228 | m_TagString: Untagged 229 | m_Icon: {fileID: 0} 230 | m_NavMeshLayer: 0 231 | m_StaticEditorFlags: 0 232 | m_IsActive: 1 233 | --- !u!114 &499555603 234 | MonoBehaviour: 235 | m_ObjectHideFlags: 0 236 | m_CorrespondingSourceObject: {fileID: 0} 237 | m_PrefabInstance: {fileID: 0} 238 | m_PrefabAsset: {fileID: 0} 239 | m_GameObject: {fileID: 499555602} 240 | m_Enabled: 1 241 | m_EditorHideFlags: 0 242 | m_Script: {fileID: 11500000, guid: 34780bf6fba924e09932bb440a8d0878, type: 3} 243 | m_Name: 244 | m_EditorClassIdentifier: 245 | prefab: {fileID: 513631889714989923, guid: 03647b2e7284c4ec8b0463af07e26bf5, type: 3} 246 | draw: {fileID: 0} 247 | --- !u!4 &499555604 248 | Transform: 249 | m_ObjectHideFlags: 0 250 | m_CorrespondingSourceObject: {fileID: 0} 251 | m_PrefabInstance: {fileID: 0} 252 | m_PrefabAsset: {fileID: 0} 253 | m_GameObject: {fileID: 499555602} 254 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 255 | m_LocalPosition: {x: 0, y: 0, z: 0} 256 | m_LocalScale: {x: 1, y: 1, z: 1} 257 | m_Children: [] 258 | m_Father: {fileID: 0} 259 | m_RootOrder: 2 260 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 261 | --- !u!1001 &1809219038 262 | PrefabInstance: 263 | m_ObjectHideFlags: 0 264 | serializedVersion: 2 265 | m_Modification: 266 | m_TransformParent: {fileID: 0} 267 | m_Modifications: 268 | - target: {fileID: 3679204650330168672, guid: b95b759483322417498c923c773969db, 269 | type: 3} 270 | propertyPath: m_Name 271 | value: DrawTarget 272 | objectReference: {fileID: 0} 273 | - target: {fileID: 3679204650330168672, guid: b95b759483322417498c923c773969db, 274 | type: 3} 275 | propertyPath: m_IsActive 276 | value: 0 277 | objectReference: {fileID: 0} 278 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 279 | type: 3} 280 | propertyPath: m_LocalPosition.x 281 | value: 0 282 | objectReference: {fileID: 0} 283 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 284 | type: 3} 285 | propertyPath: m_LocalPosition.y 286 | value: 0 287 | objectReference: {fileID: 0} 288 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 289 | type: 3} 290 | propertyPath: m_LocalPosition.z 291 | value: -10 292 | objectReference: {fileID: 0} 293 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 294 | type: 3} 295 | propertyPath: m_LocalRotation.x 296 | value: -0.7071068 297 | objectReference: {fileID: 0} 298 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 299 | type: 3} 300 | propertyPath: m_LocalRotation.y 301 | value: 0 302 | objectReference: {fileID: 0} 303 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 304 | type: 3} 305 | propertyPath: m_LocalRotation.z 306 | value: 0 307 | objectReference: {fileID: 0} 308 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 309 | type: 3} 310 | propertyPath: m_LocalRotation.w 311 | value: 0.7071068 312 | objectReference: {fileID: 0} 313 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 314 | type: 3} 315 | propertyPath: m_RootOrder 316 | value: 3 317 | objectReference: {fileID: 0} 318 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 319 | type: 3} 320 | propertyPath: m_LocalEulerAnglesHint.x 321 | value: -90 322 | objectReference: {fileID: 0} 323 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 324 | type: 3} 325 | propertyPath: m_LocalEulerAnglesHint.y 326 | value: 0 327 | objectReference: {fileID: 0} 328 | - target: {fileID: 3679204650330168676, guid: b95b759483322417498c923c773969db, 329 | type: 3} 330 | propertyPath: m_LocalEulerAnglesHint.z 331 | value: 0 332 | objectReference: {fileID: 0} 333 | m_RemovedComponents: [] 334 | m_SourcePrefab: {fileID: 100100000, guid: b95b759483322417498c923c773969db, type: 3} 335 | --- !u!1 &2049141996 336 | GameObject: 337 | m_ObjectHideFlags: 0 338 | m_CorrespondingSourceObject: {fileID: 0} 339 | m_PrefabInstance: {fileID: 0} 340 | m_PrefabAsset: {fileID: 0} 341 | serializedVersion: 6 342 | m_Component: 343 | - component: {fileID: 2049141999} 344 | - component: {fileID: 2049141998} 345 | - component: {fileID: 2049141997} 346 | m_Layer: 0 347 | m_Name: Main Camera 348 | m_TagString: MainCamera 349 | m_Icon: {fileID: 0} 350 | m_NavMeshLayer: 0 351 | m_StaticEditorFlags: 0 352 | m_IsActive: 1 353 | --- !u!81 &2049141997 354 | AudioListener: 355 | m_ObjectHideFlags: 0 356 | m_CorrespondingSourceObject: {fileID: 0} 357 | m_PrefabInstance: {fileID: 0} 358 | m_PrefabAsset: {fileID: 0} 359 | m_GameObject: {fileID: 2049141996} 360 | m_Enabled: 1 361 | --- !u!20 &2049141998 362 | Camera: 363 | m_ObjectHideFlags: 0 364 | m_CorrespondingSourceObject: {fileID: 0} 365 | m_PrefabInstance: {fileID: 0} 366 | m_PrefabAsset: {fileID: 0} 367 | m_GameObject: {fileID: 2049141996} 368 | m_Enabled: 1 369 | serializedVersion: 2 370 | m_ClearFlags: 1 371 | m_BackGroundColor: {r: 0.120149545, g: 0.25050095, b: 0.5660378, a: 0} 372 | m_projectionMatrixMode: 1 373 | m_GateFitMode: 2 374 | m_FOVAxisMode: 0 375 | m_SensorSize: {x: 36, y: 24} 376 | m_LensShift: {x: 0, y: 0} 377 | m_FocalLength: 50 378 | m_NormalizedViewPortRect: 379 | serializedVersion: 2 380 | x: 0 381 | y: 0 382 | width: 1 383 | height: 1 384 | near clip plane: 0.3 385 | far clip plane: 1000 386 | field of view: 60 387 | orthographic: 0 388 | orthographic size: 5 389 | m_Depth: -1 390 | m_CullingMask: 391 | serializedVersion: 2 392 | m_Bits: 4294967295 393 | m_RenderingPath: -1 394 | m_TargetTexture: {fileID: 0} 395 | m_TargetDisplay: 0 396 | m_TargetEye: 3 397 | m_HDR: 1 398 | m_AllowMSAA: 1 399 | m_AllowDynamicResolution: 0 400 | m_ForceIntoRT: 0 401 | m_OcclusionCulling: 1 402 | m_StereoConvergence: 10 403 | m_StereoSeparation: 0.022 404 | --- !u!4 &2049141999 405 | Transform: 406 | m_ObjectHideFlags: 0 407 | m_CorrespondingSourceObject: {fileID: 0} 408 | m_PrefabInstance: {fileID: 0} 409 | m_PrefabAsset: {fileID: 0} 410 | m_GameObject: {fileID: 2049141996} 411 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 412 | m_LocalPosition: {x: 0, y: 1, z: -20} 413 | m_LocalScale: {x: 1, y: 1, z: 1} 414 | m_Children: [] 415 | m_Father: {fileID: 0} 416 | m_RootOrder: 0 417 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 418 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scenes/ObjectViewer.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a6f1c22c0ec3401a9422e105042e191 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scenes/ThrottleTest.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27e5bfb1fa2c8423f86b4fd8db099330 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scenes/TouchSpecificTest.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46ec21d08dd154ea29bc874e5d18e330 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: faf92ab68dc454bcb884b9a618ce4657 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/DoubleSequenceTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | using UniRx; 6 | using InputObservable; 7 | 8 | public class DoubleSequenceTest : MonoBehaviour 9 | { 10 | SliderController slider; 11 | DrawTargetView draw; 12 | InputObservableContext context = null; 13 | IDisposable disposable = null; 14 | 15 | void clear() 16 | { 17 | if(disposable!=null) { 18 | disposable.Dispose(); 19 | disposable = null; 20 | } 21 | } 22 | 23 | void setup() 24 | { 25 | clear(); 26 | disposable = context.GetObservable(0).DoubleSequence(slider.Value.Value).Subscribe(e => { 27 | draw.Put(e, Color.red); 28 | }); 29 | } 30 | 31 | void Start() 32 | { 33 | slider = FindObjectOfType(); 34 | slider.Text = "Interval: "; 35 | draw = FindObjectOfType(); 36 | 37 | context = this.DefaultInputContext(); 38 | context.GetObservable(0).OnBegin.TimeInterval().Subscribe(ts => { 39 | Debug.Log($"[{ts.Value.sequenceId}] {ts.Interval.Milliseconds}"); 40 | }).AddTo(this); 41 | 42 | slider.Enabled.Subscribe(v => 43 | { 44 | if (!v) 45 | { 46 | clear(); 47 | } 48 | else 49 | { 50 | setup(); 51 | } 52 | }).AddTo(this); 53 | slider.Value.Subscribe(v => setup()).AddTo(this); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/DoubleSequenceTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e11215679fdb04678903f8d7e44324ee 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/DragCubeView.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class DragCubeView : MonoBehaviour 6 | { 7 | public TextMesh textMesh; 8 | public MeshRenderer meshRenderer; 9 | 10 | public void SetText(string txt) 11 | { 12 | textMesh.text = txt; 13 | } 14 | 15 | public void SetColor(Color color) 16 | { 17 | meshRenderer.material.color = color; 18 | } 19 | 20 | public void DrawLine(Vector3 p) 21 | { 22 | var lr = GetComponent(); 23 | lr.enabled = true; 24 | lr.SetPosition(0, transform.position); 25 | lr.SetPosition(1, p); 26 | lr.startWidth = 0.01f; 27 | lr.endWidth = 0.01f; 28 | // lr.startColor = Color.green; 29 | // lr.endColor = Color.green; 30 | lr.material.color = Color.green; 31 | } 32 | 33 | // void Start() 34 | // { 35 | // Destroy(gameObject, 3.0f); 36 | // } 37 | } 38 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/DragCubeView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f277c445468f4a91b679601f1ffe70f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/DrawTargetView.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using InputObservable; 5 | using Shapes; 6 | 7 | public class DrawTargetView : MonoBehaviour 8 | { 9 | public GameObject pointPrefab; 10 | public GameObject dragCubePrefab; 11 | 12 | Dictionary dragList = new Dictionary(); 13 | Vector3 last; 14 | 15 | Dictionary cross = new Dictionary(); 16 | 17 | public void Put(InputEvent e, Color color, string msg = null) 18 | { 19 | RaycastHit hit; 20 | if (Physics.Raycast(Camera.main.ScreenPointToRay(e.position), out hit)) 21 | { 22 | var view = Instantiate(pointPrefab, hit.point, Quaternion.identity).GetComponent(); 23 | if (!string.IsNullOrEmpty(msg)) 24 | view.SetText(msg); 25 | view.SetColor(color); 26 | } 27 | } 28 | 29 | public void NewCross(InputEvent e, Color color) 30 | { 31 | RaycastHit hit; 32 | if (Physics.Raycast(Camera.main.ScreenPointToRay(e.position), out hit)) 33 | { 34 | var view = Instantiate(pointPrefab, hit.point, Quaternion.identity).GetComponent(); 35 | view.SetCross(color); 36 | cross[e.sender] = view.gameObject; 37 | } 38 | } 39 | 40 | public void MoveCross(InputEvent e) 41 | { 42 | RaycastHit hit; 43 | if (Physics.Raycast(Camera.main.ScreenPointToRay(e.position), out hit)) 44 | { 45 | if(hit.collider.gameObject!=gameObject) { 46 | return; 47 | } 48 | if (cross.ContainsKey(e.sender)) 49 | { 50 | cross[e.sender].transform.position = hit.point; 51 | } 52 | } 53 | } 54 | 55 | public void EndCross(InputEvent e) 56 | { 57 | if (cross.ContainsKey(e.sender)) 58 | { 59 | Destroy(cross[e.sender]); 60 | cross.Remove(e.sender); 61 | } 62 | } 63 | 64 | public void Put(VerocityInfo v, Color color, string msg = null) 65 | { 66 | RaycastHit hit; 67 | if (Physics.Raycast(Camera.main.ScreenPointToRay(v.@event.position), out hit)) 68 | { 69 | var view = Instantiate(pointPrefab, hit.point, Quaternion.identity).GetComponent(); 70 | if (!string.IsNullOrEmpty(msg)) 71 | view.SetText(msg); 72 | view.SetColor(color); 73 | view.SetVetor(v.vector, Color.white); 74 | } 75 | } 76 | 77 | public void Put(Vector2 pos, Vector2 vec, Color color, string msg) 78 | { 79 | RaycastHit hit; 80 | if (Physics.Raycast(Camera.main.ScreenPointToRay(pos), out hit)) 81 | { 82 | var view = Instantiate(pointPrefab, hit.point, Quaternion.identity).GetComponent(); 83 | if (!string.IsNullOrEmpty(msg)) 84 | view.SetText(msg); 85 | view.SetColor(color); 86 | view.SetVetor(vec, Color.white); 87 | } 88 | } 89 | 90 | public void DragBegin(InputEvent e, Color color, string msg = null) 91 | { 92 | RaycastHit hit; 93 | if (Physics.Raycast(Camera.main.ScreenPointToRay(e.position), out hit)) 94 | { 95 | dragList[e.sequenceId] = new GameObject($"{e.sender}-{e.sequenceId}"); 96 | 97 | var view = Instantiate(dragCubePrefab, hit.point, Quaternion.identity).GetComponent(); 98 | Destroy(view.gameObject.GetComponent()); // Remove LineRnederer for first point. 99 | if (!string.IsNullOrEmpty(msg)) 100 | view.SetText(msg); 101 | view.SetColor(color); 102 | view.gameObject.name = e.ToString(); 103 | view.gameObject.transform.parent = dragList[e.sequenceId].transform; 104 | last = hit.point; 105 | } 106 | } 107 | 108 | public void Dragging(InputEvent e, Color color, string msg = null) 109 | { 110 | RaycastHit hit; 111 | if (Physics.Raycast(Camera.main.ScreenPointToRay(e.position), out hit)) 112 | { 113 | var view = Instantiate(dragCubePrefab, hit.point, Quaternion.identity).GetComponent(); 114 | if (!string.IsNullOrEmpty(msg)) 115 | view.SetText(msg); 116 | view.SetColor(color); 117 | view.DrawLine(last); 118 | view.gameObject.name = e.ToString(); 119 | view.gameObject.transform.parent = dragList[e.sequenceId].transform; 120 | last = hit.point; 121 | } 122 | } 123 | 124 | public void DragEnd(InputEvent e, Color color, string msg = null) 125 | { 126 | RaycastHit hit; 127 | if (Physics.Raycast(Camera.main.ScreenPointToRay(e.position), out hit)) 128 | { 129 | var view = Instantiate(dragCubePrefab, hit.point, Quaternion.identity).GetComponent(); 130 | if (!string.IsNullOrEmpty(msg)) 131 | view.SetText(msg); 132 | view.SetColor(color); 133 | view.DrawLine(last); 134 | view.gameObject.name = e.ToString(); 135 | view.gameObject.transform.parent = dragList[e.sequenceId].transform; 136 | StartCoroutine(DestroyDrag(e.sequenceId)); 137 | } 138 | } 139 | 140 | IEnumerator DestroyDrag(long id) 141 | { 142 | yield return new WaitForSeconds(3); 143 | Destroy(dragList[id]); 144 | dragList.Remove(id); 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/DrawTargetView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ecb04182f21ec47dea19ca791a87720d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/GyroCameraController.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | using UnityEngine.UI; 6 | using UnityEngine.EventSystems; 7 | using UniRx; 8 | using InputObservable; 9 | 10 | public class GyroCameraController : MonoBehaviour 11 | { 12 | public Text text; 13 | public Button resetButton; 14 | 15 | void Start() 16 | { 17 | // Cursor.visible = false; 18 | 19 | var gyro = new GyroInputObservable(this); 20 | 21 | gyro.EulerAngles.Subscribe(e => 22 | { 23 | transform.rotation = Quaternion.Euler(e); 24 | text.text = $"Pos: {transform.position}, Rot: {transform.rotation.eulerAngles}"; 25 | }).AddTo(this); 26 | 27 | // reset gyro rotation 28 | resetButton.OnClickAsObservable() 29 | .Subscribe(_ => { gyro.Reset(); }) 30 | .AddTo(this); 31 | 32 | // Screen Touch (or Mouse) to gyro input emulation 33 | var context = this.DefaultInputContext(EventSystem.current); 34 | var hratio = -90.0f / Screen.width; 35 | var vratio = -90.0f / Screen.height; 36 | context.GetObservable(0) 37 | .Difference() 38 | .Subscribe(diff => gyro.AddRotate(diff.ToEulerAngle(hratio, vratio))) 39 | .AddTo(this); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/GyroCameraController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 064c23b212e5f456abab14ef464bf66d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/MouseSpecificTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | using UniRx; 7 | using InputObservable; 8 | 9 | public class MouseSpecificTest : MonoBehaviour 10 | { 11 | public GameObject target; 12 | public DrawTargetView draw; 13 | 14 | Action mouseDrawHandler(Color c) 15 | { 16 | return (InputEvent e) => 17 | { 18 | Debug.Log(e); 19 | if (e.type == InputEventType.Begin) 20 | draw.DragBegin(e, c); 21 | else 22 | draw.Dragging(e, c); 23 | }; 24 | } 25 | 26 | void Start() 27 | { 28 | var context = new MouseInputContext(this, null); 29 | context.Wheel.Subscribe(e => 30 | { 31 | target.transform.Translate(Vector3.forward * e.wheel); 32 | }).AddTo(this); 33 | 34 | var left = context.GetObservable(0); 35 | left.Any().Subscribe(mouseDrawHandler(Color.blue)); 36 | context.GetObservable(1).Any().Subscribe(mouseDrawHandler(Color.yellow)); 37 | context.GetObservable(2).Any().Subscribe(mouseDrawHandler(Color.magenta)); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/MouseSpecificTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35eb6ac9b9e9b4df6bd49d6190b201ca 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/ObjectViewer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | using UniRx; 7 | using InputObservable; 8 | 9 | public class ObjectViewer : MonoBehaviour 10 | { 11 | public GameObject prefab; 12 | public DrawTargetView draw; 13 | Transform _target; 14 | Rigidbody _rigidbody; 15 | 16 | void Awake() 17 | { 18 | var go = Instantiate(prefab); 19 | _target = go.transform; 20 | _rigidbody = go.AddComponent(); 21 | _rigidbody.useGravity = false; 22 | _rigidbody.angularDrag = 1f; 23 | _rigidbody.maxAngularVelocity = 20; 24 | } 25 | 26 | void Start() 27 | { 28 | var context = this.DefaultInputContext(); 29 | TouchFeedback.Setup(context, draw, this); 30 | var touch0 = context.GetObservable(0); 31 | var touch1 = context.GetObservable(1); 32 | 33 | touch0.Any().Where(e => e.type != InputEventType.Move).Subscribe(e => { Debug.Log(e); }).AddTo(this); 34 | touch1.Any().Where(e => e.type != InputEventType.Move).Subscribe(e => { Debug.Log(e); }).AddTo(this); 35 | 36 | // Stop Rotation by keep touch 37 | touch0.Keep(100, () => _rigidbody.angularVelocity.x > 0 || _rigidbody.angularVelocity.y > 0 || _rigidbody.angularVelocity.z > 0) 38 | .Subscribe(_ => { 39 | Debug.Log("break"); 40 | var m = _rigidbody.angularVelocity.magnitude; 41 | _rigidbody.angularVelocity = (m < 0.1f) ? Vector3.zero : _rigidbody.angularVelocity * 0.1f; 42 | }).AddTo(this); 43 | 44 | // Rotate by Touch Operation 45 | var hratio = -180.0f / Screen.width; 46 | var vratio = -180.0f / Screen.height; 47 | touch0.Difference() 48 | .Where(_ => !touch1.IsBegin) 49 | .Subscribe(v2 => 50 | { 51 | var rot = v2.ToEulerAngle(hratio, vratio); 52 | _target.Rotate(rot, Space.World); 53 | }).AddTo(this); 54 | 55 | // Rotate Animation by Swipe operation 56 | touch0.TakeLastVerocities(4) 57 | .Subscribe(vs => 58 | { 59 | var average = new Vector2 60 | { 61 | x = vs.Average(vi => vi.vector.x), 62 | y = vs.Average(vi => vi.vector.y) 63 | }; 64 | Debug.Log($"vector = {average}"); 65 | var mag = average.magnitude; 66 | if (mag > 0.1f) 67 | { 68 | var torque = average.ToEulerAngle(hratio, vratio) * mag; 69 | _rigidbody.AddTorque(torque, ForceMode.VelocityChange); 70 | Debug.Log($"magnitude = {mag}, torque={torque}"); 71 | 72 | if (draw != null) 73 | { 74 | TouchFeedback.DrawSwipeArrow(draw, 75 | vs.First().@event.position, 76 | average, 77 | $"{average}, {mag}"); 78 | } 79 | } 80 | }).AddTo(this); 81 | 82 | // Reset 83 | var orig_rotate = _target.rotation; 84 | var orig_scale = _target.localScale; 85 | touch0.DoubleSequence(200).Subscribe(_ => 86 | { 87 | _target.rotation = orig_rotate; 88 | _target.localScale = orig_scale; 89 | }).AddTo(this); 90 | 91 | // Scale Object by Mouse Wheel 92 | var camera = Camera.main; 93 | (context as IMouseWheelObservable)?.Wheel.Subscribe(v => 94 | { 95 | var scale = _target.localScale + Vector3.one * v.wheel; 96 | if(0.1 < scale.x && scale.x < 10) 97 | _target.localScale += Vector3.one * v.wheel; 98 | }).AddTo(this); 99 | 100 | // Scale Object by Pinch Operation 101 | RectangleObservable.From(touch0, touch1) 102 | .PinchSequence() 103 | .RepeatUntilDestroy(this) 104 | .Subscribe(diff => 105 | { 106 | if (diff.x > 0 && diff.y > 0) 107 | { 108 | var v = Mathf.Max(diff.x / Screen.width, diff.y / Screen.height); 109 | var scale = _target.localScale + Vector3.one * v * 10; 110 | if (scale.x < 10) 111 | { 112 | _target.localScale = scale; 113 | Debug.Log($"pinch-out: diff={diff}, v={v}, localScale={_target.localScale}"); 114 | } 115 | } 116 | else if (diff.x < 0 && diff.y < 0) 117 | { 118 | var v = Mathf.Min(diff.x / Screen.width, diff.y / Screen.height); 119 | var scale = _target.localScale + Vector3.one * v * 10; 120 | if (scale.x > 0.1) 121 | { 122 | _target.localScale = scale; 123 | Debug.Log($"pinch-in: diff={diff}, v={v}, localScale={_target.localScale}"); 124 | } 125 | } 126 | }).AddTo(this); 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/ObjectViewer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 34780bf6fba924e09932bb440a8d0878 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/PointView.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using Shapes; 5 | 6 | public class PointView : MonoBehaviour 7 | { 8 | public TextMesh textMesh; 9 | MeshRenderer meshRenderer; 10 | bool vector = false; 11 | public LineInfo vecInfo; 12 | bool cross = false; 13 | LineInfo line1; 14 | LineInfo line2; 15 | 16 | public void SetText(string txt) 17 | { 18 | textMesh.text = txt; 19 | } 20 | 21 | public void SetColor(Color color) 22 | { 23 | meshRenderer.material.color = color; 24 | } 25 | 26 | public void SetVetor(Vector2 vec, Color color) 27 | { 28 | vector = true; 29 | var width = 0.05f; 30 | vecInfo = new LineInfo() 31 | { 32 | startPos = transform.position, 33 | endPos = transform.position + Vector3.right * vec.x / 2 + Vector3.up * vec.y / 2, 34 | width = width, 35 | fillColor = color, 36 | forward = Camera.main.transform.forward, 37 | endArrow = true, 38 | arrowWidth = width + 0.2f, 39 | arrowLength = 0.3f, 40 | }; 41 | } 42 | 43 | public void SetCross(Color color) 44 | { 45 | cross = true; 46 | var X = transform.position.x; 47 | var Y = transform.position.y; 48 | var Z = transform.position.z; 49 | line1 = new LineInfo() 50 | { 51 | startPos = new Vector3(-100, Y, Z), 52 | endPos = new Vector3(100, Y, Z), 53 | width = 0.03f, 54 | fillColor = color, 55 | forward = Camera.main.transform.forward, 56 | }; 57 | line2 = new LineInfo() 58 | { 59 | startPos = new Vector3(X, -100, Z), 60 | endPos = new Vector3(X, 100, Z), 61 | width = 0.03f, 62 | fillColor = color, 63 | forward = Camera.main.transform.forward, 64 | }; 65 | } 66 | 67 | void Awake() 68 | { 69 | meshRenderer = GetComponent(); 70 | } 71 | 72 | void Start() 73 | { 74 | if(!cross) 75 | Destroy(gameObject, 3.0f); 76 | } 77 | 78 | void Update() 79 | { 80 | if(vector) { 81 | LineSegment.Draw(vecInfo); 82 | } 83 | if(cross) { 84 | line1.startPos.y = transform.position.y; 85 | line1.endPos.y = transform.position.y; 86 | LineSegment.Draw(line1); 87 | line2.startPos.x = transform.position.x; 88 | line2.endPos.x = transform.position.x; 89 | LineSegment.Draw(line2); 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/PointView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a079d4d57f21e4f89af18f26991ddfc4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/ShapesTest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using Shapes; 5 | 6 | public class ShapesTest : MonoBehaviour 7 | { 8 | public Vector3 forward = Vector3.forward; 9 | 10 | [Range(0.05f, 2.0f)] 11 | public float width = 0.1f; 12 | 13 | void Update() 14 | { 15 | LineSegment.Draw(new LineInfo() 16 | { 17 | startPos = new Vector3(-1, 0, 0), 18 | endPos = new Vector3(1, 0, 0), 19 | fillColor = Color.red, 20 | // forward = -Camera.main.transform.forward, 21 | forward = forward, 22 | width = width, 23 | // startArrow = true, 24 | endArrow = true, 25 | arrowWidth = width + 0.2f, 26 | arrowLength = 0.3f 27 | }); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/ShapesTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ccc73439021ed4a74834884f5e39631c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/SliderController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | using UniRx; 6 | using UniRx.Triggers; 7 | 8 | public class SliderController : MonoBehaviour 9 | { 10 | public Text stringText; 11 | public Text intervalText; 12 | public Slider slider; 13 | public Toggle toggle; 14 | 15 | ReactiveProperty _value = new ReactiveProperty(); 16 | ReactiveProperty _enabled = new ReactiveProperty(); 17 | 18 | void Start() 19 | { 20 | slider.OnValueChangedAsObservable().Subscribe(v => 21 | { 22 | intervalText.text = $"{v} (ms)"; 23 | _value.Value = v; 24 | }).AddTo(this); 25 | 26 | toggle.OnValueChangedAsObservable().SubscribeToInteractable(slider); 27 | 28 | string back = intervalText.text; 29 | toggle.OnValueChangedAsObservable().Subscribe(v => { 30 | if (!v) 31 | { 32 | back = intervalText.text; 33 | intervalText.text = ""; 34 | } else { 35 | intervalText.text = back; 36 | } 37 | _enabled.Value = v; 38 | }).AddTo(this); 39 | } 40 | 41 | public IReadOnlyReactiveProperty Value { get => _value; } 42 | public IReadOnlyReactiveProperty Enabled { get => _enabled; } 43 | public string Text { set => stringText.text = value; } 44 | } 45 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/SliderController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fcba7656bb4e44592b2ad1696ba2fa81 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/TestMain.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | using UniRx; 7 | using InputObservable; 8 | 9 | public class TestMain : MonoBehaviour 10 | { 11 | public DrawTargetView draw; 12 | public UICanvasView ui; 13 | 14 | CompositeDisposable disposables = new CompositeDisposable(); 15 | 16 | void log(string msg) 17 | { 18 | Debug.Log(msg); 19 | } 20 | 21 | void clear() 22 | { 23 | disposables.Clear(); 24 | } 25 | 26 | void TraceBasic(IInputObservable io) 27 | { 28 | io.OnBegin.Subscribe(e => 29 | { 30 | log(e.ToString()); 31 | draw.Put(e, Color.red); 32 | }).AddTo(disposables); 33 | 34 | io.OnMove.Subscribe(e => 35 | { 36 | log(e.ToString()); 37 | draw.Put(e, Color.black); 38 | }).AddTo(disposables); 39 | 40 | io.OnEnd.Subscribe(e => 41 | { 42 | log(e.ToString()); 43 | draw.Put(e, Color.yellow); 44 | }).AddTo(disposables); 45 | } 46 | 47 | void TraceLumpPoints(IInputObservable io) 48 | { 49 | io.Any().Buffer(io.OnEnd).Subscribe(es => 50 | { 51 | log($"Seqeuence {es.Count} points"); 52 | log($" {es[0]}"); 53 | if (es.Count > 2) 54 | { 55 | log($" {string.Join(",", es.Select((e, i) => (e, i)).Where((e, i) => 1 <= i && i < es.Count - 1).Select(x => x.e.position.ToString()))}"); 56 | } 57 | log($" {es[es.Count - 1]}"); 58 | foreach (var e in es) 59 | { 60 | switch (e.type) 61 | { 62 | case InputEventType.Begin: 63 | draw.Put(e, Color.red); 64 | break; 65 | case InputEventType.Move: 66 | draw.Put(e, Color.black); 67 | break; 68 | case InputEventType.End: 69 | draw.Put(e, Color.yellow); 70 | break; 71 | } 72 | } 73 | }).AddTo(disposables); 74 | } 75 | 76 | void TraceDoubleTap(IInputObservable io) 77 | { 78 | io.DoubleSequence(250).Subscribe(e => 79 | { 80 | var msg = $"double click/tap ({e})"; 81 | log(msg); 82 | draw.Put(e, Color.blue); 83 | }).AddTo(disposables); 84 | } 85 | 86 | void TraceLongPress(IInputObservable io) 87 | { 88 | io.LongSequence(500).Subscribe(e => 89 | { 90 | log($"long press at {e}"); 91 | draw.Put(e, Color.green); 92 | }).AddTo(disposables); 93 | } 94 | 95 | void TraceDragAndDrop(IInputObservable io) 96 | { 97 | io.LongSequence(500).Subscribe(begin => 98 | { 99 | log($"Drag begin at. {begin}"); 100 | draw.DragBegin(begin, Color.green, begin.ToString()); 101 | 102 | io.MoveThrottle(100).TakeUntil(io.OnEnd).Subscribe(drag => 103 | { 104 | log($"Dragging. {drag}"); 105 | draw.Dragging(drag, Color.green, drag.ToString()); 106 | }).AddTo(disposables); 107 | 108 | io.OnEnd.First().Subscribe(drop => 109 | { 110 | log($"Drop at. {drop}"); 111 | draw.DragEnd(drop, Color.green, drop.ToString()); 112 | }).AddTo(disposables); 113 | }).AddTo(disposables); 114 | } 115 | 116 | void TraceLastVerocity(IInputObservable io, int count) 117 | { 118 | io.Any().Subscribe(e => 119 | { 120 | draw.Put(e, Color.blue); 121 | }).AddTo(disposables); 122 | 123 | io.TakeLastVerocities(count).Subscribe(vs => 124 | { 125 | log(string.Join(", ", vs.Select(vi => vi.ToString()))); 126 | foreach (var v in vs) 127 | { 128 | draw.Put(v, Color.magenta); 129 | } 130 | }).AddTo(disposables); 131 | } 132 | 133 | void TraceAllVerocity(IInputObservable io) 134 | { 135 | io.Any().Subscribe(e => 136 | { 137 | Debug.Log(e); 138 | draw.Put(e, Color.blue); 139 | }).AddTo(disposables); 140 | 141 | io.Verocity().Subscribe(v => 142 | { 143 | Debug.Log($">> {v}"); 144 | draw.Put(v, Color.magenta); 145 | }).AddTo(disposables); 146 | } 147 | 148 | void Start() 149 | { 150 | var io = this.DefaultInputContext().GetObservable(0); 151 | 152 | ui.SelectedToggle.Subscribe(type => 153 | { 154 | log(type); 155 | clear(); 156 | 157 | if (type == "Basic") 158 | TraceBasic(io); 159 | else if (type == "Lump") 160 | TraceLumpPoints(io); 161 | else if (type == "Double") 162 | TraceDoubleTap(io); 163 | else if (type == "LongPress") 164 | TraceLongPress(io); 165 | else if (type == "DragAndDrop") 166 | TraceDragAndDrop(io); 167 | else if (type == "Last4V") 168 | TraceLastVerocity(io, 4); 169 | else if (type == "Last16V") 170 | TraceLastVerocity(io, 16); 171 | else if (type == "Verocity") 172 | TraceAllVerocity(io); 173 | else 174 | Debug.LogError($"not found: {type}"); 175 | }).AddTo(this); 176 | } 177 | } 178 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/TestMain.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e0438a53b6e44ea89409701704f5db0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/ThrottleTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | using UniRx; 6 | using InputObservable; 7 | 8 | public class ThrottleTest : MonoBehaviour 9 | { 10 | void Start() 11 | { 12 | var throttleSlider = FindObjectOfType(); 13 | throttleSlider.Text = "Throttle: "; 14 | var draw = FindObjectOfType(); 15 | 16 | var io = this.DefaultInputContext().GetObservable(0); 17 | 18 | io.OnBegin.Subscribe(e => { 19 | draw.DragBegin(e, Color.black); 20 | 21 | IObservable move; 22 | if(throttleSlider.Enabled.Value) { 23 | move = io.MoveThrottle(throttleSlider.Value.Value); 24 | } else { 25 | move = io.OnMove; 26 | } 27 | move.TakeUntil(io.OnEnd).FrameInterval().Subscribe(ts => 28 | { 29 | // Time.frameCount 30 | draw.Dragging(ts.Value, Color.red, ts.Interval.ToString()); 31 | }).AddTo(this); 32 | 33 | io.OnEnd.First().Subscribe(ee => 34 | { 35 | draw.DragEnd(ee, Color.gray); 36 | }).AddTo(this); 37 | 38 | }).AddTo(this); 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/ThrottleTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a0e3a01f4a194d808ac3fe69002b59a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/TouchSpecificTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | using UnityEngine.UI; 7 | using UniRx; 8 | using UniRx.Diagnostics; 9 | using InputObservable; 10 | 11 | public static class TouchFeedback 12 | { 13 | static Action touchDrawHandler(DrawTargetView draw, Color c) 14 | { 15 | return (InputEvent e) => 16 | { 17 | Debug.Log(e); 18 | switch (e.type) 19 | { 20 | case InputEventType.Begin: 21 | draw.NewCross(e, c); 22 | break; 23 | case InputEventType.Move: 24 | draw.MoveCross(e); 25 | break; 26 | case InputEventType.End: 27 | draw.EndCross(e); 28 | break; 29 | } 30 | }; 31 | } 32 | 33 | public static List Setup(InputObservableContext context, DrawTargetView draw, Component component) 34 | { 35 | var ios = new List(); 36 | if (draw == null || component == null) 37 | { 38 | return ios; 39 | } 40 | var colors = new List { Color.green, Color.yellow, Color.red, Color.blue, Color.black }; 41 | foreach (var (index, color) in colors.Select((color, index) => (index, color))) 42 | { 43 | try 44 | { 45 | var io = context.GetObservable(index); 46 | io.Any().Subscribe(touchDrawHandler(draw, color)).AddTo(component); 47 | ios.Add(io); 48 | }catch(IndexOutOfRangeException e) { 49 | Debug.Log($"{e} ignore"); 50 | break; 51 | } 52 | } 53 | return ios; 54 | } 55 | 56 | public static void DrawSwipeArrow(DrawTargetView draw, Vector2 pos, Vector2 vector, string msg) 57 | { 58 | draw.Put(pos, vector, Color.red, msg); 59 | } 60 | } 61 | 62 | public class TouchSpecificTest : MonoBehaviour 63 | { 64 | public DrawTargetView draw; 65 | public Text text; 66 | public Text text2; 67 | 68 | 69 | void Start() 70 | { 71 | var context = this.DefaultInputContext(); 72 | var ios = TouchFeedback.Setup(context, draw, this); 73 | 74 | // Reset by finger release 75 | Observable.Merge(ios[0].OnEnd, ios[1].OnEnd).Subscribe(_ => 76 | { 77 | text.text = ""; 78 | text2.text = ""; 79 | }).AddTo(this); 80 | 81 | var ro = RectangleObservable.From(ios[0], ios[1]); 82 | 83 | // Rectangle 84 | ro.RepeatUntilDestroy(this).Subscribe(rect => 85 | { 86 | Debug.Log($"Rect: {rect}"); 87 | text.text = rect.ToString(); 88 | }).AddTo(this); 89 | 90 | // Pinch In/Out Detection 91 | ro.PinchSequence() 92 | .RepeatUntilDestroy(this) 93 | .Subscribe(diff => 94 | { 95 | Debug.Log($"Horizontal: {diff.x}, Vertical: {diff.y}"); 96 | string th = ""; 97 | string tv = ""; 98 | 99 | if (diff.x < 0) th = $"dX={diff.x}"; 100 | else if (diff.x > 0) th = $"dX={diff.x}"; 101 | else th = $"{diff.x}"; 102 | 103 | if (diff.y < 0) tv = $"dY={diff.y}"; 104 | else if (diff.y > 0) tv = $"dY={diff.y}"; 105 | else tv = $"{diff.x}"; 106 | 107 | text2.text = $"{th}, {tv}"; 108 | }).AddTo(this); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/TouchSpecificTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d93df991902964d4198ed78317ff0235 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/UICanvasView.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | using UnityEngine.UI; 7 | using UniRx; 8 | using UniRx.Toolkit; 9 | 10 | public class UICanvasView : MonoBehaviour 11 | { 12 | public ToggleGroup toggleGroup; 13 | public IReadOnlyReactiveProperty SelectedToggle { get; private set; } 14 | 15 | void Start() 16 | { 17 | SelectedToggle = toggleGroup.ObserveEveryValueChanged(x => toggleGroup.ActiveToggles().FirstOrDefault()) 18 | .Select(t => t.name) 19 | .ToReadOnlyReactiveProperty(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets/InputObservable/Samples~/Scripts/UICanvasView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca6288ed29656426797477be91bc139a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/InputObservable/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.jtfrom9.input-observable", 3 | "displayName": "Input Observable", 4 | "description": "Input Handling Utility with UniRx", 5 | "version": "0.1.3", 6 | "unity": "2019.4", 7 | "author": { 8 | "name": "jtfrom9", 9 | "email": "jun.tachikawa@gmail.com" 10 | }, 11 | "dependencies": { 12 | "com.neuecc.unirx": "7.1.0" 13 | }, 14 | "samples": [ 15 | { 16 | "displayName": "Samples", 17 | "description": "Samples for InputObservable", 18 | "path": "Samples~" 19 | } 20 | ] 21 | } -------------------------------------------------------------------------------- /Assets/InputObservable/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e3cd9fb2894d84aa1929f2ac08dc70a9 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Jun Tachikawa 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.miguel12345.unity-shapes": "1.0.0", 4 | "com.neuecc.unirx": "7.1.0", 5 | "com.unity.collab-proxy": "1.2.16", 6 | "com.unity.device-simulator": "2.2.3-preview", 7 | "com.unity.ide.rider": "1.1.4", 8 | "com.unity.ide.vscode": "1.2.3", 9 | "com.unity.test-framework": "1.1.18", 10 | "com.unity.textmeshpro": "2.0.1", 11 | "com.unity.timeline": "1.2.14", 12 | "com.unity.ugui": "1.0.0", 13 | "com.unity.modules.ai": "1.0.0", 14 | "com.unity.modules.androidjni": "1.0.0", 15 | "com.unity.modules.animation": "1.0.0", 16 | "com.unity.modules.assetbundle": "1.0.0", 17 | "com.unity.modules.audio": "1.0.0", 18 | "com.unity.modules.cloth": "1.0.0", 19 | "com.unity.modules.director": "1.0.0", 20 | "com.unity.modules.imageconversion": "1.0.0", 21 | "com.unity.modules.imgui": "1.0.0", 22 | "com.unity.modules.jsonserialize": "1.0.0", 23 | "com.unity.modules.particlesystem": "1.0.0", 24 | "com.unity.modules.physics": "1.0.0", 25 | "com.unity.modules.physics2d": "1.0.0", 26 | "com.unity.modules.screencapture": "1.0.0", 27 | "com.unity.modules.terrain": "1.0.0", 28 | "com.unity.modules.terrainphysics": "1.0.0", 29 | "com.unity.modules.tilemap": "1.0.0", 30 | "com.unity.modules.ui": "1.0.0", 31 | "com.unity.modules.uielements": "1.0.0", 32 | "com.unity.modules.umbra": "1.0.0", 33 | "com.unity.modules.unityanalytics": "1.0.0", 34 | "com.unity.modules.unitywebrequest": "1.0.0", 35 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 36 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 37 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 38 | "com.unity.modules.unitywebrequestwww": "1.0.0", 39 | "com.unity.modules.vehicles": "1.0.0", 40 | "com.unity.modules.video": "1.0.0", 41 | "com.unity.modules.vr": "1.0.0", 42 | "com.unity.modules.wind": "1.0.0", 43 | "com.unity.modules.xr": "1.0.0" 44 | }, 45 | "scopedRegistries": [ 46 | { 47 | "name": "package.openupm.com", 48 | "url": "https://package.openupm.com", 49 | "scopes": [ 50 | "com.miguel12345.unity-shapes", 51 | "com.neuecc.unirx", 52 | "com.openupm" 53 | ] 54 | } 55 | ] 56 | } 57 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.miguel12345.unity-shapes": { 4 | "version": "1.0.0", 5 | "depth": 0, 6 | "source": "registry", 7 | "dependencies": {}, 8 | "url": "https://package.openupm.com" 9 | }, 10 | "com.neuecc.unirx": { 11 | "version": "7.1.0", 12 | "depth": 0, 13 | "source": "registry", 14 | "dependencies": {}, 15 | "url": "https://package.openupm.com" 16 | }, 17 | "com.unity.collab-proxy": { 18 | "version": "1.2.16", 19 | "depth": 0, 20 | "source": "registry", 21 | "dependencies": {}, 22 | "url": "https://packages.unity.com" 23 | }, 24 | "com.unity.device-simulator": { 25 | "version": "2.2.3-preview", 26 | "depth": 0, 27 | "source": "registry", 28 | "dependencies": {}, 29 | "url": "https://packages.unity.com" 30 | }, 31 | "com.unity.ext.nunit": { 32 | "version": "1.0.0", 33 | "depth": 1, 34 | "source": "registry", 35 | "dependencies": {}, 36 | "url": "https://packages.unity.com" 37 | }, 38 | "com.unity.ide.rider": { 39 | "version": "1.1.4", 40 | "depth": 0, 41 | "source": "registry", 42 | "dependencies": { 43 | "com.unity.test-framework": "1.1.1" 44 | }, 45 | "url": "https://packages.unity.com" 46 | }, 47 | "com.unity.ide.vscode": { 48 | "version": "1.2.3", 49 | "depth": 0, 50 | "source": "registry", 51 | "dependencies": {}, 52 | "url": "https://packages.unity.com" 53 | }, 54 | "com.unity.test-framework": { 55 | "version": "1.1.18", 56 | "depth": 0, 57 | "source": "registry", 58 | "dependencies": { 59 | "com.unity.ext.nunit": "1.0.0", 60 | "com.unity.modules.imgui": "1.0.0", 61 | "com.unity.modules.jsonserialize": "1.0.0" 62 | }, 63 | "url": "https://packages.unity.com" 64 | }, 65 | "com.unity.textmeshpro": { 66 | "version": "2.0.1", 67 | "depth": 0, 68 | "source": "registry", 69 | "dependencies": { 70 | "com.unity.ugui": "1.0.0" 71 | }, 72 | "url": "https://packages.unity.com" 73 | }, 74 | "com.unity.timeline": { 75 | "version": "1.2.14", 76 | "depth": 0, 77 | "source": "registry", 78 | "dependencies": {}, 79 | "url": "https://packages.unity.com" 80 | }, 81 | "com.unity.ugui": { 82 | "version": "1.0.0", 83 | "depth": 0, 84 | "source": "builtin", 85 | "dependencies": { 86 | "com.unity.modules.ui": "1.0.0", 87 | "com.unity.modules.imgui": "1.0.0" 88 | } 89 | }, 90 | "com.unity.modules.ai": { 91 | "version": "1.0.0", 92 | "depth": 0, 93 | "source": "builtin", 94 | "dependencies": {} 95 | }, 96 | "com.unity.modules.androidjni": { 97 | "version": "1.0.0", 98 | "depth": 0, 99 | "source": "builtin", 100 | "dependencies": {} 101 | }, 102 | "com.unity.modules.animation": { 103 | "version": "1.0.0", 104 | "depth": 0, 105 | "source": "builtin", 106 | "dependencies": {} 107 | }, 108 | "com.unity.modules.assetbundle": { 109 | "version": "1.0.0", 110 | "depth": 0, 111 | "source": "builtin", 112 | "dependencies": {} 113 | }, 114 | "com.unity.modules.audio": { 115 | "version": "1.0.0", 116 | "depth": 0, 117 | "source": "builtin", 118 | "dependencies": {} 119 | }, 120 | "com.unity.modules.cloth": { 121 | "version": "1.0.0", 122 | "depth": 0, 123 | "source": "builtin", 124 | "dependencies": { 125 | "com.unity.modules.physics": "1.0.0" 126 | } 127 | }, 128 | "com.unity.modules.director": { 129 | "version": "1.0.0", 130 | "depth": 0, 131 | "source": "builtin", 132 | "dependencies": { 133 | "com.unity.modules.audio": "1.0.0", 134 | "com.unity.modules.animation": "1.0.0" 135 | } 136 | }, 137 | "com.unity.modules.imageconversion": { 138 | "version": "1.0.0", 139 | "depth": 0, 140 | "source": "builtin", 141 | "dependencies": {} 142 | }, 143 | "com.unity.modules.imgui": { 144 | "version": "1.0.0", 145 | "depth": 0, 146 | "source": "builtin", 147 | "dependencies": {} 148 | }, 149 | "com.unity.modules.jsonserialize": { 150 | "version": "1.0.0", 151 | "depth": 0, 152 | "source": "builtin", 153 | "dependencies": {} 154 | }, 155 | "com.unity.modules.particlesystem": { 156 | "version": "1.0.0", 157 | "depth": 0, 158 | "source": "builtin", 159 | "dependencies": {} 160 | }, 161 | "com.unity.modules.physics": { 162 | "version": "1.0.0", 163 | "depth": 0, 164 | "source": "builtin", 165 | "dependencies": {} 166 | }, 167 | "com.unity.modules.physics2d": { 168 | "version": "1.0.0", 169 | "depth": 0, 170 | "source": "builtin", 171 | "dependencies": {} 172 | }, 173 | "com.unity.modules.screencapture": { 174 | "version": "1.0.0", 175 | "depth": 0, 176 | "source": "builtin", 177 | "dependencies": { 178 | "com.unity.modules.imageconversion": "1.0.0" 179 | } 180 | }, 181 | "com.unity.modules.subsystems": { 182 | "version": "1.0.0", 183 | "depth": 1, 184 | "source": "builtin", 185 | "dependencies": { 186 | "com.unity.modules.jsonserialize": "1.0.0" 187 | } 188 | }, 189 | "com.unity.modules.terrain": { 190 | "version": "1.0.0", 191 | "depth": 0, 192 | "source": "builtin", 193 | "dependencies": {} 194 | }, 195 | "com.unity.modules.terrainphysics": { 196 | "version": "1.0.0", 197 | "depth": 0, 198 | "source": "builtin", 199 | "dependencies": { 200 | "com.unity.modules.physics": "1.0.0", 201 | "com.unity.modules.terrain": "1.0.0" 202 | } 203 | }, 204 | "com.unity.modules.tilemap": { 205 | "version": "1.0.0", 206 | "depth": 0, 207 | "source": "builtin", 208 | "dependencies": { 209 | "com.unity.modules.physics2d": "1.0.0" 210 | } 211 | }, 212 | "com.unity.modules.ui": { 213 | "version": "1.0.0", 214 | "depth": 0, 215 | "source": "builtin", 216 | "dependencies": {} 217 | }, 218 | "com.unity.modules.uielements": { 219 | "version": "1.0.0", 220 | "depth": 0, 221 | "source": "builtin", 222 | "dependencies": { 223 | "com.unity.modules.imgui": "1.0.0", 224 | "com.unity.modules.jsonserialize": "1.0.0" 225 | } 226 | }, 227 | "com.unity.modules.umbra": { 228 | "version": "1.0.0", 229 | "depth": 0, 230 | "source": "builtin", 231 | "dependencies": {} 232 | }, 233 | "com.unity.modules.unityanalytics": { 234 | "version": "1.0.0", 235 | "depth": 0, 236 | "source": "builtin", 237 | "dependencies": { 238 | "com.unity.modules.unitywebrequest": "1.0.0", 239 | "com.unity.modules.jsonserialize": "1.0.0" 240 | } 241 | }, 242 | "com.unity.modules.unitywebrequest": { 243 | "version": "1.0.0", 244 | "depth": 0, 245 | "source": "builtin", 246 | "dependencies": {} 247 | }, 248 | "com.unity.modules.unitywebrequestassetbundle": { 249 | "version": "1.0.0", 250 | "depth": 0, 251 | "source": "builtin", 252 | "dependencies": { 253 | "com.unity.modules.assetbundle": "1.0.0", 254 | "com.unity.modules.unitywebrequest": "1.0.0" 255 | } 256 | }, 257 | "com.unity.modules.unitywebrequestaudio": { 258 | "version": "1.0.0", 259 | "depth": 0, 260 | "source": "builtin", 261 | "dependencies": { 262 | "com.unity.modules.unitywebrequest": "1.0.0", 263 | "com.unity.modules.audio": "1.0.0" 264 | } 265 | }, 266 | "com.unity.modules.unitywebrequesttexture": { 267 | "version": "1.0.0", 268 | "depth": 0, 269 | "source": "builtin", 270 | "dependencies": { 271 | "com.unity.modules.unitywebrequest": "1.0.0", 272 | "com.unity.modules.imageconversion": "1.0.0" 273 | } 274 | }, 275 | "com.unity.modules.unitywebrequestwww": { 276 | "version": "1.0.0", 277 | "depth": 0, 278 | "source": "builtin", 279 | "dependencies": { 280 | "com.unity.modules.unitywebrequest": "1.0.0", 281 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 282 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 283 | "com.unity.modules.audio": "1.0.0", 284 | "com.unity.modules.assetbundle": "1.0.0", 285 | "com.unity.modules.imageconversion": "1.0.0" 286 | } 287 | }, 288 | "com.unity.modules.vehicles": { 289 | "version": "1.0.0", 290 | "depth": 0, 291 | "source": "builtin", 292 | "dependencies": { 293 | "com.unity.modules.physics": "1.0.0" 294 | } 295 | }, 296 | "com.unity.modules.video": { 297 | "version": "1.0.0", 298 | "depth": 0, 299 | "source": "builtin", 300 | "dependencies": { 301 | "com.unity.modules.audio": "1.0.0", 302 | "com.unity.modules.ui": "1.0.0", 303 | "com.unity.modules.unitywebrequest": "1.0.0" 304 | } 305 | }, 306 | "com.unity.modules.vr": { 307 | "version": "1.0.0", 308 | "depth": 0, 309 | "source": "builtin", 310 | "dependencies": { 311 | "com.unity.modules.jsonserialize": "1.0.0", 312 | "com.unity.modules.physics": "1.0.0", 313 | "com.unity.modules.xr": "1.0.0" 314 | } 315 | }, 316 | "com.unity.modules.wind": { 317 | "version": "1.0.0", 318 | "depth": 0, 319 | "source": "builtin", 320 | "dependencies": {} 321 | }, 322 | "com.unity.modules.xr": { 323 | "version": "1.0.0", 324 | "depth": 0, 325 | "source": "builtin", 326 | "dependencies": { 327 | "com.unity.modules.physics": "1.0.0", 328 | "com.unity.modules.jsonserialize": "1.0.0", 329 | "com.unity.modules.subsystems": "1.0.0" 330 | } 331 | } 332 | } 333 | } 334 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 1 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} 40 | - {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0} 41 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} 42 | m_PreloadedShaders: [] 43 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 44 | type: 0} 45 | m_CustomRenderPipeline: {fileID: 0} 46 | m_TransparencySortMode: 0 47 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 48 | m_DefaultRenderingPath: 1 49 | m_DefaultMobileRenderingPath: 1 50 | m_TierSettings: [] 51 | m_LightmapStripping: 0 52 | m_FogStripping: 0 53 | m_InstancingStripping: 0 54 | m_LightmapKeepPlain: 1 55 | m_LightmapKeepDirCombined: 1 56 | m_LightmapKeepDynamicPlain: 1 57 | m_LightmapKeepDynamicDirCombined: 1 58 | m_LightmapKeepShadowMask: 1 59 | m_LightmapKeepSubtractive: 1 60 | m_FogKeepLinear: 1 61 | m_FogKeepExp: 1 62 | m_FogKeepExp2: 1 63 | m_AlbedoSwatchInfos: [] 64 | m_LightsUseLinearIntensity: 0 65 | m_LightsUseColorTemperature: 0 66 | m_LogWhenShaderIsCompiled: 0 67 | m_AllowEnlightenSupportForUpgradedProject: 0 68 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13960, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_ScopedRegistriesSettingsExpanded: 1 16 | oneTimeWarningShown: 0 17 | m_Registries: 18 | - m_Id: main 19 | m_Name: 20 | m_Url: https://packages.unity.com 21 | m_Scopes: [] 22 | m_IsDefault: 1 23 | - m_Id: scoped:package.openupm.com 24 | m_Name: package.openupm.com 25 | m_Url: https://package.openupm.com 26 | m_Scopes: 27 | - com.miguel12345.unity-shapes 28 | - com.neuecc.unirx 29 | - com.openupm 30 | m_IsDefault: 0 31 | m_UserSelectedRegistryName: 32 | m_UserAddingNewScopedRegistry: 0 33 | m_RegistryInfoDraft: 34 | m_ErrorMessage: 35 | m_Original: 36 | m_Id: scoped:package.openupm.com 37 | m_Name: package.openupm.com 38 | m_Url: https://package.openupm.com 39 | m_Scopes: 40 | - com.miguel12345.unity-shapes 41 | - com.neuecc.unirx 42 | - com.openupm 43 | m_IsDefault: 0 44 | m_Modified: 0 45 | m_Name: package.openupm.com 46 | m_Url: https://package.openupm.com 47 | m_Scopes: 48 | - com.miguel12345.unity-shapes 49 | - com.neuecc.unirx 50 | - com.openupm 51 | m_SelectedScopeIndex: 0 52 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.4.15f1 2 | m_EditorVersionWithRevision: 2019.4.15f1 (fbf367ac14e9) 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | excludedTargetPlatforms: [] 44 | - serializedVersion: 2 45 | name: Low 46 | pixelLightCount: 0 47 | shadows: 0 48 | shadowResolution: 0 49 | shadowProjection: 1 50 | shadowCascades: 1 51 | shadowDistance: 20 52 | shadowNearPlaneOffset: 3 53 | shadowCascade2Split: 0.33333334 54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 55 | shadowmaskMode: 0 56 | blendWeights: 2 57 | textureQuality: 0 58 | anisotropicTextures: 0 59 | antiAliasing: 0 60 | softParticles: 0 61 | softVegetation: 0 62 | realtimeReflectionProbes: 0 63 | billboardsFaceCameraPosition: 0 64 | vSyncCount: 0 65 | lodBias: 0.4 66 | maximumLODLevel: 0 67 | streamingMipmapsActive: 0 68 | streamingMipmapsAddAllCameras: 1 69 | streamingMipmapsMemoryBudget: 512 70 | streamingMipmapsRenderersPerFrame: 512 71 | streamingMipmapsMaxLevelReduction: 2 72 | streamingMipmapsMaxFileIORequests: 1024 73 | particleRaycastBudget: 16 74 | asyncUploadTimeSlice: 2 75 | asyncUploadBufferSize: 16 76 | asyncUploadPersistentBuffer: 1 77 | resolutionScalingFixedDPIFactor: 1 78 | excludedTargetPlatforms: [] 79 | - serializedVersion: 2 80 | name: Medium 81 | pixelLightCount: 1 82 | shadows: 1 83 | shadowResolution: 0 84 | shadowProjection: 1 85 | shadowCascades: 1 86 | shadowDistance: 20 87 | shadowNearPlaneOffset: 3 88 | shadowCascade2Split: 0.33333334 89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 90 | shadowmaskMode: 0 91 | blendWeights: 2 92 | textureQuality: 0 93 | anisotropicTextures: 1 94 | antiAliasing: 0 95 | softParticles: 0 96 | softVegetation: 0 97 | realtimeReflectionProbes: 0 98 | billboardsFaceCameraPosition: 0 99 | vSyncCount: 1 100 | lodBias: 0.7 101 | maximumLODLevel: 0 102 | streamingMipmapsActive: 0 103 | streamingMipmapsAddAllCameras: 1 104 | streamingMipmapsMemoryBudget: 512 105 | streamingMipmapsRenderersPerFrame: 512 106 | streamingMipmapsMaxLevelReduction: 2 107 | streamingMipmapsMaxFileIORequests: 1024 108 | particleRaycastBudget: 64 109 | asyncUploadTimeSlice: 2 110 | asyncUploadBufferSize: 16 111 | asyncUploadPersistentBuffer: 1 112 | resolutionScalingFixedDPIFactor: 1 113 | excludedTargetPlatforms: [] 114 | - serializedVersion: 2 115 | name: High 116 | pixelLightCount: 2 117 | shadows: 2 118 | shadowResolution: 1 119 | shadowProjection: 1 120 | shadowCascades: 2 121 | shadowDistance: 40 122 | shadowNearPlaneOffset: 3 123 | shadowCascade2Split: 0.33333334 124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 125 | shadowmaskMode: 1 126 | blendWeights: 2 127 | textureQuality: 0 128 | anisotropicTextures: 1 129 | antiAliasing: 0 130 | softParticles: 0 131 | softVegetation: 1 132 | realtimeReflectionProbes: 1 133 | billboardsFaceCameraPosition: 1 134 | vSyncCount: 1 135 | lodBias: 1 136 | maximumLODLevel: 0 137 | streamingMipmapsActive: 0 138 | streamingMipmapsAddAllCameras: 1 139 | streamingMipmapsMemoryBudget: 512 140 | streamingMipmapsRenderersPerFrame: 512 141 | streamingMipmapsMaxLevelReduction: 2 142 | streamingMipmapsMaxFileIORequests: 1024 143 | particleRaycastBudget: 256 144 | asyncUploadTimeSlice: 2 145 | asyncUploadBufferSize: 16 146 | asyncUploadPersistentBuffer: 1 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Very High 151 | pixelLightCount: 3 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 2 156 | shadowDistance: 70 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 1.5 171 | maximumLODLevel: 0 172 | streamingMipmapsActive: 0 173 | streamingMipmapsAddAllCameras: 1 174 | streamingMipmapsMemoryBudget: 512 175 | streamingMipmapsRenderersPerFrame: 512 176 | streamingMipmapsMaxLevelReduction: 2 177 | streamingMipmapsMaxFileIORequests: 1024 178 | particleRaycastBudget: 1024 179 | asyncUploadTimeSlice: 2 180 | asyncUploadBufferSize: 16 181 | asyncUploadPersistentBuffer: 1 182 | resolutionScalingFixedDPIFactor: 1 183 | excludedTargetPlatforms: [] 184 | - serializedVersion: 2 185 | name: Ultra 186 | pixelLightCount: 4 187 | shadows: 2 188 | shadowResolution: 2 189 | shadowProjection: 1 190 | shadowCascades: 4 191 | shadowDistance: 150 192 | shadowNearPlaneOffset: 3 193 | shadowCascade2Split: 0.33333334 194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 195 | shadowmaskMode: 1 196 | blendWeights: 4 197 | textureQuality: 0 198 | anisotropicTextures: 2 199 | antiAliasing: 2 200 | softParticles: 1 201 | softVegetation: 1 202 | realtimeReflectionProbes: 1 203 | billboardsFaceCameraPosition: 1 204 | vSyncCount: 1 205 | lodBias: 2 206 | maximumLODLevel: 0 207 | streamingMipmapsActive: 0 208 | streamingMipmapsAddAllCameras: 1 209 | streamingMipmapsMemoryBudget: 512 210 | streamingMipmapsRenderersPerFrame: 512 211 | streamingMipmapsMaxLevelReduction: 2 212 | streamingMipmapsMaxFileIORequests: 1024 213 | particleRaycastBudget: 4096 214 | asyncUploadTimeSlice: 2 215 | asyncUploadBufferSize: 16 216 | asyncUploadPersistentBuffer: 1 217 | resolutionScalingFixedDPIFactor: 1 218 | excludedTargetPlatforms: [] 219 | m_PerPlatformDefaultQuality: 220 | Android: 2 221 | Lumin: 5 222 | Nintendo 3DS: 5 223 | Nintendo Switch: 5 224 | PS4: 5 225 | PSP2: 2 226 | Stadia: 5 227 | Standalone: 5 228 | WebGL: 3 229 | Windows Store Apps: 5 230 | XboxOne: 5 231 | iPhone: 2 232 | tvOS: 2 233 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 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 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Input Observable: Input Handling Utility with UniRx 2 | === 3 | 4 | Providing screen touch / mouse event Rx stream (`IObservable`) and its Operators. 5 | 6 | - Input source object (`IInputObservable`) related with a finger or button id and its manager object (`InputObservableContext`) 7 | - Verious input gesture supported 8 | - long press (`LongSequence()`) 9 | - double tap/clik (`DoubleSequence()`) 10 | - swipe (`Verocity()`, `TakeLastVerocities()`) 11 | - pinch in/out (`RectangleObservable`, `PinchSequence()`) 12 | - Rotation conversion (`Differnece()`, `ToEulerAngle()`) 13 | - Gyroscope, Mouse wheel operation also supported (`GyroInputObservable`, `IMouseWheelObservable`) 14 | 15 | ![android](https://user-images.githubusercontent.com/1320102/91451285-3d66df80-e8b8-11ea-9de7-a549bdbd26d3.gif) 16 | 17 | ### How To Use 18 | 19 | ```csharp 20 | // Get IInputObservableContext 21 | IInputObservableContext context = this.DefaultInputContext(); 22 | 23 | // Get IInputObservable with id=0, left button for Editor, fingerId=0 for Android/iOS 24 | IInputObservable touch0 = context.GetObservable(0); 25 | 26 | // Get IInputObservable with id=1, right button for Editor, fingerId=1 for Android/iOS 27 | IInputObservable touch1 = context.GetObservable(1); 28 | 29 | // Draw Point at the location of first touch (or left button clicked) 30 | touch0.OnBegin.Subscribe(e => // e is InputEvent 31 | { 32 | DrawPoint(e.position); 33 | }); 34 | 35 | // Slide (or dragging) Detection 36 | touch0.OnMoved.Subscribe(e => ...); 37 | 38 | // Touch Up (or left button release) detection 39 | touch0.OnEnd.Subscribe(e => ...); 40 | 41 | // Any input event 42 | touch0.Any().Subscribe(e => ...); 43 | 44 | // Double Tap/click detection during 200 msec 45 | touch0.DoubleSequence(200).Subscribe(e => {}) 46 | 47 | // Long Touch/press detection over 1000 msec 48 | touch0.LongSequence(1000).Subscribe(e => {}) 49 | 50 | // Slide/Move speed detection between two consecutive points 51 | touch0.Verocity().Subscribe(v => // v is VerocityInfo 52 | { 53 | DrawPoint(v.@event.position); 54 | DrawArrow(v.vector); // v.vector is Vector2 per milliseconds 55 | }); 56 | 57 | // Slide/Move speed detection between two consecutive points in the last 8 points 58 | touch0.TakeLastVerocities(8).Subscribe(verocities => 59 | { 60 | foreach (var v in verocities) { 61 | DrawPoint(v.@event.position); 62 | DrawArrow(v.vector) 63 | } 64 | }); 65 | 66 | // Rotation event conversion from slide/move operation, 67 | // at a rate of 90 degrees of slide at both ends of the screen (both up and down and left and right). 68 | touch0.Difference().Subscribe(diff => // diff is Vector2 69 | { 70 | var rot = diff.ToEulerAngle(-90.0f / Screen.width, -90.0f / Screen.height); 71 | target.Rotate(rot, Space.World); 72 | } 73 | 74 | // Differences of the width/height value of the rectangle over time (two consecutive rectangles) 75 | // for multi touch pinch operation 76 | RectangleObservable.From(touch0, touch1) 77 | .PinchSequence() 78 | .RepeatUntilDestroy(this) 79 | .Subscribe(diff => // diff is Vector2 80 | { 81 | if(diff.x > 0) { /* larger horizontally*/ } 82 | else if(diff.x <= 0) { /* smaller horizontally */ } 83 | if(diff.y > 0) { /* larger vertically */ } 84 | else if(diff.y <= 0) { /* smaller vertically */ } 85 | }); 86 | 87 | // Mouse wheel operation, type check is usefull for shared code between Editor and Android/iOS 88 | (context as IMouseWheelObservable)?.Wheel.Subscribe(w => { 89 | // w is MouseWheelEvent 90 | }); 91 | 92 | // Gyroscope to pose rotation 93 | var gyro = new GyroInputObservable(this); 94 | gyro.EulerAngles.Subscribe(e => 95 | { 96 | // e is Vector3 97 | var rot = Quaternion.Euler(e); 98 | }); 99 | ``` 100 | 101 | ### Requirements 102 | 103 | - 2019.3.4f1 or later 104 | 105 | ### Install 106 | 107 | install via openupm 108 | 109 | ``` 110 | $ openupm add com.jtfrom9.input-observable 111 | ``` 112 | --------------------------------------------------------------------------------