├── .gitignore ├── Docs.meta ├── Docs ├── CustomRecording.meta ├── CustomRecording │ ├── CustomRecording.png │ ├── CustomRecording.png.meta │ ├── HOWTO.md │ ├── HOWTO.md.meta │ ├── StringRecording.png │ └── StringRecording.png.meta ├── DataListener.png ├── DataListener.png.meta ├── HeadRecordingPlot.png ├── HeadRecordingPlot.png.meta ├── MouseRecordingPlot.png ├── MouseRecordingPlot.png.meta ├── OpenPoseExample.png ├── OpenPoseExample.png.meta ├── Recording.png ├── Recording.png.meta ├── SpatialVRUserTesting.png ├── SpatialVRUserTesting.png.meta ├── TimelineDragAndDrop.gif └── TimelineDragAndDrop.gif.meta ├── Example_MouseRecording.meta ├── Example_MouseRecording ├── RecordAndRepeat.MouseExample.asmdef ├── RecordAndRepeat.MouseExample.asmdef.meta ├── Recordings.meta ├── Recordings │ ├── Clicking.asset │ ├── Clicking.asset.meta │ ├── MoveInEight.asset │ ├── MoveInEight.asset.meta │ ├── MoveInRect.asset │ └── MoveInRect.asset.meta ├── Scenes.meta ├── Scenes │ ├── RecordScene.unity │ ├── RecordScene.unity.meta │ ├── RepeatScene.unity │ └── RepeatScene.unity.meta ├── Scripts.meta ├── Scripts │ ├── MouseData.cs │ ├── MouseData.cs.meta │ ├── MouseDrawer.cs │ ├── MouseDrawer.cs.meta │ ├── MousePlotter.cs │ ├── MousePlotter.cs.meta │ ├── MouseRecorder.cs │ └── MouseRecorder.cs.meta ├── Timeline.meta └── Timeline │ ├── MouseDrawerTimeline.playable │ └── MouseDrawerTimeline.playable.meta ├── Example_TransformRecording.meta ├── Example_TransformRecording ├── Materials.meta ├── Materials │ ├── Navy.mat │ ├── Navy.mat.meta │ ├── Orange.mat │ ├── Orange.mat.meta │ ├── White.mat │ └── White.mat.meta ├── RecordAndRepeat.TransformExample.asmdef ├── RecordAndRepeat.TransformExample.asmdef.meta ├── Recordings.meta ├── Recordings │ ├── LongRecording.asset │ ├── LongRecording.asset.meta │ ├── ShortRecording.asset │ └── ShortRecording.asset.meta ├── Scenes.meta ├── Scenes │ ├── RecordAndRepeatScene.unity │ └── RecordAndRepeatScene.unity.meta ├── Scripts.meta ├── Scripts │ ├── HeadData.cs │ ├── HeadData.cs.meta │ ├── HeadPlayback.cs │ ├── HeadPlayback.cs.meta │ ├── HeadPlotter.cs │ ├── HeadPlotter.cs.meta │ ├── HeadRecorder.cs │ ├── HeadRecorder.cs.meta │ ├── Walk.cs │ └── Walk.cs.meta ├── Timeline.meta └── Timeline │ ├── DrawerTimeline.playable │ └── DrawerTimeline.playable.meta ├── LICENSE ├── LICENSE.meta ├── README.md ├── README.md.meta ├── Source.meta ├── Source ├── RecordAndRepeat.asmdef ├── RecordAndRepeat.asmdef.meta ├── Recording.meta ├── Recording │ ├── Base.meta │ ├── Base │ │ ├── DataFrameBase.cs │ │ ├── DataFrameBase.cs.meta │ │ ├── RecorderBase.cs │ │ ├── RecorderBase.cs.meta │ │ ├── RecordingBase.cs │ │ └── RecordingBase.cs.meta │ ├── DataFrame.cs │ ├── DataFrame.cs.meta │ ├── Editor.meta │ ├── Editor │ │ ├── RecordAndRepeat.Recording.Editor.asmdef │ │ ├── RecordAndRepeat.Recording.Editor.asmdef.meta │ │ ├── RecorderInspector.cs │ │ ├── RecorderInspector.cs.meta │ │ ├── RecordingInspector.cs │ │ └── RecordingInspector.cs.meta │ ├── Recorder.cs │ ├── Recorder.cs.meta │ ├── Recording.cs │ └── Recording.cs.meta ├── Timeline.meta └── Timeline │ ├── DataListener.cs │ ├── DataListener.cs.meta │ ├── Editor.meta │ ├── Editor │ ├── RecordAndRepeat.Timeline.Editor.asmdef │ ├── RecordAndRepeat.Timeline.Editor.asmdef.meta │ ├── RecordingClipInspector.cs │ └── RecordingClipInspector.cs.meta │ ├── RecordingBehaviour.cs │ ├── RecordingBehaviour.cs.meta │ ├── RecordingClip.cs │ ├── RecordingClip.cs.meta │ ├── RecordingMixerBehaviour.cs │ ├── RecordingMixerBehaviour.cs.meta │ ├── RecordingTrack.cs │ └── RecordingTrack.cs.meta ├── package.json └── package.json.meta /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | [Bb]uilds/ 6 | Assets/AssetStoreTools* 7 | 8 | # Visual Studio cache directory 9 | .vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | 26 | # Unity3D generated meta files 27 | *.pidb.meta 28 | *.pdb.meta 29 | 30 | # Unity3D Generated File On Crash Reports 31 | sysinfo.txt 32 | 33 | # Builds 34 | *.apk 35 | *.unitypackage -------------------------------------------------------------------------------- /Docs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6690d0327be0047c0b57b929a9cb2cb6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Docs/CustomRecording.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b4c4284ffcad243dca237e5262c29b34 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Docs/CustomRecording/CustomRecording.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fx-lange/unity-record-and-repeat/c0f061e458bffd583e3b8600ddbdfbd618cd11bd/Docs/CustomRecording/CustomRecording.png -------------------------------------------------------------------------------- /Docs/CustomRecording/CustomRecording.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7cbf52fc2b55e46f28950e8aa1250439 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 6 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | userData: 85 | assetBundleName: 86 | assetBundleVariant: 87 | -------------------------------------------------------------------------------- /Docs/CustomRecording/HOWTO.md: -------------------------------------------------------------------------------- 1 | # Custom Recordings 2 | 3 | For recording your own data there are two options: 4 | 5 | * Extend the `Recorder` class (like the `MouseRecorder` example). All your data is stored as strings inside a `Recording`. 6 | * If string recordings don't work for you, you can replace the `Recorder` with your own custom recorder and custom recording. 7 | 8 | The plugin consists of two parts: 1) the recorder/recording component and 2) the playback support via Timeline. 9 | 10 | ### Record 11 | 12 | For recording your own data you need to implement three abstract classes: 13 | 14 | * `DataFrameBase` only contains timestamps 15 | 16 | Your implementation "MyCustomData" needs to add your own serializable data fields ([DataFrame](../../Source/Recording/DataFrame.cs) for reference). 17 | 18 | * `RecordingBase` is an abstract `ScriptableObject`. 19 | 20 | In your "MyCustomRecording" add a private `List` and override `IEnumerable GetDataFrames()` and `void Add(IDataFrame data)` ([Recording](../../Source/Recording/Recording.cs) for reference). 21 | 22 | * `RecorderBase` is an abstract `MonoBehaviour`. 23 | 24 | Your recorder implementation has to override the `RecorderBase CreateInstance()` which simply needs to return a `ScriptableObject.CreateInstance()`. 25 | Additionally, creating your "MyCustomData" objects and passing them to `RecordData(DataFrame dataFrame)` ([Recorder](../../Source/Recording/Recorder.cs) for reference). 26 | 27 | ### Repeat 28 | 29 | Recordings stored as `ScriptableObjects` in the asset folder can be dragged&dropped into Timeline RecordingTracks/RecordingClips. 30 | 31 | To receive your "MyCustomData" during playback a `DataListener` implementation is needed - overriding the `void ProcessData(DataFrame data)` method. 32 | 33 | Finally, add your listener game object as a TrackBinding into RecordAndRepeat RecordingTracks. This game object is probably already part of your application - now using recorded data instead of live data. -------------------------------------------------------------------------------- /Docs/CustomRecording/HOWTO.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7c8d66d62c63c4789a4869a4309e7d14 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Docs/CustomRecording/StringRecording.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fx-lange/unity-record-and-repeat/c0f061e458bffd583e3b8600ddbdfbd618cd11bd/Docs/CustomRecording/StringRecording.png -------------------------------------------------------------------------------- /Docs/CustomRecording/StringRecording.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c80da9ca130214bcb8c90aec4fa88fcb 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 6 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | userData: 85 | assetBundleName: 86 | assetBundleVariant: 87 | -------------------------------------------------------------------------------- /Docs/DataListener.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fx-lange/unity-record-and-repeat/c0f061e458bffd583e3b8600ddbdfbd618cd11bd/Docs/DataListener.png -------------------------------------------------------------------------------- /Docs/DataListener.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 82e6abf5fedb51d48977c05297ba1dae 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 9 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | pSDRemoveMatte: 0 85 | pSDShowRemoveMatteOption: 0 86 | userData: 87 | assetBundleName: 88 | assetBundleVariant: 89 | -------------------------------------------------------------------------------- /Docs/HeadRecordingPlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fx-lange/unity-record-and-repeat/c0f061e458bffd583e3b8600ddbdfbd618cd11bd/Docs/HeadRecordingPlot.png -------------------------------------------------------------------------------- /Docs/HeadRecordingPlot.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e102ca24edaec47bc97de0d7e5f52cd5 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 6 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | userData: 85 | assetBundleName: 86 | assetBundleVariant: 87 | -------------------------------------------------------------------------------- /Docs/MouseRecordingPlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fx-lange/unity-record-and-repeat/c0f061e458bffd583e3b8600ddbdfbd618cd11bd/Docs/MouseRecordingPlot.png -------------------------------------------------------------------------------- /Docs/MouseRecordingPlot.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7ae35ae5e098407aacf7b911414efff 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 5 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | grayScaleToAlpha: 0 25 | generateCubemap: 6 26 | cubemapConvolution: 0 27 | seamlessCubemap: 0 28 | textureFormat: 1 29 | maxTextureSize: 2048 30 | textureSettings: 31 | serializedVersion: 2 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapU: -1 36 | wrapV: -1 37 | wrapW: -1 38 | nPOTScale: 1 39 | lightmap: 0 40 | compressionQuality: 50 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spritePixelsToUnits: 100 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spriteGenerateFallbackPhysicsShape: 1 49 | alphaUsage: 1 50 | alphaIsTransparency: 0 51 | spriteTessellationDetail: -1 52 | textureType: 0 53 | textureShape: 1 54 | singleChannelComponent: 0 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - serializedVersion: 2 60 | buildTarget: DefaultTexturePlatform 61 | maxTextureSize: 2048 62 | resizeAlgorithm: 0 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | androidETC2FallbackOverride: 0 70 | spriteSheet: 71 | serializedVersion: 2 72 | sprites: [] 73 | outline: [] 74 | physicsShape: [] 75 | bones: [] 76 | spriteID: 77 | vertices: [] 78 | indices: 79 | edges: [] 80 | weights: [] 81 | spritePackingTag: 82 | userData: 83 | assetBundleName: 84 | assetBundleVariant: 85 | -------------------------------------------------------------------------------- /Docs/OpenPoseExample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fx-lange/unity-record-and-repeat/c0f061e458bffd583e3b8600ddbdfbd618cd11bd/Docs/OpenPoseExample.png -------------------------------------------------------------------------------- /Docs/OpenPoseExample.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 830e7fe43777c459e9ef7742660059ac 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 6 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | userData: 85 | assetBundleName: 86 | assetBundleVariant: 87 | -------------------------------------------------------------------------------- /Docs/Recording.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fx-lange/unity-record-and-repeat/c0f061e458bffd583e3b8600ddbdfbd618cd11bd/Docs/Recording.png -------------------------------------------------------------------------------- /Docs/Recording.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36be9ee5112274d14b890bc6f3eb1ce9 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 6 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | userData: 85 | assetBundleName: 86 | assetBundleVariant: 87 | -------------------------------------------------------------------------------- /Docs/SpatialVRUserTesting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fx-lange/unity-record-and-repeat/c0f061e458bffd583e3b8600ddbdfbd618cd11bd/Docs/SpatialVRUserTesting.png -------------------------------------------------------------------------------- /Docs/SpatialVRUserTesting.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2d366ee12042466c81c77db4bf380ae 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 6 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | userData: 85 | assetBundleName: 86 | assetBundleVariant: 87 | -------------------------------------------------------------------------------- /Docs/TimelineDragAndDrop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fx-lange/unity-record-and-repeat/c0f061e458bffd583e3b8600ddbdfbd618cd11bd/Docs/TimelineDragAndDrop.gif -------------------------------------------------------------------------------- /Docs/TimelineDragAndDrop.gif.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e6251099742f4b15a5b27407ebd72fd 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 6 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | userData: 85 | assetBundleName: 86 | assetBundleVariant: 87 | -------------------------------------------------------------------------------- /Example_MouseRecording.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91085378c9692408895563c97149dddc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_MouseRecording/RecordAndRepeat.MouseExample.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RecordAndRepeat.MouseExample", 3 | "rootNamespace": "", 4 | "references": [ 5 | "RecordAndRepeat" 6 | ], 7 | "includePlatforms": [ 8 | "Editor" 9 | ], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": false, 13 | "precompiledReferences": [], 14 | "autoReferenced": true, 15 | "defineConstraints": [], 16 | "versionDefines": [], 17 | "noEngineReferences": false 18 | } -------------------------------------------------------------------------------- /Example_MouseRecording/RecordAndRepeat.MouseExample.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae818e09f7a658541a5565bf4996fe9b 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Example_MouseRecording/Recordings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d5fca108310174b938ff978344013c6d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_MouseRecording/Recordings/Clicking.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f8858a72b82154d869d1f2324c44ea0a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_MouseRecording/Recordings/MoveInEight.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c198a10d16fbb45c786096f240f4734b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_MouseRecording/Recordings/MoveInRect.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 03601991233db48dab48503c0d18dae2 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_MouseRecording/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 49fc130b5a05f498daacbc66ca57895a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_MouseRecording/Scenes/RecordScene.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.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 0 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: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 10 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_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_FinalGather: 0 70 | m_FinalGatherFiltering: 1 71 | m_FinalGatherRayCount: 256 72 | m_ReflectionCompression: 2 73 | m_MixedBakeMode: 2 74 | m_BakeBackend: 1 75 | m_PVRSampling: 1 76 | m_PVRDirectSampleCount: 32 77 | m_PVRSampleCount: 500 78 | m_PVRBounces: 2 79 | m_PVRFilterTypeDirect: 0 80 | m_PVRFilterTypeIndirect: 0 81 | m_PVRFilterTypeAO: 0 82 | m_PVRFilteringMode: 1 83 | m_PVRCulling: 1 84 | m_PVRFilteringGaussRadiusDirect: 1 85 | m_PVRFilteringGaussRadiusIndirect: 5 86 | m_PVRFilteringGaussRadiusAO: 2 87 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 88 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 89 | m_PVRFilteringAtrousPositionSigmaAO: 1 90 | m_ShowResolutionOverlay: 1 91 | m_LightingDataAsset: {fileID: 0} 92 | m_UseShadowmask: 1 93 | --- !u!196 &4 94 | NavMeshSettings: 95 | serializedVersion: 2 96 | m_ObjectHideFlags: 0 97 | m_BuildSettings: 98 | serializedVersion: 2 99 | agentTypeID: 0 100 | agentRadius: 0.5 101 | agentHeight: 2 102 | agentSlope: 45 103 | agentClimb: 0.4 104 | ledgeDropHeight: 0 105 | maxJumpAcrossDistance: 0 106 | minRegionArea: 2 107 | manualCellSize: 0 108 | cellSize: 0.16666667 109 | manualTileSize: 0 110 | tileSize: 256 111 | accuratePlacement: 0 112 | debug: 113 | m_Flags: 0 114 | m_NavMeshData: {fileID: 0} 115 | --- !u!1 &562545703 116 | GameObject: 117 | m_ObjectHideFlags: 0 118 | m_CorrespondingSourceObject: {fileID: 0} 119 | m_PrefabInstance: {fileID: 0} 120 | m_PrefabAsset: {fileID: 0} 121 | serializedVersion: 6 122 | m_Component: 123 | - component: {fileID: 562545707} 124 | - component: {fileID: 562545706} 125 | - component: {fileID: 562545705} 126 | - component: {fileID: 562545704} 127 | m_Layer: 0 128 | m_Name: MainCamera 129 | m_TagString: MainCamera 130 | m_Icon: {fileID: 0} 131 | m_NavMeshLayer: 0 132 | m_StaticEditorFlags: 0 133 | m_IsActive: 1 134 | --- !u!81 &562545704 135 | AudioListener: 136 | m_ObjectHideFlags: 0 137 | m_CorrespondingSourceObject: {fileID: 0} 138 | m_PrefabInstance: {fileID: 0} 139 | m_PrefabAsset: {fileID: 0} 140 | m_GameObject: {fileID: 562545703} 141 | m_Enabled: 1 142 | --- !u!124 &562545705 143 | Behaviour: 144 | m_ObjectHideFlags: 0 145 | m_CorrespondingSourceObject: {fileID: 0} 146 | m_PrefabInstance: {fileID: 0} 147 | m_PrefabAsset: {fileID: 0} 148 | m_GameObject: {fileID: 562545703} 149 | m_Enabled: 1 150 | --- !u!20 &562545706 151 | Camera: 152 | m_ObjectHideFlags: 0 153 | m_CorrespondingSourceObject: {fileID: 0} 154 | m_PrefabInstance: {fileID: 0} 155 | m_PrefabAsset: {fileID: 0} 156 | m_GameObject: {fileID: 562545703} 157 | m_Enabled: 1 158 | serializedVersion: 2 159 | m_ClearFlags: 2 160 | m_BackGroundColor: {r: 0.13274297, g: 0.15082721, b: 0.1792453, a: 0} 161 | m_projectionMatrixMode: 1 162 | m_SensorSize: {x: 36, y: 24} 163 | m_LensShift: {x: 0, y: 0} 164 | m_GateFitMode: 2 165 | m_FocalLength: 50 166 | m_NormalizedViewPortRect: 167 | serializedVersion: 2 168 | x: 0 169 | y: 0 170 | width: 1 171 | height: 1 172 | near clip plane: 0.3 173 | far clip plane: 1000 174 | field of view: 60 175 | orthographic: 0 176 | orthographic size: 5 177 | m_Depth: 0 178 | m_CullingMask: 179 | serializedVersion: 2 180 | m_Bits: 4294967295 181 | m_RenderingPath: -1 182 | m_TargetTexture: {fileID: 0} 183 | m_TargetDisplay: 0 184 | m_TargetEye: 3 185 | m_HDR: 1 186 | m_AllowMSAA: 1 187 | m_AllowDynamicResolution: 0 188 | m_ForceIntoRT: 0 189 | m_OcclusionCulling: 1 190 | m_StereoConvergence: 10 191 | m_StereoSeparation: 0.022 192 | --- !u!4 &562545707 193 | Transform: 194 | m_ObjectHideFlags: 0 195 | m_CorrespondingSourceObject: {fileID: 0} 196 | m_PrefabInstance: {fileID: 0} 197 | m_PrefabAsset: {fileID: 0} 198 | m_GameObject: {fileID: 562545703} 199 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 200 | m_LocalPosition: {x: 0, y: 0, z: 0} 201 | m_LocalScale: {x: 1, y: 1, z: 1} 202 | m_Children: [] 203 | m_Father: {fileID: 0} 204 | m_RootOrder: 0 205 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 206 | --- !u!1 &1377753431 207 | GameObject: 208 | m_ObjectHideFlags: 0 209 | m_CorrespondingSourceObject: {fileID: 0} 210 | m_PrefabInstance: {fileID: 0} 211 | m_PrefabAsset: {fileID: 0} 212 | serializedVersion: 6 213 | m_Component: 214 | - component: {fileID: 1377753433} 215 | - component: {fileID: 1377753432} 216 | m_Layer: 0 217 | m_Name: Directional Light 218 | m_TagString: Untagged 219 | m_Icon: {fileID: 0} 220 | m_NavMeshLayer: 0 221 | m_StaticEditorFlags: 0 222 | m_IsActive: 1 223 | --- !u!108 &1377753432 224 | Light: 225 | m_ObjectHideFlags: 0 226 | m_CorrespondingSourceObject: {fileID: 0} 227 | m_PrefabInstance: {fileID: 0} 228 | m_PrefabAsset: {fileID: 0} 229 | m_GameObject: {fileID: 1377753431} 230 | m_Enabled: 1 231 | serializedVersion: 8 232 | m_Type: 1 233 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 234 | m_Intensity: 1 235 | m_Range: 10 236 | m_SpotAngle: 30 237 | m_CookieSize: 10 238 | m_Shadows: 239 | m_Type: 2 240 | m_Resolution: -1 241 | m_CustomResolution: -1 242 | m_Strength: 1 243 | m_Bias: 0.05 244 | m_NormalBias: 0.4 245 | m_NearPlane: 0.2 246 | m_Cookie: {fileID: 0} 247 | m_DrawHalo: 0 248 | m_Flare: {fileID: 0} 249 | m_RenderMode: 0 250 | m_CullingMask: 251 | serializedVersion: 2 252 | m_Bits: 4294967295 253 | m_Lightmapping: 4 254 | m_LightShadowCasterMode: 0 255 | m_AreaSize: {x: 1, y: 1} 256 | m_BounceIntensity: 1 257 | m_ColorTemperature: 6570 258 | m_UseColorTemperature: 0 259 | m_ShadowRadius: 0 260 | m_ShadowAngle: 0 261 | --- !u!4 &1377753433 262 | Transform: 263 | m_ObjectHideFlags: 0 264 | m_CorrespondingSourceObject: {fileID: 0} 265 | m_PrefabInstance: {fileID: 0} 266 | m_PrefabAsset: {fileID: 0} 267 | m_GameObject: {fileID: 1377753431} 268 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 269 | m_LocalPosition: {x: 0, y: 3, z: 0} 270 | m_LocalScale: {x: 1, y: 1, z: 1} 271 | m_Children: [] 272 | m_Father: {fileID: 0} 273 | m_RootOrder: 1 274 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 275 | --- !u!1 &1590284760 276 | GameObject: 277 | m_ObjectHideFlags: 0 278 | m_CorrespondingSourceObject: {fileID: 0} 279 | m_PrefabInstance: {fileID: 0} 280 | m_PrefabAsset: {fileID: 0} 281 | serializedVersion: 6 282 | m_Component: 283 | - component: {fileID: 1590284762} 284 | - component: {fileID: 1590284763} 285 | - component: {fileID: 1590284761} 286 | m_Layer: 0 287 | m_Name: MouseRecorder 288 | m_TagString: EditorOnly 289 | m_Icon: {fileID: 0} 290 | m_NavMeshLayer: 0 291 | m_StaticEditorFlags: 0 292 | m_IsActive: 1 293 | --- !u!114 &1590284761 294 | MonoBehaviour: 295 | m_ObjectHideFlags: 0 296 | m_CorrespondingSourceObject: {fileID: 0} 297 | m_PrefabInstance: {fileID: 0} 298 | m_PrefabAsset: {fileID: 0} 299 | m_GameObject: {fileID: 1590284760} 300 | m_Enabled: 1 301 | m_EditorHideFlags: 0 302 | m_Script: {fileID: 11500000, guid: 1761b1cfc3b944445b1bed02c302989f, type: 3} 303 | m_Name: 304 | m_EditorClassIdentifier: 305 | --- !u!4 &1590284762 306 | Transform: 307 | m_ObjectHideFlags: 0 308 | m_CorrespondingSourceObject: {fileID: 0} 309 | m_PrefabInstance: {fileID: 0} 310 | m_PrefabAsset: {fileID: 0} 311 | m_GameObject: {fileID: 1590284760} 312 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 313 | m_LocalPosition: {x: 0, y: 0, z: 0} 314 | m_LocalScale: {x: 1, y: 1, z: 1} 315 | m_Children: [] 316 | m_Father: {fileID: 0} 317 | m_RootOrder: 2 318 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 319 | --- !u!114 &1590284763 320 | MonoBehaviour: 321 | m_ObjectHideFlags: 0 322 | m_CorrespondingSourceObject: {fileID: 0} 323 | m_PrefabInstance: {fileID: 0} 324 | m_PrefabAsset: {fileID: 0} 325 | m_GameObject: {fileID: 1590284760} 326 | m_Enabled: 1 327 | m_EditorHideFlags: 0 328 | m_Script: {fileID: 11500000, guid: 8c00b72588b8d4d4fa8f07e1a7d4079f, type: 3} 329 | m_Name: 330 | m_EditorClassIdentifier: 331 | recordingName: New Mouse Recording 332 | disableIfNotPlaying: 1 333 | doRecord: 0 334 | doSave: 0 335 | doCancel: 0 336 | recording: {fileID: 0} 337 | responseText: 338 | -------------------------------------------------------------------------------- /Example_MouseRecording/Scenes/RecordScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f895269e941e43bd8803904fe5e1f0b 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Example_MouseRecording/Scenes/RepeatScene.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.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 0 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: 1 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: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 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_LightingSettings: {fileID: 0} 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 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &452264530 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 452264532} 135 | - component: {fileID: 452264531} 136 | m_Layer: 0 137 | m_Name: MousePlotter 138 | m_TagString: Untagged 139 | m_Icon: {fileID: 0} 140 | m_NavMeshLayer: 0 141 | m_StaticEditorFlags: 0 142 | m_IsActive: 0 143 | --- !u!114 &452264531 144 | MonoBehaviour: 145 | m_ObjectHideFlags: 0 146 | m_CorrespondingSourceObject: {fileID: 0} 147 | m_PrefabInstance: {fileID: 0} 148 | m_PrefabAsset: {fileID: 0} 149 | m_GameObject: {fileID: 452264530} 150 | m_Enabled: 1 151 | m_EditorHideFlags: 0 152 | m_Script: {fileID: 11500000, guid: 68ef7c1bf90fd4eefaef8b5c365993d9, type: 3} 153 | m_Name: 154 | m_EditorClassIdentifier: 155 | recording: {fileID: 11400000, guid: f8858a72b82154d869d1f2324c44ea0a, type: 2} 156 | scaleRadius: 1 157 | --- !u!4 &452264532 158 | Transform: 159 | m_ObjectHideFlags: 0 160 | m_CorrespondingSourceObject: {fileID: 0} 161 | m_PrefabInstance: {fileID: 0} 162 | m_PrefabAsset: {fileID: 0} 163 | m_GameObject: {fileID: 452264530} 164 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 165 | m_LocalPosition: {x: 0, y: 0, z: 0} 166 | m_LocalScale: {x: 1, y: 1, z: 1} 167 | m_Children: [] 168 | m_Father: {fileID: 0} 169 | m_RootOrder: 3 170 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 171 | --- !u!1 &562545703 172 | GameObject: 173 | m_ObjectHideFlags: 0 174 | m_CorrespondingSourceObject: {fileID: 0} 175 | m_PrefabInstance: {fileID: 0} 176 | m_PrefabAsset: {fileID: 0} 177 | serializedVersion: 6 178 | m_Component: 179 | - component: {fileID: 562545707} 180 | - component: {fileID: 562545706} 181 | - component: {fileID: 562545705} 182 | - component: {fileID: 562545704} 183 | - component: {fileID: 562545708} 184 | m_Layer: 0 185 | m_Name: MainCamera 186 | m_TagString: MainCamera 187 | m_Icon: {fileID: 0} 188 | m_NavMeshLayer: 0 189 | m_StaticEditorFlags: 0 190 | m_IsActive: 1 191 | --- !u!81 &562545704 192 | AudioListener: 193 | m_ObjectHideFlags: 0 194 | m_CorrespondingSourceObject: {fileID: 0} 195 | m_PrefabInstance: {fileID: 0} 196 | m_PrefabAsset: {fileID: 0} 197 | m_GameObject: {fileID: 562545703} 198 | m_Enabled: 1 199 | --- !u!124 &562545705 200 | Behaviour: 201 | m_ObjectHideFlags: 0 202 | m_CorrespondingSourceObject: {fileID: 0} 203 | m_PrefabInstance: {fileID: 0} 204 | m_PrefabAsset: {fileID: 0} 205 | m_GameObject: {fileID: 562545703} 206 | m_Enabled: 1 207 | --- !u!20 &562545706 208 | Camera: 209 | m_ObjectHideFlags: 0 210 | m_CorrespondingSourceObject: {fileID: 0} 211 | m_PrefabInstance: {fileID: 0} 212 | m_PrefabAsset: {fileID: 0} 213 | m_GameObject: {fileID: 562545703} 214 | m_Enabled: 1 215 | serializedVersion: 2 216 | m_ClearFlags: 2 217 | m_BackGroundColor: {r: 0.13274297, g: 0.15082721, b: 0.1792453, a: 0} 218 | m_projectionMatrixMode: 1 219 | m_GateFitMode: 2 220 | m_FOVAxisMode: 0 221 | m_SensorSize: {x: 36, y: 24} 222 | m_LensShift: {x: 0, y: 0} 223 | m_FocalLength: 50 224 | m_NormalizedViewPortRect: 225 | serializedVersion: 2 226 | x: 0 227 | y: 0 228 | width: 1 229 | height: 1 230 | near clip plane: 0.3 231 | far clip plane: 1000 232 | field of view: 60 233 | orthographic: 0 234 | orthographic size: 5 235 | m_Depth: 0 236 | m_CullingMask: 237 | serializedVersion: 2 238 | m_Bits: 4294967295 239 | m_RenderingPath: -1 240 | m_TargetTexture: {fileID: 0} 241 | m_TargetDisplay: 0 242 | m_TargetEye: 3 243 | m_HDR: 1 244 | m_AllowMSAA: 1 245 | m_AllowDynamicResolution: 0 246 | m_ForceIntoRT: 0 247 | m_OcclusionCulling: 1 248 | m_StereoConvergence: 10 249 | m_StereoSeparation: 0.022 250 | --- !u!4 &562545707 251 | Transform: 252 | m_ObjectHideFlags: 0 253 | m_CorrespondingSourceObject: {fileID: 0} 254 | m_PrefabInstance: {fileID: 0} 255 | m_PrefabAsset: {fileID: 0} 256 | m_GameObject: {fileID: 562545703} 257 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 258 | m_LocalPosition: {x: 0, y: 0, z: 0} 259 | m_LocalScale: {x: 1, y: 1, z: 1} 260 | m_Children: [] 261 | m_Father: {fileID: 0} 262 | m_RootOrder: 0 263 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 264 | --- !u!114 &562545708 265 | MonoBehaviour: 266 | m_ObjectHideFlags: 0 267 | m_CorrespondingSourceObject: {fileID: 0} 268 | m_PrefabInstance: {fileID: 0} 269 | m_PrefabAsset: {fileID: 0} 270 | m_GameObject: {fileID: 562545703} 271 | m_Enabled: 1 272 | m_EditorHideFlags: 0 273 | m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} 274 | m_Name: 275 | m_EditorClassIdentifier: 276 | m_RenderShadows: 1 277 | m_RequiresDepthTextureOption: 2 278 | m_RequiresOpaqueTextureOption: 2 279 | m_CameraType: 0 280 | m_Cameras: [] 281 | m_RendererIndex: -1 282 | m_VolumeLayerMask: 283 | serializedVersion: 2 284 | m_Bits: 1 285 | m_VolumeTrigger: {fileID: 0} 286 | m_RenderPostProcessing: 0 287 | m_Antialiasing: 0 288 | m_AntialiasingQuality: 2 289 | m_StopNaN: 0 290 | m_Dithering: 0 291 | m_ClearDepth: 1 292 | m_AllowXRRendering: 1 293 | m_RequiresDepthTexture: 0 294 | m_RequiresColorTexture: 0 295 | m_Version: 2 296 | --- !u!1 &680019446 297 | GameObject: 298 | m_ObjectHideFlags: 0 299 | m_CorrespondingSourceObject: {fileID: 0} 300 | m_PrefabInstance: {fileID: 0} 301 | m_PrefabAsset: {fileID: 0} 302 | serializedVersion: 6 303 | m_Component: 304 | - component: {fileID: 680019449} 305 | - component: {fileID: 680019448} 306 | - component: {fileID: 680019447} 307 | - component: {fileID: 680019451} 308 | - component: {fileID: 680019450} 309 | m_Layer: 0 310 | m_Name: MouseDrawer - Enable Gizmos 311 | m_TagString: Untagged 312 | m_Icon: {fileID: 0} 313 | m_NavMeshLayer: 0 314 | m_StaticEditorFlags: 0 315 | m_IsActive: 1 316 | --- !u!95 &680019447 317 | Animator: 318 | serializedVersion: 3 319 | m_ObjectHideFlags: 0 320 | m_CorrespondingSourceObject: {fileID: 0} 321 | m_PrefabInstance: {fileID: 0} 322 | m_PrefabAsset: {fileID: 0} 323 | m_GameObject: {fileID: 680019446} 324 | m_Enabled: 1 325 | m_Avatar: {fileID: 0} 326 | m_Controller: {fileID: 0} 327 | m_CullingMode: 0 328 | m_UpdateMode: 0 329 | m_ApplyRootMotion: 1 330 | m_LinearVelocityBlending: 0 331 | m_WarningMessage: 332 | m_HasTransformHierarchy: 1 333 | m_AllowConstantClipSamplingOptimization: 1 334 | m_KeepAnimatorControllerStateOnDisable: 0 335 | --- !u!320 &680019448 336 | PlayableDirector: 337 | m_ObjectHideFlags: 0 338 | m_CorrespondingSourceObject: {fileID: 0} 339 | m_PrefabInstance: {fileID: 0} 340 | m_PrefabAsset: {fileID: 0} 341 | m_GameObject: {fileID: 680019446} 342 | m_Enabled: 1 343 | serializedVersion: 3 344 | m_PlayableAsset: {fileID: 11400000, guid: 9cc880d0463af4b8288b9e48aa60bcd8, type: 2} 345 | m_InitialState: 1 346 | m_WrapMode: 2 347 | m_DirectorUpdateMode: 1 348 | m_InitialTime: 0 349 | m_SceneBindings: 350 | - key: {fileID: 0} 351 | value: {fileID: 680019446} 352 | - key: {fileID: 114774859078110122, guid: 9cc880d0463af4b8288b9e48aa60bcd8, type: 2} 353 | value: {fileID: 0} 354 | - key: {fileID: 0} 355 | value: {fileID: 0} 356 | - key: {fileID: 0} 357 | value: {fileID: 0} 358 | - key: {fileID: 0} 359 | value: {fileID: 0} 360 | - key: {fileID: 0} 361 | value: {fileID: 0} 362 | - key: {fileID: 0} 363 | value: {fileID: 0} 364 | - key: {fileID: 0} 365 | value: {fileID: 0} 366 | - key: {fileID: 0} 367 | value: {fileID: 0} 368 | - key: {fileID: 0} 369 | value: {fileID: 0} 370 | - key: {fileID: 0} 371 | value: {fileID: 0} 372 | - key: {fileID: 0} 373 | value: {fileID: 0} 374 | - key: {fileID: 0} 375 | value: {fileID: 0} 376 | - key: {fileID: 114320528640185606, guid: 9cc880d0463af4b8288b9e48aa60bcd8, type: 2} 377 | value: {fileID: 680019451} 378 | - key: {fileID: 0} 379 | value: {fileID: 0} 380 | m_ExposedReferences: 381 | m_References: [] 382 | --- !u!4 &680019449 383 | Transform: 384 | m_ObjectHideFlags: 0 385 | m_CorrespondingSourceObject: {fileID: 0} 386 | m_PrefabInstance: {fileID: 0} 387 | m_PrefabAsset: {fileID: 0} 388 | m_GameObject: {fileID: 680019446} 389 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 390 | m_LocalPosition: {x: 0, y: 0, z: 10} 391 | m_LocalScale: {x: 1, y: 1, z: 1} 392 | m_Children: [] 393 | m_Father: {fileID: 0} 394 | m_RootOrder: 2 395 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 396 | --- !u!114 &680019450 397 | MonoBehaviour: 398 | m_ObjectHideFlags: 0 399 | m_CorrespondingSourceObject: {fileID: 0} 400 | m_PrefabInstance: {fileID: 0} 401 | m_PrefabAsset: {fileID: 0} 402 | m_GameObject: {fileID: 680019446} 403 | m_Enabled: 1 404 | m_EditorHideFlags: 0 405 | m_Script: {fileID: 11500000, guid: 31b098dc47ea1470ba3c8782447f4df0, type: 3} 406 | m_Name: 407 | m_EditorClassIdentifier: 408 | --- !u!114 &680019451 409 | MonoBehaviour: 410 | m_ObjectHideFlags: 0 411 | m_CorrespondingSourceObject: {fileID: 0} 412 | m_PrefabInstance: {fileID: 0} 413 | m_PrefabAsset: {fileID: 0} 414 | m_GameObject: {fileID: 680019446} 415 | m_Enabled: 1 416 | m_EditorHideFlags: 0 417 | m_Script: {fileID: 11500000, guid: 07854983c60464c10a6d5426027bdd16, type: 3} 418 | m_Name: 419 | m_EditorClassIdentifier: 420 | dataFrameEvent: 421 | m_PersistentCalls: 422 | m_Calls: 423 | - m_Target: {fileID: 680019450} 424 | m_TargetAssemblyTypeName: 425 | m_MethodName: ProcessData 426 | m_Mode: 0 427 | m_Arguments: 428 | m_ObjectArgument: {fileID: 0} 429 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 430 | m_IntArgument: 0 431 | m_FloatArgument: 0 432 | m_StringArgument: 433 | m_BoolArgument: 0 434 | m_CallState: 1 435 | --- !u!1 &1377753431 436 | GameObject: 437 | m_ObjectHideFlags: 0 438 | m_CorrespondingSourceObject: {fileID: 0} 439 | m_PrefabInstance: {fileID: 0} 440 | m_PrefabAsset: {fileID: 0} 441 | serializedVersion: 6 442 | m_Component: 443 | - component: {fileID: 1377753433} 444 | - component: {fileID: 1377753432} 445 | m_Layer: 0 446 | m_Name: Directional Light 447 | m_TagString: Untagged 448 | m_Icon: {fileID: 0} 449 | m_NavMeshLayer: 0 450 | m_StaticEditorFlags: 0 451 | m_IsActive: 1 452 | --- !u!108 &1377753432 453 | Light: 454 | m_ObjectHideFlags: 0 455 | m_CorrespondingSourceObject: {fileID: 0} 456 | m_PrefabInstance: {fileID: 0} 457 | m_PrefabAsset: {fileID: 0} 458 | m_GameObject: {fileID: 1377753431} 459 | m_Enabled: 1 460 | serializedVersion: 10 461 | m_Type: 1 462 | m_Shape: 0 463 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 464 | m_Intensity: 1 465 | m_Range: 10 466 | m_SpotAngle: 30 467 | m_InnerSpotAngle: 21.80208 468 | m_CookieSize: 10 469 | m_Shadows: 470 | m_Type: 2 471 | m_Resolution: -1 472 | m_CustomResolution: -1 473 | m_Strength: 1 474 | m_Bias: 0.05 475 | m_NormalBias: 0.4 476 | m_NearPlane: 0.2 477 | m_CullingMatrixOverride: 478 | e00: 1 479 | e01: 0 480 | e02: 0 481 | e03: 0 482 | e10: 0 483 | e11: 1 484 | e12: 0 485 | e13: 0 486 | e20: 0 487 | e21: 0 488 | e22: 1 489 | e23: 0 490 | e30: 0 491 | e31: 0 492 | e32: 0 493 | e33: 1 494 | m_UseCullingMatrixOverride: 0 495 | m_Cookie: {fileID: 0} 496 | m_DrawHalo: 0 497 | m_Flare: {fileID: 0} 498 | m_RenderMode: 0 499 | m_CullingMask: 500 | serializedVersion: 2 501 | m_Bits: 4294967295 502 | m_RenderingLayerMask: 1 503 | m_Lightmapping: 4 504 | m_LightShadowCasterMode: 0 505 | m_AreaSize: {x: 1, y: 1} 506 | m_BounceIntensity: 1 507 | m_ColorTemperature: 6570 508 | m_UseColorTemperature: 0 509 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 510 | m_UseBoundingSphereOverride: 0 511 | m_UseViewFrustumForShadowCasterCull: 1 512 | m_ShadowRadius: 0 513 | m_ShadowAngle: 0 514 | --- !u!4 &1377753433 515 | Transform: 516 | m_ObjectHideFlags: 0 517 | m_CorrespondingSourceObject: {fileID: 0} 518 | m_PrefabInstance: {fileID: 0} 519 | m_PrefabAsset: {fileID: 0} 520 | m_GameObject: {fileID: 1377753431} 521 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 522 | m_LocalPosition: {x: 0, y: 3, z: 0} 523 | m_LocalScale: {x: 1, y: 1, z: 1} 524 | m_Children: [] 525 | m_Father: {fileID: 0} 526 | m_RootOrder: 1 527 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 528 | -------------------------------------------------------------------------------- /Example_MouseRecording/Scenes/RepeatScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55276d1270856437d84dc601a6687929 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Example_MouseRecording/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e3d160e266334428387960e8282a8aee 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_MouseRecording/Scripts/MouseData.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace RecordAndRepeat.Examples 4 | { 5 | [System.Serializable] 6 | public class MouseData 7 | { 8 | public Vector3 worldPos; 9 | public bool pressed; 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /Example_MouseRecording/Scripts/MouseData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d6d92a1dffadf4a58b52ba76cab2caa8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Example_MouseRecording/Scripts/MouseDrawer.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | // Copyright (c) 2018 Felix Lange 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 | 23 | using System.Collections; 24 | using System.Collections.Generic; 25 | using UnityEngine; 26 | 27 | namespace RecordAndRepeat.Examples 28 | { 29 | [RequireComponent(typeof(DataListener))] 30 | public class MouseDrawer : MonoBehaviour 31 | { 32 | private MouseData mouseData = new MouseData(); 33 | 34 | //binding via UnityEvent (DataFrameEvent of DataListener) 35 | public void ProcessData(IDataFrame frame) 36 | { 37 | DataFrame jsonFrame = frame as DataFrame; 38 | mouseData = jsonFrame.ParseFromJson(); 39 | } 40 | 41 | void OnDrawGizmos() 42 | { 43 | float radius; 44 | if (mouseData.pressed) 45 | { 46 | radius = 1.2f; 47 | Gizmos.color = Color.green; 48 | } 49 | else 50 | { 51 | radius = 1; 52 | Gizmos.color = Color.grey; 53 | } 54 | 55 | Gizmos.DrawWireSphere(mouseData.worldPos, radius); 56 | } 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /Example_MouseRecording/Scripts/MouseDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31b098dc47ea1470ba3c8782447f4df0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Example_MouseRecording/Scripts/MousePlotter.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | // Copyright (c) 2018 Felix Lange 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 | 23 | using System.Collections; 24 | using System.Collections.Generic; 25 | using UnityEngine; 26 | 27 | namespace RecordAndRepeat.Examples 28 | { 29 | public class MousePlotter : MonoBehaviour 30 | { 31 | 32 | public Recording recording; 33 | public float scaleRadius = 1f; 34 | 35 | void OnDrawGizmos() 36 | { 37 | if (recording != null) 38 | { 39 | foreach (DataFrame frame in recording.DataFrames) 40 | { 41 | MouseData mouseData = frame.ParseFromJson(); 42 | 43 | float radius; 44 | if (mouseData.pressed) 45 | { 46 | radius = 1.2f; 47 | Gizmos.color = Color.green; 48 | } 49 | else 50 | { 51 | radius = 1; 52 | Gizmos.color = Color.grey; 53 | } 54 | 55 | Gizmos.DrawWireSphere(mouseData.worldPos, radius * scaleRadius); 56 | } 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Example_MouseRecording/Scripts/MousePlotter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68ef7c1bf90fd4eefaef8b5c365993d9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Example_MouseRecording/Scripts/MouseRecorder.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | // Copyright (c) 2018 Felix Lange 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 | 23 | using System.Collections; 24 | using System.Collections.Generic; 25 | using UnityEngine; 26 | 27 | namespace RecordAndRepeat.Examples 28 | { 29 | [RequireComponent(typeof(Recorder))] 30 | [ExecuteInEditMode] 31 | public class MouseRecorder : MonoBehaviour 32 | { 33 | 34 | private Recorder recorder; 35 | private MouseData mouseData = new MouseData(); 36 | 37 | void Awake() 38 | { 39 | recorder = GetComponent(); 40 | recorder.DefaultRecordingName = "New Mouse Recording"; 41 | } 42 | 43 | void Update() 44 | { 45 | Vector3 mouse = Input.mousePosition; 46 | mouse.z = 10; 47 | 48 | mouseData.worldPos = Camera.main.ScreenToWorldPoint(mouse); 49 | mouseData.pressed = Input.GetMouseButton(0); 50 | 51 | if (recorder.IsRecording) 52 | { 53 | recorder.RecordAsJson(mouseData); 54 | } 55 | } 56 | 57 | void OnDrawGizmos() 58 | { 59 | if (recorder.IsRecording) 60 | { 61 | Gizmos.color = Color.red; 62 | } 63 | else 64 | { 65 | Gizmos.color = Color.grey; 66 | } 67 | Gizmos.DrawWireSphere(mouseData.worldPos, mouseData.pressed ? 1.2f : 1f); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Example_MouseRecording/Scripts/MouseRecorder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1761b1cfc3b944445b1bed02c302989f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Example_MouseRecording/Timeline.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 63a96927a935e46d7b79b32ec240f720 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_MouseRecording/Timeline/MouseDrawerTimeline.playable: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 337831424, guid: 6a10b2909283487f913b00d94cd3faf5, type: 3} 12 | m_Name: MouseDrawerTimeline 13 | m_EditorClassIdentifier: 14 | m_NextId: 0 15 | m_Tracks: 16 | - {fileID: 114320528640185606} 17 | m_FixedDuration: 0 18 | m_EditorSettings: 19 | m_Framerate: 60 20 | m_DurationMode: 0 21 | m_Version: 0 22 | --- !u!114 &114118584073663586 23 | MonoBehaviour: 24 | m_ObjectHideFlags: 1 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInternal: {fileID: 0} 27 | m_GameObject: {fileID: 0} 28 | m_Enabled: 1 29 | m_EditorHideFlags: 0 30 | m_Script: {fileID: 11500000, guid: f2e6ab84ba07902498da4807885565cb, type: 3} 31 | m_Name: Transform Tween Track (1) 32 | m_EditorClassIdentifier: 33 | m_Locked: 0 34 | m_Muted: 0 35 | m_CustomPlayableFullTypename: 36 | m_AnimClip: {fileID: 0} 37 | m_Parent: {fileID: 11400000} 38 | m_Children: [] 39 | m_Clips: [] 40 | m_Version: 1 41 | --- !u!114 &114138334628621336 42 | MonoBehaviour: 43 | m_ObjectHideFlags: 1 44 | m_CorrespondingSourceObject: {fileID: 0} 45 | m_PrefabInternal: {fileID: 0} 46 | m_GameObject: {fileID: 0} 47 | m_Enabled: 1 48 | m_EditorHideFlags: 0 49 | m_Script: {fileID: 11500000, guid: ef456091969024375aef2552952b31d9, type: 3} 50 | m_Name: RecordingClip 51 | m_EditorClassIdentifier: 52 | template: 53 | recording: {fileID: 11400000, guid: f8858a72b82154d869d1f2324c44ea0a, type: 2} 54 | watchReference: {fileID: 11400000, guid: f8858a72b82154d869d1f2324c44ea0a, type: 2} 55 | --- !u!114 &114154445363386184 56 | MonoBehaviour: 57 | m_ObjectHideFlags: 1 58 | m_CorrespondingSourceObject: {fileID: 0} 59 | m_PrefabInternal: {fileID: 0} 60 | m_GameObject: {fileID: 0} 61 | m_Enabled: 1 62 | m_EditorHideFlags: 0 63 | m_Script: {fileID: 11500000, guid: f28fb04ff66f85e40af453230799042c, type: 3} 64 | m_Name: TransformTweenClip 65 | m_EditorClassIdentifier: 66 | template: 67 | startLocation: {fileID: 0} 68 | endLocation: {fileID: 0} 69 | tweenPosition: 1 70 | tweenRotation: 1 71 | tweenType: 0 72 | customCurve: 73 | serializedVersion: 2 74 | m_Curve: 75 | - serializedVersion: 3 76 | time: 0 77 | value: 0 78 | inSlope: 0 79 | outSlope: 1 80 | tangentMode: 0 81 | weightedMode: 0 82 | inWeight: 0 83 | outWeight: 0 84 | - serializedVersion: 3 85 | time: 1 86 | value: 1 87 | inSlope: 1 88 | outSlope: 0 89 | tangentMode: 0 90 | weightedMode: 0 91 | inWeight: 0 92 | outWeight: 0 93 | m_PreInfinity: 2 94 | m_PostInfinity: 2 95 | m_RotationOrder: 4 96 | startingPosition: {x: 0, y: 0, z: 0} 97 | startingRotation: {x: 0, y: 0, z: 0, w: 1} 98 | startLocation: 99 | exposedName: 100 | defaultValue: {fileID: 0} 101 | endLocation: 102 | exposedName: 103 | defaultValue: {fileID: 0} 104 | --- !u!114 &114320528640185606 105 | MonoBehaviour: 106 | m_ObjectHideFlags: 1 107 | m_CorrespondingSourceObject: {fileID: 0} 108 | m_PrefabInternal: {fileID: 0} 109 | m_GameObject: {fileID: 0} 110 | m_Enabled: 1 111 | m_EditorHideFlags: 0 112 | m_Script: {fileID: 11500000, guid: 39cd434a3e3184adf9bb31348ce468b5, type: 3} 113 | m_Name: Recording Track 114 | m_EditorClassIdentifier: 115 | m_Locked: 0 116 | m_Muted: 0 117 | m_CustomPlayableFullTypename: 118 | m_AnimClip: {fileID: 0} 119 | m_Parent: {fileID: 11400000} 120 | m_Children: [] 121 | m_Clips: 122 | - m_Start: 0 123 | m_ClipIn: 1.3166666666666667 124 | m_Asset: {fileID: 114453886452035464} 125 | m_Duration: 5.233333333333333 126 | m_TimeScale: 1 127 | m_ParentTrack: {fileID: 114320528640185606} 128 | m_EaseInDuration: 0 129 | m_EaseOutDuration: 0 130 | m_BlendInDuration: 0 131 | m_BlendOutDuration: 0 132 | m_MixInCurve: 133 | serializedVersion: 2 134 | m_Curve: 135 | - serializedVersion: 3 136 | time: 0 137 | value: 0 138 | inSlope: 0 139 | outSlope: 0 140 | tangentMode: 0 141 | weightedMode: 0 142 | inWeight: 0 143 | outWeight: 0 144 | - serializedVersion: 3 145 | time: 1 146 | value: 1 147 | inSlope: 0 148 | outSlope: 0 149 | tangentMode: 0 150 | weightedMode: 0 151 | inWeight: 0 152 | outWeight: 0 153 | m_PreInfinity: 2 154 | m_PostInfinity: 2 155 | m_RotationOrder: 4 156 | m_MixOutCurve: 157 | serializedVersion: 2 158 | m_Curve: 159 | - serializedVersion: 3 160 | time: 0 161 | value: 1 162 | inSlope: 0 163 | outSlope: 0 164 | tangentMode: 0 165 | weightedMode: 0 166 | inWeight: 0 167 | outWeight: 0 168 | - serializedVersion: 3 169 | time: 1 170 | value: 0 171 | inSlope: 0 172 | outSlope: 0 173 | tangentMode: 0 174 | weightedMode: 0 175 | inWeight: 0 176 | outWeight: 0 177 | m_PreInfinity: 2 178 | m_PostInfinity: 2 179 | m_RotationOrder: 4 180 | m_BlendInCurveMode: 0 181 | m_BlendOutCurveMode: 0 182 | m_ExposedParameterNames: [] 183 | m_AnimationCurves: {fileID: 0} 184 | m_Recordable: 0 185 | m_PostExtrapolationMode: 0 186 | m_PreExtrapolationMode: 0 187 | m_PostExtrapolationTime: 0 188 | m_PreExtrapolationTime: 0 189 | m_DisplayName: ScanEight 190 | m_Version: 1 191 | - m_Start: 12.066666666666666 192 | m_ClipIn: 8.533333333333333 193 | m_Asset: {fileID: 114138334628621336} 194 | m_Duration: 4.816666666666666 195 | m_TimeScale: 1 196 | m_ParentTrack: {fileID: 114320528640185606} 197 | m_EaseInDuration: 0 198 | m_EaseOutDuration: 0 199 | m_BlendInDuration: 0 200 | m_BlendOutDuration: 0 201 | m_MixInCurve: 202 | serializedVersion: 2 203 | m_Curve: 204 | - serializedVersion: 3 205 | time: 0 206 | value: 0 207 | inSlope: 0 208 | outSlope: 0 209 | tangentMode: 0 210 | weightedMode: 0 211 | inWeight: 0 212 | outWeight: 0 213 | - serializedVersion: 3 214 | time: 1 215 | value: 1 216 | inSlope: 0 217 | outSlope: 0 218 | tangentMode: 0 219 | weightedMode: 0 220 | inWeight: 0 221 | outWeight: 0 222 | m_PreInfinity: 2 223 | m_PostInfinity: 2 224 | m_RotationOrder: 4 225 | m_MixOutCurve: 226 | serializedVersion: 2 227 | m_Curve: 228 | - serializedVersion: 3 229 | time: 0 230 | value: 1 231 | inSlope: 0 232 | outSlope: 0 233 | tangentMode: 0 234 | weightedMode: 0 235 | inWeight: 0 236 | outWeight: 0 237 | - serializedVersion: 3 238 | time: 1 239 | value: 0 240 | inSlope: 0 241 | outSlope: 0 242 | tangentMode: 0 243 | weightedMode: 0 244 | inWeight: 0 245 | outWeight: 0 246 | m_PreInfinity: 2 247 | m_PostInfinity: 2 248 | m_RotationOrder: 4 249 | m_BlendInCurveMode: 0 250 | m_BlendOutCurveMode: 0 251 | m_ExposedParameterNames: [] 252 | m_AnimationCurves: {fileID: 0} 253 | m_Recordable: 0 254 | m_PostExtrapolationMode: 0 255 | m_PreExtrapolationMode: 0 256 | m_PostExtrapolationTime: 0 257 | m_PreExtrapolationTime: 0 258 | m_DisplayName: Shoot 259 | m_Version: 1 260 | - m_Start: 5.233333333333333 261 | m_ClipIn: 5.183333333333334 262 | m_Asset: {fileID: 114649354148987476} 263 | m_Duration: 3.0166666666666666 264 | m_TimeScale: 1 265 | m_ParentTrack: {fileID: 114320528640185606} 266 | m_EaseInDuration: 0 267 | m_EaseOutDuration: 0 268 | m_BlendInDuration: 0 269 | m_BlendOutDuration: 0 270 | m_MixInCurve: 271 | serializedVersion: 2 272 | m_Curve: 273 | - serializedVersion: 3 274 | time: 0 275 | value: 0 276 | inSlope: 0 277 | outSlope: 0 278 | tangentMode: 0 279 | weightedMode: 0 280 | inWeight: 0 281 | outWeight: 0 282 | - serializedVersion: 3 283 | time: 1 284 | value: 1 285 | inSlope: 0 286 | outSlope: 0 287 | tangentMode: 0 288 | weightedMode: 0 289 | inWeight: 0 290 | outWeight: 0 291 | m_PreInfinity: 2 292 | m_PostInfinity: 2 293 | m_RotationOrder: 4 294 | m_MixOutCurve: 295 | serializedVersion: 2 296 | m_Curve: 297 | - serializedVersion: 3 298 | time: 0 299 | value: 1 300 | inSlope: 0 301 | outSlope: 0 302 | tangentMode: 0 303 | weightedMode: 0 304 | inWeight: 0 305 | outWeight: 0 306 | - serializedVersion: 3 307 | time: 1 308 | value: 0 309 | inSlope: 0 310 | outSlope: 0 311 | tangentMode: 0 312 | weightedMode: 0 313 | inWeight: 0 314 | outWeight: 0 315 | m_PreInfinity: 2 316 | m_PostInfinity: 2 317 | m_RotationOrder: 4 318 | m_BlendInCurveMode: 0 319 | m_BlendOutCurveMode: 0 320 | m_ExposedParameterNames: [] 321 | m_AnimationCurves: {fileID: 0} 322 | m_Recordable: 0 323 | m_PostExtrapolationMode: 0 324 | m_PreExtrapolationMode: 0 325 | m_PostExtrapolationTime: 0 326 | m_PreExtrapolationTime: 0 327 | m_DisplayName: Shoot 328 | m_Version: 1 329 | - m_Start: 8.25 330 | m_ClipIn: 2.1883219401041636 331 | m_Asset: {fileID: 114794734476933278} 332 | m_Duration: 3.8166666666666664 333 | m_TimeScale: 1 334 | m_ParentTrack: {fileID: 114320528640185606} 335 | m_EaseInDuration: 0 336 | m_EaseOutDuration: 0 337 | m_BlendInDuration: 0 338 | m_BlendOutDuration: 0 339 | m_MixInCurve: 340 | serializedVersion: 2 341 | m_Curve: 342 | - serializedVersion: 3 343 | time: 0 344 | value: 0 345 | inSlope: 0 346 | outSlope: 0 347 | tangentMode: 0 348 | weightedMode: 0 349 | inWeight: 0 350 | outWeight: 0 351 | - serializedVersion: 3 352 | time: 1 353 | value: 1 354 | inSlope: 0 355 | outSlope: 0 356 | tangentMode: 0 357 | weightedMode: 0 358 | inWeight: 0 359 | outWeight: 0 360 | m_PreInfinity: 2 361 | m_PostInfinity: 2 362 | m_RotationOrder: 4 363 | m_MixOutCurve: 364 | serializedVersion: 2 365 | m_Curve: 366 | - serializedVersion: 3 367 | time: 0 368 | value: 1 369 | inSlope: 0 370 | outSlope: 0 371 | tangentMode: 0 372 | weightedMode: 0 373 | inWeight: 0 374 | outWeight: 0 375 | - serializedVersion: 3 376 | time: 1 377 | value: 0 378 | inSlope: 0 379 | outSlope: 0 380 | tangentMode: 0 381 | weightedMode: 0 382 | inWeight: 0 383 | outWeight: 0 384 | m_PreInfinity: 2 385 | m_PostInfinity: 2 386 | m_RotationOrder: 4 387 | m_BlendInCurveMode: 0 388 | m_BlendOutCurveMode: 0 389 | m_ExposedParameterNames: [] 390 | m_AnimationCurves: {fileID: 0} 391 | m_Recordable: 0 392 | m_PostExtrapolationMode: 0 393 | m_PreExtrapolationMode: 0 394 | m_PostExtrapolationTime: 0 395 | m_PreExtrapolationTime: 0 396 | m_DisplayName: ScanRect 397 | m_Version: 1 398 | m_Version: 1 399 | --- !u!114 &114322612089667498 400 | MonoBehaviour: 401 | m_ObjectHideFlags: 1 402 | m_CorrespondingSourceObject: {fileID: 0} 403 | m_PrefabInternal: {fileID: 0} 404 | m_GameObject: {fileID: 0} 405 | m_Enabled: 1 406 | m_EditorHideFlags: 0 407 | m_Script: {fileID: 11500000, guid: e97b7684a1a63ed42afa5e89e962140f, type: 3} 408 | m_Name: Light Control Track (1) 409 | m_EditorClassIdentifier: 410 | m_Locked: 0 411 | m_Muted: 0 412 | m_CustomPlayableFullTypename: 413 | m_AnimClip: {fileID: 0} 414 | m_Parent: {fileID: 11400000} 415 | m_Children: [] 416 | m_Clips: [] 417 | m_Version: 1 418 | --- !u!114 &114332999789720290 419 | MonoBehaviour: 420 | m_ObjectHideFlags: 1 421 | m_CorrespondingSourceObject: {fileID: 0} 422 | m_PrefabInternal: {fileID: 0} 423 | m_GameObject: {fileID: 0} 424 | m_Enabled: 1 425 | m_EditorHideFlags: 0 426 | m_Script: {fileID: 11500000, guid: 14ca5475deffe408396f71e38f938f60, type: 3} 427 | m_Name: NewTestClip 428 | m_EditorClassIdentifier: 429 | template: {} 430 | --- !u!114 &114371988620158030 431 | MonoBehaviour: 432 | m_ObjectHideFlags: 1 433 | m_CorrespondingSourceObject: {fileID: 0} 434 | m_PrefabInternal: {fileID: 0} 435 | m_GameObject: {fileID: 0} 436 | m_Enabled: 1 437 | m_EditorHideFlags: 0 438 | m_Script: {fileID: 11500000, guid: 14ca5475deffe408396f71e38f938f60, type: 3} 439 | m_Name: NewTestClip 440 | m_EditorClassIdentifier: 441 | template: {} 442 | --- !u!114 &114375581965263478 443 | MonoBehaviour: 444 | m_ObjectHideFlags: 1 445 | m_CorrespondingSourceObject: {fileID: 0} 446 | m_PrefabInternal: {fileID: 0} 447 | m_GameObject: {fileID: 0} 448 | m_Enabled: 1 449 | m_EditorHideFlags: 0 450 | m_Script: {fileID: 11500000, guid: f28fb04ff66f85e40af453230799042c, type: 3} 451 | m_Name: TransformTweenClip 452 | m_EditorClassIdentifier: 453 | template: 454 | startLocation: {fileID: 0} 455 | endLocation: {fileID: 0} 456 | tweenPosition: 1 457 | tweenRotation: 1 458 | tweenType: 0 459 | customCurve: 460 | serializedVersion: 2 461 | m_Curve: 462 | - serializedVersion: 3 463 | time: 0 464 | value: 0 465 | inSlope: 0 466 | outSlope: 1 467 | tangentMode: 0 468 | weightedMode: 0 469 | inWeight: 0 470 | outWeight: 0 471 | - serializedVersion: 3 472 | time: 1 473 | value: 1 474 | inSlope: 1 475 | outSlope: 0 476 | tangentMode: 0 477 | weightedMode: 0 478 | inWeight: 0 479 | outWeight: 0 480 | m_PreInfinity: 2 481 | m_PostInfinity: 2 482 | m_RotationOrder: 4 483 | startingPosition: {x: 0, y: 0, z: 0} 484 | startingRotation: {x: 0, y: 0, z: 0, w: 1} 485 | startLocation: 486 | exposedName: 487 | defaultValue: {fileID: 0} 488 | endLocation: 489 | exposedName: 490 | defaultValue: {fileID: 0} 491 | --- !u!114 &114453886452035464 492 | MonoBehaviour: 493 | m_ObjectHideFlags: 1 494 | m_CorrespondingSourceObject: {fileID: 0} 495 | m_PrefabInternal: {fileID: 0} 496 | m_GameObject: {fileID: 0} 497 | m_Enabled: 1 498 | m_EditorHideFlags: 0 499 | m_Script: {fileID: 11500000, guid: ef456091969024375aef2552952b31d9, type: 3} 500 | m_Name: RecordingClip 501 | m_EditorClassIdentifier: 502 | template: 503 | recording: {fileID: 11400000, guid: c198a10d16fbb45c786096f240f4734b, type: 2} 504 | watchReference: {fileID: 11400000, guid: c198a10d16fbb45c786096f240f4734b, type: 2} 505 | --- !u!114 &114640678239048740 506 | MonoBehaviour: 507 | m_ObjectHideFlags: 1 508 | m_CorrespondingSourceObject: {fileID: 0} 509 | m_PrefabInternal: {fileID: 0} 510 | m_GameObject: {fileID: 0} 511 | m_Enabled: 1 512 | m_EditorHideFlags: 0 513 | m_Script: {fileID: 11500000, guid: 553abbca0db4f4257a6408729feffb98, type: 3} 514 | m_Name: ClipInTestClip 515 | m_EditorClassIdentifier: 516 | template: {} 517 | --- !u!114 &114649354148987476 518 | MonoBehaviour: 519 | m_ObjectHideFlags: 1 520 | m_CorrespondingSourceObject: {fileID: 0} 521 | m_PrefabInternal: {fileID: 0} 522 | m_GameObject: {fileID: 0} 523 | m_Enabled: 1 524 | m_EditorHideFlags: 0 525 | m_Script: {fileID: 11500000, guid: ef456091969024375aef2552952b31d9, type: 3} 526 | m_Name: RecordingClip 527 | m_EditorClassIdentifier: 528 | template: 529 | recording: {fileID: 11400000, guid: f8858a72b82154d869d1f2324c44ea0a, type: 2} 530 | watchReference: {fileID: 11400000, guid: f8858a72b82154d869d1f2324c44ea0a, type: 2} 531 | --- !u!114 &114794734476933278 532 | MonoBehaviour: 533 | m_ObjectHideFlags: 1 534 | m_CorrespondingSourceObject: {fileID: 0} 535 | m_PrefabInternal: {fileID: 0} 536 | m_GameObject: {fileID: 0} 537 | m_Enabled: 1 538 | m_EditorHideFlags: 0 539 | m_Script: {fileID: 11500000, guid: ef456091969024375aef2552952b31d9, type: 3} 540 | m_Name: RecordingClip 541 | m_EditorClassIdentifier: 542 | template: 543 | recording: {fileID: 11400000, guid: 03601991233db48dab48503c0d18dae2, type: 2} 544 | watchReference: {fileID: 11400000, guid: 03601991233db48dab48503c0d18dae2, type: 2} 545 | --- !u!114 &114935787581820278 546 | MonoBehaviour: 547 | m_ObjectHideFlags: 1 548 | m_CorrespondingSourceObject: {fileID: 0} 549 | m_PrefabInternal: {fileID: 0} 550 | m_GameObject: {fileID: 0} 551 | m_Enabled: 1 552 | m_EditorHideFlags: 0 553 | m_Script: {fileID: 11500000, guid: f2e6ab84ba07902498da4807885565cb, type: 3} 554 | m_Name: Transform Tween Track 555 | m_EditorClassIdentifier: 556 | m_Locked: 0 557 | m_Muted: 0 558 | m_CustomPlayableFullTypename: 559 | m_AnimClip: {fileID: 0} 560 | m_Parent: {fileID: 11400000} 561 | m_Children: [] 562 | m_Clips: [] 563 | m_Version: 1 564 | -------------------------------------------------------------------------------- /Example_MouseRecording/Timeline/MouseDrawerTimeline.playable.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9cc880d0463af4b8288b9e48aa60bcd8 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_TransformRecording.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8eeaa035f4cd54a30af23ef81e9d83cb 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_TransformRecording/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21705d5536f044e09a31050c7c8123ff 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_TransformRecording/Materials/Navy.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: Navy 11 | m_Shader: {fileID: 45, 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 | - _OcclusionMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _ParallaxMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _SpecGlossMap: 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 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 0.1254902, g: 0.17254902, b: 0.21568629, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 78 | -------------------------------------------------------------------------------- /Example_TransformRecording/Materials/Navy.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48995c78e342d48aab369567f28d54c0 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_TransformRecording/Materials/Orange.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: Orange 11 | m_Shader: {fileID: 45, 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 | - _OcclusionMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _ParallaxMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _SpecGlossMap: 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 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 1, g: 0.49803925, b: 0.20000002, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 78 | -------------------------------------------------------------------------------- /Example_TransformRecording/Materials/Orange.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7238d89360a944fab2dd845c9ff542d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_TransformRecording/Materials/White.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: White 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: 1, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Example_TransformRecording/Materials/White.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9948c0ca7c772488fb8bcacbadfd44d0 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_TransformRecording/RecordAndRepeat.TransformExample.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RecordAndRepeat.TransformExample", 3 | "rootNamespace": "", 4 | "references": [ 5 | "RecordAndRepeat" 6 | ], 7 | "includePlatforms": [ 8 | "Editor" 9 | ], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": false, 13 | "precompiledReferences": [], 14 | "autoReferenced": true, 15 | "defineConstraints": [], 16 | "versionDefines": [], 17 | "noEngineReferences": false 18 | } -------------------------------------------------------------------------------- /Example_TransformRecording/RecordAndRepeat.TransformExample.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db07797e9f592d643a004a3f554dd744 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Example_TransformRecording/Recordings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 079be49e5161e4396b575baf6a3ab8a8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_TransformRecording/Recordings/LongRecording.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e58957f02b6b64434bbf0c6c4cc24a7a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_TransformRecording/Recordings/ShortRecording.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8bafd829056114c109db1c1943379605 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_TransformRecording/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a769d80c6814a4709851a0c7d5305020 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_TransformRecording/Scenes/RecordAndRepeatScene.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.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 0 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: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 10 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_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_FinalGather: 0 70 | m_FinalGatherFiltering: 1 71 | m_FinalGatherRayCount: 256 72 | m_ReflectionCompression: 2 73 | m_MixedBakeMode: 2 74 | m_BakeBackend: 1 75 | m_PVRSampling: 1 76 | m_PVRDirectSampleCount: 32 77 | m_PVRSampleCount: 500 78 | m_PVRBounces: 2 79 | m_PVRFilterTypeDirect: 0 80 | m_PVRFilterTypeIndirect: 0 81 | m_PVRFilterTypeAO: 0 82 | m_PVRFilteringMode: 1 83 | m_PVRCulling: 1 84 | m_PVRFilteringGaussRadiusDirect: 1 85 | m_PVRFilteringGaussRadiusIndirect: 5 86 | m_PVRFilteringGaussRadiusAO: 2 87 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 88 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 89 | m_PVRFilteringAtrousPositionSigmaAO: 1 90 | m_ShowResolutionOverlay: 1 91 | m_LightingDataAsset: {fileID: 0} 92 | m_UseShadowmask: 1 93 | --- !u!196 &4 94 | NavMeshSettings: 95 | serializedVersion: 2 96 | m_ObjectHideFlags: 0 97 | m_BuildSettings: 98 | serializedVersion: 2 99 | agentTypeID: 0 100 | agentRadius: 0.5 101 | agentHeight: 2 102 | agentSlope: 45 103 | agentClimb: 0.4 104 | ledgeDropHeight: 0 105 | maxJumpAcrossDistance: 0 106 | minRegionArea: 2 107 | manualCellSize: 0 108 | cellSize: 0.16666667 109 | manualTileSize: 0 110 | tileSize: 256 111 | accuratePlacement: 0 112 | debug: 113 | m_Flags: 0 114 | m_NavMeshData: {fileID: 0} 115 | --- !u!1 &782452545 116 | GameObject: 117 | m_ObjectHideFlags: 0 118 | m_CorrespondingSourceObject: {fileID: 0} 119 | m_PrefabInstance: {fileID: 0} 120 | m_PrefabAsset: {fileID: 0} 121 | serializedVersion: 6 122 | m_Component: 123 | - component: {fileID: 782452546} 124 | - component: {fileID: 782452548} 125 | - component: {fileID: 782452547} 126 | m_Layer: 0 127 | m_Name: Recorder 128 | m_TagString: Untagged 129 | m_Icon: {fileID: 0} 130 | m_NavMeshLayer: 0 131 | m_StaticEditorFlags: 0 132 | m_IsActive: 1 133 | --- !u!4 &782452546 134 | Transform: 135 | m_ObjectHideFlags: 0 136 | m_CorrespondingSourceObject: {fileID: 0} 137 | m_PrefabInstance: {fileID: 0} 138 | m_PrefabAsset: {fileID: 0} 139 | m_GameObject: {fileID: 782452545} 140 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 141 | m_LocalPosition: {x: 0, y: 0, z: 0} 142 | m_LocalScale: {x: 1, y: 1, z: 1} 143 | m_Children: [] 144 | m_Father: {fileID: 1621700182} 145 | m_RootOrder: 2 146 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 147 | --- !u!114 &782452547 148 | MonoBehaviour: 149 | m_ObjectHideFlags: 0 150 | m_CorrespondingSourceObject: {fileID: 0} 151 | m_PrefabInstance: {fileID: 0} 152 | m_PrefabAsset: {fileID: 0} 153 | m_GameObject: {fileID: 782452545} 154 | m_Enabled: 1 155 | m_EditorHideFlags: 0 156 | m_Script: {fileID: 11500000, guid: dfcfa09f9ee5243eb8ce36998f94ec69, type: 3} 157 | m_Name: 158 | m_EditorClassIdentifier: 159 | headTransform: {fileID: 1854596561} 160 | --- !u!114 &782452548 161 | MonoBehaviour: 162 | m_ObjectHideFlags: 0 163 | m_CorrespondingSourceObject: {fileID: 0} 164 | m_PrefabInstance: {fileID: 0} 165 | m_PrefabAsset: {fileID: 0} 166 | m_GameObject: {fileID: 782452545} 167 | m_Enabled: 1 168 | m_EditorHideFlags: 0 169 | m_Script: {fileID: 11500000, guid: 8c00b72588b8d4d4fa8f07e1a7d4079f, type: 3} 170 | m_Name: 171 | m_EditorClassIdentifier: 172 | recordingName: Offline 2 173 | disableIfNotPlaying: 0 174 | doRecord: 0 175 | doSave: 0 176 | doCancel: 0 177 | recording: {fileID: 0} 178 | responseText: Recording stored under Assets/DataRecordings/Offline 2.asset. 179 | --- !u!1 &788741620 180 | GameObject: 181 | m_ObjectHideFlags: 0 182 | m_CorrespondingSourceObject: {fileID: 0} 183 | m_PrefabInstance: {fileID: 0} 184 | m_PrefabAsset: {fileID: 0} 185 | serializedVersion: 6 186 | m_Component: 187 | - component: {fileID: 788741622} 188 | - component: {fileID: 788741621} 189 | m_Layer: 0 190 | m_Name: Directional Light 191 | m_TagString: Untagged 192 | m_Icon: {fileID: 0} 193 | m_NavMeshLayer: 0 194 | m_StaticEditorFlags: 0 195 | m_IsActive: 1 196 | --- !u!108 &788741621 197 | Light: 198 | m_ObjectHideFlags: 0 199 | m_CorrespondingSourceObject: {fileID: 0} 200 | m_PrefabInstance: {fileID: 0} 201 | m_PrefabAsset: {fileID: 0} 202 | m_GameObject: {fileID: 788741620} 203 | m_Enabled: 1 204 | serializedVersion: 8 205 | m_Type: 1 206 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 207 | m_Intensity: 1 208 | m_Range: 10 209 | m_SpotAngle: 30 210 | m_CookieSize: 10 211 | m_Shadows: 212 | m_Type: 2 213 | m_Resolution: -1 214 | m_CustomResolution: -1 215 | m_Strength: 1 216 | m_Bias: 0.05 217 | m_NormalBias: 0.4 218 | m_NearPlane: 0.2 219 | m_Cookie: {fileID: 0} 220 | m_DrawHalo: 0 221 | m_Flare: {fileID: 0} 222 | m_RenderMode: 0 223 | m_CullingMask: 224 | serializedVersion: 2 225 | m_Bits: 4294967295 226 | m_Lightmapping: 4 227 | m_LightShadowCasterMode: 0 228 | m_AreaSize: {x: 1, y: 1} 229 | m_BounceIntensity: 1 230 | m_ColorTemperature: 6570 231 | m_UseColorTemperature: 0 232 | m_ShadowRadius: 0 233 | m_ShadowAngle: 0 234 | --- !u!4 &788741622 235 | Transform: 236 | m_ObjectHideFlags: 0 237 | m_CorrespondingSourceObject: {fileID: 0} 238 | m_PrefabInstance: {fileID: 0} 239 | m_PrefabAsset: {fileID: 0} 240 | m_GameObject: {fileID: 788741620} 241 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 242 | m_LocalPosition: {x: 0, y: 3, z: 0} 243 | m_LocalScale: {x: 1, y: 1, z: 1} 244 | m_Children: [] 245 | m_Father: {fileID: 1479959488} 246 | m_RootOrder: 1 247 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 248 | --- !u!1 &1125786633 249 | GameObject: 250 | m_ObjectHideFlags: 0 251 | m_CorrespondingSourceObject: {fileID: 0} 252 | m_PrefabInstance: {fileID: 0} 253 | m_PrefabAsset: {fileID: 0} 254 | serializedVersion: 6 255 | m_Component: 256 | - component: {fileID: 1125786637} 257 | - component: {fileID: 1125786636} 258 | - component: {fileID: 1125786635} 259 | - component: {fileID: 1125786634} 260 | m_Layer: 0 261 | m_Name: Plane 262 | m_TagString: Untagged 263 | m_Icon: {fileID: 0} 264 | m_NavMeshLayer: 0 265 | m_StaticEditorFlags: 0 266 | m_IsActive: 1 267 | --- !u!64 &1125786634 268 | MeshCollider: 269 | m_ObjectHideFlags: 0 270 | m_CorrespondingSourceObject: {fileID: 0} 271 | m_PrefabInstance: {fileID: 0} 272 | m_PrefabAsset: {fileID: 0} 273 | m_GameObject: {fileID: 1125786633} 274 | m_Material: {fileID: 0} 275 | m_IsTrigger: 0 276 | m_Enabled: 1 277 | serializedVersion: 3 278 | m_Convex: 0 279 | m_CookingOptions: 14 280 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 281 | --- !u!23 &1125786635 282 | MeshRenderer: 283 | m_ObjectHideFlags: 0 284 | m_CorrespondingSourceObject: {fileID: 0} 285 | m_PrefabInstance: {fileID: 0} 286 | m_PrefabAsset: {fileID: 0} 287 | m_GameObject: {fileID: 1125786633} 288 | m_Enabled: 1 289 | m_CastShadows: 1 290 | m_ReceiveShadows: 1 291 | m_DynamicOccludee: 1 292 | m_MotionVectors: 1 293 | m_LightProbeUsage: 1 294 | m_ReflectionProbeUsage: 1 295 | m_RenderingLayerMask: 4294967295 296 | m_RendererPriority: 0 297 | m_Materials: 298 | - {fileID: 2100000, guid: 48995c78e342d48aab369567f28d54c0, type: 2} 299 | m_StaticBatchInfo: 300 | firstSubMesh: 0 301 | subMeshCount: 0 302 | m_StaticBatchRoot: {fileID: 0} 303 | m_ProbeAnchor: {fileID: 0} 304 | m_LightProbeVolumeOverride: {fileID: 0} 305 | m_ScaleInLightmap: 1 306 | m_PreserveUVs: 0 307 | m_IgnoreNormalsForChartDetection: 0 308 | m_ImportantGI: 0 309 | m_StitchLightmapSeams: 0 310 | m_SelectedEditorRenderState: 3 311 | m_MinimumChartSize: 4 312 | m_AutoUVMaxDistance: 0.5 313 | m_AutoUVMaxAngle: 89 314 | m_LightmapParameters: {fileID: 0} 315 | m_SortingLayerID: 0 316 | m_SortingLayer: 0 317 | m_SortingOrder: 0 318 | --- !u!33 &1125786636 319 | MeshFilter: 320 | m_ObjectHideFlags: 0 321 | m_CorrespondingSourceObject: {fileID: 0} 322 | m_PrefabInstance: {fileID: 0} 323 | m_PrefabAsset: {fileID: 0} 324 | m_GameObject: {fileID: 1125786633} 325 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 326 | --- !u!4 &1125786637 327 | Transform: 328 | m_ObjectHideFlags: 0 329 | m_CorrespondingSourceObject: {fileID: 0} 330 | m_PrefabInstance: {fileID: 0} 331 | m_PrefabAsset: {fileID: 0} 332 | m_GameObject: {fileID: 1125786633} 333 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 334 | m_LocalPosition: {x: 0, y: 0, z: 0} 335 | m_LocalScale: {x: 2, y: 1, z: 2} 336 | m_Children: [] 337 | m_Father: {fileID: 1479959488} 338 | m_RootOrder: 2 339 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 340 | --- !u!1 &1221407858 341 | GameObject: 342 | m_ObjectHideFlags: 0 343 | m_CorrespondingSourceObject: {fileID: 0} 344 | m_PrefabInstance: {fileID: 0} 345 | m_PrefabAsset: {fileID: 0} 346 | serializedVersion: 6 347 | m_Component: 348 | - component: {fileID: 1221407861} 349 | - component: {fileID: 1221407860} 350 | - component: {fileID: 1221407859} 351 | m_Layer: 0 352 | m_Name: Main Camera 353 | m_TagString: MainCamera 354 | m_Icon: {fileID: 0} 355 | m_NavMeshLayer: 0 356 | m_StaticEditorFlags: 0 357 | m_IsActive: 1 358 | --- !u!81 &1221407859 359 | AudioListener: 360 | m_ObjectHideFlags: 0 361 | m_CorrespondingSourceObject: {fileID: 0} 362 | m_PrefabInstance: {fileID: 0} 363 | m_PrefabAsset: {fileID: 0} 364 | m_GameObject: {fileID: 1221407858} 365 | m_Enabled: 1 366 | --- !u!20 &1221407860 367 | Camera: 368 | m_ObjectHideFlags: 0 369 | m_CorrespondingSourceObject: {fileID: 0} 370 | m_PrefabInstance: {fileID: 0} 371 | m_PrefabAsset: {fileID: 0} 372 | m_GameObject: {fileID: 1221407858} 373 | m_Enabled: 1 374 | serializedVersion: 2 375 | m_ClearFlags: 1 376 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 377 | m_projectionMatrixMode: 1 378 | m_SensorSize: {x: 36, y: 24} 379 | m_LensShift: {x: 0, y: 0} 380 | m_GateFitMode: 2 381 | m_FocalLength: 50 382 | m_NormalizedViewPortRect: 383 | serializedVersion: 2 384 | x: 0 385 | y: 0 386 | width: 1 387 | height: 1 388 | near clip plane: 0.3 389 | far clip plane: 1000 390 | field of view: 60 391 | orthographic: 0 392 | orthographic size: 5 393 | m_Depth: -1 394 | m_CullingMask: 395 | serializedVersion: 2 396 | m_Bits: 4294967295 397 | m_RenderingPath: -1 398 | m_TargetTexture: {fileID: 0} 399 | m_TargetDisplay: 0 400 | m_TargetEye: 3 401 | m_HDR: 1 402 | m_AllowMSAA: 1 403 | m_AllowDynamicResolution: 0 404 | m_ForceIntoRT: 0 405 | m_OcclusionCulling: 1 406 | m_StereoConvergence: 10 407 | m_StereoSeparation: 0.022 408 | --- !u!4 &1221407861 409 | Transform: 410 | m_ObjectHideFlags: 0 411 | m_CorrespondingSourceObject: {fileID: 0} 412 | m_PrefabInstance: {fileID: 0} 413 | m_PrefabAsset: {fileID: 0} 414 | m_GameObject: {fileID: 1221407858} 415 | m_LocalRotation: {x: -0.1291313, y: 0.8379261, z: -0.22542918, w: -0.47998613} 416 | m_LocalPosition: {x: 15.554794, y: 7.8265963, z: 9.900038} 417 | m_LocalScale: {x: 1, y: 1, z: 1} 418 | m_Children: [] 419 | m_Father: {fileID: 1479959488} 420 | m_RootOrder: 0 421 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 422 | --- !u!1 &1479959487 423 | GameObject: 424 | m_ObjectHideFlags: 0 425 | m_CorrespondingSourceObject: {fileID: 0} 426 | m_PrefabInstance: {fileID: 0} 427 | m_PrefabAsset: {fileID: 0} 428 | serializedVersion: 6 429 | m_Component: 430 | - component: {fileID: 1479959488} 431 | m_Layer: 0 432 | m_Name: Game 433 | m_TagString: Untagged 434 | m_Icon: {fileID: 0} 435 | m_NavMeshLayer: 0 436 | m_StaticEditorFlags: 0 437 | m_IsActive: 1 438 | --- !u!4 &1479959488 439 | Transform: 440 | m_ObjectHideFlags: 0 441 | m_CorrespondingSourceObject: {fileID: 0} 442 | m_PrefabInstance: {fileID: 0} 443 | m_PrefabAsset: {fileID: 0} 444 | m_GameObject: {fileID: 1479959487} 445 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 446 | m_LocalPosition: {x: 0, y: 0, z: 0} 447 | m_LocalScale: {x: 1, y: 1, z: 1} 448 | m_Children: 449 | - {fileID: 1221407861} 450 | - {fileID: 788741622} 451 | - {fileID: 1125786637} 452 | - {fileID: 2131104398} 453 | m_Father: {fileID: 0} 454 | m_RootOrder: 0 455 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 456 | --- !u!1 &1621700181 457 | GameObject: 458 | m_ObjectHideFlags: 0 459 | m_CorrespondingSourceObject: {fileID: 0} 460 | m_PrefabInstance: {fileID: 0} 461 | m_PrefabAsset: {fileID: 0} 462 | serializedVersion: 6 463 | m_Component: 464 | - component: {fileID: 1621700182} 465 | m_Layer: 0 466 | m_Name: RecordAndPlay 467 | m_TagString: Untagged 468 | m_Icon: {fileID: 0} 469 | m_NavMeshLayer: 0 470 | m_StaticEditorFlags: 0 471 | m_IsActive: 1 472 | --- !u!4 &1621700182 473 | Transform: 474 | m_ObjectHideFlags: 0 475 | m_CorrespondingSourceObject: {fileID: 0} 476 | m_PrefabInstance: {fileID: 0} 477 | m_PrefabAsset: {fileID: 0} 478 | m_GameObject: {fileID: 1621700181} 479 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 480 | m_LocalPosition: {x: 0, y: 0, z: 0} 481 | m_LocalScale: {x: 1, y: 1, z: 1} 482 | m_Children: 483 | - {fileID: 1666333082} 484 | - {fileID: 2116800487} 485 | - {fileID: 782452546} 486 | m_Father: {fileID: 0} 487 | m_RootOrder: 1 488 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 489 | --- !u!1 &1666333080 490 | GameObject: 491 | m_ObjectHideFlags: 0 492 | m_CorrespondingSourceObject: {fileID: 0} 493 | m_PrefabInstance: {fileID: 0} 494 | m_PrefabAsset: {fileID: 0} 495 | serializedVersion: 6 496 | m_Component: 497 | - component: {fileID: 1666333082} 498 | - component: {fileID: 1666333081} 499 | m_Layer: 0 500 | m_Name: Plotter 501 | m_TagString: Untagged 502 | m_Icon: {fileID: 0} 503 | m_NavMeshLayer: 0 504 | m_StaticEditorFlags: 0 505 | m_IsActive: 1 506 | --- !u!114 &1666333081 507 | MonoBehaviour: 508 | m_ObjectHideFlags: 0 509 | m_CorrespondingSourceObject: {fileID: 0} 510 | m_PrefabInstance: {fileID: 0} 511 | m_PrefabAsset: {fileID: 0} 512 | m_GameObject: {fileID: 1666333080} 513 | m_Enabled: 1 514 | m_EditorHideFlags: 0 515 | m_Script: {fileID: 11500000, guid: 27d974e680aa8403087bd13f342a4088, type: 3} 516 | m_Name: 517 | m_EditorClassIdentifier: 518 | recordings: 519 | - recording: {fileID: 11400000, guid: 8bafd829056114c109db1c1943379605, type: 2} 520 | color: {r: 0, g: 0, b: 0, a: 0.15294118} 521 | radius: 0.3 522 | rayLength: 2 523 | connectionAlpha: 0 524 | --- !u!4 &1666333082 525 | Transform: 526 | m_ObjectHideFlags: 0 527 | m_CorrespondingSourceObject: {fileID: 0} 528 | m_PrefabInstance: {fileID: 0} 529 | m_PrefabAsset: {fileID: 0} 530 | m_GameObject: {fileID: 1666333080} 531 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 532 | m_LocalPosition: {x: 0, y: 0, z: 0} 533 | m_LocalScale: {x: 1, y: 1, z: 1} 534 | m_Children: [] 535 | m_Father: {fileID: 1621700182} 536 | m_RootOrder: 0 537 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 538 | --- !u!1 &1854596560 539 | GameObject: 540 | m_ObjectHideFlags: 0 541 | m_CorrespondingSourceObject: {fileID: 0} 542 | m_PrefabInstance: {fileID: 0} 543 | m_PrefabAsset: {fileID: 0} 544 | serializedVersion: 6 545 | m_Component: 546 | - component: {fileID: 1854596561} 547 | - component: {fileID: 1854596565} 548 | - component: {fileID: 1854596564} 549 | - component: {fileID: 1854596563} 550 | m_Layer: 0 551 | m_Name: Head 552 | m_TagString: Untagged 553 | m_Icon: {fileID: 0} 554 | m_NavMeshLayer: 0 555 | m_StaticEditorFlags: 0 556 | m_IsActive: 1 557 | --- !u!4 &1854596561 558 | Transform: 559 | m_ObjectHideFlags: 0 560 | m_CorrespondingSourceObject: {fileID: 0} 561 | m_PrefabInstance: {fileID: 0} 562 | m_PrefabAsset: {fileID: 0} 563 | m_GameObject: {fileID: 1854596560} 564 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 565 | m_LocalPosition: {x: 0, y: 0.563, z: 0.45} 566 | m_LocalScale: {x: 0.69312, y: 0.22590362, z: 0.33271} 567 | m_Children: [] 568 | m_Father: {fileID: 2131104398} 569 | m_RootOrder: 0 570 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 571 | --- !u!65 &1854596563 572 | BoxCollider: 573 | m_ObjectHideFlags: 0 574 | m_CorrespondingSourceObject: {fileID: 0} 575 | m_PrefabInstance: {fileID: 0} 576 | m_PrefabAsset: {fileID: 0} 577 | m_GameObject: {fileID: 1854596560} 578 | m_Material: {fileID: 0} 579 | m_IsTrigger: 0 580 | m_Enabled: 1 581 | serializedVersion: 2 582 | m_Size: {x: 1, y: 1, z: 1} 583 | m_Center: {x: 0, y: 0, z: 0} 584 | --- !u!23 &1854596564 585 | MeshRenderer: 586 | m_ObjectHideFlags: 0 587 | m_CorrespondingSourceObject: {fileID: 0} 588 | m_PrefabInstance: {fileID: 0} 589 | m_PrefabAsset: {fileID: 0} 590 | m_GameObject: {fileID: 1854596560} 591 | m_Enabled: 1 592 | m_CastShadows: 1 593 | m_ReceiveShadows: 1 594 | m_DynamicOccludee: 1 595 | m_MotionVectors: 1 596 | m_LightProbeUsage: 1 597 | m_ReflectionProbeUsage: 1 598 | m_RenderingLayerMask: 4294967295 599 | m_RendererPriority: 0 600 | m_Materials: 601 | - {fileID: 2100000, guid: b7238d89360a944fab2dd845c9ff542d, type: 2} 602 | m_StaticBatchInfo: 603 | firstSubMesh: 0 604 | subMeshCount: 0 605 | m_StaticBatchRoot: {fileID: 0} 606 | m_ProbeAnchor: {fileID: 0} 607 | m_LightProbeVolumeOverride: {fileID: 0} 608 | m_ScaleInLightmap: 1 609 | m_PreserveUVs: 0 610 | m_IgnoreNormalsForChartDetection: 0 611 | m_ImportantGI: 0 612 | m_StitchLightmapSeams: 0 613 | m_SelectedEditorRenderState: 3 614 | m_MinimumChartSize: 4 615 | m_AutoUVMaxDistance: 0.5 616 | m_AutoUVMaxAngle: 89 617 | m_LightmapParameters: {fileID: 0} 618 | m_SortingLayerID: 0 619 | m_SortingLayer: 0 620 | m_SortingOrder: 0 621 | --- !u!33 &1854596565 622 | MeshFilter: 623 | m_ObjectHideFlags: 0 624 | m_CorrespondingSourceObject: {fileID: 0} 625 | m_PrefabInstance: {fileID: 0} 626 | m_PrefabAsset: {fileID: 0} 627 | m_GameObject: {fileID: 1854596560} 628 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 629 | --- !u!1 &2116800486 630 | GameObject: 631 | m_ObjectHideFlags: 0 632 | m_CorrespondingSourceObject: {fileID: 0} 633 | m_PrefabInstance: {fileID: 0} 634 | m_PrefabAsset: {fileID: 0} 635 | serializedVersion: 6 636 | m_Component: 637 | - component: {fileID: 2116800487} 638 | - component: {fileID: 2116800489} 639 | - component: {fileID: 2116800488} 640 | - component: {fileID: 2116800491} 641 | - component: {fileID: 2116800490} 642 | m_Layer: 0 643 | m_Name: Playback 644 | m_TagString: Untagged 645 | m_Icon: {fileID: 0} 646 | m_NavMeshLayer: 0 647 | m_StaticEditorFlags: 0 648 | m_IsActive: 1 649 | --- !u!4 &2116800487 650 | Transform: 651 | m_ObjectHideFlags: 0 652 | m_CorrespondingSourceObject: {fileID: 0} 653 | m_PrefabInstance: {fileID: 0} 654 | m_PrefabAsset: {fileID: 0} 655 | m_GameObject: {fileID: 2116800486} 656 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 657 | m_LocalPosition: {x: 0, y: 0, z: 0} 658 | m_LocalScale: {x: 1, y: 1, z: 1} 659 | m_Children: [] 660 | m_Father: {fileID: 1621700182} 661 | m_RootOrder: 1 662 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 663 | --- !u!95 &2116800488 664 | Animator: 665 | serializedVersion: 3 666 | m_ObjectHideFlags: 0 667 | m_CorrespondingSourceObject: {fileID: 0} 668 | m_PrefabInstance: {fileID: 0} 669 | m_PrefabAsset: {fileID: 0} 670 | m_GameObject: {fileID: 2116800486} 671 | m_Enabled: 1 672 | m_Avatar: {fileID: 0} 673 | m_Controller: {fileID: 0} 674 | m_CullingMode: 0 675 | m_UpdateMode: 0 676 | m_ApplyRootMotion: 1 677 | m_LinearVelocityBlending: 0 678 | m_WarningMessage: 679 | m_HasTransformHierarchy: 1 680 | m_AllowConstantClipSamplingOptimization: 1 681 | m_KeepAnimatorControllerStateOnDisable: 0 682 | --- !u!320 &2116800489 683 | PlayableDirector: 684 | m_ObjectHideFlags: 0 685 | m_CorrespondingSourceObject: {fileID: 0} 686 | m_PrefabInstance: {fileID: 0} 687 | m_PrefabAsset: {fileID: 0} 688 | m_GameObject: {fileID: 2116800486} 689 | m_Enabled: 1 690 | serializedVersion: 3 691 | m_PlayableAsset: {fileID: 11400000, guid: 62f22b23f0aca425eaad04274554134f, type: 2} 692 | m_InitialState: 1 693 | m_WrapMode: 2 694 | m_DirectorUpdateMode: 1 695 | m_InitialTime: 0 696 | m_SceneBindings: 697 | - key: {fileID: 0} 698 | value: {fileID: 2116800488} 699 | - key: {fileID: 114287511022815590, guid: 62f22b23f0aca425eaad04274554134f, type: 2} 700 | value: {fileID: 2116800491} 701 | m_ExposedReferences: 702 | m_References: [] 703 | --- !u!114 &2116800490 704 | MonoBehaviour: 705 | m_ObjectHideFlags: 0 706 | m_CorrespondingSourceObject: {fileID: 0} 707 | m_PrefabInstance: {fileID: 0} 708 | m_PrefabAsset: {fileID: 0} 709 | m_GameObject: {fileID: 2116800486} 710 | m_Enabled: 1 711 | m_EditorHideFlags: 0 712 | m_Script: {fileID: 11500000, guid: fba35d9667a97467f940bb8cc247b4cb, type: 3} 713 | m_Name: 714 | m_EditorClassIdentifier: 715 | playbackTarget: {fileID: 1854596561} 716 | color: {r: 1, g: 0, b: 0, a: 0.5882353} 717 | radius: 0.5 718 | rayLength: 0.1 719 | --- !u!114 &2116800491 720 | MonoBehaviour: 721 | m_ObjectHideFlags: 0 722 | m_CorrespondingSourceObject: {fileID: 0} 723 | m_PrefabInstance: {fileID: 0} 724 | m_PrefabAsset: {fileID: 0} 725 | m_GameObject: {fileID: 2116800486} 726 | m_Enabled: 1 727 | m_EditorHideFlags: 0 728 | m_Script: {fileID: 11500000, guid: 07854983c60464c10a6d5426027bdd16, type: 3} 729 | m_Name: 730 | m_EditorClassIdentifier: 731 | --- !u!1 &2131104390 732 | GameObject: 733 | m_ObjectHideFlags: 0 734 | m_CorrespondingSourceObject: {fileID: 0} 735 | m_PrefabInstance: {fileID: 0} 736 | m_PrefabAsset: {fileID: 0} 737 | serializedVersion: 6 738 | m_Component: 739 | - component: {fileID: 2131104398} 740 | - component: {fileID: 2131104397} 741 | - component: {fileID: 2131104396} 742 | - component: {fileID: 2131104395} 743 | - component: {fileID: 2131104391} 744 | m_Layer: 0 745 | m_Name: Player 746 | m_TagString: Untagged 747 | m_Icon: {fileID: 0} 748 | m_NavMeshLayer: 0 749 | m_StaticEditorFlags: 0 750 | m_IsActive: 1 751 | --- !u!114 &2131104391 752 | MonoBehaviour: 753 | m_ObjectHideFlags: 0 754 | m_CorrespondingSourceObject: {fileID: 0} 755 | m_PrefabInstance: {fileID: 0} 756 | m_PrefabAsset: {fileID: 0} 757 | m_GameObject: {fileID: 2131104390} 758 | m_Enabled: 1 759 | m_EditorHideFlags: 0 760 | m_Script: {fileID: 11500000, guid: 624d20eb68a484f2ba3aa09feee329aa, type: 3} 761 | m_Name: 762 | m_EditorClassIdentifier: 763 | moveSpeed: 0.1 764 | rotationSpeed: 5 765 | --- !u!136 &2131104395 766 | CapsuleCollider: 767 | m_ObjectHideFlags: 0 768 | m_CorrespondingSourceObject: {fileID: 0} 769 | m_PrefabInstance: {fileID: 0} 770 | m_PrefabAsset: {fileID: 0} 771 | m_GameObject: {fileID: 2131104390} 772 | m_Material: {fileID: 0} 773 | m_IsTrigger: 0 774 | m_Enabled: 1 775 | m_Radius: 0.5 776 | m_Height: 2 777 | m_Direction: 1 778 | m_Center: {x: 0, y: 0, z: 0} 779 | --- !u!23 &2131104396 780 | MeshRenderer: 781 | m_ObjectHideFlags: 0 782 | m_CorrespondingSourceObject: {fileID: 0} 783 | m_PrefabInstance: {fileID: 0} 784 | m_PrefabAsset: {fileID: 0} 785 | m_GameObject: {fileID: 2131104390} 786 | m_Enabled: 1 787 | m_CastShadows: 1 788 | m_ReceiveShadows: 1 789 | m_DynamicOccludee: 1 790 | m_MotionVectors: 1 791 | m_LightProbeUsage: 1 792 | m_ReflectionProbeUsage: 1 793 | m_RenderingLayerMask: 4294967295 794 | m_RendererPriority: 0 795 | m_Materials: 796 | - {fileID: 2100000, guid: 9948c0ca7c772488fb8bcacbadfd44d0, type: 2} 797 | m_StaticBatchInfo: 798 | firstSubMesh: 0 799 | subMeshCount: 0 800 | m_StaticBatchRoot: {fileID: 0} 801 | m_ProbeAnchor: {fileID: 0} 802 | m_LightProbeVolumeOverride: {fileID: 0} 803 | m_ScaleInLightmap: 1 804 | m_PreserveUVs: 0 805 | m_IgnoreNormalsForChartDetection: 0 806 | m_ImportantGI: 0 807 | m_StitchLightmapSeams: 0 808 | m_SelectedEditorRenderState: 3 809 | m_MinimumChartSize: 4 810 | m_AutoUVMaxDistance: 0.5 811 | m_AutoUVMaxAngle: 89 812 | m_LightmapParameters: {fileID: 0} 813 | m_SortingLayerID: 0 814 | m_SortingLayer: 0 815 | m_SortingOrder: 0 816 | --- !u!33 &2131104397 817 | MeshFilter: 818 | m_ObjectHideFlags: 0 819 | m_CorrespondingSourceObject: {fileID: 0} 820 | m_PrefabInstance: {fileID: 0} 821 | m_PrefabAsset: {fileID: 0} 822 | m_GameObject: {fileID: 2131104390} 823 | m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} 824 | --- !u!4 &2131104398 825 | Transform: 826 | m_ObjectHideFlags: 0 827 | m_CorrespondingSourceObject: {fileID: 0} 828 | m_PrefabInstance: {fileID: 0} 829 | m_PrefabAsset: {fileID: 0} 830 | m_GameObject: {fileID: 2131104390} 831 | m_LocalRotation: {x: -0, y: 0.9914448, z: -0, w: -0.13052644} 832 | m_LocalPosition: {x: 2.9888368, y: 1, z: -2.2615063} 833 | m_LocalScale: {x: 1, y: 1, z: 1} 834 | m_Children: 835 | - {fileID: 1854596561} 836 | m_Father: {fileID: 1479959488} 837 | m_RootOrder: 3 838 | m_LocalEulerAnglesHint: {x: 0, y: 19.946001, z: 0} 839 | -------------------------------------------------------------------------------- /Example_TransformRecording/Scenes/RecordAndRepeatScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 655ea27be0a4e414ab1e394afbda17e0 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Example_TransformRecording/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f49bf040a089343b3bc761d34a10020c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_TransformRecording/Scripts/HeadData.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | // Copyright (c) 2018 Felix Lange 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 | 23 | using UnityEngine; 24 | 25 | namespace RecordAndRepeat.Examples 26 | { 27 | [System.Serializable] 28 | public class HeadData 29 | { 30 | public Vector3 worldPos; 31 | public Vector3 forward; 32 | 33 | public HeadData() { } 34 | public HeadData(Transform t) 35 | { 36 | worldPos = t.position; 37 | forward = t.forward; 38 | } 39 | 40 | public void DebugDraw(float radius, float rayLength) 41 | { 42 | Gizmos.DrawWireSphere(worldPos, radius); 43 | 44 | Vector3 from = worldPos; 45 | Vector3 to = from + forward * rayLength; 46 | Gizmos.DrawLine(from, to); 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /Example_TransformRecording/Scripts/HeadData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 153e3965a74944d86932170ab77e9970 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Example_TransformRecording/Scripts/HeadPlayback.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | // Copyright (c) 2018 Felix Lange 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 | 23 | using System.Collections; 24 | using System.Collections.Generic; 25 | using UnityEngine; 26 | 27 | namespace RecordAndRepeat.Examples 28 | { 29 | [ExecuteInEditMode] 30 | [RequireComponent(typeof(DataListener))] 31 | public class HeadPlayback : MonoBehaviour 32 | { 33 | public Transform playbackTarget; 34 | 35 | [Header("DebugDraw")] 36 | public Color color; 37 | public float radius = 0.5f; 38 | public float rayLength = 0.1f; 39 | 40 | private HeadData headData = null; 41 | private DataListener dataListener; 42 | 43 | void Awake() 44 | { 45 | dataListener = GetComponent(); 46 | } 47 | 48 | void OnEnable() 49 | { 50 | dataListener.OnDataFrameReceived += ProcessData; 51 | } 52 | 53 | void OnDisable() 54 | { 55 | dataListener.OnDataFrameReceived -= ProcessData; 56 | } 57 | 58 | public void ProcessData(IDataFrame frame) 59 | { 60 | DataFrame jsonFrame = frame as DataFrame; 61 | headData = jsonFrame.ParseFromJson(); 62 | 63 | if (playbackTarget != null) 64 | { 65 | Transform parent = playbackTarget.parent; 66 | Vector3 headOffset = playbackTarget.position - parent.position; 67 | 68 | parent.position = headData.worldPos - headOffset; 69 | parent.rotation = Quaternion.LookRotation(headData.forward); 70 | } 71 | } 72 | 73 | void OnDrawGizmos() 74 | { 75 | if (headData == null) 76 | { 77 | return; 78 | } 79 | 80 | Gizmos.color = color; 81 | headData.DebugDraw(radius, rayLength); 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Example_TransformRecording/Scripts/HeadPlayback.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fba35d9667a97467f940bb8cc247b4cb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Example_TransformRecording/Scripts/HeadPlotter.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | // Copyright (c) 2018 Felix Lange 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 | 23 | using System.Collections; 24 | using System.Collections.Generic; 25 | using UnityEngine; 26 | 27 | namespace RecordAndRepeat.Examples 28 | { 29 | public class HeadPlotter : MonoBehaviour 30 | { 31 | 32 | [System.Serializable] 33 | public class ColoredRecording 34 | { 35 | public Recording recording = null; 36 | public Color color = Color.white; 37 | } 38 | 39 | public List recordings = new List(); 40 | 41 | [Header("Size")] 42 | public float radius = 0.5f; 43 | public float rayLength = 0.1f; 44 | 45 | [Range(0, 1)] 46 | public float connectionAlpha = 1f; 47 | 48 | void OnDrawGizmos() 49 | { 50 | //loop recordings 51 | foreach (ColoredRecording coloredRec in recordings) 52 | { 53 | Recording recording = coloredRec.recording; 54 | if (recording == null) 55 | { 56 | continue; 57 | } 58 | 59 | //draw colored recording 60 | HeadData lastHeadData = null; 61 | foreach (DataFrame frame in recording.DataFrames) 62 | { 63 | 64 | HeadData headData = frame.ParseFromJson(); 65 | 66 | //draw head 67 | Gizmos.color = coloredRec.color; 68 | headData.DebugDraw(radius, rayLength); 69 | 70 | //draw connection between heads 71 | if (lastHeadData != null) 72 | { 73 | SetGizmoAlpha(connectionAlpha); 74 | Gizmos.DrawLine(lastHeadData.worldPos, headData.worldPos); 75 | } 76 | lastHeadData = headData; 77 | } 78 | } 79 | } 80 | 81 | void SetGizmoAlpha(float alpha) 82 | { 83 | Color drawColor = Gizmos.color; 84 | drawColor.a = alpha; 85 | Gizmos.color = drawColor; 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /Example_TransformRecording/Scripts/HeadPlotter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27d974e680aa8403087bd13f342a4088 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Example_TransformRecording/Scripts/HeadRecorder.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | // Copyright (c) 2018 Felix Lange 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 | 23 | using System.Collections; 24 | using System.Collections.Generic; 25 | using UnityEngine; 26 | 27 | namespace RecordAndRepeat.Examples 28 | { 29 | [RequireComponent(typeof(Recorder))] 30 | [ExecuteInEditMode] 31 | public class HeadRecorder : MonoBehaviour 32 | { 33 | public Transform headTransform; 34 | 35 | private Recorder recorder; 36 | 37 | void Awake() 38 | { 39 | recorder = GetComponent(); 40 | recorder.DefaultRecordingName = "New Head Recording"; 41 | recorder.disableIfNotPlaying = false; 42 | } 43 | 44 | void Update() 45 | { 46 | if (!recorder.IsRecording) 47 | { 48 | return; 49 | } 50 | 51 | if (headTransform == null) 52 | { 53 | Debug.LogWarning("No transform target set!"); 54 | return; 55 | } 56 | 57 | HeadData headData = new HeadData(headTransform); 58 | recorder.RecordAsJson(headData); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Example_TransformRecording/Scripts/HeadRecorder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dfcfa09f9ee5243eb8ce36998f94ec69 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Example_TransformRecording/Scripts/Walk.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace RecordAndRepeat.Examples 6 | { 7 | public class Walk : MonoBehaviour 8 | { 9 | public float moveSpeed = 0.1f; 10 | public float rotationSpeed = 5f; 11 | 12 | // Update is called once per frame 13 | void FixedUpdate() 14 | { 15 | if (Input.GetKey("w")) 16 | { 17 | transform.position += transform.forward * moveSpeed; 18 | } 19 | else if (Input.GetKey("s")) 20 | { 21 | transform.position -= transform.forward * moveSpeed; 22 | } 23 | 24 | if (Input.GetKey("a")) 25 | { 26 | transform.Rotate(new Vector3(0, -rotationSpeed, 0)); 27 | } 28 | else if (Input.GetKey("d")) 29 | { 30 | transform.Rotate(new Vector3(0, +rotationSpeed, 0)); 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Example_TransformRecording/Scripts/Walk.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 624d20eb68a484f2ba3aa09feee329aa 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Example_TransformRecording/Timeline.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e18dc7df7eae8462cabcbb2ca4a8f39c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Example_TransformRecording/Timeline/DrawerTimeline.playable: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 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: 337831424, guid: 6a10b2909283487f913b00d94cd3faf5, type: 3} 13 | m_Name: DrawerTimeline 14 | m_EditorClassIdentifier: 15 | m_NextId: 0 16 | m_Tracks: 17 | - {fileID: 114287511022815590} 18 | m_FixedDuration: 0 19 | m_EditorSettings: 20 | m_Framerate: 60 21 | m_DurationMode: 0 22 | m_Version: 0 23 | --- !u!114 &114050585422460642 24 | MonoBehaviour: 25 | m_ObjectHideFlags: 1 26 | m_CorrespondingSourceObject: {fileID: 0} 27 | m_PrefabInstance: {fileID: 0} 28 | m_PrefabAsset: {fileID: 0} 29 | m_GameObject: {fileID: 0} 30 | m_Enabled: 1 31 | m_EditorHideFlags: 0 32 | m_Script: {fileID: 11500000, guid: ef456091969024375aef2552952b31d9, type: 3} 33 | m_Name: RecordingClip 34 | m_EditorClassIdentifier: 35 | template: 36 | recording: {fileID: 11400000, guid: 8bafd829056114c109db1c1943379605, type: 2} 37 | watchReference: {fileID: 11400000, guid: 8bafd829056114c109db1c1943379605, type: 2} 38 | --- !u!114 &114287511022815590 39 | MonoBehaviour: 40 | m_ObjectHideFlags: 1 41 | m_CorrespondingSourceObject: {fileID: 0} 42 | m_PrefabInstance: {fileID: 0} 43 | m_PrefabAsset: {fileID: 0} 44 | m_GameObject: {fileID: 0} 45 | m_Enabled: 1 46 | m_EditorHideFlags: 0 47 | m_Script: {fileID: 11500000, guid: 39cd434a3e3184adf9bb31348ce468b5, type: 3} 48 | m_Name: Recording Track 49 | m_EditorClassIdentifier: 50 | m_Locked: 0 51 | m_Muted: 0 52 | m_CustomPlayableFullTypename: 53 | m_AnimClip: {fileID: 0} 54 | m_Parent: {fileID: 11400000} 55 | m_Children: [] 56 | m_Clips: 57 | - m_Start: 10.178123474121094 58 | m_ClipIn: 0 59 | m_Asset: {fileID: 114671259712642640} 60 | m_Duration: 26.80292510986328 61 | m_TimeScale: 1 62 | m_ParentTrack: {fileID: 114287511022815590} 63 | m_EaseInDuration: 0 64 | m_EaseOutDuration: 0 65 | m_BlendInDuration: 0 66 | m_BlendOutDuration: 0 67 | m_MixInCurve: 68 | serializedVersion: 2 69 | m_Curve: 70 | - serializedVersion: 3 71 | time: 0 72 | value: 0 73 | inSlope: 0 74 | outSlope: 0 75 | tangentMode: 0 76 | weightedMode: 0 77 | inWeight: 0 78 | outWeight: 0 79 | - serializedVersion: 3 80 | time: 1 81 | value: 1 82 | inSlope: 0 83 | outSlope: 0 84 | tangentMode: 0 85 | weightedMode: 0 86 | inWeight: 0 87 | outWeight: 0 88 | m_PreInfinity: 2 89 | m_PostInfinity: 2 90 | m_RotationOrder: 4 91 | m_MixOutCurve: 92 | serializedVersion: 2 93 | m_Curve: 94 | - serializedVersion: 3 95 | time: 0 96 | value: 1 97 | inSlope: 0 98 | outSlope: 0 99 | tangentMode: 0 100 | weightedMode: 0 101 | inWeight: 0 102 | outWeight: 0 103 | - serializedVersion: 3 104 | time: 1 105 | value: 0 106 | inSlope: 0 107 | outSlope: 0 108 | tangentMode: 0 109 | weightedMode: 0 110 | inWeight: 0 111 | outWeight: 0 112 | m_PreInfinity: 2 113 | m_PostInfinity: 2 114 | m_RotationOrder: 4 115 | m_BlendInCurveMode: 0 116 | m_BlendOutCurveMode: 0 117 | m_ExposedParameterNames: [] 118 | m_AnimationCurves: {fileID: 0} 119 | m_Recordable: 0 120 | m_PostExtrapolationMode: 0 121 | m_PreExtrapolationMode: 0 122 | m_PostExtrapolationTime: 0 123 | m_PreExtrapolationTime: 0 124 | m_DisplayName: LongRecording 125 | m_Version: 1 126 | - m_Start: 0 127 | m_ClipIn: 0 128 | m_Asset: {fileID: 114050585422460642} 129 | m_Duration: 10.178123474121094 130 | m_TimeScale: 1 131 | m_ParentTrack: {fileID: 114287511022815590} 132 | m_EaseInDuration: 0 133 | m_EaseOutDuration: 0 134 | m_BlendInDuration: 0 135 | m_BlendOutDuration: 0 136 | m_MixInCurve: 137 | serializedVersion: 2 138 | m_Curve: 139 | - serializedVersion: 3 140 | time: 0 141 | value: 0 142 | inSlope: 0 143 | outSlope: 0 144 | tangentMode: 0 145 | weightedMode: 0 146 | inWeight: 0 147 | outWeight: 0 148 | - serializedVersion: 3 149 | time: 1 150 | value: 1 151 | inSlope: 0 152 | outSlope: 0 153 | tangentMode: 0 154 | weightedMode: 0 155 | inWeight: 0 156 | outWeight: 0 157 | m_PreInfinity: 2 158 | m_PostInfinity: 2 159 | m_RotationOrder: 4 160 | m_MixOutCurve: 161 | serializedVersion: 2 162 | m_Curve: 163 | - serializedVersion: 3 164 | time: 0 165 | value: 1 166 | inSlope: 0 167 | outSlope: 0 168 | tangentMode: 0 169 | weightedMode: 0 170 | inWeight: 0 171 | outWeight: 0 172 | - serializedVersion: 3 173 | time: 1 174 | value: 0 175 | inSlope: 0 176 | outSlope: 0 177 | tangentMode: 0 178 | weightedMode: 0 179 | inWeight: 0 180 | outWeight: 0 181 | m_PreInfinity: 2 182 | m_PostInfinity: 2 183 | m_RotationOrder: 4 184 | m_BlendInCurveMode: 0 185 | m_BlendOutCurveMode: 0 186 | m_ExposedParameterNames: [] 187 | m_AnimationCurves: {fileID: 0} 188 | m_Recordable: 0 189 | m_PostExtrapolationMode: 0 190 | m_PreExtrapolationMode: 0 191 | m_PostExtrapolationTime: 0 192 | m_PreExtrapolationTime: 0 193 | m_DisplayName: ShortRecording 194 | m_Version: 1 195 | m_Version: 2 196 | --- !u!114 &114671259712642640 197 | MonoBehaviour: 198 | m_ObjectHideFlags: 1 199 | m_CorrespondingSourceObject: {fileID: 0} 200 | m_PrefabInstance: {fileID: 0} 201 | m_PrefabAsset: {fileID: 0} 202 | m_GameObject: {fileID: 0} 203 | m_Enabled: 1 204 | m_EditorHideFlags: 0 205 | m_Script: {fileID: 11500000, guid: ef456091969024375aef2552952b31d9, type: 3} 206 | m_Name: RecordingClip 207 | m_EditorClassIdentifier: 208 | template: 209 | recording: {fileID: 11400000, guid: e58957f02b6b64434bbf0c6c4cc24a7a, type: 2} 210 | watchReference: {fileID: 11400000, guid: e58957f02b6b64434bbf0c6c4cc24a7a, type: 2} 211 | -------------------------------------------------------------------------------- /Example_TransformRecording/Timeline/DrawerTimeline.playable.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62f22b23f0aca425eaad04274554134f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Felix Lange 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. -------------------------------------------------------------------------------- /LICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62a745b617514441a96165dfe3714fc0 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RecordAndRepeat 2 | 3 | RecordAndRepeat is a plugin for [Unity3d](https://unity3d.com/), which supports recording of custom data and playback via the Unity3d Timeline. 4 | 5 | The core of the plugin are recordings stored as [ScriptableObjects](https://docs.unity3d.com/ScriptReference/ScriptableObject.html). You can plug them into custom scripts via the Inspector (to access and visialize the data) or play them back in a flexible matter due to an integration into the powerful Unity Timeline. 6 | 7 | This allows for a variety of applications! 8 | 9 | ## Usecases 10 | 11 | ### Prototyping with recorded data 12 | 13 | Using recorded rather than live data can drastically smoothen the development process of your prototypes. It was originally developed for recording external tracking information (OpenPose), but can handle any kind of serializable data - produced inside Unity or coming from external. 14 | 15 |

16 | 17 |

18 | 19 | 20 | ### Spatial User Testing and Training 21 | 22 | To track and visually layer user movements is another great usecase. In applications like spatial user tests or trainings conducted in AR/VR, it allows to compare, analyse and quantify user behaviours. 23 | 24 |

25 | 26 |

27 | 28 | ## Getting started 29 | 30 | * Install via [package manager](https://docs.unity3d.com/Manual/upm-ui-giturl.html) or clone directly. 31 | * Checkout the [example folders](#Examples) with scenes showcasing recording, playback and plotting. 32 | * Get an overview of the API in the [Usage](#Usage) section. 33 | 34 | ## Examples 35 | 36 | *Make sure to activate Gizmos in the Game window.* 37 | 38 | ### Mouse 39 | 40 | Two scenes showcasing recording, plotting and playback of mouse data. The custom mouse class containing positions and button state is stored as a Json String. 41 | 42 | Folder: [Example_MouseRecording](Example_MouseRecording) 43 | 44 |

45 | 46 |

47 | 48 | ### Transform 49 | 50 | In this example scene we are recording a simplified transform of the character's head. Besides plotting the character's behaviour (via gizmos) the example also showcases replaying the recording. 51 | 52 | Folder: [Example_TransformRecording](Example_TransformRecording) 53 | 54 |

55 | 56 |

57 | 58 | ## Usage 59 | 60 | `Recorder` and `DataListener` are the components needed in order to hook your own data objects into RecordAndRepeat. With that in place you can control recording and playback via RecordAndRepeat's Inspector interface and Unity Timeline features. 61 | 62 | ### Record 63 | 64 | The `Recorder` component allows to define what kind of data objects you want to record and to control how you want to record them (for example every frame?). Use it as a component or feel free to extend it directly. 65 | 66 | Below you find a compressed script from the [MouseRecorder](Example_MouseRecording/Scripts/MouseRecorder.cs) example, which utilizes the `Recorder` and passes serializable data objects to the `Recorder.RecordAsJson` function. 67 | 68 | ```csharp 69 | using RecordAndRepeat; 70 | public class MouseRecorder : MonoBehaviour 71 | { 72 | [System.Serializable] 73 | public class MouseData //your custom data 74 | { 75 | public Vector3 worldPos; 76 | public bool pressed; 77 | } 78 | 79 | Recorder recorder; 80 | MouseData mouseData = new MouseData(); 81 | 82 | void Awake() 83 | { 84 | recorder = GetComponent(); 85 | recorder.DefaultRecordingName = "New Mouse Recording"; 86 | } 87 | 88 | void Update() 89 | { 90 | if (recorder.IsRecording) 91 | { 92 | // Update mouseData... 93 | 94 | recorder.RecordAsJson(mouseData); 95 | } 96 | } 97 | } 98 | ``` 99 | 100 | Controlling the recorder as well as defining the name of the recording is done via the Inspector interface or via code (`Recorder.StartRecording()`, `Recorder.SaveRecording()`, `...`). 101 | 102 |

103 | 104 |

105 | 106 | ### Plot 107 | 108 | If you want to visualize a whole recording for example, the getter `List Recording.DataFrames` allows to work directly with Recordings in custom scripts. In this case `DataListener` is not needed. 109 | 110 | ```csharp 111 | foreach (DataFrame frame in recording.DataFrames) 112 | { 113 | MouseData mouseData = frame.ParseFromJson(); 114 | ... 115 | } 116 | ``` 117 | 118 | *Snippet of [MousePlotter](Example_MouseRecording/Scripts/MousePlotter.cs) example.* 119 | 120 | ### Repeat 121 | 122 | Recordings can be drag&dropped into RecordAndRepeat Timeline tracks and arranged via the Timeline interface. 123 | 124 |

125 | 126 |

127 | 128 | In order to receive the data during playback you can utilize the `DataListener` component, which offers C# `events` and `UnityEvents`. 129 | After adding `DataListener` as a component you can use it as a _TrackBinding_ in corresponding tracks. 130 | 131 |

132 | 133 |

134 | 135 | *Screenshot of [MouseDrawer](Example_MouseRecording/Scripts/MouseDrawer.cs) example.* 136 | 137 | 138 | ------------------- 139 | 140 | As an alternative to _events_, you can extend `DataListener` and override the `DataListener.ProcessData(IDataFrame)` method. 141 | 142 | ```csharp 143 | using RecordAndRepeat; 144 | public class MouseDrawer : DataListener 145 | 146 | //Initialize members... 147 | 148 | public override void ProcessData(IDataFrame frame) 149 | { 150 | DataFrame jsonFrame = frame as DataFrame; 151 | mouseData = jsonFrame.ParseFromJson(); 152 | } 153 | 154 | ... 155 | } 156 | ``` 157 | 158 | 162 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c030dd08a8efd4acd90ced5e4343bd03 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Source.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e53c874b2811c4cd1856ff5255c6b2f7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Source/RecordAndRepeat.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RecordAndRepeat", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:f06555f75b070af458a003d92f9efb00" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [], 15 | "noEngineReferences": false 16 | } -------------------------------------------------------------------------------- /Source/RecordAndRepeat.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a859bf890032b94fb9ffdad613e5f14 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Source/Recording.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ef452fa7c2d6455d9c743d3d1c8ea08 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Source/Recording/Base.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 882302211b0ab4e99aa6c3cff9cbd4cd 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Source/Recording/Base/DataFrameBase.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | // Copyright (c) 2018 Felix Lange 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 | 23 | using UnityEngine; 24 | 25 | namespace RecordAndRepeat 26 | { 27 | public interface IDataFrame 28 | { 29 | float Time { get; set; } 30 | } 31 | 32 | [System.Serializable] 33 | public abstract class DataFrameBase : IDataFrame 34 | { 35 | [SerializeField] 36 | private float time; 37 | public float Time 38 | { 39 | get { return time; } 40 | set { time = value; } 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /Source/Recording/Base/DataFrameBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d69b1160737df403dacd1cb7293819ad 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Source/Recording/Base/RecorderBase.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | // Copyright (c) 2018 Felix Lange 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 | 23 | using System; 24 | using System.IO; 25 | using System.Collections; 26 | using System.Collections.Generic; 27 | using UnityEngine; 28 | using UnityEditor; 29 | 30 | namespace RecordAndRepeat 31 | { 32 | [ExecuteInEditMode] 33 | public abstract class RecorderBase : MonoBehaviour 34 | { 35 | //folder to store recordings 36 | protected static string recordingsPath = "DataRecordings"; 37 | [HideInInspector] 38 | public string recordingName = ""; 39 | 40 | //interface via inspector 41 | [HideInInspector] 42 | public bool disableIfNotPlaying = true; 43 | [HideInInspector] 44 | public bool doRecord = false; 45 | [HideInInspector] 46 | public bool doSave = false; 47 | [HideInInspector] 48 | public bool doCancel = false; 49 | 50 | //private members 51 | private float startTimeSec; 52 | private float pauseStartTimeSec; 53 | private bool isRecordingStarted = false; 54 | private bool isPaused = false; 55 | 56 | [SerializeField] 57 | [HideInInspector] 58 | private RecordingBase recording = null; 59 | 60 | [SerializeField] 61 | [HideInInspector] 62 | private string responseText; 63 | 64 | //properties 65 | public bool IsRecording { get { return isRecordingStarted && !isPaused; } } 66 | public bool IsPaused { get { return isPaused; } } 67 | public bool IsRecordingStarted { get { return isRecordingStarted; } } 68 | public string DestinationFolder 69 | { 70 | get { return String.Format("Assets/{0}", recordingsPath); } 71 | } 72 | public string DefaultRecordingName { get; set; } = "New Recording"; 73 | 74 | protected abstract RecordingBase CreateInstance(); 75 | 76 | public void InitRecording() 77 | { 78 | if (recordingName == "") 79 | { 80 | recordingName = DefaultRecordingName; 81 | } 82 | } 83 | 84 | protected void Start() 85 | { 86 | doSave = false; 87 | doRecord = false; 88 | } 89 | 90 | protected void Update() 91 | { 92 | if (!isRecordingStarted && doRecord) 93 | { 94 | StartRecording(); 95 | } 96 | else if (IsRecording && !doRecord) 97 | { 98 | PauseRecording(); 99 | } 100 | else if (isRecordingStarted && isPaused && doRecord) 101 | { 102 | ContinueRecording(); 103 | } 104 | 105 | if (doSave) 106 | { 107 | SaveRecording(); 108 | } 109 | else if (doCancel) 110 | { 111 | CancelRecording(); 112 | } 113 | } 114 | 115 | public void StartRecording() 116 | { 117 | recording = CreateInstance(); 118 | 119 | startTimeSec = Time.realtimeSinceStartup; 120 | isRecordingStarted = true; 121 | isPaused = false; 122 | } 123 | 124 | public void PauseRecording() 125 | { 126 | // Debug.Log("PauseRecording"); 127 | isPaused = true; 128 | pauseStartTimeSec = Time.realtimeSinceStartup; 129 | } 130 | 131 | public void ContinueRecording() 132 | { 133 | float pauseDuration = Time.realtimeSinceStartup - pauseStartTimeSec; 134 | startTimeSec += pauseDuration; 135 | isPaused = false; 136 | // Debug.Log(String.Format("ContinueRecording after {0}",pauseDuration)); 137 | } 138 | 139 | public void CancelRecording() 140 | { 141 | ResetRecorder(); 142 | 143 | responseText = "Recording canceled!"; 144 | } 145 | 146 | public void SaveRecording() 147 | { 148 | #if UNITY_EDITOR 149 | if (recording == null || recording.duration <= 0) 150 | { 151 | responseText = "Nothing recorded yet, can't save Recording."; 152 | ResetRecorder(); 153 | return; 154 | } 155 | 156 | string path = "Assets/" + recordingsPath; 157 | if (!AssetDatabase.IsValidFolder(path)) 158 | { 159 | AssetDatabase.CreateFolder("Assets", recordingsPath); 160 | } 161 | 162 | recordingName = recordingName.Trim() == "" ? DefaultRecordingName : recordingName; 163 | string assetPathAndName = AssetDatabase.GenerateUniqueAssetPath(path + "/" + recordingName + ".asset"); 164 | 165 | AssetDatabase.CreateAsset(recording, assetPathAndName); 166 | responseText = String.Format("Recording stored under {0}.", assetPathAndName); 167 | Debug.Log(responseText); 168 | 169 | AssetDatabase.SaveAssets(); 170 | AssetDatabase.Refresh(); 171 | 172 | ResetRecorder(); 173 | #endif 174 | } 175 | 176 | private void ResetRecorder() 177 | { 178 | isPaused = isRecordingStarted = false; 179 | doCancel = doSave = doRecord = false; 180 | recording = null; 181 | } 182 | 183 | protected void RecordData(IDataFrame frame) 184 | { 185 | if (!IsRecording) 186 | { 187 | return; 188 | } 189 | 190 | frame.Time = Time.realtimeSinceStartup - startTimeSec; 191 | 192 | recording.duration = frame.Time; //always as long as the last data frame 193 | recording.Add(frame); 194 | } 195 | } 196 | } 197 | 198 | -------------------------------------------------------------------------------- /Source/Recording/Base/RecorderBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 618a1518e5e034f00b6b10495d775fba 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Source/Recording/Base/RecordingBase.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | // Copyright (c) 2018 Felix Lange 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 | 23 | using UnityEngine; 24 | using System; 25 | using System.Collections.Generic; 26 | using System.Linq; 27 | 28 | namespace RecordAndRepeat 29 | { 30 | public abstract class RecordingBase : ScriptableObject 31 | { 32 | [HideInInspector] 33 | public float duration = 0; 34 | 35 | private bool dirtyFlag = true; 36 | private List copiedDataFrames = null; 37 | public List DataFrames 38 | { 39 | get 40 | { 41 | UpdateStoredDataCopy(); 42 | return copiedDataFrames; 43 | } 44 | } 45 | 46 | public abstract void Add(IDataFrame frame); 47 | public abstract int Count(); 48 | protected abstract IEnumerable ConvertDataFrames(); 49 | 50 | public IDataFrame GetDataFrame(float timeS) 51 | { 52 | UpdateStoredDataCopy(); 53 | 54 | IDataFrame data = copiedDataFrames.FindLast(x => x.Time <= timeS); 55 | return data; 56 | } 57 | 58 | public void Log() 59 | { 60 | UpdateStoredDataCopy(); 61 | 62 | Debug.Log(String.Format("{0} - {1} seconds - {2} samples", name, duration, copiedDataFrames.Count)); 63 | copiedDataFrames.ForEach(frame => Debug.Log(frame)); 64 | } 65 | 66 | public void OnValidate() 67 | { 68 | dirtyFlag = true; 69 | } 70 | 71 | private void UpdateStoredDataCopy() 72 | { 73 | if (dirtyFlag || copiedDataFrames == null) 74 | { 75 | // Debug.Log($"Update copied data: {this.name}"); 76 | copiedDataFrames = ConvertDataFrames().ToList(); 77 | dirtyFlag = false; 78 | } 79 | } 80 | } 81 | } -------------------------------------------------------------------------------- /Source/Recording/Base/RecordingBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17869f9832ba14589b226c50b3b814fc 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Source/Recording/DataFrame.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | // Copyright (c) 2018 Felix Lange 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 | 23 | using System; 24 | using UnityEngine; 25 | 26 | namespace RecordAndRepeat 27 | { 28 | [System.Serializable] 29 | public class DataFrame : DataFrameBase 30 | { 31 | [SerializeField] 32 | private string data; 33 | 34 | public string Data 35 | { 36 | get { return data; } 37 | set { data = value; } 38 | } 39 | 40 | public T ParseFromJson() 41 | { 42 | return JsonUtility.FromJson(data); 43 | } 44 | 45 | public override string ToString() 46 | { 47 | return String.Format("Time: {0:N2} Data: {1}", Time, data); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Source/Recording/DataFrame.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d1fefad8bca54be4ba57cbcf8b0fa82 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Source/Recording/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5fbdafe5b4b045639a563622cfaa0b7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Source/Recording/Editor/RecordAndRepeat.Recording.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RecordAndRepeat.Recording.Editor", 3 | "rootNamespace": "", 4 | "references": [ 5 | "RecordAndRepeat" 6 | ], 7 | "includePlatforms": [ 8 | "Editor" 9 | ], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": false, 13 | "precompiledReferences": [], 14 | "autoReferenced": true, 15 | "defineConstraints": [], 16 | "versionDefines": [], 17 | "noEngineReferences": false 18 | } -------------------------------------------------------------------------------- /Source/Recording/Editor/RecordAndRepeat.Recording.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d7e5ea6c9d59a449a1e8015d38ca4d2 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Source/Recording/Editor/RecorderInspector.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | // Copyright (c) 2018 Felix Lange 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 | 23 | using System; 24 | using UnityEngine; 25 | using UnityEditor; 26 | using RecordAndRepeat; 27 | 28 | [CustomEditor(typeof(RecorderBase), true)] 29 | public class RecorderInspector : Editor 30 | { 31 | SerializedProperty recordProp; 32 | SerializedProperty saveProp; 33 | SerializedProperty cancelProp; 34 | SerializedProperty recordingProp; 35 | SerializedProperty responseProp; 36 | SerializedProperty recordingNameProp; 37 | 38 | bool showFeedback = false; 39 | 40 | GUIStyle buttonStyle; 41 | GUILayoutOption height; 42 | 43 | void OnEnable() 44 | { 45 | RecorderBase recorder = target as RecorderBase; 46 | recorder.InitRecording(); 47 | 48 | // Setup the SerializedProperties. 49 | recordProp = serializedObject.FindProperty("doRecord"); 50 | saveProp = serializedObject.FindProperty("doSave"); 51 | cancelProp = serializedObject.FindProperty("doCancel"); 52 | recordingProp = serializedObject.FindProperty("recording"); 53 | responseProp = serializedObject.FindProperty("responseText"); 54 | recordingNameProp = serializedObject.FindProperty("recordingName"); 55 | } 56 | 57 | public override void OnInspectorGUI() 58 | { 59 | RecorderBase recorder = target as RecorderBase; 60 | serializedObject.Update(); 61 | 62 | buttonStyle = EditorStyles.miniButtonMid; 63 | height = GUILayout.Height(20); 64 | 65 | DrawDefaultInspector(); 66 | EditorGUILayout.Space(); 67 | 68 | // disable gui outside play mode 69 | if (recorder.disableIfNotPlaying && !Application.isPlaying) 70 | { 71 | EditorGUILayout.HelpBox("For this Recorder recording is disabled while Application is not playing.", MessageType.Info); 72 | GUI.enabled = false; 73 | } 74 | 75 | // record toggle 76 | RecordToggle(); 77 | 78 | // recording group 79 | RecordingGroup(); 80 | 81 | if (recorder.IsRecording) 82 | { 83 | showFeedback = false; 84 | 85 | Repaint(); // drawn 10 times per second 86 | } 87 | 88 | //only enable save/cancel if recording has been started 89 | GUI.enabled = GUI.enabled && recorder.IsRecordingStarted; 90 | 91 | // save button 92 | if (GUILayout.Button("Save Recording", buttonStyle, height)) 93 | { 94 | saveProp.boolValue = true; 95 | showFeedback = true; 96 | } 97 | 98 | // cancel button 99 | if (GUILayout.Button("Cancel Recording", buttonStyle, height)) 100 | { 101 | cancelProp.boolValue = true; 102 | showFeedback = true; 103 | } 104 | 105 | GUI.enabled = true; 106 | 107 | // feedback helpbox 108 | if (showFeedback) 109 | { 110 | EditorGUILayout.HelpBox(responseProp.stringValue, MessageType.Info); 111 | } 112 | 113 | EditorGUILayout.Space(); 114 | 115 | serializedObject.ApplyModifiedPropertiesWithoutUndo(); 116 | } 117 | 118 | private void RecordToggle() 119 | { 120 | RecorderBase recorder = target as RecorderBase; 121 | 122 | Color defaultColor = GUI.backgroundColor; 123 | string toggleLabel; 124 | if (recordProp.boolValue) 125 | { 126 | GUI.backgroundColor = Color.red; 127 | toggleLabel = "Recording"; 128 | } 129 | else 130 | { 131 | toggleLabel = recorder.IsPaused ? "Continue Recording" : "Start Recording"; 132 | } 133 | 134 | recordProp.boolValue = GUILayout.Toggle(recordProp.boolValue, toggleLabel, buttonStyle, height); 135 | 136 | //reset background color 137 | GUI.backgroundColor = defaultColor; 138 | } 139 | 140 | private void RecordingGroup() 141 | { 142 | RecorderBase recorder = target as RecorderBase; 143 | 144 | RecordingBase recordingRef = recordingProp.objectReferenceValue as RecordingBase; 145 | 146 | string type = "-"; 147 | string duration = "-"; 148 | string recordCount = "0"; 149 | 150 | if (recordingRef) 151 | { 152 | type = recordingRef.GetType().Name; 153 | duration = String.Format("{0:N2}", recordingRef.duration); 154 | recordCount = recordingRef.Count().ToString(); 155 | } 156 | 157 | EditorGUILayout.BeginVertical(EditorStyles.helpBox); 158 | EditorGUILayout.PropertyField(recordingNameProp); 159 | 160 | EditorGUILayout.LabelField("Type", type); 161 | EditorGUILayout.LabelField("Duration", duration); 162 | EditorGUILayout.LabelField("Count", recordCount); 163 | 164 | EditorGUILayout.LabelField("Destination Folder", recorder.DestinationFolder); 165 | 166 | EditorGUILayout.EndVertical(); 167 | } 168 | } -------------------------------------------------------------------------------- /Source/Recording/Editor/RecorderInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0fa6eab959ca4ae3b393b0bce899b1f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Source/Recording/Editor/RecordingInspector.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | // Copyright (c) 2018 Felix Lange 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 | 23 | using System; 24 | using UnityEngine; 25 | using UnityEditor; 26 | using RecordAndRepeat; 27 | 28 | [CustomEditor(typeof(RecordingBase), true)] 29 | public class RecordingInspector : Editor 30 | { 31 | public override void OnInspectorGUI() 32 | { 33 | serializedObject.Update(); 34 | 35 | RecordingBase recording = target as RecordingBase; 36 | 37 | EditorGUILayout.BeginVertical(EditorStyles.helpBox); 38 | 39 | // recording details as labels 40 | EditorGUILayout.LabelField("Recording Name", recording.name); 41 | EditorGUILayout.LabelField("Type",recording.GetType().Name); 42 | EditorGUILayout.LabelField("Duration", String.Format("{0:N2}", recording.duration)); 43 | EditorGUILayout.LabelField("Count", recording.Count().ToString()); 44 | 45 | EditorGUILayout.EndVertical(); 46 | EditorGUILayout.Space(); 47 | 48 | // button to log all data records 49 | if (GUILayout.Button("Log Recording", EditorStyles.miniButtonMid, GUILayout.Height(20))) 50 | { 51 | recording.Log(); 52 | } 53 | 54 | EditorGUILayout.Space(); 55 | 56 | // show data fields 57 | SerializedProperty field = serializedObject.GetIterator(); 58 | field.NextVisible(true); 59 | while (field.NextVisible(false)) 60 | { 61 | EditorGUILayout.PropertyField(field, true); 62 | } 63 | 64 | serializedObject.ApplyModifiedPropertiesWithoutUndo(); 65 | } 66 | } -------------------------------------------------------------------------------- /Source/Recording/Editor/RecordingInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 509f3dc5abeff4e78beebb0e880ad0e3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Source/Recording/Recorder.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | // Copyright (c) 2018 Felix Lange 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 | 23 | using System.Collections; 24 | using System.Collections.Generic; 25 | using UnityEngine; 26 | 27 | namespace RecordAndRepeat 28 | { 29 | public class Recorder : RecorderBase 30 | { 31 | protected override RecordingBase CreateInstance() 32 | { 33 | return ScriptableObject.CreateInstance(); 34 | } 35 | 36 | public void RecordAsJson(object obj) 37 | { 38 | RecordString(JsonUtility.ToJson(obj)); 39 | } 40 | 41 | public void RecordString(string data) 42 | { 43 | DataFrame frame = new DataFrame(); 44 | frame.Data = data; 45 | 46 | RecordData(frame); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Source/Recording/Recorder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c00b72588b8d4d4fa8f07e1a7d4079f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Source/Recording/Recording.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | // Copyright (c) 2018 Felix Lange 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 | 23 | using System.Collections.Generic; 24 | using UnityEngine; 25 | using System.Linq; 26 | 27 | namespace RecordAndRepeat 28 | { 29 | public class Recording : RecordingBase 30 | { 31 | [SerializeField] 32 | private List frames = new List(); 33 | 34 | public override void Add(IDataFrame frame) 35 | { 36 | frames.Add((DataFrame)frame); 37 | } 38 | 39 | protected override IEnumerable ConvertDataFrames() 40 | { 41 | return frames.Cast(); 42 | } 43 | 44 | public override int Count() 45 | { 46 | return frames.Count(); 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /Source/Recording/Recording.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05af61335a8d24a17b94b0a202d3aa46 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Source/Timeline.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ea93fc5c2186c84792ede3edf5cad55 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Source/Timeline/DataListener.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | // Copyright (c) 2018 Felix Lange 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 | 23 | using System; 24 | using UnityEngine; 25 | using UnityEngine.Events; 26 | 27 | namespace RecordAndRepeat 28 | { 29 | [System.Serializable] 30 | public class DataFrameEvent : UnityEvent{} 31 | 32 | [ExecuteInEditMode] 33 | public class DataListener : MonoBehaviour 34 | { 35 | public DataFrameEvent dataFrameEvent; 36 | 37 | public event Action OnDataFrameReceived; 38 | 39 | void Awake() 40 | { 41 | if (dataFrameEvent == null) 42 | { 43 | dataFrameEvent = new DataFrameEvent(); 44 | } 45 | } 46 | 47 | public virtual void ProcessData(IDataFrame frame) 48 | { 49 | if (OnDataFrameReceived != null) 50 | { 51 | OnDataFrameReceived(frame); 52 | } 53 | 54 | if (dataFrameEvent != null) 55 | { 56 | dataFrameEvent.Invoke(frame); 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Source/Timeline/DataListener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07854983c60464c10a6d5426027bdd16 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Source/Timeline/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f184bd3bc374440b1b507bee00a3c7f6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Source/Timeline/Editor/RecordAndRepeat.Timeline.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RecordAndRepeat.Timeline.Editor", 3 | "rootNamespace": "", 4 | "references": [ 5 | "RecordAndRepeat" 6 | ], 7 | "includePlatforms": [ 8 | "Editor" 9 | ], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": false, 13 | "precompiledReferences": [], 14 | "autoReferenced": true, 15 | "defineConstraints": [], 16 | "versionDefines": [], 17 | "noEngineReferences": false 18 | } -------------------------------------------------------------------------------- /Source/Timeline/Editor/RecordAndRepeat.Timeline.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed88b634f85378c4e819df7021c5ce93 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Source/Timeline/Editor/RecordingClipInspector.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | // Copyright (c) 2018 Felix Lange 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 | 23 | using System; 24 | using UnityEditor; 25 | using UnityEngine; 26 | using UnityEngine.Playables; 27 | 28 | using RecordAndRepeat; 29 | 30 | [CustomEditor(typeof(RecordingClip), true)] 31 | public class RecordingClipInspector : Editor 32 | { 33 | public static bool disableRecordingSwitch = true; 34 | 35 | public override void OnInspectorGUI() 36 | { 37 | serializedObject.Update(); 38 | 39 | SerializedProperty templateProp = serializedObject.FindProperty("template"); 40 | SerializedProperty recordingProp = templateProp.FindPropertyRelative("recording"); 41 | 42 | GUI.enabled = !(RecordingClipInspector.disableRecordingSwitch && Application.isPlaying); 43 | EditorGUILayout.PropertyField(recordingProp); 44 | GUI.enabled = true; 45 | 46 | RecordingBase recordingRef = recordingProp.objectReferenceValue as RecordingBase; 47 | if (recordingRef) 48 | { 49 | EditorGUILayout.BeginVertical(EditorStyles.helpBox); 50 | 51 | EditorGUILayout.LabelField("Recording Name", recordingRef.name); 52 | EditorGUILayout.LabelField("Type",recordingRef.GetType().Name); 53 | EditorGUILayout.LabelField("Duration", String.Format("{0:N2}", recordingRef.duration)); 54 | EditorGUILayout.LabelField("Count", recordingRef.Count().ToString()); 55 | 56 | EditorGUILayout.EndVertical(); 57 | } 58 | 59 | serializedObject.ApplyModifiedProperties(); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Source/Timeline/Editor/RecordingClipInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 382a3118ca7f74cba94c86d1deb488f4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Source/Timeline/RecordingBehaviour.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.Playables; 4 | using UnityEngine.Timeline; 5 | 6 | namespace RecordAndRepeat 7 | { 8 | [Serializable] 9 | public class RecordingBehaviour : PlayableBehaviour 10 | { 11 | public RecordingBase recording; 12 | [HideInInspector] 13 | public RecordingBase watchReference = null; 14 | public bool RecordingChanged() 15 | { 16 | if (watchReference == recording) 17 | { 18 | return false; 19 | } 20 | else 21 | { 22 | watchReference = recording; 23 | return true; 24 | } 25 | } 26 | 27 | public void CleanClone(RecordingBehaviour other) 28 | { 29 | watchReference = other.watchReference; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Source/Timeline/RecordingBehaviour.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98a5d376b57fe48f9b2733aec2f4e0b4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Source/Timeline/RecordingClip.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.Playables; 4 | using UnityEngine.Timeline; 5 | 6 | namespace RecordAndRepeat 7 | { 8 | [Serializable] 9 | public class RecordingClip : PlayableAsset, ITimelineClipAsset 10 | { 11 | public RecordingBehaviour template = new RecordingBehaviour(); 12 | 13 | public ClipCaps clipCaps 14 | { 15 | get { return ClipCaps.Looping | ClipCaps.ClipIn | ClipCaps.SpeedMultiplier; } 16 | } 17 | 18 | public override double duration 19 | { 20 | get 21 | { 22 | if (template.recording) 23 | { 24 | return template.recording.duration; 25 | } 26 | else 27 | { 28 | return base.duration; 29 | } 30 | } 31 | } 32 | 33 | public override Playable CreatePlayable(PlayableGraph graph, GameObject owner) 34 | { 35 | var playable = ScriptPlayable.Create(graph, template); 36 | return playable; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Source/Timeline/RecordingClip.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef456091969024375aef2552952b31d9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Source/Timeline/RecordingMixerBehaviour.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.Playables; 4 | using UnityEngine.Timeline; 5 | 6 | namespace RecordAndRepeat 7 | { 8 | public class RecordingMixerBehaviour : PlayableBehaviour 9 | { 10 | // NOTE: This function is called at runtime and edit time. Keep that in mind when setting the values of properties. 11 | public override void ProcessFrame(Playable playable, FrameData info, object playerData) 12 | { 13 | DataListener trackBinding = playerData as DataListener; 14 | 15 | if (trackBinding == null) 16 | { 17 | Debug.Log("Track without Trackbinding"); 18 | return; 19 | } 20 | 21 | int inputCount = playable.GetInputCount(); 22 | 23 | for (int i = 0; i < inputCount; i++) 24 | { 25 | float inputWeight = playable.GetInputWeight(i); 26 | ScriptPlayable inputPlayable = 27 | (ScriptPlayable)playable.GetInput(i); 28 | RecordingBehaviour input = inputPlayable.GetBehaviour(); 29 | 30 | // Use the above variables to process each frame of this playable. 31 | if (inputWeight > 0 && input.recording != null) 32 | { 33 | float timeS = (float)inputPlayable.GetTime(); 34 | float duration = input.recording.duration; 35 | if (duration > 0) 36 | { 37 | timeS = timeS % duration; //loop 38 | } 39 | 40 | IDataFrame frame = input.recording.GetDataFrame(timeS); 41 | if (frame != null) 42 | { 43 | trackBinding.ProcessData(frame); 44 | } 45 | } 46 | } 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /Source/Timeline/RecordingMixerBehaviour.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 267c8da6efed542408501e6f85e66de9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Source/Timeline/RecordingTrack.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Playables; 3 | using UnityEngine.Timeline; 4 | 5 | namespace RecordAndRepeat 6 | { 7 | [TrackColor(0.855f, 0.8623f, 0.87f)] 8 | [TrackClipType(typeof(RecordingClip))] 9 | [TrackBindingType(typeof(DataListener))] 10 | public class RecordingTrack : TrackAsset 11 | { 12 | public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount) 13 | { 14 | foreach (var clip in GetClips()) 15 | { 16 | RecordingClip recordingClip = clip.asset as RecordingClip; 17 | RecordingBase recordingRef = recordingClip.template.recording; 18 | if (recordingRef) 19 | { 20 | if (recordingClip.template.RecordingChanged()) 21 | { 22 | clip.displayName = recordingRef.name; 23 | clip.duration = recordingClip.duration; 24 | clip.clipIn = 0; 25 | } 26 | } 27 | else 28 | { 29 | clip.displayName = "..."; 30 | } 31 | } 32 | 33 | return ScriptPlayable.Create(graph, inputCount); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /Source/Timeline/RecordingTrack.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39cd434a3e3184adf9bb31348ce468b5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.fxlange.record-and-repeat", 3 | "version": "0.4.3", 4 | "displayName": "Record and Repeat", 5 | "description": "Unity editor plugin, which supports recording of custom data and playback via the Unity Timeline", 6 | "unity": "2020.3", 7 | "author": { 8 | "name": "Felix Lange", 9 | "email": "mail@felixlange.dev", 10 | "url": "felixlange.dev" 11 | }, 12 | "keywords": [ 13 | "timeline", 14 | "replay", 15 | "playback" 16 | ], 17 | "licensesUrl": "https://github.com/fx-lange/unity-record-and-repeat/blob/main/LICENSE" 18 | } -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f50fd2864bc94d3e90ecddde0353582 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | --------------------------------------------------------------------------------