commit 81aba5a53c80038f7820e05b2fedfa7bf0f303dd Author: shenyuchi <1349334667@qq.com> Date: Fri May 9 10:20:30 2025 +0800 录制功能 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c1a546e --- /dev/null +++ b/.gitignore @@ -0,0 +1,65 @@ +# This .gitignore file should be placed at the root of your Unity project directory +# +# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore +# +/[Ll]ibrary/ +/[Tt]emp/ +/[Oo]bj/ +/[Bb]uild/ +/[Bb]uilds/ +/[Ll]ogs/ +/[Mm]emoryCaptures/ + +# Never ignore Asset meta data +!/[Aa]ssets/**/*.meta + +# Uncomment this line if you wish to ignore the asset store tools plugin +# /[Aa]ssets/AssetStoreTools* + +# TextMesh Pro files +[Aa]ssets/TextMesh*Pro/ + +# Autogenerated Jetbrains Rider plugin +[Aa]ssets/Plugins/Editor/JetBrains* + +# Visual Studio cache directory +.vs/ + +# Gradle cache directory +.gradle/ + +# Autogenerated VS/MD/Consulo solution and project files +ExportedObj/ +.consulo/ +*.csproj +*.unityproj +*.sln +*.suo +*.tmp +*.user +*.userprefs +*.pidb +*.booproj +*.svd +*.pdb +*.mdb +*.opendb +*.VC.db + +# Unity3D generated meta files +*.pidb.meta +*.pdb.meta +*.mdb.meta + +# Unity3D generated file on crash reports +sysinfo.txt + +# Builds +*.apk +*.unitypackage + +# Crashlytics generated file +crashlytics-build.properties + +*.zip +/App/ \ No newline at end of file diff --git a/.vsconfig b/.vsconfig new file mode 100644 index 0000000..d70cd98 --- /dev/null +++ b/.vsconfig @@ -0,0 +1,6 @@ +{ + "version": "1.0", + "components": [ + "Microsoft.VisualStudio.Workload.ManagedGame" + ] +} diff --git a/Assets/DLL.meta b/Assets/DLL.meta new file mode 100644 index 0000000..0c553cc --- /dev/null +++ b/Assets/DLL.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 336c11b053504fd4f8e6fd17e06b820c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/DLL/GDLog.dll b/Assets/DLL/GDLog.dll new file mode 100644 index 0000000..415cb13 Binary files /dev/null and b/Assets/DLL/GDLog.dll differ diff --git a/Assets/DLL/GDLog.dll.meta b/Assets/DLL/GDLog.dll.meta new file mode 100644 index 0000000..7310c6a --- /dev/null +++ b/Assets/DLL/GDLog.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 7bd8584163be07c428d1d17d05a26b49 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Editor.meta b/Assets/Editor.meta new file mode 100644 index 0000000..e9a4553 --- /dev/null +++ b/Assets/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e41d275967f8ea54a8cbfbeffae02e0a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Editor/CreateNewScript.cs b/Assets/Editor/CreateNewScript.cs new file mode 100644 index 0000000..1c097ed --- /dev/null +++ b/Assets/Editor/CreateNewScript.cs @@ -0,0 +1,33 @@ +/// +///******************************************************** +/// 创建人: +/// 创建时间: #CreateTime# +/// 描述: 更改头文件注释 +///******************************************************** +/// + +using System.IO; +using System; +using UnityEditor; + +[Obsolete] +public class CreateNewScript : AssetModificationProcessor +{ + //private const string AuthorName = "true."; + //private const string AuthorEmail = "1670328571@qq.com"; + + private const string CreateTime = "yyyy/MM/dd HH:mm:ss"; + private static void OnWillCreateAsset(string path) + { + path = path.Replace(".meta", ""); + if (path.EndsWith(".cs")) + { + string allText = File.ReadAllText(path); + //allText = allText.Replace("#AuthorName#", AuthorName); + //allText = allText.Replace("#AuthorEmail#", AuthorEmail); + allText = allText.Replace("#CreateTime#", System.DateTime.Now.ToString(CreateTime)); + File.WriteAllText(path, allText); + AssetDatabase.Refresh(); + } + } +} diff --git a/Assets/Editor/CreateNewScript.cs.meta b/Assets/Editor/CreateNewScript.cs.meta new file mode 100644 index 0000000..730d94b --- /dev/null +++ b/Assets/Editor/CreateNewScript.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f2002911c08ad1d47a38bb35d8c0cc3b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..556d6d7 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9d498b376064327449225cda6cfe8756 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads.meta b/Assets/Plugins/RenderHeads.meta new file mode 100644 index 0000000..ddad1cf --- /dev/null +++ b/Assets/Plugins/RenderHeads.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e364d6bf9ccfe294ca054e0b6f539e32 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture.meta new file mode 100644 index 0000000..55537c6 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 538138a7da7683e4db8fa85dbcee8835 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos.meta new file mode 100644 index 0000000..26be9e1 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 94f9e072b7bf8b4419ce9835aa43a5c5 +folderAsset: yes +timeCreated: 1563637382 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/AVProMovieCapture.Demos.asmdef b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/AVProMovieCapture.Demos.asmdef new file mode 100644 index 0000000..2d80c55 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/AVProMovieCapture.Demos.asmdef @@ -0,0 +1,5 @@ +{ + "name": "RenderHeads.AVProMovieCapture.Demos", + "references": [ "RenderHeads.AVProMovieCapture.Runtime" ], + "includePlatforms": [ ] +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/AVProMovieCapture.Demos.asmdef.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/AVProMovieCapture.Demos.asmdef.meta new file mode 100644 index 0000000..da0964d --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/AVProMovieCapture.Demos.asmdef.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 8426b3d3473738a489355e04a0882d0b +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio.meta new file mode 100644 index 0000000..cc64b44 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 76c2bb32661761d40b39ce23b8dbb860 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/Tone.wav b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/Tone.wav new file mode 100644 index 0000000..b46d4d3 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/Tone.wav differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/Tone.wav.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/Tone.wav.meta new file mode 100644 index 0000000..bc74436 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/Tone.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 764908f8332f02340b72e3010f4a3a2e +timeCreated: 1606868176 +licenseType: Store +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 0 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 0 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/ding.wav b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/ding.wav new file mode 100644 index 0000000..94e143c Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/ding.wav differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/ding.wav.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/ding.wav.meta new file mode 100644 index 0000000..204f1ba --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/ding.wav.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bec3644980842774db12d11690b0d916 +AudioImporter: + serializedVersion: 4 + format: -1 + quality: .5 + stream: 1 + 3D: 0 + forceToMono: 0 + useHardware: 0 + loopable: 0 diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/jelly__pisk3.xm b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/jelly__pisk3.xm new file mode 100644 index 0000000..f6e309e Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/jelly__pisk3.xm differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/jelly__pisk3.xm.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/jelly__pisk3.xm.meta new file mode 100644 index 0000000..c776661 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Audio/jelly__pisk3.xm.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 1 +guid: 1ed2bddd186bb264eb42d8ac765accd4 +AudioImporter: + importerVersion: 4 + format: -1 + quality: -1 + 3d: 0 + forceToMono: 0 + stream: 1 + useHardware: 0 diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI.meta new file mode 100644 index 0000000..e71a4c9 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: bc925b9c371f92e40bf7355ee0dc2536 diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/ConfigSkin.guiskin b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/ConfigSkin.guiskin new file mode 100644 index 0000000..c355f36 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/ConfigSkin.guiskin @@ -0,0 +1,1691 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12001, guid: 0000000000000000e000000000000000, type: 0} + m_Name: ConfigSkin + m_EditorClassIdentifier: + m_Font: {fileID: 12800000, guid: 1102003ee10456942bffb2b369d6a7b8, type: 3} + m_box: + m_Name: box + m_Normal: + m_Background: {fileID: 2800000, guid: 7fbbedb31432e4d408b2e3fbd0dbd862, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 6 + m_Right: 6 + m_Top: 6 + m_Bottom: 6 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 18 + m_FontStyle: 0 + m_Alignment: 1 + m_WordWrap: 1 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_button: + m_Name: button + m_Normal: + m_Background: {fileID: 2800000, guid: b6b9f1741e3bb6241aab55422ae1f133, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: 5fa7bcd58e1876e41952c9349da60879, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Active: + m_Background: {fileID: 2800000, guid: 5fa7bcd58e1876e41952c9349da60879, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnNormal: + m_Background: {fileID: 2800000, guid: 89756d2e84d7799499b64043123ddf38, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnHover: + m_Background: {fileID: 2800000, guid: 89756d2e84d7799499b64043123ddf38, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnActive: + m_Background: {fileID: 2800000, guid: 89756d2e84d7799499b64043123ddf38, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnFocused: + m_Background: {fileID: 2800000, guid: 89756d2e84d7799499b64043123ddf38, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Border: + m_Left: 6 + m_Right: 6 + m_Top: 6 + m_Bottom: 4 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 16 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_toggle: + m_Name: toggle + m_Normal: + m_Background: {fileID: 2800000, guid: ccce2d09cdddb2d4da068267090c1548, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.76865673, g: 0.76865673, b: 0.76865673, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: b6b9f1741e3bb6241aab55422ae1f133, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 2800000, guid: 89756d2e84d7799499b64043123ddf38, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 6 + m_Right: 6 + m_Top: 6 + m_Bottom: 4 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 6 + m_Right: 6 + m_Top: 3 + m_Bottom: 3 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 16 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + m_label: + m_Name: label + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 16 + m_FontStyle: 0 + m_Alignment: 3 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_textField: + m_Name: textfield + m_Normal: + m_Background: {fileID: 2800000, guid: ccce2d09cdddb2d4da068267090c1548, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Hover: + m_Background: {fileID: 11026, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 11026, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnNormal: + m_Background: {fileID: 11025, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 3 + m_Right: 3 + m_Top: 3 + m_Bottom: 3 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 25 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_textArea: + m_Name: textarea + m_Normal: + m_Background: {fileID: 11024, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.9019608, g: 0.9019608, b: 0.9019608, a: 1} + m_Hover: + m_Background: {fileID: 11026, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.79999995, g: 0.79999995, b: 0.79999995, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 11025, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 3 + m_Right: 3 + m_Top: 3 + m_Bottom: 3 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 1 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_window: + m_Name: window + m_Normal: + m_Background: {fileID: 2800000, guid: 7fbbedb31432e4d408b2e3fbd0dbd862, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 8 + m_Right: 8 + m_Top: 18 + m_Bottom: 8 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 10 + m_Right: 10 + m_Top: 20 + m_Bottom: 10 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 18 + m_FontStyle: 0 + m_Alignment: 1 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: -18} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_horizontalSlider: + m_Name: horizontalslider + m_Normal: + m_Background: {fileID: 2800000, guid: 5fa7bcd58e1876e41952c9349da60879, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0.5074627, g: 0.14390732, b: 0.14390732, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: 89756d2e84d7799499b64043123ddf38, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 2800000, guid: 89756d2e84d7799499b64043123ddf38, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 3 + m_Right: 3 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: -1 + m_Right: -1 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: -2 + m_Bottom: -3 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 30 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_horizontalSliderThumb: + m_Name: horizontalsliderthumb + m_Normal: + m_Background: {fileID: 2800000, guid: e8b5fb4ca0fdd2c4eadc7cbe065543a4, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: e8b5fb4ca0fdd2c4eadc7cbe065543a4, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 2800000, guid: e8b5fb4ca0fdd2c4eadc7cbe065543a4, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 4 + m_Right: 4 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 7 + m_Right: 7 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: -1 + m_Right: -1 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 30 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_verticalSlider: + m_Name: verticalslider + m_Normal: + m_Background: {fileID: 11021, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 3 + m_Bottom: 3 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: -1 + m_Bottom: -1 + m_Overflow: + m_Left: -2 + m_Right: -3 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 0 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 12 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 1 + m_verticalSliderThumb: + m_Name: verticalsliderthumb + m_Normal: + m_Background: {fileID: 11011, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 11012, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 11010, guid: 0000000000000000e000000000000000, type: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 7 + m_Bottom: 7 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: -1 + m_Bottom: -1 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 12 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 1 + m_horizontalScrollbar: + m_Name: horizontalscrollbar + m_Normal: + m_Background: {fileID: 2800000, guid: 89756d2e84d7799499b64043123ddf38, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 9 + m_Right: 9 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 1 + m_Bottom: 4 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 15 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_horizontalScrollbarThumb: + m_Name: horizontalscrollbarthumb + m_Normal: + m_Background: {fileID: 2800000, guid: e8b5fb4ca0fdd2c4eadc7cbe065543a4, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 6 + m_Right: 6 + m_Top: 6 + m_Bottom: 6 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 6 + m_Right: 6 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: -1 + m_Bottom: 1 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 13 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_horizontalScrollbarLeftButton: + m_Name: horizontalscrollbarleftbutton + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_horizontalScrollbarRightButton: + m_Name: horizontalscrollbarrightbutton + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_verticalScrollbar: + m_Name: verticalscrollbar + m_Normal: + m_Background: {fileID: 2800000, guid: 89756d2e84d7799499b64043123ddf38, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 9 + m_Bottom: 9 + m_Margin: + m_Left: 1 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 1 + m_Bottom: 1 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 15 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_verticalScrollbarThumb: + m_Name: verticalscrollbarthumb + m_Normal: + m_Background: {fileID: 2800000, guid: e8b5fb4ca0fdd2c4eadc7cbe065543a4, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 6 + m_Right: 6 + m_Top: 6 + m_Bottom: 6 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 6 + m_Bottom: 6 + m_Overflow: + m_Left: -1 + m_Right: -1 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 15 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 1 + m_verticalScrollbarUpButton: + m_Name: verticalscrollbarupbutton + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_verticalScrollbarDownButton: + m_Name: verticalscrollbardownbutton + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_ScrollView: + m_Name: scrollview + m_Normal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + m_CustomStyles: + - m_Name: ContrastLabel + m_Normal: + m_Background: {fileID: 2800000, guid: 7fbbedb31432e4d408b2e3fbd0dbd862, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 0 + m_ImagePosition: 0 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + - m_Name: spectrumHorizSlider + m_Normal: + m_Background: {fileID: 2800000, guid: be0cffc23968d704980274205bc44645, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Hover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 3 + m_Right: 3 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 4 + m_Right: 4 + m_Top: 4 + m_Bottom: 4 + m_Padding: + m_Left: -1 + m_Right: -1 + m_Top: 0 + m_Bottom: 0 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: -2 + m_Bottom: -3 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 2 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 30 + m_StretchWidth: 1 + m_StretchHeight: 0 + - m_Name: sceneSelection + m_Normal: + m_Background: {fileID: 2800000, guid: b6b9f1741e3bb6241aab55422ae1f133, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: 5fa7bcd58e1876e41952c9349da60879, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 2800000, guid: 89756d2e84d7799499b64043123ddf38, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 3 + m_Right: 3 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 10 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 16 + m_Bottom: 12 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: -2 + m_Bottom: -3 + m_Font: {fileID: 0} + m_FontSize: 0 + m_FontStyle: 0 + m_Alignment: 4 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 1 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 208.01 + m_StretchWidth: 1 + m_StretchHeight: 0 + - m_Name: labelCentred + m_Normal: + m_Background: {fileID: 2800000, guid: 7fbbedb31432e4d408b2e3fbd0dbd862, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: 5fa7bcd58e1876e41952c9349da60879, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 2800000, guid: 89756d2e84d7799499b64043123ddf38, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Padding: + m_Left: 18 + m_Right: 18 + m_Top: 3 + m_Bottom: 3 + m_Overflow: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: -2 + m_Font: {fileID: 0} + m_FontSize: 31 + m_FontStyle: 0 + m_Alignment: 1 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 1 + m_StretchHeight: 0 + - m_Name: labelHeading + m_Normal: + m_Background: {fileID: 2800000, guid: b6b9f1741e3bb6241aab55422ae1f133, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Hover: + m_Background: {fileID: 2800000, guid: 5fa7bcd58e1876e41952c9349da60879, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_Active: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Focused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnNormal: + m_Background: {fileID: 2800000, guid: 89756d2e84d7799499b64043123ddf38, type: 3} + m_ScaledBackgrounds: [] + m_TextColor: {r: 1, g: 1, b: 1, a: 1} + m_OnHover: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnActive: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_OnFocused: + m_Background: {fileID: 0} + m_ScaledBackgrounds: [] + m_TextColor: {r: 0, g: 0, b: 0, a: 1} + m_Border: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_Margin: + m_Left: 15 + m_Right: 0 + m_Top: 23 + m_Bottom: 17 + m_Padding: + m_Left: 0 + m_Right: 46 + m_Top: 9 + m_Bottom: 6 + m_Overflow: + m_Left: 18 + m_Right: 4 + m_Top: 0 + m_Bottom: 0 + m_Font: {fileID: 0} + m_FontSize: 22 + m_FontStyle: 0 + m_Alignment: 0 + m_WordWrap: 0 + m_RichText: 1 + m_TextClipping: 1 + m_ImagePosition: 3 + m_ContentOffset: {x: 0, y: 0} + m_FixedWidth: 0 + m_FixedHeight: 0 + m_StretchWidth: 0 + m_StretchHeight: 0 + m_Settings: + m_DoubleClickSelectsWord: 1 + m_TripleClickSelectsLine: 1 + m_CursorColor: {r: 1, g: 1, b: 1, a: 1} + m_CursorFlashSpeed: -1 + m_SelectionColor: {r: 1, g: 0.38403907, b: 0, a: 0.7} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/ConfigSkin.guiskin.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/ConfigSkin.guiskin.meta new file mode 100644 index 0000000..bf3603a --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/ConfigSkin.guiskin.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: eb821627fb1a0c044a6fd7a6dabe3147 diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/Inconsolata.otf b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/Inconsolata.otf new file mode 100644 index 0000000..3488898 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/Inconsolata.otf differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/Inconsolata.otf.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/Inconsolata.otf.meta new file mode 100644 index 0000000..ea59d6d --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/Inconsolata.otf.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 1102003ee10456942bffb2b369d6a7b8 +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + fontColor: {r: 1, g: 1, b: 1, a: 1} + forceTextureCase: -2 + renderMode: 0 + style: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + customCharacters: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/black.png b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/black.png new file mode 100644 index 0000000..8cde491 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/black.png differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/black.png.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/black.png.meta new file mode 100644 index 0000000..1b47880 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/black.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 41dc463a61e06694b85593cb70e17848 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray.png b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray.png new file mode 100644 index 0000000..9ad6115 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray.png differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray.png.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray.png.meta new file mode 100644 index 0000000..586dea8 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 89756d2e84d7799499b64043123ddf38 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray25.png b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray25.png new file mode 100644 index 0000000..e986d47 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray25.png differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray25.png.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray25.png.meta new file mode 100644 index 0000000..cac5a1a --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray25.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 5fa7bcd58e1876e41952c9349da60879 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray50.png b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray50.png new file mode 100644 index 0000000..b97d737 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray50.png differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray50.png.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray50.png.meta new file mode 100644 index 0000000..7ed3af5 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray50.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: b6b9f1741e3bb6241aab55422ae1f133 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray80.png b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray80.png new file mode 100644 index 0000000..7da5ca4 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray80.png differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray80.png.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray80.png.meta new file mode 100644 index 0000000..b8a2c08 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/gray80.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: ccce2d09cdddb2d4da068267090c1548 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/transpBlack.png b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/transpBlack.png new file mode 100644 index 0000000..23648d5 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/transpBlack.png differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/transpBlack.png.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/transpBlack.png.meta new file mode 100644 index 0000000..837d42d --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/transpBlack.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 7fbbedb31432e4d408b2e3fbd0dbd862 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/transpWhite.png b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/transpWhite.png new file mode 100644 index 0000000..6ffa8a1 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/transpWhite.png differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/transpWhite.png.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/transpWhite.png.meta new file mode 100644 index 0000000..db850f6 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/GUI/transpWhite.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: e8b5fb4ca0fdd2c4eadc7cbe065543a4 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Materials.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Materials.meta new file mode 100644 index 0000000..2b980e8 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 206f513b60f950c4793035333d2f95d5 +folderAsset: yes +timeCreated: 1583523317 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Materials/DefaultDemo.mat b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Materials/DefaultDemo.mat new file mode 100644 index 0000000..b4a8c0e --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Materials/DefaultDemo.mat @@ -0,0 +1,76 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: DefaultDemo + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 1 + - _GlossyReflections: 0 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 0 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Materials/DefaultDemo.mat.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Materials/DefaultDemo.mat.meta new file mode 100644 index 0000000..781751c --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Materials/DefaultDemo.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f663b5cc3e742024b902055797e3957c +timeCreated: 1583523326 +licenseType: Store +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Prefabs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Prefabs.meta new file mode 100644 index 0000000..a13c341 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Prefabs.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 7e35a0c5b2541b24983f361278c74f91 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Prefabs/Cube.prefab b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Prefabs/Cube.prefab new file mode 100644 index 0000000..9e757f8 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Prefabs/Cube.prefab @@ -0,0 +1,111 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &102934 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 402934} + - component: {fileID: 3302934} + - component: {fileID: 6502934} + - component: {fileID: 2302934} + - component: {fileID: 5492826} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &402934 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 102934} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &2302934 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 102934} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &3302934 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 102934} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!54 &5492826 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 102934} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 1 +--- !u!65 &6502934 +BoxCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 102934} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 102934} + m_IsPrefabParent: 1 diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Prefabs/Cube.prefab.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Prefabs/Cube.prefab.meta new file mode 100644 index 0000000..9cdb45d --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Prefabs/Cube.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 08f87e0910df635498ae10bedcb85aab +NativeFormatImporter: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes.meta new file mode 100644 index 0000000..13f46d0 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2efc957cf89b49b41a927320a690604b +folderAsset: yes +timeCreated: 1563636592 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo00-ScreenCapture.unity b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo00-ScreenCapture.unity new file mode 100644 index 0000000..e12bae4 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo00-ScreenCapture.unity @@ -0,0 +1,1746 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 8 + m_Fog: 0 + m_FogColor: {r: 0, g: 0, b: 0, a: 1} + m_FogMode: 1 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 30 + m_AmbientSkyColor: {r: 0.13235295, g: 0.13235295, b: 0.13235295, a: 1} + m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientIntensity: 1.01 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !u!1 &11 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 18} + - component: {fileID: 20} + - component: {fileID: 37} + m_Layer: 0 + m_Name: MainCamera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &18 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1311126200} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &20 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.01 + far clip plane: 30 + field of view: 70 + orthographic: 0 + orthographic size: 100 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &37 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11} + m_Enabled: 1 +--- !u!196 &44 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666666 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &325417972 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139760, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 325417973} + - component: {fileID: 325417976} + - component: {fileID: 325417975} + - component: {fileID: 325417974} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &325417973 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439760, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 325417972} + m_LocalRotation: {x: 0.23617692, y: -0.16679496, z: -0.16363996, w: 0.9431977} + m_LocalPosition: {x: 0, y: 7.35, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1669314328} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &325417974 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339760, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 325417972} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &325417975 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539760, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 325417972} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &325417976 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339760, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 325417972} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &685358251 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 685358252} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &685358252 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 685358251} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 1648220146} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &742673301 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139762, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 742673302} + - component: {fileID: 742673305} + - component: {fileID: 742673304} + - component: {fileID: 742673303} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &742673302 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439762, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 742673301} + m_LocalRotation: {x: 0.29325396, y: -0.18601899, z: -0.19839196, w: 0.9165368} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1669314328} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &742673303 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339762, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 742673301} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &742673304 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539762, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 742673301} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &742673305 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339762, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 742673301} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &768453310 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139766, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 768453311} + - component: {fileID: 768453314} + - component: {fileID: 768453313} + - component: {fileID: 768453312} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &768453311 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439766, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 768453310} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 5.26, y: 0, z: 5.35} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1669314328} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &768453312 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339766, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 768453310} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &768453313 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539766, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 768453310} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &768453314 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339766, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 768453310} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &903593939 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 903593940} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &903593940 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 903593939} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 976384846} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &957131599 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 957131601} + - component: {fileID: 957131600} + m_Layer: 0 + m_Name: Demo + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &957131600 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 957131599} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3ba7f85d458d9d041a1180c7018b9d00, type: 3} + m_Name: + m_EditorClassIdentifier: + _audioBG: {fileID: 8300000, guid: 1ed2bddd186bb264eb42d8ac765accd4, type: 3} + _audioHit: {fileID: 8300000, guid: bec3644980842774db12d11690b0d916, type: 3} + _speed: 1 + _capture: {fileID: 1922093089} + _guiSkin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2} + _spinCamera: 0 +--- !u!4 &957131601 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 957131599} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &959015543 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 959015545} + - component: {fileID: 959015544} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &959015544 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 959015543} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 1, g: 0.6, b: 0, a: 1} + m_Intensity: 1 + m_Range: 8 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 1 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &959015545 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 959015543} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: 0, y: 1.65, z: -2.14} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 1120111222} + m_Father: {fileID: 1032825606} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &976384844 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 976384846} + - component: {fileID: 976384845} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &976384845 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 976384844} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 0.94707537, g: 0, b: 1, a: 1} + m_Intensity: 1 + m_Range: 8 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 1 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &976384846 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 976384844} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: 3, y: 1.725, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 903593940} + m_Father: {fileID: 1032825606} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1032825602 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1032825606} + - component: {fileID: 1032825605} + - component: {fileID: 1032825604} + - component: {fileID: 1032825603} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1032825603 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1032825602} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1032825604 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1032825602} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_InflateMesh: 0 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1032825605 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1032825602} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1032825606 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1032825602} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 2, y: 2, z: 2} + m_Children: + - {fileID: 959015545} + - {fileID: 1648220146} + - {fileID: 976384846} + - {fileID: 1124690941} + - {fileID: 1669314328} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1120111221 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1120111222} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1120111222 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1120111221} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 959015545} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1124690939 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1124690941} + - component: {fileID: 1124690940} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &1124690940 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1124690939} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 0, g: 1, b: 0.55710316, a: 1} + m_Intensity: 1 + m_Range: 8 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 1 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1124690941 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1124690939} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: -3, y: 1.725, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 1594685860} + m_Father: {fileID: 1032825606} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1139250486 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139758, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1139250487} + - component: {fileID: 1139250490} + - component: {fileID: 1139250489} + - component: {fileID: 1139250488} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1139250487 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439758, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1139250486} + m_LocalRotation: {x: 0.39540902, y: 0.12881501, z: 0.09649201, w: 0.9042941} + m_LocalPosition: {x: -6.67, y: 0, z: -7.116} + m_LocalScale: {x: 2.8360684, y: 2.8360674, z: 2.836067} + m_Children: [] + m_Father: {fileID: 1669314328} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1139250488 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339758, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1139250486} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1139250489 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539758, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1139250486} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1139250490 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339758, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1139250486} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1303178053 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139772, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1303178054} + - component: {fileID: 1303178057} + - component: {fileID: 1303178056} + - component: {fileID: 1303178055} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1303178054 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439772, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1303178053} + m_LocalRotation: {x: -0.41296893, y: 0.47651595, z: 0.19101897, w: 0.7522639} + m_LocalPosition: {x: -6.77, y: 0, z: 0} + m_LocalScale: {x: 2.580892, y: 2.580892, z: 2.5808926} + m_Children: [] + m_Father: {fileID: 1669314328} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1303178055 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339772, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1303178053} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1303178056 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539772, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1303178053} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1303178057 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339772, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1303178053} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1311126197 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1311126200} + - component: {fileID: 1311126199} + - component: {fileID: 1311126198} + m_Layer: 0 + m_Name: Collision Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!135 &1311126198 +SphereCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1311126197} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1311126199 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1311126197} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1311126200 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1311126197} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -1.7, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 18} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1389607881 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1389607883} + - component: {fileID: 1389607882} + - component: {fileID: 1389607884} + - component: {fileID: 1389607886} + - component: {fileID: 1389607885} + m_Layer: 0 + m_Name: Spawners + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1389607882 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1389607881} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 1120111222} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!4 &1389607883 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1389607881} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1389607884 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1389607881} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 685358252} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!114 &1389607885 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1389607881} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 1594685860} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!114 &1389607886 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1389607881} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 903593940} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!1 &1400191720 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139764, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1400191721} + - component: {fileID: 1400191724} + - component: {fileID: 1400191723} + - component: {fileID: 1400191722} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1400191721 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439764, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1400191720} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.7, z: -7.12} + m_LocalScale: {x: 3.017974, y: 3.017975, z: 3.017975} + m_Children: [] + m_Father: {fileID: 1669314328} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1400191722 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339764, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1400191720} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1400191723 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539764, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1400191720} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1400191724 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339764, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1400191720} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1589626818 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1589626819} + - component: {fileID: 1589626820} + m_Layer: 0 + m_Name: GUI + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1589626819 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1589626818} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1922093090} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1589626820 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1589626818} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca3e27221be35d41a4ff608f4ef327e, type: 3} + m_Name: + m_EditorClassIdentifier: + _movieCapture: {fileID: 1922093089} + _showUI: 1 + _whenRecordingAutoHideUI: 0 + _guiSkin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2} +--- !u!1 &1594685859 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1594685860} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1594685860 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1594685859} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 1124690941} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1648220144 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1648220146} + - component: {fileID: 1648220145} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &1648220145 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1648220144} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 0, g: 0.5448277, b: 1, a: 1} + m_Intensity: 1 + m_Range: 8 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 1 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1648220146 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1648220144} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: 0, y: 1.725, z: 3} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 685358252} + m_Father: {fileID: 1032825606} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1669314327 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1669314328} + m_Layer: 0 + m_Name: Cubes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1669314328 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1669314327} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 1303178054} + - {fileID: 1974371552} + - {fileID: 1904803575} + - {fileID: 768453311} + - {fileID: 1400191721} + - {fileID: 742673302} + - {fileID: 325417973} + - {fileID: 1139250487} + m_Father: {fileID: 1032825606} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1904803571 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139768, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1904803575} + - component: {fileID: 1904803574} + - component: {fileID: 1904803573} + - component: {fileID: 1904803572} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1904803572 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339768, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1904803571} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1904803573 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539768, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1904803571} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1904803574 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339768, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1904803571} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1904803575 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439768, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1904803571} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 5.26, y: 1.7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1669314328} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1922093088 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1922093090} + - component: {fileID: 1922093089} + m_Layer: 0 + m_Name: Capture + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1922093089 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1922093088} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7d29444a3446e8b4fbe2e76a72d7d598, type: 3} + m_Name: + m_EditorClassIdentifier: + _encoderHintsWindows: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _encoderHintsMacOS: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _encoderHintsIOS: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _captureKey: 0 + _isRealTime: 1 + _persistAcrossSceneLoads: 0 + _startTrigger: 0 + _startDelay: 0 + _startDelaySeconds: 0 + _stopMode: 0 + _stopFrames: 0 + _stopSeconds: 0 + _videoCodecPriorityWindows: + - H264 + - HEVC + - Lagarith Lossless Codec + - Uncompressed + - x264vfw - H.264/MPEG-4 AVC codec + - Xvid MPEG-4 Codec + _videoCodecPriorityMacOS: + - H264 + - HEVC + - Apple ProRes 422 + - Apple ProRes 4444 + _audioCodecPriorityWindows: + - AAC + - Uncompressed + _audioCodecPriorityMacOS: + - AAC + - FLAC + - Apple Lossless + - Linear PCM + - Uncompresssed + _frameRate: 30 + _timelapseScale: 1 + _frameUpdateMode: 0 + _downScale: 1 + _maxVideoSize: {x: 0, y: 0} + _forceVideoCodecIndexWindows: -1 + _forceVideoCodecIndexMacOS: 0 + _forceVideoCodecIndexIOS: 0 + _forceAudioCodecIndexWindows: -1 + _forceAudioCodecIndexMacOS: 0 + _forceAudioCodecIndexIOS: 0 + _flipVertically: 0 + _forceGpuFlush: 0 + _useWaitForEndOfFrame: 1 + _logCaptureStartStop: 1 + _audioCaptureSource: 1 + _unityAudioCapture: {fileID: 0} + _forceAudioInputDeviceIndex: 0 + _manualAudioSampleRate: 48000 + _manualAudioChannelCount: 2 + _outputTarget: 0 + _outputFolderType: 0 + _outputFolderPath: Captures + _filenamePrefix: ScreenCapture + _appendFilenameTimestamp: 1 + _allowManualFileExtension: 0 + _filenameExtension: mp4 + _namedPipePath: \\.\pipe\test_pipe + _imageSequenceStartFrame: 0 + _imageSequenceZeroDigits: 6 + _imageSequenceFormatWindows: 0 + _imageSequenceFormatMacOS: 0 + _imageSequenceFormatIOS: 0 + _renderResolution: 18 + _renderSize: {x: 1, y: 1} + _renderAntiAliasing: -1 + _useMotionBlur: 0 + _motionBlurSamples: 16 + _motionBlurCameras: [] + _motionBlur: {fileID: 0} + _allowVSyncDisable: 1 + _supportTextureRecreate: 0 + _minimumDiskSpaceMB: -1 + _captureMouseCursor: 0 + _mouseCursor: {fileID: 0} +--- !u!4 &1922093090 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1922093088} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1589626819} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1974371551 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139770, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1974371552} + - component: {fileID: 1974371555} + - component: {fileID: 1974371554} + - component: {fileID: 1974371553} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1974371552 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439770, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1974371551} + m_LocalRotation: {x: -0.40547207, y: -0.030918006, z: 0.07843501, w: 0.9102112} + m_LocalPosition: {x: -2.79, y: 0, z: 5.35} + m_LocalScale: {x: 2.4912324, y: 2.4912333, z: 2.491233} + m_Children: [] + m_Father: {fileID: 1669314328} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1974371553 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339770, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1974371551} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1974371554 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539770, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1974371551} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1974371555 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339770, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1974371551} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo00-ScreenCapture.unity.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo00-ScreenCapture.unity.meta new file mode 100644 index 0000000..7183492 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo00-ScreenCapture.unity.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: aac421df044c8404b9bd40c84487a589 diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo01-TextureCapture.unity b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo01-TextureCapture.unity new file mode 100644 index 0000000..73c109c --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo01-TextureCapture.unity @@ -0,0 +1,364 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 8 + m_Fog: 1 + m_FogColor: {r: 0, g: 0, b: 0, a: 1} + m_FogMode: 1 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 30 + m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !u!1 &11 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 18} + - component: {fileID: 20} + - component: {fileID: 37} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &18 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &20 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.01 + far clip plane: 300 + field of view: 60 + orthographic: 0 + orthographic size: 100 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &37 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11} + m_Enabled: 1 +--- !u!196 &44 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666666 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &1130807521 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1130807525} + - component: {fileID: 1130807524} + - component: {fileID: 1130807523} + - component: {fileID: 1130807522} + m_Layer: 0 + m_Name: TextureCapture + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1130807522 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1130807521} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: de5a7a2f274da2340a2de24a1fffee45, type: 3} + m_Name: + m_EditorClassIdentifier: + _encoderHintsWindows: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _encoderHintsMacOS: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _encoderHintsIOS: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _captureKey: 0 + _isRealTime: 0 + _persistAcrossSceneLoads: 0 + _startTrigger: 0 + _startDelay: 0 + _startDelaySeconds: 0 + _stopMode: 0 + _stopFrames: 0 + _stopSeconds: 0 + _videoCodecPriorityWindows: + - H264 + - HEVC + - Lagarith Lossless Codec + - Uncompressed + - x264vfw - H.264/MPEG-4 AVC codec + - Xvid MPEG-4 Codec + _videoCodecPriorityMacOS: + - H264 + - HEVC + - Apple ProRes 422 + - Apple ProRes 4444 + _audioCodecPriorityWindows: + - AAC + - Uncompressed + _audioCodecPriorityMacOS: + - AAC + - FLAC + - Apple Lossless + - Linear PCM + - Uncompresssed + _frameRate: 30 + _timelapseScale: 1 + _downScale: 1 + _maxVideoSize: {x: 0, y: 0} + _forceVideoCodecIndexWindows: -1 + _forceVideoCodecIndexMacOS: 0 + _forceVideoCodecIndexIOS: 0 + _forceAudioCodecIndexWindows: -1 + _forceAudioCodecIndexMacOS: 0 + _forceAudioCodecIndexIOS: 0 + _flipVertically: 0 + _forceGpuFlush: 0 + _useWaitForEndOfFrame: 1 + _logCaptureStartStop: 1 + _audioCaptureSource: 1 + _unityAudioCapture: {fileID: 0} + _forceAudioInputDeviceIndex: 0 + _outputTarget: 0 + _outputFolderType: 0 + _outputFolderPath: Captures + _filenamePrefix: TextureCapture + _appendFilenameTimestamp: 1 + _allowManualFileExtension: 0 + _filenameExtension: mp4 + _namedPipePath: \\.\pipe\test_pipe + _imageSequenceStartFrame: 0 + _imageSequenceZeroDigits: 6 + _imageSequenceFormatWindows: 0 + _imageSequenceFormatMacOS: 0 + _imageSequenceFormatIOS: 0 + _renderResolution: 14 + _renderSize: {x: 1, y: 1} + _renderAntiAliasing: -1 + _useMotionBlur: 0 + _motionBlurSamples: 0 + _motionBlurCameras: [] + _motionBlur: {fileID: 0} + _allowVSyncDisable: 1 + _supportTextureRecreate: 0 + _minimumDiskSpaceMB: -1 + _manualUpdate: 0 +--- !u!114 &1130807523 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1130807521} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1f519d13df72fce439c800f34395deb7, type: 3} + m_Name: + m_EditorClassIdentifier: + _shader: {fileID: 4800000, guid: f3d2361de25fd894da4e336b857ff62d, type: 3} + _textureWidth: 1024 + _textureHeight: 1024 + _movieCapture: {fileID: 1130807522} +--- !u!114 &1130807524 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1130807521} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca3e27221be35d41a4ff608f4ef327e, type: 3} + m_Name: + m_EditorClassIdentifier: + _movieCapture: {fileID: 1130807522} + _showUI: 1 + _whenRecordingAutoHideUI: 0 + _guiSkin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2} +--- !u!4 &1130807525 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1130807521} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo01-TextureCapture.unity.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo01-TextureCapture.unity.meta new file mode 100644 index 0000000..8529ba9 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo01-TextureCapture.unity.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 4c41bfde9dbb0a3449f96fdffb67a8e2 diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo02-WebcamCapture.unity b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo02-WebcamCapture.unity new file mode 100644 index 0000000..5128bbb --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo02-WebcamCapture.unity @@ -0,0 +1,368 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 8 + m_Fog: 1 + m_FogColor: {r: 0, g: 0, b: 0, a: 1} + m_FogMode: 1 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 30 + m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !u!1 &11 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 18} + - component: {fileID: 20} + - component: {fileID: 37} + - component: {fileID: 12} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &12 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98a052fe19e52c048865e758e854f078, type: 3} + m_Name: + m_EditorClassIdentifier: + _skin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2} + _prefab: {fileID: 1774798094} + _webcamResolutionWidth: 640 + _webcamResolutionHeight: 480 + _webcamFrameRate: 30 +--- !u!4 &18 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &20 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.08088237, g: 0.08088237, b: 0.08088237, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.01 + far clip plane: 300 + field of view: 60 + orthographic: 0 + orthographic size: 100 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &37 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11} + m_Enabled: 1 +--- !u!196 &44 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666666 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &1774798094 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1774798102} + - component: {fileID: 1774798097} + - component: {fileID: 1774798095} + m_Layer: 0 + m_Name: WebcamCapturePrefab + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1774798095 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1774798094} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ea41b0330d3eea243b45fd4355c3080c, type: 3} + m_Name: + m_EditorClassIdentifier: + _encoderHintsWindows: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _encoderHintsMacOS: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _encoderHintsIOS: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _captureKey: 0 + _isRealTime: 1 + _persistAcrossSceneLoads: 0 + _startTrigger: 0 + _startDelay: 0 + _startDelaySeconds: 0 + _stopMode: 0 + _stopFrames: 0 + _stopSeconds: 0 + _videoCodecPriorityWindows: + - H264 + - HEVC + - Lagarith Lossless Codec + - Uncompressed + - x264vfw - H.264/MPEG-4 AVC codec + - Xvid MPEG-4 Codec + _videoCodecPriorityMacOS: + - H264 + - HEVC + - Apple ProRes 422 + - Apple ProRes 4444 + _audioCodecPriorityWindows: + - AAC + - Uncompressed + _audioCodecPriorityMacOS: + - AAC + - FLAC + - Apple Lossless + - Linear PCM + - Uncompresssed + _frameRate: 30 + _timelapseScale: 1 + _frameUpdateMode: 0 + _downScale: 1 + _maxVideoSize: {x: 0, y: 0} + _forceVideoCodecIndexWindows: -1 + _forceVideoCodecIndexMacOS: 0 + _forceVideoCodecIndexIOS: 0 + _forceAudioCodecIndexWindows: -1 + _forceAudioCodecIndexMacOS: 0 + _forceAudioCodecIndexIOS: 0 + _flipVertically: 0 + _forceGpuFlush: 0 + _useWaitForEndOfFrame: 1 + _logCaptureStartStop: 1 + _audioCaptureSource: 0 + _unityAudioCapture: {fileID: 0} + _forceAudioInputDeviceIndex: 0 + _manualAudioSampleRate: 48000 + _manualAudioChannelCount: 2 + _outputTarget: 0 + _outputFolderType: 0 + _outputFolderPath: Captures + _filenamePrefix: Webcam + _appendFilenameTimestamp: 1 + _allowManualFileExtension: 0 + _filenameExtension: mp4 + _namedPipePath: \\.\pipe\test_pipe + _imageSequenceStartFrame: 0 + _imageSequenceZeroDigits: 6 + _imageSequenceFormatWindows: 0 + _imageSequenceFormatMacOS: 0 + _imageSequenceFormatIOS: 0 + _renderResolution: 18 + _renderSize: {x: 1, y: 1} + _renderAntiAliasing: -1 + _useMotionBlur: 0 + _motionBlurSamples: 16 + _motionBlurCameras: [] + _motionBlur: {fileID: 0} + _allowVSyncDisable: 1 + _supportTextureRecreate: 0 + _minimumDiskSpaceMB: -1 + _manualUpdate: 0 +--- !u!114 &1774798097 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1774798094} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca3e27221be35d41a4ff608f4ef327e, type: 3} + m_Name: + m_EditorClassIdentifier: + _movieCapture: {fileID: 1774798095} + _showUI: 0 + _whenRecordingAutoHideUI: 0 + _guiSkin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2} +--- !u!4 &1774798102 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1774798094} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo02-WebcamCapture.unity.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo02-WebcamCapture.unity.meta new file mode 100644 index 0000000..6190d35 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo02-WebcamCapture.unity.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 6ba0f3c85855c684db1ca2bfaa26058a diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo03-CameraCapture.unity b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo03-CameraCapture.unity new file mode 100644 index 0000000..eace0a5 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo03-CameraCapture.unity @@ -0,0 +1,1832 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 8 + m_Fog: 0 + m_FogColor: {r: 0, g: 0, b: 0, a: 1} + m_FogMode: 1 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 30 + m_AmbientSkyColor: {r: 0.13333334, g: 0.13333334, b: 0.13333334, a: 1} + m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !u!196 &44 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666666 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &57653081 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139758, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 57653082} + - component: {fileID: 57653085} + - component: {fileID: 57653084} + - component: {fileID: 57653083} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &57653082 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439758, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 57653081} + m_LocalRotation: {x: 0.39540902, y: 0.12881501, z: 0.09649201, w: 0.9042941} + m_LocalPosition: {x: -6.67, y: 0, z: -7.116} + m_LocalScale: {x: 2.8360684, y: 2.8360674, z: 2.836067} + m_Children: [] + m_Father: {fileID: 836549264} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &57653083 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339758, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 57653081} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &57653084 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539758, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 57653081} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &57653085 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339758, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 57653081} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &150699434 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 150699435} + - component: {fileID: 150699436} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &150699435 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 150699434} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: 0, y: 1.725, z: 3} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 1546103908} + m_Father: {fileID: 972183057} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &150699436 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 150699434} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 0, g: 0.5448277, b: 1, a: 1} + m_Intensity: 1 + m_Range: 8.6 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 0.43 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &157719286 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 157719288} + - component: {fileID: 157719287} + m_Layer: 0 + m_Name: Demo + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &157719287 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 157719286} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3ba7f85d458d9d041a1180c7018b9d00, type: 3} + m_Name: + m_EditorClassIdentifier: + _audioBG: {fileID: 8300000, guid: 1ed2bddd186bb264eb42d8ac765accd4, type: 3} + _audioHit: {fileID: 8300000, guid: bec3644980842774db12d11690b0d916, type: 3} + _speed: 1 + _capture: {fileID: 0} + _guiSkin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2} + _spinCamera: 0 +--- !u!4 &157719288 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 157719286} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &170061456 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139772, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 170061457} + - component: {fileID: 170061460} + - component: {fileID: 170061459} + - component: {fileID: 170061458} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &170061457 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439772, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 170061456} + m_LocalRotation: {x: -0.41296893, y: 0.47651595, z: 0.19101897, w: 0.7522639} + m_LocalPosition: {x: -6.77, y: 0, z: 0} + m_LocalScale: {x: 2.580892, y: 2.580892, z: 2.5808926} + m_Children: [] + m_Father: {fileID: 836549264} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &170061458 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339772, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 170061456} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &170061459 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539772, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 170061456} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &170061460 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339772, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 170061456} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &316547562 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139770, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 316547563} + - component: {fileID: 316547566} + - component: {fileID: 316547565} + - component: {fileID: 316547564} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &316547563 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439770, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 316547562} + m_LocalRotation: {x: -0.40547207, y: -0.030918006, z: 0.07843501, w: 0.9102112} + m_LocalPosition: {x: -2.79, y: 0, z: 5.35} + m_LocalScale: {x: 2.4912324, y: 2.4912333, z: 2.491233} + m_Children: [] + m_Father: {fileID: 836549264} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &316547564 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339770, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 316547562} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &316547565 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539770, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 316547562} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &316547566 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339770, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 316547562} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &364076075 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 364076080} + - component: {fileID: 364076079} + - component: {fileID: 364076078} + - component: {fileID: 364076077} + - component: {fileID: 364076076} + m_Layer: 0 + m_Name: Spawners + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &364076076 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 364076075} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 1282998484} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!114 &364076077 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 364076075} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 584988785} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!114 &364076078 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 364076075} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 1546103908} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!114 &364076079 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 364076075} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 1538644350} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!4 &364076080 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 364076075} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &445750119 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 445750121} + - component: {fileID: 445750120} + m_Layer: 0 + m_Name: Capture Camera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!20 &445750120 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 445750119} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: 2 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!4 &445750121 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 445750119} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 14.7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!1 &532428963 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 532428964} + - component: {fileID: 532428965} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &532428964 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 532428963} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: -3, y: 1.725, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 1282998484} + m_Father: {fileID: 972183057} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &532428965 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 532428963} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 0, g: 1, b: 0.55710316, a: 1} + m_Intensity: 1 + m_Range: 8.6 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 0.43 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &584988784 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 584988785} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &584988785 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 584988784} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 1097632945} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &629393611 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139766, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 629393612} + - component: {fileID: 629393615} + - component: {fileID: 629393614} + - component: {fileID: 629393613} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &629393612 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439766, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 629393611} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 5.26, y: 0, z: 5.35} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 836549264} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &629393613 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339766, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 629393611} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &629393614 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539766, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 629393611} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &629393615 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339766, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 629393611} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &785157965 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139760, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 785157966} + - component: {fileID: 785157969} + - component: {fileID: 785157968} + - component: {fileID: 785157967} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &785157966 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439760, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 785157965} + m_LocalRotation: {x: 0.23617692, y: -0.16679496, z: -0.16363996, w: 0.9431977} + m_LocalPosition: {x: 0, y: 7.35, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 836549264} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &785157967 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339760, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 785157965} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &785157968 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539760, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 785157965} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &785157969 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339760, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 785157965} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &836549263 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 836549264} + m_Layer: 0 + m_Name: Cubes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &836549264 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 836549263} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 170061457} + - {fileID: 316547563} + - {fileID: 1870634450} + - {fileID: 629393612} + - {fileID: 1537767833} + - {fileID: 1416963386} + - {fileID: 785157966} + - {fileID: 57653082} + m_Father: {fileID: 972183057} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &972183056 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 972183057} + - component: {fileID: 972183060} + - component: {fileID: 972183059} + - component: {fileID: 972183058} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &972183057 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 972183056} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 2, y: 2, z: 2} + m_Children: + - {fileID: 2115622840} + - {fileID: 150699435} + - {fileID: 1097632945} + - {fileID: 532428964} + - {fileID: 836549264} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &972183058 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 972183056} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &972183059 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 972183056} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_InflateMesh: 0 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &972183060 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 972183056} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1097632944 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1097632945} + - component: {fileID: 1097632946} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1097632945 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1097632944} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: 3, y: 1.725, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 584988785} + m_Father: {fileID: 972183057} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &1097632946 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1097632944} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 0.94707537, g: 0, b: 1, a: 1} + m_Intensity: 1 + m_Range: 8.6 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 0.43 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &1274863199 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1274863201} + - component: {fileID: 1274863202} + - component: {fileID: 1274863200} + m_Layer: 0 + m_Name: Capture + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1274863200 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1274863199} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f41e58c74463edf43a9624fcdf483d19, type: 3} + m_Name: + m_EditorClassIdentifier: + _encoderHintsWindows: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _encoderHintsMacOS: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _encoderHintsIOS: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _captureKey: 0 + _isRealTime: 1 + _persistAcrossSceneLoads: 0 + _startTrigger: 0 + _startDelay: 0 + _startDelaySeconds: 0 + _stopMode: 0 + _stopFrames: 0 + _stopSeconds: 0 + _videoCodecPriorityWindows: + - H264 + - HEVC + - Lagarith Lossless Codec + - Uncompressed + - x264vfw - H.264/MPEG-4 AVC codec + - Xvid MPEG-4 Codec + _videoCodecPriorityMacOS: + - H264 + - HEVC + - Apple ProRes 422 + - Apple ProRes 4444 + _audioCodecPriorityWindows: + - AAC + - Uncompressed + _audioCodecPriorityMacOS: + - AAC + - FLAC + - Apple Lossless + - Linear PCM + - Uncompresssed + _frameRate: 30 + _timelapseScale: 1 + _frameUpdateMode: 0 + _downScale: 1 + _maxVideoSize: {x: 0, y: 0} + _forceVideoCodecIndexWindows: -1 + _forceVideoCodecIndexMacOS: 0 + _forceVideoCodecIndexIOS: 0 + _forceAudioCodecIndexWindows: -1 + _forceAudioCodecIndexMacOS: 0 + _forceAudioCodecIndexIOS: 0 + _flipVertically: 0 + _forceGpuFlush: 0 + _useWaitForEndOfFrame: 1 + _logCaptureStartStop: 1 + _audioCaptureSource: 0 + _unityAudioCapture: {fileID: 0} + _forceAudioInputDeviceIndex: 0 + _manualAudioSampleRate: 48000 + _manualAudioChannelCount: 2 + _outputTarget: 0 + _outputFolderType: 0 + _outputFolderPath: Captures + _filenamePrefix: MovieCapture + _appendFilenameTimestamp: 1 + _allowManualFileExtension: 0 + _filenameExtension: mp4 + _namedPipePath: \\.\pipe\test_pipe + _imageSequenceStartFrame: 0 + _imageSequenceZeroDigits: 6 + _imageSequenceFormatWindows: 0 + _imageSequenceFormatMacOS: 0 + _imageSequenceFormatIOS: 0 + _renderResolution: 18 + _renderSize: {x: 1, y: 1} + _renderAntiAliasing: -1 + _useMotionBlur: 0 + _motionBlurSamples: 16 + _motionBlurCameras: [] + _motionBlur: {fileID: 0} + _allowVSyncDisable: 1 + _supportTextureRecreate: 0 + _minimumDiskSpaceMB: -1 + _cameraSelector: {fileID: 1274863202} + _lastCamera: {fileID: 445750120} + _contribCameras: [] + _useContributingCameras: 1 + _includeSceneViewGizmos: 1 +--- !u!4 &1274863201 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1274863199} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1373988034} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1274863202 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1274863199} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dbfc4cbb9957c704f912cd32368f81dc, type: 3} + m_Name: + m_EditorClassIdentifier: + _selectBy: 0 + _scanFrequency: 2 + _scanHiddenCameras: 0 + _tag: MainCamera + _name: Main Camera + _camera: {fileID: 0} +--- !u!1 &1282998483 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1282998484} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1282998484 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1282998483} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 532428964} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1373988033 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1373988034} + - component: {fileID: 1373988035} + m_Layer: 0 + m_Name: GUI + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1373988034 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1373988033} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1274863201} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1373988035 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1373988033} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca3e27221be35d41a4ff608f4ef327e, type: 3} + m_Name: + m_EditorClassIdentifier: + _movieCapture: {fileID: 1274863200} + _showUI: 1 + _whenRecordingAutoHideUI: 0 + _guiSkin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2} +--- !u!1 &1416963385 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139762, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1416963386} + - component: {fileID: 1416963389} + - component: {fileID: 1416963388} + - component: {fileID: 1416963387} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1416963386 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439762, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1416963385} + m_LocalRotation: {x: 0.29325396, y: -0.18601899, z: -0.19839196, w: 0.9165368} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 836549264} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1416963387 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339762, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1416963385} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1416963388 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539762, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1416963385} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1416963389 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339762, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1416963385} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1537767832 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139764, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1537767833} + - component: {fileID: 1537767836} + - component: {fileID: 1537767835} + - component: {fileID: 1537767834} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1537767833 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439764, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1537767832} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.7, z: -7.12} + m_LocalScale: {x: 3.017974, y: 3.017975, z: 3.017975} + m_Children: [] + m_Father: {fileID: 836549264} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1537767834 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339764, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1537767832} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1537767835 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539764, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1537767832} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1537767836 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339764, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1537767832} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1538644349 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1538644350} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1538644350 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1538644349} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 2115622840} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1546103907 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1546103908} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1546103908 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1546103907} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 150699435} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1870634449 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139768, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1870634450} + - component: {fileID: 1870634453} + - component: {fileID: 1870634452} + - component: {fileID: 1870634451} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1870634450 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439768, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1870634449} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 5.26, y: 1.7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 836549264} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1870634451 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339768, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1870634449} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1870634452 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539768, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1870634449} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1870634453 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339768, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1870634449} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1939487726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1939487727} + - component: {fileID: 1939487729} + - component: {fileID: 1939487728} + m_Layer: 0 + m_Name: Collision Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1939487727 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1939487726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -1.7, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 2011284061} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!135 &1939487728 +SphereCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1939487726} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1939487729 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1939487726} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &2011284057 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2011284061} + - component: {fileID: 2011284060} + - component: {fileID: 2011284059} + m_Layer: 0 + m_Name: MainCamera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &2011284059 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2011284057} + m_Enabled: 1 +--- !u!20 &2011284060 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2011284057} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.01 + far clip plane: 30 + field of view: 70 + orthographic: 0 + orthographic size: 100 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!4 &2011284061 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2011284057} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1939487727} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2115622839 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2115622840} + - component: {fileID: 2115622841} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2115622840 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2115622839} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: 0, y: 1.65, z: -2.14} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 1538644350} + m_Father: {fileID: 972183057} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &2115622841 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2115622839} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 1, g: 0.6, b: 0, a: 1} + m_Intensity: 1 + m_Range: 8.6 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 0.43 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo03-CameraCapture.unity.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo03-CameraCapture.unity.meta new file mode 100644 index 0000000..42de6cf --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo03-CameraCapture.unity.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 092608d1cce5b7a4c961385358838689 diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo04-360Capture.unity b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo04-360Capture.unity new file mode 100644 index 0000000..4cab8fc --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo04-360Capture.unity @@ -0,0 +1,1726 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 8 + m_Fog: 0 + m_FogColor: {r: 0, g: 0, b: 0, a: 1} + m_FogMode: 1 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 30 + m_AmbientSkyColor: {r: 0.13333334, g: 0.13333334, b: 0.13333334, a: 1} + m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !u!1 &11 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 18} + - component: {fileID: 20} + - component: {fileID: 37} + m_Layer: 0 + m_Name: MainCamera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &18 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1311126200} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &20 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.01 + far clip plane: 30 + field of view: 70 + orthographic: 0 + orthographic size: 100 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &37 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 11} + m_Enabled: 1 +--- !u!196 &44 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666666 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &325417972 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139760, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 325417973} + - component: {fileID: 325417976} + - component: {fileID: 325417975} + - component: {fileID: 325417974} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &325417973 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439760, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 325417972} + m_LocalRotation: {x: 0.23617692, y: -0.16679496, z: -0.16363996, w: 0.9431977} + m_LocalPosition: {x: 0, y: 7.35, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1669314328} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &325417974 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339760, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 325417972} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &325417975 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539760, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 325417972} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &325417976 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339760, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 325417972} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &685358251 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 685358252} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &685358252 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 685358251} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 1648220146} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &742673301 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139762, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 742673302} + - component: {fileID: 742673305} + - component: {fileID: 742673304} + - component: {fileID: 742673303} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &742673302 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439762, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 742673301} + m_LocalRotation: {x: 0.29325396, y: -0.18601899, z: -0.19839196, w: 0.9165368} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1669314328} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &742673303 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339762, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 742673301} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &742673304 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539762, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 742673301} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &742673305 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339762, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 742673301} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &768453310 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139766, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 768453311} + - component: {fileID: 768453314} + - component: {fileID: 768453313} + - component: {fileID: 768453312} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &768453311 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439766, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 768453310} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 5.26, y: 0, z: 5.35} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1669314328} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &768453312 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339766, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 768453310} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &768453313 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539766, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 768453310} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &768453314 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339766, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 768453310} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &903593939 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 903593940} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &903593940 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 903593939} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 976384846} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &959015543 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 959015545} + - component: {fileID: 959015544} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &959015544 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 959015543} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 1, g: 0.6, b: 0, a: 1} + m_Intensity: 1 + m_Range: 8 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &959015545 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 959015543} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: 0, y: 1.65, z: -2.14} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 1120111222} + m_Father: {fileID: 1032825606} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &976384844 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 976384846} + - component: {fileID: 976384845} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &976384845 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 976384844} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 0.94707537, g: 0, b: 1, a: 1} + m_Intensity: 1 + m_Range: 8 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &976384846 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 976384844} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: 3, y: 1.725, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 903593940} + m_Father: {fileID: 1032825606} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1032825602 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1032825606} + - component: {fileID: 1032825605} + - component: {fileID: 1032825604} + - component: {fileID: 1032825603} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1032825603 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1032825602} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1032825604 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1032825602} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_InflateMesh: 0 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1032825605 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1032825602} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1032825606 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1032825602} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 2, y: 2, z: 2} + m_Children: + - {fileID: 959015545} + - {fileID: 1648220146} + - {fileID: 976384846} + - {fileID: 1124690941} + - {fileID: 1669314328} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1120111221 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1120111222} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1120111222 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1120111221} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 959015545} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1124690939 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1124690941} + - component: {fileID: 1124690940} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &1124690940 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1124690939} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 0, g: 1, b: 0.55710316, a: 1} + m_Intensity: 1 + m_Range: 8 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1124690941 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1124690939} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: -3, y: 1.725, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 1594685860} + m_Father: {fileID: 1032825606} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1139250486 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139758, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1139250487} + - component: {fileID: 1139250490} + - component: {fileID: 1139250489} + - component: {fileID: 1139250488} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1139250487 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439758, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1139250486} + m_LocalRotation: {x: 0.39540902, y: 0.12881501, z: 0.09649201, w: 0.9042941} + m_LocalPosition: {x: -6.67, y: 0, z: -7.116} + m_LocalScale: {x: 2.8360684, y: 2.8360674, z: 2.836067} + m_Children: [] + m_Father: {fileID: 1669314328} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1139250488 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339758, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1139250486} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1139250489 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539758, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1139250486} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1139250490 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339758, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1139250486} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1303178053 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139772, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1303178054} + - component: {fileID: 1303178057} + - component: {fileID: 1303178056} + - component: {fileID: 1303178055} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1303178054 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439772, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1303178053} + m_LocalRotation: {x: -0.41296893, y: 0.47651595, z: 0.19101897, w: 0.7522639} + m_LocalPosition: {x: -6.77, y: 0, z: 0} + m_LocalScale: {x: 2.580892, y: 2.580892, z: 2.5808926} + m_Children: [] + m_Father: {fileID: 1669314328} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1303178055 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339772, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1303178053} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1303178056 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539772, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1303178053} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1303178057 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339772, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1303178053} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1311126197 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1311126200} + - component: {fileID: 1311126199} + - component: {fileID: 1311126198} + m_Layer: 0 + m_Name: Collision Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!135 &1311126198 +SphereCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1311126197} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1311126199 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1311126197} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1311126200 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1311126197} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -1.7, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 18} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1389607881 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1389607883} + - component: {fileID: 1389607882} + - component: {fileID: 1389607884} + - component: {fileID: 1389607886} + - component: {fileID: 1389607885} + m_Layer: 0 + m_Name: Spawners + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1389607882 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1389607881} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 1120111222} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!4 &1389607883 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1389607881} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1389607884 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1389607881} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 685358252} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!114 &1389607885 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1389607881} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 1594685860} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!114 &1389607886 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1389607881} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 903593940} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!1 &1400191720 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139764, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1400191721} + - component: {fileID: 1400191724} + - component: {fileID: 1400191723} + - component: {fileID: 1400191722} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1400191721 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439764, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1400191720} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.7, z: -7.12} + m_LocalScale: {x: 3.017974, y: 3.017975, z: 3.017975} + m_Children: [] + m_Father: {fileID: 1669314328} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1400191722 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339764, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1400191720} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1400191723 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539764, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1400191720} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1400191724 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339764, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1400191720} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1589626818 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1589626819} + - component: {fileID: 1589626820} + m_Layer: 0 + m_Name: GUI + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1589626819 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1589626818} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1922093090} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1589626820 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1589626818} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca3e27221be35d41a4ff608f4ef327e, type: 3} + m_Name: + m_EditorClassIdentifier: + _movieCapture: {fileID: 1922093089} + _showUI: 1 + _whenRecordingAutoHideUI: 0 + _guiSkin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2} +--- !u!1 &1594685859 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1594685860} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1594685860 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1594685859} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 1124690941} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1648220144 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1648220146} + - component: {fileID: 1648220145} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &1648220145 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1648220144} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 0, g: 0.5448277, b: 1, a: 1} + m_Intensity: 1 + m_Range: 8 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1648220146 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1648220144} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: 0, y: 1.725, z: 3} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 685358252} + m_Father: {fileID: 1032825606} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1669314327 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1669314328} + m_Layer: 0 + m_Name: Cubes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1669314328 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1669314327} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 1303178054} + - {fileID: 1974371552} + - {fileID: 1904803575} + - {fileID: 768453311} + - {fileID: 1400191721} + - {fileID: 742673302} + - {fileID: 325417973} + - {fileID: 1139250487} + m_Father: {fileID: 1032825606} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1904803571 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139768, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1904803575} + - component: {fileID: 1904803574} + - component: {fileID: 1904803573} + - component: {fileID: 1904803572} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1904803572 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339768, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1904803571} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1904803573 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539768, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1904803571} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1904803574 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339768, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1904803571} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1904803575 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439768, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1904803571} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 5.26, y: 1.7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1669314328} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1922093088 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1922093090} + - component: {fileID: 1922093091} + - component: {fileID: 1922093089} + m_Layer: 0 + m_Name: Capture + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1922093089 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1922093088} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2f452da2383e6e24991a212542347f4b, type: 3} + m_Name: + m_EditorClassIdentifier: + _encoderHintsWindows: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _encoderHintsMacOS: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _encoderHintsIOS: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _captureKey: 0 + _isRealTime: 0 + _persistAcrossSceneLoads: 0 + _startTrigger: 1 + _startDelay: 0 + _startDelaySeconds: 0 + _stopMode: 3 + _stopFrames: 0 + _stopSeconds: 10 + _videoCodecPriorityWindows: + - H264 + - HEVC + - Lagarith Lossless Codec + - Uncompressed + - x264vfw - H.264/MPEG-4 AVC codec + - Xvid MPEG-4 Codec + _videoCodecPriorityMacOS: + - H264 + - HEVC + - Apple ProRes 422 + - Apple ProRes 4444 + _audioCodecPriorityWindows: + - AAC + - Uncompressed + _audioCodecPriorityMacOS: + - AAC + - FLAC + - Apple Lossless + - Linear PCM + - Uncompresssed + _frameRate: 30 + _timelapseScale: 1 + _frameUpdateMode: 0 + _downScale: 1 + _maxVideoSize: {x: 0, y: 0} + _forceVideoCodecIndexWindows: -1 + _forceVideoCodecIndexMacOS: 0 + _forceVideoCodecIndexIOS: 0 + _forceAudioCodecIndexWindows: -1 + _forceAudioCodecIndexMacOS: 0 + _forceAudioCodecIndexIOS: 0 + _flipVertically: 0 + _forceGpuFlush: 0 + _useWaitForEndOfFrame: 1 + _logCaptureStartStop: 1 + _audioCaptureSource: 0 + _unityAudioCapture: {fileID: 0} + _forceAudioInputDeviceIndex: 0 + _manualAudioSampleRate: 48000 + _manualAudioChannelCount: 2 + _outputTarget: 0 + _outputFolderType: 0 + _outputFolderPath: Captures + _filenamePrefix: 360Capture + _appendFilenameTimestamp: 1 + _allowManualFileExtension: 0 + _filenameExtension: mp4 + _namedPipePath: \\.\pipe\test_pipe + _imageSequenceStartFrame: 0 + _imageSequenceZeroDigits: 6 + _imageSequenceFormatWindows: 0 + _imageSequenceFormatMacOS: 0 + _imageSequenceFormatIOS: 0 + _renderResolution: 8 + _renderSize: {x: 1, y: 1} + _renderAntiAliasing: 4 + _useMotionBlur: 0 + _motionBlurSamples: 32 + _motionBlurCameras: [] + _motionBlur: {fileID: 0} + _allowVSyncDisable: 1 + _supportTextureRecreate: 0 + _minimumDiskSpaceMB: -1 + _cameraSelector: {fileID: 1922093091} + _cubemapResolution: 2048 + _cubemapDepth: 24 + _supportGUI: 0 + _supportCameraRotation: 0 + _onlyLeftRightRotation: 0 + _render180Degrees: 0 + _stereoRendering: 0 + _ipd: 0.064 + _camera: {fileID: 20} +--- !u!4 &1922093090 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1922093088} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1589626819} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1922093091 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1922093088} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dbfc4cbb9957c704f912cd32368f81dc, type: 3} + m_Name: + m_EditorClassIdentifier: + _selectBy: 1 + _scanFrequency: 2 + _scanHiddenCameras: 0 + _tag: MainCamera + _name: Main Camera + _camera: {fileID: 0} +--- !u!1 &1974371551 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139770, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1974371552} + - component: {fileID: 1974371555} + - component: {fileID: 1974371554} + - component: {fileID: 1974371553} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1974371552 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439770, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1974371551} + m_LocalRotation: {x: -0.40547207, y: -0.030918006, z: 0.07843501, w: 0.9102112} + m_LocalPosition: {x: -2.79, y: 0, z: 5.35} + m_LocalScale: {x: 2.4912324, y: 2.4912333, z: 2.491233} + m_Children: [] + m_Father: {fileID: 1669314328} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1974371553 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339770, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1974371551} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1974371554 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539770, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1974371551} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1974371555 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339770, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1974371551} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo04-360Capture.unity.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo04-360Capture.unity.meta new file mode 100644 index 0000000..517f070 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo04-360Capture.unity.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 12b616342e078604a85b24def8314313 +DefaultImporter: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo05-360CaptureODS.unity b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo05-360CaptureODS.unity new file mode 100644 index 0000000..d5006a5 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo05-360CaptureODS.unity @@ -0,0 +1,1723 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 8 + m_Fog: 0 + m_FogColor: {r: 0, g: 0, b: 0, a: 1} + m_FogMode: 1 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 30 + m_AmbientSkyColor: {r: 0.13333334, g: 0.13333334, b: 0.13333334, a: 1} + m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !u!196 &44 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666666 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &42500309 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 42500310} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &42500310 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 42500309} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 189163088} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &189163087 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 189163088} + - component: {fileID: 189163089} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &189163088 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 189163087} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: 0, y: 1.65, z: -2.14} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 42500310} + m_Father: {fileID: 243158725} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &189163089 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 189163087} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 1, g: 0.6, b: 0, a: 1} + m_Intensity: 1 + m_Range: 8 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &195645914 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139762, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 195645915} + - component: {fileID: 195645918} + - component: {fileID: 195645917} + - component: {fileID: 195645916} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &195645915 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439762, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 195645914} + m_LocalRotation: {x: 0.29325396, y: -0.18601899, z: -0.19839196, w: 0.9165368} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 452619351} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &195645916 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339762, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 195645914} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &195645917 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539762, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 195645914} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &195645918 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339762, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 195645914} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &243158724 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 243158725} + - component: {fileID: 243158728} + - component: {fileID: 243158727} + - component: {fileID: 243158726} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &243158725 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 243158724} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 2, y: 2, z: 2} + m_Children: + - {fileID: 189163088} + - {fileID: 259064435} + - {fileID: 1858924907} + - {fileID: 1339234358} + - {fileID: 452619351} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &243158726 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 243158724} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &243158727 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 243158724} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_InflateMesh: 0 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &243158728 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 243158724} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &259064434 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 259064435} + - component: {fileID: 259064436} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &259064435 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 259064434} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: 0, y: 1.725, z: 3} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 1184914989} + m_Father: {fileID: 243158725} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &259064436 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 259064434} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 0, g: 0.5448277, b: 1, a: 1} + m_Intensity: 1 + m_Range: 8 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &364363369 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139772, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 364363370} + - component: {fileID: 364363373} + - component: {fileID: 364363372} + - component: {fileID: 364363371} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &364363370 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439772, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 364363369} + m_LocalRotation: {x: -0.41296893, y: 0.47651595, z: 0.19101897, w: 0.7522639} + m_LocalPosition: {x: -6.77, y: 0, z: 0} + m_LocalScale: {x: 2.580892, y: 2.580892, z: 2.5808926} + m_Children: [] + m_Father: {fileID: 452619351} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &364363371 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339772, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 364363369} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &364363372 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539772, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 364363369} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &364363373 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339772, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 364363369} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &380221479 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139768, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 380221480} + - component: {fileID: 380221483} + - component: {fileID: 380221482} + - component: {fileID: 380221481} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &380221480 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439768, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 380221479} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 5.26, y: 1.7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 452619351} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &380221481 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339768, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 380221479} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &380221482 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539768, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 380221479} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &380221483 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339768, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 380221479} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &418073131 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139764, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 418073132} + - component: {fileID: 418073135} + - component: {fileID: 418073134} + - component: {fileID: 418073133} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &418073132 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439764, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 418073131} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.7, z: -7.12} + m_LocalScale: {x: 3.017974, y: 3.017975, z: 3.017975} + m_Children: [] + m_Father: {fileID: 452619351} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &418073133 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339764, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 418073131} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &418073134 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539764, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 418073131} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &418073135 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339764, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 418073131} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &429054475 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139766, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 429054476} + - component: {fileID: 429054479} + - component: {fileID: 429054478} + - component: {fileID: 429054477} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &429054476 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439766, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 429054475} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 5.26, y: 0, z: 5.35} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 452619351} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &429054477 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339766, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 429054475} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &429054478 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539766, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 429054475} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &429054479 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339766, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 429054475} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &452619350 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 452619351} + m_Layer: 0 + m_Name: Cubes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &452619351 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 452619350} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 364363370} + - {fileID: 1473191082} + - {fileID: 380221480} + - {fileID: 429054476} + - {fileID: 418073132} + - {fileID: 195645915} + - {fileID: 1599741404} + - {fileID: 925289415} + m_Father: {fileID: 243158725} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &506968977 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 506968978} + - component: {fileID: 506968980} + - component: {fileID: 506968979} + m_Layer: 0 + m_Name: Collision Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &506968978 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 506968977} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -1.7, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 1635225868} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!135 &506968979 +SphereCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 506968977} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &506968980 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 506968977} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &925289414 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139758, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 925289415} + - component: {fileID: 925289418} + - component: {fileID: 925289417} + - component: {fileID: 925289416} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &925289415 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439758, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 925289414} + m_LocalRotation: {x: 0.39540902, y: 0.12881501, z: 0.09649201, w: 0.9042941} + m_LocalPosition: {x: -6.67, y: 0, z: -7.116} + m_LocalScale: {x: 2.8360684, y: 2.8360674, z: 2.836067} + m_Children: [] + m_Father: {fileID: 452619351} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &925289416 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339758, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 925289414} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &925289417 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539758, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 925289414} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &925289418 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339758, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 925289414} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1098198077 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1098198079} + - component: {fileID: 1098198080} + - component: {fileID: 1098198078} + m_Layer: 0 + m_Name: Capture + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1098198078 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1098198077} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5945507e76c77da41ad8dd25ae6ac95c, type: 3} + m_Name: + m_EditorClassIdentifier: + _encoderHintsWindows: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _encoderHintsMacOS: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _encoderHintsIOS: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _captureKey: 0 + _isRealTime: 0 + _persistAcrossSceneLoads: 0 + _startTrigger: 0 + _startDelay: 0 + _startDelaySeconds: 0 + _stopMode: 0 + _stopFrames: 0 + _stopSeconds: 0 + _videoCodecPriorityWindows: + - H264 + - HEVC + - Lagarith Lossless Codec + - Uncompressed + - x264vfw - H.264/MPEG-4 AVC codec + - Xvid MPEG-4 Codec + _videoCodecPriorityMacOS: + - H264 + - HEVC + - Apple ProRes 422 + - Apple ProRes 4444 + _audioCodecPriorityWindows: + - AAC + - Uncompressed + _audioCodecPriorityMacOS: + - AAC + - FLAC + - Apple Lossless + - Linear PCM + - Uncompresssed + _frameRate: 30 + _timelapseScale: 1 + _downScale: 1 + _maxVideoSize: {x: 0, y: 0} + _forceVideoCodecIndexWindows: -1 + _forceVideoCodecIndexMacOS: 0 + _forceVideoCodecIndexIOS: 0 + _forceAudioCodecIndexWindows: -1 + _forceAudioCodecIndexMacOS: 0 + _forceAudioCodecIndexIOS: 0 + _flipVertically: 0 + _forceGpuFlush: 0 + _useWaitForEndOfFrame: 1 + _logCaptureStartStop: 1 + _audioCaptureSource: 0 + _unityAudioCapture: {fileID: 0} + _forceAudioInputDeviceIndex: 0 + _outputTarget: 0 + _outputFolderType: 0 + _outputFolderPath: Captures + _filenamePrefix: 360CaptureODS + _appendFilenameTimestamp: 1 + _allowManualFileExtension: 0 + _filenameExtension: mp4 + _namedPipePath: \\.\pipe\test_pipe + _imageSequenceStartFrame: 0 + _imageSequenceZeroDigits: 6 + _imageSequenceFormatWindows: 0 + _imageSequenceFormatMacOS: 0 + _imageSequenceFormatIOS: 0 + _renderResolution: 10 + _renderSize: {x: 1, y: 1} + _renderAntiAliasing: -1 + _useMotionBlur: 0 + _motionBlurSamples: 16 + _motionBlurCameras: [] + _motionBlur: {fileID: 0} + _allowVSyncDisable: 1 + _supportTextureRecreate: 0 + _minimumDiskSpaceMB: -1 + _settings: + camera: {fileID: 1635225866} + cameraSelector: {fileID: 1098198080} + render180Degrees: 0 + ipd: 0.064 + pixelSliceSize: 1 + paddingSize: 1 + cameraClearMode: 2 + cameraClearColor: {r: 0, g: 0, b: 0, a: 1} + cameraImageEffects: [] +--- !u!4 &1098198079 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1098198077} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1764208651} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1098198080 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1098198077} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dbfc4cbb9957c704f912cd32368f81dc, type: 3} + m_Name: + m_EditorClassIdentifier: + _selectBy: 0 + _scanFrequency: 2 + _scanHiddenCameras: 0 + _tag: MainCamera + _name: Main Camera + _camera: {fileID: 0} +--- !u!1 &1103730606 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1103730607} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1103730607 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1103730606} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 1858924907} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1184914988 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1184914989} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1184914989 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1184914988} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 259064435} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1219944751 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1219944752} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1219944752 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1219944751} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 1339234358} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1313583951 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1313583956} + - component: {fileID: 1313583955} + - component: {fileID: 1313583954} + - component: {fileID: 1313583953} + - component: {fileID: 1313583952} + m_Layer: 0 + m_Name: Spawners + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1313583952 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1313583951} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 1219944752} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!114 &1313583953 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1313583951} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 1103730607} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!114 &1313583954 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1313583951} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 1184914989} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!114 &1313583955 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1313583951} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 42500310} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!4 &1313583956 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1313583951} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1339234357 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1339234358} + - component: {fileID: 1339234359} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1339234358 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1339234357} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: -3, y: 1.725, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 1219944752} + m_Father: {fileID: 243158725} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &1339234359 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1339234357} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 0, g: 1, b: 0.55710316, a: 1} + m_Intensity: 1 + m_Range: 8 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &1473191081 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139770, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1473191082} + - component: {fileID: 1473191085} + - component: {fileID: 1473191084} + - component: {fileID: 1473191083} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1473191082 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439770, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1473191081} + m_LocalRotation: {x: -0.40547207, y: -0.030918006, z: 0.07843501, w: 0.9102112} + m_LocalPosition: {x: -2.79, y: 0, z: 5.35} + m_LocalScale: {x: 2.4912324, y: 2.4912333, z: 2.491233} + m_Children: [] + m_Father: {fileID: 452619351} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1473191083 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339770, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1473191081} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1473191084 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539770, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1473191081} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1473191085 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339770, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1473191081} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1599741403 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139760, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1599741404} + - component: {fileID: 1599741407} + - component: {fileID: 1599741406} + - component: {fileID: 1599741405} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1599741404 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439760, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1599741403} + m_LocalRotation: {x: 0.23617692, y: -0.16679496, z: -0.16363996, w: 0.9431977} + m_LocalPosition: {x: 0, y: 7.35, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 452619351} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1599741405 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339760, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1599741403} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1599741406 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539760, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1599741403} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1599741407 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339760, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1599741403} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1635225865 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1635225868} + - component: {fileID: 1635225866} + - component: {fileID: 1635225867} + m_Layer: 0 + m_Name: MainCamera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!20 &1635225866 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1635225865} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.01 + far clip plane: 30 + field of view: 70 + orthographic: 0 + orthographic size: 100 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &1635225867 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1635225865} + m_Enabled: 1 +--- !u!4 &1635225868 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1635225865} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 506968978} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1764208650 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1764208651} + - component: {fileID: 1764208652} + m_Layer: 0 + m_Name: GUI + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1764208651 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1764208650} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1098198079} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1764208652 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1764208650} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca3e27221be35d41a4ff608f4ef327e, type: 3} + m_Name: + m_EditorClassIdentifier: + _movieCapture: {fileID: 1098198078} + _showUI: 1 + _whenRecordingAutoHideUI: 0 + _guiSkin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2} +--- !u!1 &1858924906 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1858924907} + - component: {fileID: 1858924908} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1858924907 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1858924906} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: 3, y: 1.725, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 1103730607} + m_Father: {fileID: 243158725} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &1858924908 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1858924906} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 0.94707537, g: 0, b: 1, a: 1} + m_Intensity: 1 + m_Range: 8 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo05-360CaptureODS.unity.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo05-360CaptureODS.unity.meta new file mode 100644 index 0000000..f585be9 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo05-360CaptureODS.unity.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: a59b6804fb7f20947abe5bbece9bb4f1 +DefaultImporter: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo06-TransparentCapture.unity b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo06-TransparentCapture.unity new file mode 100644 index 0000000..9b26dab --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo06-TransparentCapture.unity @@ -0,0 +1,1733 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 8 + m_Fog: 0 + m_FogColor: {r: 0, g: 0, b: 0, a: 1} + m_FogMode: 1 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 30 + m_AmbientSkyColor: {r: 0.13333334, g: 0.13333334, b: 0.13333334, a: 1} + m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !u!196 &44 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666666 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &210084866 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139766, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 210084867} + - component: {fileID: 210084870} + - component: {fileID: 210084869} + - component: {fileID: 210084868} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &210084867 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439766, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 210084866} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 5.26, y: 0, z: 5.35} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 255525435} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &210084868 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339766, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 210084866} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &210084869 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539766, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 210084866} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &210084870 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339766, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 210084866} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &255525434 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 255525435} + m_Layer: 0 + m_Name: Cubes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &255525435 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 255525434} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 784270940} + - {fileID: 1429328105} + - {fileID: 1227586381} + - {fileID: 210084867} + - {fileID: 959990205} + - {fileID: 543656998} + - {fileID: 1719954924} + - {fileID: 1214233340} + m_Father: {fileID: 1042235714} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &275683098 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 275683099} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &275683099 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 275683098} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 1192455680} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &298846121 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 298846122} + - component: {fileID: 298846123} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &298846122 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 298846121} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: -3, y: 1.725, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 1299250426} + m_Father: {fileID: 1042235714} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &298846123 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 298846121} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 0, g: 1, b: 0.55710316, a: 1} + m_Intensity: 1 + m_Range: 8 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &492689470 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 492689471} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &492689471 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 492689470} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 1969391705} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &500758922 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 500758923} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &500758923 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 500758922} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 1186319434} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &543656997 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139762, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 543656998} + - component: {fileID: 543657001} + - component: {fileID: 543657000} + - component: {fileID: 543656999} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &543656998 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439762, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 543656997} + m_LocalRotation: {x: 0.29325396, y: -0.18601899, z: -0.19839196, w: 0.9165368} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 255525435} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &543656999 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339762, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 543656997} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 10302, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &543657000 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539762, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 543656997} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &543657001 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339762, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 543656997} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &784270939 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139772, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 784270940} + - component: {fileID: 784270943} + - component: {fileID: 784270942} + - component: {fileID: 784270941} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &784270940 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439772, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 784270939} + m_LocalRotation: {x: -0.41296893, y: 0.47651595, z: 0.19101897, w: 0.7522639} + m_LocalPosition: {x: -6.77, y: 0, z: 0} + m_LocalScale: {x: 2.580892, y: 2.580892, z: 2.5808926} + m_Children: [] + m_Father: {fileID: 255525435} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &784270941 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339772, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 784270939} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &784270942 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539772, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 784270939} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &784270943 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339772, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 784270939} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &959990204 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139764, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 959990205} + - component: {fileID: 959990208} + - component: {fileID: 959990207} + - component: {fileID: 959990206} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &959990205 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439764, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 959990204} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.7, z: -7.12} + m_LocalScale: {x: 3.017974, y: 3.017975, z: 3.017975} + m_Children: [] + m_Father: {fileID: 255525435} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &959990206 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339764, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 959990204} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &959990207 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539764, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 959990204} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &959990208 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339764, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 959990204} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1042235713 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1042235714} + - component: {fileID: 1042235717} + - component: {fileID: 1042235716} + - component: {fileID: 1042235715} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1042235714 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1042235713} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 2, y: 2, z: 2} + m_Children: + - {fileID: 1969391705} + - {fileID: 1192455680} + - {fileID: 1186319434} + - {fileID: 298846122} + - {fileID: 255525435} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1042235715 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1042235713} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &1042235716 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1042235713} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_InflateMesh: 0 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1042235717 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1042235713} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1186319433 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1186319434} + - component: {fileID: 1186319435} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1186319434 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1186319433} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: 3, y: 1.725, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 500758923} + m_Father: {fileID: 1042235714} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &1186319435 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1186319433} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 0.94707537, g: 0, b: 1, a: 1} + m_Intensity: 1 + m_Range: 8 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &1192455679 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1192455680} + - component: {fileID: 1192455681} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1192455680 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1192455679} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: 0, y: 1.725, z: 3} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 275683099} + m_Father: {fileID: 1042235714} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &1192455681 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1192455679} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 0, g: 0.5448277, b: 1, a: 1} + m_Intensity: 1 + m_Range: 8 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &1214233339 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139758, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1214233340} + - component: {fileID: 1214233343} + - component: {fileID: 1214233342} + - component: {fileID: 1214233341} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1214233340 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439758, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1214233339} + m_LocalRotation: {x: 0.39540902, y: 0.12881501, z: 0.09649201, w: 0.9042941} + m_LocalPosition: {x: -6.67, y: 0, z: -7.116} + m_LocalScale: {x: 2.8360684, y: 2.8360674, z: 2.836067} + m_Children: [] + m_Father: {fileID: 255525435} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1214233341 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339758, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1214233339} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1214233342 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539758, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1214233339} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1214233343 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339758, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1214233339} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1227586380 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139768, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1227586381} + - component: {fileID: 1227586384} + - component: {fileID: 1227586383} + - component: {fileID: 1227586382} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1227586381 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439768, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1227586380} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 5.26, y: 1.7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 255525435} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1227586382 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339768, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1227586380} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1227586383 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539768, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1227586380} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1227586384 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339768, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1227586380} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1299250425 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1299250426} + m_Layer: 0 + m_Name: Spawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1299250426 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1299250425} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 298846122} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1310889871 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1310889872} + - component: {fileID: 1310889874} + - component: {fileID: 1310889873} + m_Layer: 0 + m_Name: Collision Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1310889872 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1310889871} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -1.7, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 1608400533} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!135 &1310889873 +SphereCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1310889871} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1310889874 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1310889871} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1429328104 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139770, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1429328105} + - component: {fileID: 1429328108} + - component: {fileID: 1429328107} + - component: {fileID: 1429328106} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1429328105 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439770, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1429328104} + m_LocalRotation: {x: -0.40547207, y: -0.030918006, z: 0.07843501, w: 0.9102112} + m_LocalPosition: {x: -2.79, y: 0, z: 5.35} + m_LocalScale: {x: 2.4912324, y: 2.4912333, z: 2.491233} + m_Children: [] + m_Father: {fileID: 255525435} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1429328106 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339770, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1429328104} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1429328107 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539770, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1429328104} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1429328108 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339770, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1429328104} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1608400530 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1608400533} + - component: {fileID: 1608400531} + - component: {fileID: 1608400532} + m_Layer: 0 + m_Name: MainCamera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!20 &1608400531 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1608400530} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.01 + far clip plane: 30 + field of view: 70 + orthographic: 0 + orthographic size: 100 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &1608400532 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1608400530} + m_Enabled: 1 +--- !u!4 &1608400533 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1608400530} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1310889872} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1719954923 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 139760, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1719954924} + - component: {fileID: 1719954927} + - component: {fileID: 1719954926} + - component: {fileID: 1719954925} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1719954924 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 439760, guid: 30d7f2e996022854a821af90263b65d9, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1719954923} + m_LocalRotation: {x: 0.23617692, y: -0.16679496, z: -0.16363996, w: 0.9431977} + m_LocalPosition: {x: 0, y: 7.35, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 255525435} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1719954925 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2339760, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1719954923} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: f663b5cc3e742024b902055797e3957c, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &1719954926 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 6539760, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1719954923} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1719954927 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 3339760, guid: 30d7f2e996022854a821af90263b65d9, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1719954923} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1778259730 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1778259735} + - component: {fileID: 1778259734} + - component: {fileID: 1778259733} + - component: {fileID: 1778259732} + - component: {fileID: 1778259731} + m_Layer: 0 + m_Name: Spawners + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1778259731 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1778259730} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 1299250426} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!114 &1778259732 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1778259730} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 500758923} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!114 &1778259733 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1778259730} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 275683099} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!114 &1778259734 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1778259730} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 414b748b3f9089641bbcd64644cba905, type: 3} + m_Name: + m_EditorClassIdentifier: + _spawnPoint: {fileID: 492689471} + _cubePrefab: {fileID: 102934, guid: 08f87e0910df635498ae10bedcb85aab, type: 2} + _spawn: 1 +--- !u!4 &1778259735 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1778259730} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1806220192 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1806220194} + - component: {fileID: 1806220195} + - component: {fileID: 1806220193} + m_Layer: 0 + m_Name: Capture + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1806220193 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1806220192} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f41e58c74463edf43a9624fcdf483d19, type: 3} + m_Name: + m_EditorClassIdentifier: + _encoderHintsWindows: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 1 + useHardwareEncoding: 1 + injectStereoPacking: 1 + stereoPacking: 0 + injectSphericalVideoLayout: 1 + sphericalVideoLayout: 0 + imageHints: + quality: 0.85 + supportTransparency: 1 + _encoderHintsMacOS: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 1 + useHardwareEncoding: 1 + injectStereoPacking: 1 + stereoPacking: 0 + injectSphericalVideoLayout: 1 + sphericalVideoLayout: 0 + imageHints: + quality: 0.85 + supportTransparency: 1 + _encoderHintsIOS: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 1 + useHardwareEncoding: 1 + injectStereoPacking: 1 + stereoPacking: 0 + injectSphericalVideoLayout: 1 + sphericalVideoLayout: 0 + imageHints: + quality: 0.85 + supportTransparency: 1 + _captureKey: 0 + _isRealTime: 1 + _persistAcrossSceneLoads: 0 + _startTrigger: 0 + _startDelay: 0 + _startDelaySeconds: 0 + _stopMode: 0 + _stopFrames: 0 + _stopSeconds: 0 + _videoCodecPriorityWindows: + - Lagarith Lossless Codec + - Uncompressed + - H264 + - HEVC + - x264vfw - H.264/MPEG-4 AVC codec + - Xvid MPEG-4 Codec + _videoCodecPriorityMacOS: + - H264 + - HEVC + - Apple ProRes 422 + - Apple ProRes 4444 + _audioCodecPriorityWindows: + - AAC + - Uncompressed + _audioCodecPriorityMacOS: + - AAC + - FLAC + - Apple Lossless + - Linear PCM + - Uncompresssed + _frameRate: 30 + _timelapseScale: 1 + _frameUpdateMode: 0 + _downScale: 1 + _maxVideoSize: {x: 0, y: 0} + _forceVideoCodecIndexWindows: -1 + _forceVideoCodecIndexMacOS: 1 + _forceVideoCodecIndexIOS: 1 + _forceAudioCodecIndexWindows: -1 + _forceAudioCodecIndexMacOS: 0 + _forceAudioCodecIndexIOS: 0 + _flipVertically: 0 + _forceGpuFlush: 0 + _useWaitForEndOfFrame: 1 + _logCaptureStartStop: 1 + _audioCaptureSource: 0 + _unityAudioCapture: {fileID: 0} + _forceAudioInputDeviceIndex: 0 + _manualAudioSampleRate: 48000 + _manualAudioChannelCount: 2 + _outputTarget: 0 + _outputFolderType: 0 + _outputFolderPath: Captures + _filenamePrefix: TransparentCapture + _appendFilenameTimestamp: 1 + _allowManualFileExtension: 0 + _filenameExtension: mp4 + _namedPipePath: \\.\pipe\test_pipe + _imageSequenceStartFrame: 0 + _imageSequenceZeroDigits: 6 + _imageSequenceFormatWindows: 0 + _imageSequenceFormatMacOS: 0 + _imageSequenceFormatIOS: 0 + _renderResolution: 18 + _renderSize: {x: 1, y: 1} + _renderAntiAliasing: -1 + _useMotionBlur: 0 + _motionBlurSamples: 16 + _motionBlurCameras: [] + _motionBlur: {fileID: 0} + _allowVSyncDisable: 1 + _supportTextureRecreate: 0 + _minimumDiskSpaceMB: -1 + _cameraSelector: {fileID: 1806220195} + _lastCamera: {fileID: 1608400531} + _contribCameras: [] + _useContributingCameras: 1 + _includeSceneViewGizmos: 1 +--- !u!4 &1806220194 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1806220192} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 2036856919} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1806220195 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1806220192} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dbfc4cbb9957c704f912cd32368f81dc, type: 3} + m_Name: + m_EditorClassIdentifier: + _selectBy: 0 + _scanFrequency: 2 + _scanHiddenCameras: 0 + _tag: MainCamera + _name: Main Camera + _camera: {fileID: 0} +--- !u!1 &1969391704 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1969391705} + - component: {fileID: 1969391706} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1969391705 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1969391704} + m_LocalRotation: {x: 0.7378247, y: 0, z: 0, w: 0.67499244} + m_LocalPosition: {x: 0, y: 1.65, z: -2.14} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 492689471} + m_Father: {fileID: 1042235714} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &1969391706 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1969391704} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 2 + m_Color: {r: 1, g: 0.6, b: 0, a: 1} + m_Intensity: 1 + m_Range: 8 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &2036856918 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2036856919} + - component: {fileID: 2036856920} + m_Layer: 0 + m_Name: GUI + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2036856919 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2036856918} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1806220194} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &2036856920 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2036856918} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca3e27221be35d41a4ff608f4ef327e, type: 3} + m_Name: + m_EditorClassIdentifier: + _movieCapture: {fileID: 1806220193} + _showUI: 1 + _whenRecordingAutoHideUI: 0 + _guiSkin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo06-TransparentCapture.unity.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo06-TransparentCapture.unity.meta new file mode 100644 index 0000000..a766bad --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo06-TransparentCapture.unity.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: d9796adb67791004f8de331385c2ebe5 +DefaultImporter: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo07-AmbisonicAudio.unity b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo07-AmbisonicAudio.unity new file mode 100644 index 0000000..03d7dd1 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo07-AmbisonicAudio.unity @@ -0,0 +1,798 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 8 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 3 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &177080796 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 177080798} + - component: {fileID: 177080797} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &177080797 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 177080796} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &177080798 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 177080796} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &648885771 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 648885772} + - component: {fileID: 648885775} + - component: {fileID: 648885774} + - component: {fileID: 648885773} + m_Layer: 0 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &648885772 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 648885771} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 791625166} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &648885773 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 648885771} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!136 &648885774 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 648885771} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &648885775 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 648885771} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &791625161 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 791625166} + - component: {fileID: 791625165} + - component: {fileID: 791625162} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &791625162 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 791625161} + m_Enabled: 1 +--- !u!20 &791625165 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 791625161} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 100 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!4 &791625166 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 791625161} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 648885772} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &935719015 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 935719017} + - component: {fileID: 935719016} + m_Layer: 0 + m_Name: Demo + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &935719016 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 935719015} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d8148657fef7dab4e8414216aaa44cf8, type: 3} + m_Name: + m_EditorClassIdentifier: + _audioObjects: + - {fileID: 1884010177} + _audioSources: [] +--- !u!4 &935719017 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 935719015} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &993218520 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 993218522} + - component: {fileID: 993218521} + m_Layer: 0 + m_Name: Camera-PIP + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!20 &993218521 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 993218520} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0.2 + height: 0.2 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: 5 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!4 &993218522 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 993218520} + m_LocalRotation: {x: 0.1993598, y: -0, z: -0, w: 0.9799264} + m_LocalPosition: {x: 0, y: 1.28, z: -2.92} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 22.999, y: 0, z: 0} +--- !u!1 &1140585883 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1140585885} + - component: {fileID: 1140585884} + - component: {fileID: 1140585887} + - component: {fileID: 1140585886} + m_Layer: 0 + m_Name: Capture + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1140585884 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1140585883} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2f452da2383e6e24991a212542347f4b, type: 3} + m_Name: + m_EditorClassIdentifier: + _encoderHintsWindows: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 0 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _encoderHintsMacOS: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _encoderHintsIOS: + videoHints: + averageBitrate: 0 + maximumBitrate: 0 + quality: 1 + keyframeInterval: 0 + allowFastStartStreamingPostProcess: 1 + supportTransparency: 0 + useHardwareEncoding: 1 + imageHints: + quality: 0.85 + supportTransparency: 0 + _captureKey: 0 + _isRealTime: 1 + _persistAcrossSceneLoads: 0 + _startTrigger: 1 + _startDelay: 0 + _startDelaySeconds: 0 + _stopMode: 3 + _stopFrames: 0 + _stopSeconds: 12 + _videoCodecPriorityWindows: + - HEVC + - H264 + - Lagarith Lossless Codec + - Uncompressed + - x264vfw - H.264/MPEG-4 AVC codec + - Xvid MPEG-4 Codec + _videoCodecPriorityMacOS: + - H264 + - HEVC + - Apple ProRes 422 + - Apple ProRes 4444 + _audioCodecPriorityWindows: + - AAC + - Uncompressed + _audioCodecPriorityMacOS: + - AAC + - FLAC + - Apple Lossless + - Linear PCM + - Uncompresssed + _frameRate: 30 + _timelapseScale: 1 + _frameUpdateMode: 0 + _downScale: 1 + _maxVideoSize: {x: 0, y: 0} + _forceVideoCodecIndexWindows: -1 + _forceVideoCodecIndexMacOS: 0 + _forceVideoCodecIndexIOS: 0 + _forceAudioCodecIndexWindows: -1 + _forceAudioCodecIndexMacOS: 0 + _forceAudioCodecIndexIOS: 0 + _flipVertically: 0 + _forceGpuFlush: 0 + _useWaitForEndOfFrame: 1 + _logCaptureStartStop: 1 + _audioCaptureSource: 0 + _unityAudioCapture: {fileID: 0} + _forceAudioInputDeviceIndex: 0 + _manualAudioSampleRate: 48000 + _manualAudioChannelCount: 4 + _outputTarget: 0 + _outputFolderType: 0 + _outputFolderPath: Captures + _filenamePrefix: proxy360 + _appendFilenameTimestamp: 0 + _allowManualFileExtension: 0 + _filenameExtension: mp4 + _namedPipePath: \\.\pipe\test_pipe + _imageSequenceStartFrame: 0 + _imageSequenceZeroDigits: 6 + _imageSequenceFormatWindows: 0 + _imageSequenceFormatMacOS: 0 + _imageSequenceFormatIOS: 0 + _renderResolution: 15 + _renderSize: {x: 1, y: 1} + _renderAntiAliasing: -1 + _useMotionBlur: 0 + _motionBlurSamples: 16 + _motionBlurCameras: [] + _motionBlur: {fileID: 0} + _allowVSyncDisable: 1 + _supportTextureRecreate: 0 + _minimumDiskSpaceMB: -1 + _cameraSelector: {fileID: 0} + _cubemapResolution: 256 + _cubemapDepth: 24 + _supportGUI: 0 + _supportCameraRotation: 0 + _onlyLeftRightRotation: 0 + _render180Degrees: 0 + _stereoRendering: 0 + _ipd: 0.064 + _camera: {fileID: 791625165} +--- !u!4 &1140585885 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1140585883} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1.243124, y: -0.125, z: 0.70754045} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1140585886 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1140585883} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d496180929275434c90b945a345cbaa2, type: 3} + m_Name: + m_EditorClassIdentifier: + _capture: {fileID: 1140585884} + _order: 3 + _format: 1 + _filename: output.wav + _bufferCount: 16 +--- !u!114 &1140585887 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1140585883} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7ca3e27221be35d41a4ff608f4ef327e, type: 3} + m_Name: + m_EditorClassIdentifier: + _movieCapture: {fileID: 1140585884} + _showUI: 1 + _whenRecordingAutoHideUI: 0 + _guiSkin: {fileID: 11400000, guid: eb821627fb1a0c044a6fd7a6dabe3147, type: 2} +--- !u!1 &1884010172 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1884010177} + - component: {fileID: 1884010176} + - component: {fileID: 1884010175} + - component: {fileID: 1884010174} + - component: {fileID: 1884010173} + m_Layer: 0 + m_Name: AudioObject-Insect1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &1884010173 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1884010172} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1884010174 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1884010172} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 10302, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!114 &1884010175 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1884010172} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7fb5927f10eb767468d3bb55a913ed3b, type: 3} + m_Name: + m_EditorClassIdentifier: + _sink: {fileID: 1140585886} + _listener: {fileID: 791625166} +--- !u!82 &1884010176 +AudioSource: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1884010172} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 8300000, guid: 764908f8332f02340b72e3010f4a3a2e, type: 3} + m_PlayOnAwake: 1 + m_Volume: 0.398 + m_Pitch: 1 + Loop: 1 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 2 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.5 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 +--- !u!4 &1884010177 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1884010172} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 2} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo07-AmbisonicAudio.unity.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo07-AmbisonicAudio.unity.meta new file mode 100644 index 0000000..e466716 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scenes/Demo07-AmbisonicAudio.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 53aebdd36b29c09468b985f749fa0d2f +timeCreated: 1606666929 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts.meta new file mode 100644 index 0000000..2905e01 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 2693fb63d67b5cd4ba2b8e89fe16bcd1 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/AmbisonicAudioDemo.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/AmbisonicAudioDemo.cs new file mode 100644 index 0000000..295f5be --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/AmbisonicAudioDemo.cs @@ -0,0 +1,79 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Demos +{ + public class AmbisonicAudioDemo : MonoBehaviour + { + [SerializeField] Transform[] _audioObjects = null; + [SerializeField] AudioSource[] _audioSources = null; + + struct Instance + { + float x, y, z; + float radius; + } + + private int index; + //private List _instances = new List(4); + + /*void Start() + { + foreach (Transform t in _audioObjects) + { + Instance instance = new Instance(); + instance.radius = Random.Range(0.5f, 2f); + instance.x = Random.Range(0f, 100f); + instance.y = Random.Range(0f, 100f); + instance.z = Random.Range(0f, 100f); + _instances.Add(instance); + } + }*/ + + void Update() + { + float[] samples = new float[4]; + foreach (AudioSource audio in _audioSources) + { + audio.GetOutputData(samples, 0); + float sample = Mathf.Abs(samples[2]); + sample = Mathf.Sqrt(sample); + float scale = audio.gameObject.transform.localScale.x; + //audio.GetSpectrumData(samples, 0, FFTWindow.Hanning); + + scale = 0.15f + Mathf.Lerp(scale, sample, Time.deltaTime * 20f) * 0.85f; + audio.gameObject.transform.localScale = Vector3.one * scale; + } + + int index = 0; + foreach (Transform t in _audioObjects) + { + //Vector3 v = axes[index % axes.Length]; + //t.RotateAround(Vector3.zero, Vector3.up, 40 * Time.deltaTime); + //Quaternion q = Quaternion.Euler(0f, Time.timeSinceLevelLoad * 50f, 0f); + //Matrix4x4.TRS(Vector3) + + float time = Time.timeSinceLevelLoad + index * 1.321f; + float tt = Mathf.PingPong(Mathf.Sin(time * 2.23f) + 1f, 2f) / 2f; + float r = Mathf.Lerp(0.5f, 3f, tt); + float x = Mathf.Sin(time * 1f) * r; + float z = Mathf.Cos(time * 1.13f) * r; + float y = Mathf.Sin(time * 1.23f) * 1f; + + + //Vector3 v = t.position.normalized * r; + + t.position = new Vector3(x, y, z); + + //t.position = new Vector3(t.position.x, y, t.position.z); + index++; + } + + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/AmbisonicAudioDemo.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/AmbisonicAudioDemo.cs.meta new file mode 100644 index 0000000..1090603 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/AmbisonicAudioDemo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d8148657fef7dab4e8414216aaa44cf8 +timeCreated: 1606667340 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/ScreenCaptureDemo.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/ScreenCaptureDemo.cs new file mode 100644 index 0000000..832baa7 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/ScreenCaptureDemo.cs @@ -0,0 +1,217 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Demos +{ + public class ScreenCaptureDemo : MonoBehaviour + { + [SerializeField] AudioClip _audioBG = null; + [SerializeField] AudioClip _audioHit = null; + [SerializeField] float _speed = 1.0f; + [SerializeField] CaptureBase _capture = null; + [SerializeField] GUISkin _guiSkin = null; + [SerializeField] bool _spinCamera = true; + + // State + private float _timer; + private List _fileWritingHandlers = new List(4); + + private IEnumerator Start() + { +#if UNITY_IOS + Application.targetFrameRate = 60; +#endif + // Play music track + if (_audioBG != null) + { + // AudioSource.PlayClipAtPoint(_audioBG, Vector3.zero); + AudioSource source = gameObject.AddComponent(); + source.clip = _audioBG; + source.loop = true; + source.Play(); + } + if (_capture != null) + { + _capture.BeginFinalFileWritingAction += OnBeginFinalFileWriting; + _capture.CompletedFileWritingAction += OnCompleteFinalFileWriting; + +#if (UNITY_STANDALONE_OSX || UNITY_IOS) && !UNITY_EDITOR + CaptureBase.PhotoLibraryAccessLevel photoLibraryAccessLevel = CaptureBase.PhotoLibraryAccessLevel.AddOnly; + + // If we're trying to write to the photo library, make sure we have permission + if (_capture.OutputFolder == CaptureBase.OutputPath.PhotoLibrary) + { + // Album creation (album name is taken from the output folder path) requires read write access. + if (_capture.OutputFolderPath != null && _capture.OutputFolderPath.Length > 0) + photoLibraryAccessLevel = CaptureBase.PhotoLibraryAccessLevel.ReadWrite; + + switch (CaptureBase.HasUserAuthorisationToAccessPhotos(photoLibraryAccessLevel)) + { + case CaptureBase.PhotoLibraryAuthorisationStatus.Authorised: + // All good, nothing to do + break; + + case CaptureBase.PhotoLibraryAuthorisationStatus.Unavailable: + Debug.LogWarning("The photo library is unavailable, will use RelativeToPeristentData instead"); + _capture.OutputFolder = CaptureBase.OutputPath.RelativeToPeristentData; + break; + + case CaptureBase.PhotoLibraryAuthorisationStatus.Denied: + // User has denied access, change output path + Debug.LogWarning("User has denied access to the photo library, will use RelativeToPeristentData instead"); + _capture.OutputFolder = CaptureBase.OutputPath.RelativeToPeristentData; + break; + + case CaptureBase.PhotoLibraryAuthorisationStatus.NotDetermined: + // Need to ask permission + yield return CaptureBase.RequestUserAuthorisationToAccessPhotos(photoLibraryAccessLevel); + // Nested switch, everbodies favourite + switch (CaptureBase.HasUserAuthorisationToAccessPhotos(photoLibraryAccessLevel)) + { + case CaptureBase.PhotoLibraryAuthorisationStatus.Authorised: + // All good, nothing to do + break; + + case CaptureBase.PhotoLibraryAuthorisationStatus.Denied: + // User has denied access, change output path + Debug.LogWarning("User has denied access to the photo library, will use RelativeToPeristentData instead"); + _capture.OutputFolder = CaptureBase.OutputPath.RelativeToPeristentData; + break; + + case CaptureBase.PhotoLibraryAuthorisationStatus.NotDetermined: + // We were unable to request access for some reason, check the logs for any error information + Debug.LogWarning("Authorisation to access the photo library is still undetermined, will use RelativeToPeristentData instead"); + _capture.OutputFolder = CaptureBase.OutputPath.RelativeToPeristentData; + break; + } + break; + } + } +#endif + +#if UNITY_EDITOR_OSX || (!UNITY_EDITOR && (UNITY_STANDALONE_OSX || UNITY_IOS || UNITY_ANDROID)) + // Make sure we're authorised for using the microphone. On iOS the OS will forcibly + // close the application if authorisation has not been granted. Make sure the + // "Microphone Usage Description" field has been filled in the player settings. + // Todo: handle late selection of microphone + if (_capture.AudioCaptureSource == AudioCaptureSource.Microphone) + { + Debug.Log("Checking user has authorization to use the Microphone"); + switch (CaptureBase.HasUserAuthorisationToCaptureAudio()) + { + case CaptureBase.AudioCaptureDeviceAuthorisationStatus.Unavailable: + Debug.LogWarning("Audio capture is unavailable, no audio will captured"); + break; + case CaptureBase.AudioCaptureDeviceAuthorisationStatus.NotDetermined: + Debug.Log("Audio capture status is not determined, requesting access"); + yield return CaptureBase.RequestAudioCaptureDeviceUserAuthorisation(); + switch (CaptureBase.HasUserAuthorisationToCaptureAudio()) + { + case CaptureBase.AudioCaptureDeviceAuthorisationStatus.Unavailable: + Debug.LogWarning("Audio capture is unavailable, no audio will captured"); + break; + + case CaptureBase.AudioCaptureDeviceAuthorisationStatus.NotDetermined: + Debug.LogWarning("Audio capture status is still not determined, no audio will captured"); + break; + + case CaptureBase.AudioCaptureDeviceAuthorisationStatus.Denied: + Debug.LogWarning("Audio capture status denied, no audio will be captured"); + break; + + case CaptureBase.AudioCaptureDeviceAuthorisationStatus.Authorised: + Debug.Log("Audio capture is authorised"); + break; + } + break; + case CaptureBase.AudioCaptureDeviceAuthorisationStatus.Denied: + Debug.LogWarning("Audio capture status denied, no audio will be captured"); + break; + case CaptureBase.AudioCaptureDeviceAuthorisationStatus.Authorised: + Debug.Log("Audio capture is authorised"); + break; + } + } +#endif + } + yield return null; + } + + private void OnBeginFinalFileWriting(FileWritingHandler handler) + { + _fileWritingHandlers.Add(handler); + } + + private void OnCompleteFinalFileWriting(FileWritingHandler handler) + { + Debug.Log("Completed capture '" + handler.Path + "' with status: " + handler.Status.ToString()); + } + + private void Update() + { + #if (!ENABLE_INPUT_SYSTEM || ENABLE_LEGACY_INPUT_MANAGER) + // Press the S key to trigger audio and background color change - useful for testing A/V sync +#if (UNITY_IOS || UNITY_ANDROID) && !UNITY_EDITOR + bool bTouch = (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Ended); + if (bTouch) +#else + if (Input.GetKeyDown(KeyCode.S)) +#endif + { + if (_audioHit != null && _capture != null && _capture.IsCapturing()) + { + AudioSource.PlayClipAtPoint(_audioHit, Vector3.zero); + Camera.main.backgroundColor = new Color(Random.value, Random.value, Random.value, 0); + } + } + + // ESC to stop capture and quit + if (Input.GetKeyDown(KeyCode.Escape)) + { + if (_capture != null && _capture.IsCapturing()) + { + _capture.StopCapture(); + } + else + { + Application.Quit(); + } + } + #endif + + // Spin the camera around + if (_spinCamera && Camera.main != null) + { + Camera.main.transform.RotateAround(Vector3.zero, Vector3.up, 20f * Time.deltaTime * _speed); + } + + if (FileWritingHandler.Cleanup(_fileWritingHandlers)) + { + if (_fileWritingHandlers.Count == 0) + { + Debug.Log("All pending file writes completed"); + } + } + } + + void OnDestroy() + { + foreach (FileWritingHandler handler in _fileWritingHandlers) + { + handler.Dispose(); + } + } + + private void OnGUI() + { + GUI.skin = _guiSkin; + Rect r = new Rect(Screen.width - 108, 64, 128, 28); + GUI.Label(r, "Frame " + Time.frameCount); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/ScreenCaptureDemo.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/ScreenCaptureDemo.cs.meta new file mode 100644 index 0000000..0bd10f3 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/ScreenCaptureDemo.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3ba7f85d458d9d041a1180c7018b9d00 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: -100 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/ScriptCaptureDemo.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/ScriptCaptureDemo.cs new file mode 100644 index 0000000..f251ee8 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/ScriptCaptureDemo.cs @@ -0,0 +1,100 @@ +using UnityEngine; +using System.Runtime.InteropServices; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Demos +{ + /// + /// Demo code to create and write frames manually into a movie using the low-level API via scripting + /// + public class ScriptCaptureDemo : MonoBehaviour + { + private const string X264CodecName = "x264vfw - H.264/MPEG-4 AVC codec"; + private const string FallbackCodecName = "Uncompressed"; + + /*[SerializeField] + private int _width = 512; + + [SerializeField] + private int _height = 512; + + [SerializeField] + private int _frameRate = 30; + + [SerializeField] + private string _filePath;*/ + + // State + private Codec _videoCodec; + private int _encoderHandle; + + private void Start() + { + if (NativePlugin.Init()) + { + // Find the index for the video codec + _videoCodec = CodecManager.FindCodec(CodecType.Video, X264CodecName); + if (_videoCodec == null) + { + _videoCodec = CodecManager.FindCodec(CodecType.Video, FallbackCodecName); + } + } + else + { + this.enabled = false; + } + } + + private void OnDestroy() + { + NativePlugin.Deinit(); + } + + public void CreateVideoFromByteArray(string filePath, int width, int height, int frameRate) + { + byte[] frameData = new byte[width * height * 4]; + GCHandle frameHandle = GCHandle.Alloc(frameData, GCHandleType.Pinned); + + // Start the recording session + int encoderHandle = NativePlugin.CreateRecorderVideo(filePath, (uint)width, (uint)height, frameRate, (int)NativePlugin.PixelFormat.RGBA32, false, false, _videoCodec.Index, AudioCaptureSource.None, 0, 0, -1, -1, true, null); + if (encoderHandle >= 0) + { + NativePlugin.Start(encoderHandle); + + // Write out 100 frames + int numFrames = 100; + for (int i = 0; i < numFrames; i++) + { + // TODO: fill the byte array with your own data :) + + + // Wait for the encoder to be ready for the next frame + int numAttempts = 32; + while (numAttempts > 0) + { + if (NativePlugin.IsNewFrameDue(encoderHandle)) + { + // Encode the new frame + NativePlugin.EncodeFrame(encoderHandle, frameHandle.AddrOfPinnedObject()); + break; + } + System.Threading.Thread.Sleep(1); + numAttempts--; + } + } + + // End the session + NativePlugin.Stop(encoderHandle, false); + NativePlugin.FreeRecorder(encoderHandle); + } + + if (frameHandle.IsAllocated) + { + frameHandle.Free(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/ScriptCaptureDemo.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/ScriptCaptureDemo.cs.meta new file mode 100644 index 0000000..5bc16b3 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/ScriptCaptureDemo.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6ebfd325dceeb4842b31e562ca753497 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/SurroundCaptureDemo.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/SurroundCaptureDemo.cs new file mode 100644 index 0000000..e0cd347 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/SurroundCaptureDemo.cs @@ -0,0 +1,81 @@ +using UnityEngine; +using System.Collections.Generic; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Demos +{ + /// + /// Spawns cube prefabs from a transform and removes them once they reach a maximum number + /// + public class SurroundCaptureDemo : MonoBehaviour + { + [SerializeField] Transform _spawnPoint = null; + [SerializeField] GameObject _cubePrefab = null; + [SerializeField] bool _spawn = true; + + private const int MaxCubes = 48; + private const float SpawnTime = 0.25f; + + // State + private float _timer = SpawnTime; + private List _cubes = new List(32); + + private void Update() + { + // Spawn cubes at a certain rate + _timer -= Time.deltaTime; + if (_timer <= 0f) + { + if (_spawn) + { + _timer = SpawnTime; + SpawnCube(); + } + + // Remove cubes when there are too many + if (_cubes.Count > MaxCubes || !_spawn) + { + RemoveCube(); + } + } + } + + private void SpawnCube() + { + Quaternion rotation = Quaternion.Euler(Random.Range(-180f, 180f), Random.Range(-180f, 180f), Random.Range(-180f, 180f)); + float scale = Random.Range(0.1f, 0.6f); + + GameObject go = (GameObject)GameObject.Instantiate(_cubePrefab, _spawnPoint.position, rotation); + Transform t = go.GetComponent(); + go.GetComponent().AddExplosionForce(10f, _spawnPoint.position, 5f, 0f, ForceMode.Impulse); + + //AddExplosionForce(float explosionForce, Vector3 explosionPosition, float explosionRadius, float upwardsModifier = 0.0F, ForceMode mode = ForceMode.Force); + t.localScale = new Vector3(scale * 2f, scale, scale * 2f); + t.SetParent(_spawnPoint); + _cubes.Add(go); + } + + private void RemoveCube() + { + if (_cubes.Count > 0) + { + // Remove the oldest cube + GameObject go = _cubes[0]; + + // Disabling the collider makes it fall through the floor - which is a neat way to hide its removal + go.GetComponent().enabled = false; + _cubes.RemoveAt(0); + StartCoroutine("KillCube", go); + } + } + + private System.Collections.IEnumerator KillCube(GameObject go) + { + yield return new WaitForSeconds(1.5f); + Destroy(go); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/SurroundCaptureDemo.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/SurroundCaptureDemo.cs.meta new file mode 100644 index 0000000..2482000 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/SurroundCaptureDemo.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 414b748b3f9089641bbcd64644cba905 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/TextureCaptureDemo.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/TextureCaptureDemo.cs new file mode 100644 index 0000000..81f15c8 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/TextureCaptureDemo.cs @@ -0,0 +1,70 @@ +using UnityEngine; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Demos +{ + /// + /// Animates a procedural texture effect driven by a shader + /// + public class TextureCaptureDemo : MonoBehaviour + { + [SerializeField] Shader _shader = null; + [SerializeField] int _textureWidth = 1024; + [SerializeField] int _textureHeight = 1024; + [SerializeField] CaptureFromTexture _movieCapture = null; + + // State + private Material _material; + private RenderTexture _texture; + + private void Start() + { + _material = new Material(_shader); + + _texture = new RenderTexture(_textureWidth, _textureHeight, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear); + _texture.filterMode = FilterMode.Bilinear; + _texture.Create(); + + if (_movieCapture) + { + _movieCapture.SetSourceTexture(_texture); + } + } + + private void OnDestroy() + { + if (_material != null) + { + Material.Destroy(_material); + _material = null; + } + if (_texture != null) + { + RenderTexture.Destroy(_texture); + _texture = null; + } + } + + private void Update() + { + UpdateTexture(); + } + + private void UpdateTexture() + { + Graphics.Blit(Texture2D.whiteTexture, _texture, _material); + } + + private void OnGUI() + { + if (_texture != null) + { + GUI.depth = 100; + GUI.DrawTexture(new Rect(0f, 0f, Screen.width, Screen.height), _texture, ScaleMode.ScaleToFit, false); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/TextureCaptureDemo.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/TextureCaptureDemo.cs.meta new file mode 100644 index 0000000..200c1e2 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/TextureCaptureDemo.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1f519d13df72fce439c800f34395deb7 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: -50 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/WebcamCaptureDemo.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/WebcamCaptureDemo.cs new file mode 100644 index 0000000..c484e8b --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/WebcamCaptureDemo.cs @@ -0,0 +1,220 @@ + +using UnityEngine; +using System.Collections; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Demos +{ + /// + /// Allows the user to select from a list of webcams and creates a capture instance for the webcam recording. + /// Currently only a single webcam can be captured at once. + /// + public class WebcamCaptureDemo : MonoBehaviour + { + #pragma warning disable 0414 // x is assigned but its value is never used + [SerializeField] GUISkin _skin = null; + [SerializeField] GameObject _prefab = null; + [SerializeField] int _webcamResolutionWidth = 640; + [SerializeField] int _webcamResolutionHeight = 480; + [SerializeField] int _webcamFrameRate = 30; + #pragma warning restore 0414 + +#if AVPRO_MOVIECAPTURE_WEBCAMTEXTURE_SUPPORT + + private class Instance + { + public string name; + public WebCamTexture texture; + public CaptureFromWebCamTexture capture; + public CaptureGUI gui; + } + + // State + private Instance[] _instances; + private int _selectedWebcamIndex = -1; + + private IEnumerator Start() + { + // Make sure we're authorised for using the camera. On iOS the OS will forcibly + // close the application if authorisation has not been granted. Make sure the + // "Camera Usage Description" field has been filled in the player settings. + // This needs to be done first otherwise no cameras will be reported. + if (!Application.HasUserAuthorization(UserAuthorization.WebCam)) + { + yield return Application.RequestUserAuthorization(UserAuthorization.WebCam); + } + + // Make sure we're authorised for using the microphone. On iOS the OS will forcibly + // close the application if authorisation has not been granted. Make sure the + // "Microphone Usage Description" field has been filled in the player settings. + // if (_capture.AudioCaptureSource == AudioCaptureSource.Microphone) + { + if (!Application.HasUserAuthorization(UserAuthorization.Microphone)) + { + yield return Application.RequestUserAuthorization(UserAuthorization.Microphone); + } + if (Application.HasUserAuthorization(UserAuthorization.Microphone)) + { + // On iOS modified the audio session to allow recording from the microphone. + NativePlugin.SetMicrophoneRecordingHint(true); + } + } + + // Create instance data per webcam + int numCams = WebCamTexture.devices.Length; + _instances = new Instance[numCams]; + for (int i = 0; i < numCams; i++) + { + GameObject go = (GameObject)GameObject.Instantiate(_prefab); + + Instance instance = new Instance(); + instance.name = WebCamTexture.devices[i].name; + instance.capture = go.GetComponent(); + instance.capture.FilenamePrefix = "Demo4Webcam-" + i; + instance.gui = go.GetComponent(); + instance.gui.ShowUI = false; + + _instances[i] = instance; + } + + if (numCams > 0) + { + SelectWebcam(0); + } + } + + private void StartWebcam(Instance instance) + { + // NOTE: WebcamTexture can be slow for high resolutions, this can cause issues with audio-video sync. + // Our plugins AVPro Live Camera or AVPro DeckLink can be used to capture high resolution devices + #if UNITY_2018_4_OR_NEWER + Debug.Log($"_webcamResolutionWidth: {_webcamResolutionWidth}, _webcamResolutionHeight: {_webcamResolutionHeight}, _webcamFrameRate: {_webcamFrameRate}"); + #endif + instance.texture = new WebCamTexture(instance.name, _webcamResolutionWidth, _webcamResolutionHeight, _webcamFrameRate); + instance.texture.Play(); + if (instance.texture.isPlaying) + { + instance.capture.WebCamTexture = instance.texture; + Debug.Log(string.Format("Running webcam in mode {0}x{1}", instance.texture.width, instance.texture.height)); + } + else + { + Debug.Log(string.Format("Unable to start webcam in mode {0}x{1}@{2}", _webcamResolutionWidth, _webcamResolutionHeight, _webcamFrameRate)); + StopWebcam(instance); + } + } + + private void StopWebcam(Instance instance) + { + if (instance.texture != null) + { + if (instance.capture != null && instance.capture.IsCapturing()) + { + instance.capture.WebCamTexture = null; + instance.capture.StopCapture(); + } + + instance.texture.Stop(); + Destroy(instance.texture); + instance.texture = null; + } + + _selectedWebcamIndex = -1; + } + + private void OnDestroy() + { + for (int i = 0; i < _instances.Length; i++) + { + StopWebcam(_instances[i]); + } + } + + private void SelectWebcam(int index) + { + // Stop any currently + if (_selectedWebcamIndex >= 0) + { + StopWebcam(_instances[_selectedWebcamIndex]); + _selectedWebcamIndex = -1; + } + + if (index >= 0) + { + _selectedWebcamIndex = index; + for (int j = 0; j < _instances.Length; j++) + { + _instances[j].gui.ShowUI = (j == _selectedWebcamIndex); + } + StartWebcam(_instances[_selectedWebcamIndex]); + } + } + + private void OnGUI() + { + GUI.skin = _skin; + GUILayout.BeginArea(new Rect(Screen.width - 512, 0, 512, Screen.height)); + GUILayout.BeginVertical(); + + GUILayout.Label("Select webcam:"); + + for (int i = 0; i < _instances.Length; i++) + { + Instance webcam = _instances[i]; + + GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true)); + + if (webcam.capture.IsCapturing()) + { + float t = Mathf.PingPong(Time.timeSinceLevelLoad, 0.25f) * 4f; + GUI.backgroundColor = Color.Lerp(GUI.backgroundColor, Color.white, t); + GUI.color = Color.Lerp(Color.red, Color.white, t); + } + + if (_selectedWebcamIndex == i) + { + GUI.backgroundColor = Color.green; + } + + if (GUILayout.Button(webcam.name, GUILayout.Width(200), GUILayout.ExpandWidth(true))) + { + if (_selectedWebcamIndex != i) + { + SelectWebcam(i); + } + else + { + StopWebcam(webcam); + } + } + + GUI.backgroundColor = Color.white; + GUI.color = Color.white; + + if (webcam.texture != null) + { + Rect camRect = GUILayoutUtility.GetRect(256, 256.0f / (webcam.texture.width / (float)webcam.texture.height)); + GUI.DrawTexture(camRect, webcam.texture); + } + else + { + GUILayout.Label(string.Empty, GUILayout.MinWidth(256.0f), GUILayout.MaxWidth(256.0f), GUILayout.ExpandWidth(false)); + } + + GUILayout.EndHorizontal(); + } + + GUILayout.EndVertical(); + GUILayout.EndArea(); + } +#else + void Start() + { + Debug.LogError("[AVProMovieCapture] To use WebCamTexture capture component/demo you must add the string AVPRO_MOVIECAPTURE_WEBCAMTEXTURE_SUPPORT must be added to `Scriping Define Symbols` in `Player Settings > Other Settings > Script Compilation`"); + } +#endif // AVPRO_MOVIECAPTURE_WEBCAMTEXTURE_SUPPORT + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/WebcamCaptureDemo.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/WebcamCaptureDemo.cs.meta new file mode 100644 index 0000000..ce0b169 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Scripts/WebcamCaptureDemo.cs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 98a052fe19e52c048865e758e854f078 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Shaders.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Shaders.meta new file mode 100644 index 0000000..73cdf1f --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Shaders.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5f4071a2eb4dd7e44953f88be83bd5a4 +folderAsset: yes +timeCreated: 1563640874 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Shaders/AVProMovieCapture_Plasma.shader b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Shaders/AVProMovieCapture_Plasma.shader new file mode 100644 index 0000000..003d72f --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Shaders/AVProMovieCapture_Plasma.shader @@ -0,0 +1,124 @@ +Shader "Hidden/AVProMovieCapture/Plasma" +{ + Properties + { + _MainTex ("Texture", 2D) = "white" {} + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + // #pragma exclude_renderers gles + #pragma target 2.5 + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + float2 uv : TEXCOORD0; + float4 vertex : SV_POSITION; + }; + + sampler2D _MainTex; + float4 _MainTex_ST; + + //dave hoskins hash + float2 hash(float2 p) + { + float3 HASHSCALE3 = float3(0.1031, 0.1030, 0.0973); + float3 p3 = frac(float3(p.xyx) * HASHSCALE3); + p3 += dot(p3, p3.yzx + 19.19); + + return frac((p3.xx+p3.yz)*p3.zy); + } + + float voronoi(float2 p, float gap) + { + p *= 1.0 / gap; + + float2 n = floor(p); + float2 f = frac(p); + + float min_dist = 99999.0; + for (int j = -1; j <= 1; j++) + for (int i = -1; i <= 1; i++) + { + float2 pos = float2(float(i), float(j)); + float2 jitter = (hash(n + pos) - 0.5) * 2.0; + jitter = 0.5 + sin(_Time.y + 6.2831 * jitter) * 0.5; + float2 r = pos + jitter - f; + float d = length(r); + + if (d < min_dist) + { + min_dist = d; + } + } + + return pow(min_dist, 3.0) * gap * 10; + } + + float3 tonemap(float3 color) + { + color = max(float3(0, 0, 0), color - float3(0.004, 0.004, 0.004)); + color = (color * (6.2 * color + .5)) / (color * (6.2 * color + 1.7) + 0.06); + return color; + } + + float plasma(float2 p) + { + float gap = 0.5; + float norm_factor = 0.0; + float total_val = 0.0; + + [unroll(8)] + for (int i = 0; i < 8; ++i) + { + total_val += voronoi(p, gap) / 16.0; + norm_factor += gap; + gap /= 2.0; + } + return total_val / norm_factor; + } + + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.uv = TRANSFORM_TEX(v.uv, _MainTex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + i.uv += float2(0, -_Time.y * 0.1); + + float r = abs(frac(i.uv.y) - 0.5) * 2.0; + float b = 1 - r; + float g = 1.0 - 2 * abs(i.uv.x - 0.5); + + fixed4 col = fixed4(r, g, b, 1) * plasma(i.uv); + + col.rgb = tonemap(col.rgb); + col.a = 1; + + return col; + } + ENDCG + } + } + + Fallback Off +} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Shaders/AVProMovieCapture_Plasma.shader.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Shaders/AVProMovieCapture_Plasma.shader.meta new file mode 100644 index 0000000..4631f81 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Demos/Shaders/AVProMovieCapture_Plasma.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f3d2361de25fd894da4e336b857ff62d +timeCreated: 1491491549 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Docs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Docs.meta new file mode 100644 index 0000000..be1b1e0 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Docs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b2afb1484f696a74c8028a9456053886 +folderAsset: yes +timeCreated: 1563637382 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Docs/AVProMovieCapture-UserManual.pdf b/Assets/Plugins/RenderHeads/AVProMovieCapture/Docs/AVProMovieCapture-UserManual.pdf new file mode 100644 index 0000000..83a8576 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Docs/AVProMovieCapture-UserManual.pdf differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Docs/AVProMovieCapture-UserManual.pdf.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Docs/AVProMovieCapture-UserManual.pdf.meta new file mode 100644 index 0000000..bc487d7 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Docs/AVProMovieCapture-UserManual.pdf.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 1 +guid: 0096b784692acfb4e92e5ce9ab0233d5 diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor.meta new file mode 100644 index 0000000..fd15454 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b7a195eaf70dd7c4db070647dbb48dce +folderAsset: yes +timeCreated: 1563637382 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/AVProMovieCapture.Editor.asmdef b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/AVProMovieCapture.Editor.asmdef new file mode 100644 index 0000000..98e7d75 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/AVProMovieCapture.Editor.asmdef @@ -0,0 +1,6 @@ +{ + "name": "RenderHeads.AVProMovieCapture.Editor", + "references": [ "RenderHeads.AVProMovieCapture.Runtime" ], + "includePlatforms": [ "Editor" ] + +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/AVProMovieCapture.Editor.asmdef.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/AVProMovieCapture.Editor.asmdef.meta new file mode 100644 index 0000000..f7fee1a --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/AVProMovieCapture.Editor.asmdef.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 5692e4d2014af1542a09e0dab1e4a164 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Resources.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Resources.meta new file mode 100644 index 0000000..32019c4 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Resources.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3d2a76974faba2d4eaf900faaf2f04b7 +folderAsset: yes +timeCreated: 1563636592 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Resources/AVProMovieCaptureIcon.png b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Resources/AVProMovieCaptureIcon.png new file mode 100644 index 0000000..7383364 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Resources/AVProMovieCaptureIcon.png differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Resources/AVProMovieCaptureIcon.png.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Resources/AVProMovieCaptureIcon.png.meta new file mode 100644 index 0000000..3a9dace --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Resources/AVProMovieCaptureIcon.png.meta @@ -0,0 +1,90 @@ +fileFormatVersion: 2 +guid: 9dadcbc01dfb782409ab9f21874995f1 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 256 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 0 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 256 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 256 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 256 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 256 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts.meta new file mode 100644 index 0000000..98e5899 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8a69b148c9c07e443bb5c63956646b4a +folderAsset: yes +timeCreated: 1563636592 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CameraSelectorEditor.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CameraSelectorEditor.cs new file mode 100644 index 0000000..8668b75 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CameraSelectorEditor.cs @@ -0,0 +1,102 @@ +#if UNITY_EDITOR +#if !UNITY_2018_3_OR_NEWER + #define SUPPORT_SCENE_VIEW_GIZMOS_CAPTURE +#endif +using UnityEngine; +using UnityEditor; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Editor +{ + [CanEditMultipleObjects] + [CustomEditor(typeof(CameraSelector))] + public class CameraSelectorEditor : UnityEditor.Editor + { + private SerializedProperty _propSelectBy; + private SerializedProperty _propScanFrequency; + private SerializedProperty _propScanHiddenCameras; + private SerializedProperty _propTag; + private SerializedProperty _propName; + private SerializedProperty _propCamera; + + void OnEnable() + { + _propSelectBy = serializedObject.AssertFindProperty("_selectBy"); + _propScanFrequency = serializedObject.AssertFindProperty("_scanFrequency"); + _propScanHiddenCameras = serializedObject.AssertFindProperty("_scanHiddenCameras"); + _propTag = serializedObject.AssertFindProperty("_tag"); + _propName = serializedObject.AssertFindProperty("_name"); + _propCamera = serializedObject.AssertFindProperty("_camera"); + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + EditorGUILayout.PropertyField(_propScanFrequency); + EditorGUILayout.PropertyField(_propScanHiddenCameras); + EditorGUILayout.PropertyField(_propSelectBy); + if (_propSelectBy.enumValueIndex == (int)CameraSelector.SelectByMode.Name) + { + EditorGUILayout.PropertyField(_propName); + } + else if (_propSelectBy.enumValueIndex == (int)CameraSelector.SelectByMode.Tag) + { + EditorGUILayout.PropertyField(_propTag); + } + else if (_propSelectBy.enumValueIndex == (int)CameraSelector.SelectByMode.Manual) + { + EditorGUILayout.PropertyField(_propCamera); + } +#if !SUPPORT_SCENE_VIEW_GIZMOS_CAPTURE + else if (_propSelectBy.enumValueIndex == (int)CameraSelector.SelectByMode.EditorSceneView) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Warning: Scene View capture only currently supports gizmo capture up to Unity 2018.2.x"); + GUI.color = Color.white; + } +#endif + if (Application.isPlaying) + { + EditorGUILayout.Separator(); + + GUILayout.Label("Cameras:"); + + CameraSelector selector = (this.target) as CameraSelector; + + // Display buttons for all possible cameras + for (int i = 0; i < selector.CameraCacheCount; i++) + { + if (selector.Camera != selector.CameraCache[i]) + { + if (GUILayout.Button(selector.CameraCache[i].name)) + { + selector.Camera = selector.CameraCache[i]; + } + } + else + { + GUI.color = Color.green; + GUILayout.Button(selector.Camera.name); + GUI.color = Color.white; + } + } + + EditorGUILayout.Separator(); + if (_propScanFrequency.enumValueIndex != (int)CameraSelector.ScanFrequencyMode.Frame) + { + if (GUILayout.Button("Update Camera List")) + { + selector.UpdateCameraCache(); + } + } + } + + serializedObject.ApplyModifiedProperties(); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CameraSelectorEditor.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CameraSelectorEditor.cs.meta new file mode 100644 index 0000000..46b7972 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CameraSelectorEditor.cs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a731464844c643e4e8da08697d37df67 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureBaseEditor.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureBaseEditor.cs new file mode 100644 index 0000000..b2bda47 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureBaseEditor.cs @@ -0,0 +1,1308 @@ +#if UNITY_2017_3_OR_NEWER + #define AVPRO_MOVIECAPTURE_OFFLINE_AUDIOCAPTURE +#endif +#if UNITY_5_6_OR_NEWER && UNITY_2018_3_OR_NEWER + #define AVPRO_MOVIECAPTURE_VIDEOPLAYER_SUPPORT +#endif +#if UNITY_2017_1_OR_NEWER + #define AVPRO_MOVIECAPTURE_PLAYABLES_SUPPORT +#endif +#if UNITY_EDITOR +using UnityEngine; +using UnityEditor; +using System.Collections; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Editor +{ + [CanEditMultipleObjects] + [CustomEditor(typeof(CaptureBase), true)] + public class CaptureBaseEditor : UnityEditor.Editor + { + private const string SettingsPrefix = "AVProMovieCapture-BaseEditor-"; + internal const string UnityAssetStore_FullVersionUrl = "https://assetstore.unity.com/packages/tools/video/avpro-movie-capture-151061?aid=1101lcNgx"; + + public readonly static string[] ResolutionStrings = { "8192x8192 (1:1)", "8192x4096 (2:1)", "4096x4096 (1:1)", "4096x2048 (2:1)", "2048x4096 (1:2)", "3840x2160 (16:9)", "3840x2048 (15:8)", "3840x1920 (2:1)", "2560x1440 (16:9)", "2048x2048 (1:1)", "2048x1024 (2:1)", "1920x1080 (16:9)", "1280x720 (16:9)", "1024x768 (4:3)", "800x600 (4:3)", "800x450 (16:9)", "640x480 (4:3)", "640x360 (16:9)", "320x240 (4:3)", "Original", "Custom" }; + + private readonly static GUIContent _guiBlankSpace = new GUIContent(" "); + private readonly static GUIContent _guiContentMotionBlurSamples = new GUIContent("Samples"); + private readonly static GUIContent _guiContentMotionBlurCameras = new GUIContent("Cameras"); + private readonly static GUIContent _guiContentFolder = new GUIContent("Folder"); + private readonly static GUIContent _guiContentPath = new GUIContent("Path"); + private readonly static GUIContent _guiContentSubfolders = new GUIContent("Subfolder(s)"); + private readonly static GUIContent _guiContentPrefix = new GUIContent("Prefix"); + private readonly static GUIContent _guiContentAppendTimestamp = new GUIContent("Append Timestamp"); + private readonly static GUIContent _guiContentManualExtension = new GUIContent("Manual Extension"); + private readonly static GUIContent _guiContentExtension = new GUIContent("Extension"); + private readonly static GUIContent _guiContentStartFrame = new GUIContent("Start Frame"); + private readonly static GUIContent _guiContentZeroDigits = new GUIContent("Zero Digits"); + private readonly static GUIContent _guiContentPipePath = new GUIContent("Pipe Path"); + private readonly static GUIContent _guiContentToggleKey = new GUIContent("Toggle Key"); + private readonly static GUIContent _guiContentStartMode = new GUIContent("Start Mode"); + private readonly static GUIContent _guiContentStartDelay = new GUIContent("Start Delay"); + private readonly static GUIContent _guiContentSeconds = new GUIContent("Seconds"); + private readonly static GUIContent _guiContentStopMode = new GUIContent("Stop Mode"); + private readonly static GUIContent _guiContentFrames = new GUIContent("Frames"); + private readonly static GUIContent _guiContentCodecSearchOrder = new GUIContent("Codec Search Order"); + private readonly static GUIContent _guiContentSupportTextureRecreate = new GUIContent("Support Texture Recreate", "Using this option will slow rendering (forces GPU sync), but is needed to handle cases where texture resources are recreated, due to alt-tab or window resizing."); + private readonly static GUIContent _guiStreamableMP4 = new GUIContent("Streamable MP4"); + private readonly static GUIContent _guiStereoPacking = new GUIContent("Stereo Packing"); + private readonly static GUIContent _guiSphericalLayout = new GUIContent("Spherical Layout"); + private readonly static GUIContent _guiAndroidNoCaptureRotation = new GUIContent("No Capture Rotation"); + + private static bool _isTrialVersion = false; + private SerializedProperty _propCaptureKey; + private SerializedProperty _propMinimumDiskSpaceMB; + private SerializedProperty _propPersistAcrossSceneLoads; + + private SerializedProperty _propIsRealtime; + + private SerializedProperty _propOutputTarget; + private SerializedProperty _propImageSequenceFormatWindows; + private SerializedProperty _propImageSequenceFormatMacOS; + private SerializedProperty _propImageSequenceFormatIOS; + private SerializedProperty _propImageSequenceFormatAndroid; + private SerializedProperty _propImageSequenceStartFrame; + private SerializedProperty _propImageSequenceZeroDigits; + private SerializedProperty _propOutputFolderType; + private SerializedProperty _propOutputFolderPath; + private SerializedProperty _propAppendFilenameTimestamp; + private SerializedProperty _propFileNamePrefix; + private SerializedProperty _propAllowManualFileExtension; + private SerializedProperty _propFileNameExtension; + private SerializedProperty _propForceFileName; + private SerializedProperty _propNamedPipePath; + + private SerializedProperty _propVideoCodecPriorityWindows; + private SerializedProperty _propVideoCodecPriorityMacOS; + //private SerializedProperty _propVideoCodecPriorityAndroid; + private SerializedProperty _propForceVideoCodecIndexWindows; + private SerializedProperty _propForceVideoCodecIndexMacOS; + private SerializedProperty _propForceVideoCodecIndexIOS; + private SerializedProperty _propForceVideoCodecIndexAndroid; + + private SerializedProperty _propAudioCaptureSource; + private SerializedProperty _propAudioCodecPriorityWindows; + private SerializedProperty _propAudioCodecPriorityMacOS; + //private SerializedProperty _propAudioCodecPriorityAndroid; + private SerializedProperty _propForceAudioCodecIndexWindows; + private SerializedProperty _propForceAudioCodecIndexMacOS; + private SerializedProperty _propForceAudioCodecIndexIOS; + private SerializedProperty _propForceAudioCodecIndexAndroid; + private SerializedProperty _propForceAudioDeviceIndex; + private SerializedProperty _propUnityAudioCapture; + private SerializedProperty _propManualAudioSampleRate; + private SerializedProperty _propManualAudioChannelCount; + + private SerializedProperty _propStartTrigger; + private SerializedProperty _propStartDelay; + private SerializedProperty _propStartDelaySeconds; + + private SerializedProperty _propStopMode; + private SerializedProperty _propStopFrames; + private SerializedProperty _propStopSeconds; + + private class PropVideoHints + { + public SerializedProperty propAverageBitrate; + public SerializedProperty propMaximumBitrate; + public SerializedProperty propQuality; + public SerializedProperty propKeyframeInterval; + public SerializedProperty propTransparency; + public SerializedProperty propHardwareEncoding; + public SerializedProperty propFastStart; + public SerializedProperty propInjectStereoPacking; + public SerializedProperty propStereoPacking; + public SerializedProperty propInjectSphericalVideoLayout; + public SerializedProperty propSphericalVideoLayout; + public SerializedProperty propEnableFragmentedWriting; + public SerializedProperty propMovieFragmentInterval; + } + + private class PropImageHints + { + public SerializedProperty propQuality; + public SerializedProperty propTransparency; + } + + private PropVideoHints[] _propVideoHints; + private PropImageHints[] _propImageHints; + + private SerializedProperty _propDownScale; + private SerializedProperty _propMaxVideoSize; + private SerializedProperty _propFrameRate; + private SerializedProperty _propTimelapseScale; + private SerializedProperty _propFrameUpdateMode; + private SerializedProperty _propFlipVertically; + private SerializedProperty _propForceGpuFlush; + private SerializedProperty _propWaitForEndOfFrame; + private SerializedProperty _propAndroidNoCaptureRotation; + + private SerializedProperty _propUseMotionBlur; + private SerializedProperty _propMotionBlurSamples; + private SerializedProperty _propMotionBlurCameras; + + private SerializedProperty _propLogCaptureStartStop; + private SerializedProperty _propAllowVsyncDisable; + private SerializedProperty _propSupportTextureRecreate; + #if AVPRO_MOVIECAPTURE_PLAYABLES_SUPPORT + private SerializedProperty _propTimelineController; + #endif + #if AVPRO_MOVIECAPTURE_VIDEOPLAYER_SUPPORT + private SerializedProperty _propVideoPlayerController; + #endif + + private static bool _isExpandedStartStop = false; + private static bool _isExpandedOutput = false; + private static bool _isExpandedVisual = false; + private static bool _isExpandedAudio = false; + private static bool _isExpandedPost = false; + private static bool _isExpandedMisc = false; + private static bool _isExpandedTrial = true; + private static bool _isExpandedAbout = false; + private static NativePlugin.Platform _selectedPlatform = NativePlugin.Platform.Windows; + private static GUIStyle _stylePlatformBox = null; + + protected CaptureBase _baseCapture; + + public override void OnInspectorGUI() + { + // Warning if the base component is used + if (this.target.GetType() == typeof(CaptureBase)) + { + GUI.color = Color.yellow; + GUILayout.BeginVertical("box"); + GUILayout.TextArea("Error: This is not a component, this is the base class.\n\nPlease add one of the components\n(eg:CaptureFromScene / CaptureFromCamera etc)"); + GUILayout.EndVertical(); + return; + } + + if (_stylePlatformBox == null) + { + _stylePlatformBox = new GUIStyle(GUI.skin.box); + _stylePlatformBox.padding.top = 0; + _stylePlatformBox.padding.bottom = 0; + } + + GUI_Header(); + GUI_BaseOptions(); + } + + protected virtual void GUI_User() + { + + } + + protected void GUI_Header() + { + // Describe the watermark for trial version + if (_isTrialVersion) + { + EditorUtils.DrawSectionColored("- AVPRO MOVIE CAPTURE -\nTRIAL VERSION", ref _isExpandedTrial, DrawTrialMessage, Color.magenta, Color.magenta, Color.magenta); + } + + // Button to launch the capture window + { + GUI.backgroundColor = new Color(0.96f, 0.25f, 0.47f); + if (GUILayout.Button("\n◄ Open Movie Capture Window ►\n")) + { + CaptureEditorWindow.Init(); + } + GUI.backgroundColor = Color.white; + } + } + + protected void DrawTrialMessage() + { + string message = "The free trial version is watermarked. Upgrade to the full package to remove the watermark."; + + GUI.backgroundColor = Color.yellow; + EditorGUILayout.BeginVertical(GUI.skin.box); + //GUI.color = Color.yellow; + //GUILayout.Label("AVPRO MOVIE CAPTURE - FREE TRIAL VERSION", EditorStyles.boldLabel); + GUI.color = Color.white; + GUILayout.Label(message, EditorStyles.wordWrappedLabel); + if (GUILayout.Button("Upgrade Now")) + { + Application.OpenURL(UnityAssetStore_FullVersionUrl); + } + EditorGUILayout.EndVertical(); + GUI.backgroundColor = Color.white; + GUI.color = Color.white; + } + + protected void GUI_BaseOptions() + { + serializedObject.Update(); + + if (_baseCapture == null) + { + return; + } + + //DrawDefaultInspector(); + + if (!_baseCapture.IsCapturing()) + { + GUILayout.Space(8f); + EditorUtils.BoolAsDropdown("Capture Mode", _propIsRealtime, "Realtime Capture", "Offline Render"); + GUILayout.Space(8f); + + if (serializedObject.ApplyModifiedProperties()) + { + EditorUtility.SetDirty(target); + } + + GUI_User(); + + // After the user mode we must update the serialised object again + serializedObject.Update(); + + EditorUtils.DrawSection("Start / Stop", ref _isExpandedStartStop, GUI_StartStop); + EditorUtils.DrawSection("Output", ref _isExpandedOutput, GUI_OutputFilePath); + EditorUtils.DrawSection("Visual", ref _isExpandedVisual, GUI_Visual); + if (_propOutputTarget.enumValueIndex == (int)OutputTarget.VideoFile) + { + EditorUtils.DrawSection("Audio", ref _isExpandedAudio, GUI_Audio); + EditorUtils.DrawSection("Post", ref _isExpandedPost, GUI_Post); + } + EditorUtils.DrawSection("Misc", ref _isExpandedMisc, GUI_Misc); + //EditorUtils.DrawSection("Platform Specific", ref _isExpandedMisc, GUI_PlatformSpecific); + EditorUtils.DrawSection("Help", ref _isExpandedAbout, GUI_About); + + if (serializedObject.ApplyModifiedProperties()) + { + EditorUtility.SetDirty(target); + } + + GUI_Controls(); + } + else + { + GUI_Stats(); + GUI_Progress(); + GUI_Controls(); + } + } + + protected void GUI_Progress() + { + if (_baseCapture == null) + { + return; + } + + if (_propStopMode.enumValueIndex != (int)StopMode.None) + { + Rect r = GUILayoutUtility.GetRect(128f, EditorStyles.label.CalcHeight(GUIContent.none, 32f), GUILayout.ExpandWidth(true)); + float progress = _baseCapture.GetProgress(); + EditorGUI.ProgressBar(r, progress, (progress * 100f).ToString("F1") + "%"); + } + } + + protected void GUI_Stats() + { + if (_baseCapture == null) + { + return; + } + + if (Application.isPlaying && _baseCapture.IsCapturing()) + { + CaptureEditorWindow.DrawBaseCapturingGUI(_baseCapture); + + { + EditorGUILayout.BeginVertical("box"); + EditorGUI.indentLevel++; + { + uint lastEncodedSeconds = (uint)Mathf.FloorToInt((float)_baseCapture.CaptureStats.NumEncodedFrames / _baseCapture.FrameRate); + if (_baseCapture.IsRealTime) + { + lastEncodedSeconds = _baseCapture.CaptureStats.TotalEncodedSeconds; + } + uint lastEncodedMinutes = lastEncodedSeconds / 60; + lastEncodedSeconds = lastEncodedSeconds % 60; + uint lastEncodedFrame = _baseCapture.CaptureStats.NumEncodedFrames % (uint)_baseCapture.FrameRate; + + string lengthText = string.Format("{0:00}:{1:00}.{2:000}", lastEncodedMinutes, lastEncodedSeconds, lastEncodedFrame); + EditorGUILayout.LabelField("Video Length", lengthText); + + if (!_baseCapture.IsRealTime) + { + long lastFileSize = _baseCapture.GetCaptureFileSize(); + EditorGUILayout.LabelField("File Size", ((float)lastFileSize / (1024f * 1024f)).ToString("F1") + "MB"); + EditorGUILayout.LabelField("Avg Bitrate", (8f * ((float)lastFileSize / (1024f * 1024f)) / (float)((lastEncodedMinutes * 60) + lastEncodedSeconds)).ToString("F2") + "Mb/s"); + } + } + EditorGUI.indentLevel--; + EditorGUILayout.EndVertical(); + } + } + } + + protected void GUI_Controls() + { + if (_baseCapture == null) + { + return; + } + + GUILayout.Space(8.0f); + + EditorGUI.BeginDisabledGroup(!Application.isPlaying); + { + if (!_baseCapture.IsCapturing()) + { + GUI.backgroundColor = Color.green; + string startString = "Start Capture"; + if (!_baseCapture.IsRealTime) + { + startString = "Start Render"; + } + if (GUILayout.Button(startString, GUILayout.Height(32f))) + { + _baseCapture.SelectVideoCodec(); + _baseCapture.SelectAudioCodec(); + _baseCapture.SelectAudioInputDevice(); + // We have to queue the start capture otherwise Screen.width and height aren't correct + _baseCapture.QueueStartCapture(); + } + GUI.backgroundColor = Color.white; + } + else + { + GUILayout.BeginHorizontal(); + if (!_baseCapture.IsPaused()) + { + GUI.backgroundColor = Color.yellow; + if (GUILayout.Button("Pause", GUILayout.Height(32f))) + { + _baseCapture.PauseCapture(); + } + } + else + { + GUI.backgroundColor = Color.green; + if (GUILayout.Button("Resume", GUILayout.Height(32f))) + { + _baseCapture.ResumeCapture(); + } + } + GUI.backgroundColor = Color.cyan; + if (GUILayout.Button("Cancel", GUILayout.Height(32f))) + { + _baseCapture.CancelCapture(); + } + GUI.backgroundColor = Color.red; + if (GUILayout.Button("Stop", GUILayout.Height(32f))) + { + _baseCapture.StopCapture(); + } + GUI.backgroundColor = Color.white; + GUILayout.EndHorizontal(); + } + } + EditorGUI.EndDisabledGroup(); + + EditorGUILayout.Space(); + EditorGUI.BeginDisabledGroup(string.IsNullOrEmpty(CaptureBase.LastFileSaved)); + GUILayout.BeginHorizontal(); + if (GUILayout.Button("Browse Last")) + { + if (!string.IsNullOrEmpty(CaptureBase.LastFileSaved)) + { + Utils.ShowInExplorer(CaptureBase.LastFileSaved); + } + } + { + Color prevColor = GUI.color; + GUI.color = Color.cyan; + if (GUILayout.Button("View Last Capture")) + { + if (!string.IsNullOrEmpty(CaptureBase.LastFileSaved)) + { + Utils.OpenInDefaultApp(CaptureBase.LastFileSaved); + } + } + GUI.color = prevColor; + } + GUILayout.EndHorizontal(); + EditorGUI.EndDisabledGroup(); + } + + protected void GUI_OutputFilePath() + { + EditorUtils.EnumAsDropdown("Output Target", _propOutputTarget, EditorUtils.OutputTargetNames); + if (_propOutputTarget.enumValueIndex == (int)OutputTarget.VideoFile || + _propOutputTarget.enumValueIndex == (int)OutputTarget.ImageSequence) + { + bool isImageSequence = (_propOutputTarget.enumValueIndex == (int)OutputTarget.ImageSequence); + + if (isImageSequence) + { + BeginPlatformSelection(); + if (_selectedPlatform == NativePlugin.Platform.Windows) + { + EditorUtils.EnumAsDropdown("Format", _propImageSequenceFormatWindows, Utils.WindowsImageSequenceFormatNames); + } + else if (_selectedPlatform == NativePlugin.Platform.macOS) + { + EditorUtils.EnumAsDropdown("Format", _propImageSequenceFormatMacOS, Utils.MacOSImageSequenceFormatNames); + } + else if (_selectedPlatform == NativePlugin.Platform.iOS) + { + EditorUtils.EnumAsDropdown("Format", _propImageSequenceFormatIOS, Utils.IOSImageSequenceFormatNames); + } + else if (_selectedPlatform == NativePlugin.Platform.Android) + { + EditorUtils.EnumAsDropdown("Format", _propImageSequenceFormatAndroid, Utils.AndroidImageSequenceFormatNames); + } + EndPlatformSelection(); + GUILayout.Space(8f); + } + + GUILayout.Label(_guiContentFolder, EditorStyles.boldLabel); + + #if UNITY_EDITOR_OSX + // Photo Library is only for the video output type so grab the current folder type in case we need to reset it + int outputFolderTypePrevValue = _propOutputFolderType.enumValueIndex; + if (outputFolderTypePrevValue == (int)CaptureBase.OutputPath.PhotoLibrary) + // Already the Photo Library type so reset to the default option + outputFolderTypePrevValue = (int)CaptureBase.DefaultOutputFolderType; + #endif + + EditorGUILayout.PropertyField(_propOutputFolderType, _guiContentFolder); + + #if UNITY_EDITOR_OSX + if (isImageSequence && _propOutputFolderType.enumValueIndex == (int)CaptureBase.OutputPath.PhotoLibrary) + { + Debug.LogWarning("Photo Library is unavailable for the Image Sequence output type"); + _propOutputFolderType.enumValueIndex = (int)outputFolderTypePrevValue; + } + #endif + + if (_propOutputFolderType.enumValueIndex == (int)CaptureBase.OutputPath.Absolute) + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(_propOutputFolderPath, _guiContentPath); + if (GUILayout.Button(">", GUILayout.Width(22))) + { + _propOutputFolderPath.stringValue = EditorUtility.SaveFolderPanel("Select Folder To Store Video Captures", System.IO.Path.GetFullPath(System.IO.Path.Combine(Application.dataPath, "../")), ""); + } + EditorGUILayout.EndHorizontal(); + } + else + { + EditorGUILayout.PropertyField(_propOutputFolderPath, _guiContentSubfolders); + } + + GUILayout.Label("File Name", EditorStyles.boldLabel); + + if (!isImageSequence) + { + EditorGUILayout.PropertyField(_propFileNamePrefix, _guiContentPrefix); + EditorGUILayout.PropertyField(_propAppendFilenameTimestamp,_guiContentAppendTimestamp); + EditorGUILayout.PropertyField(_propAllowManualFileExtension, _guiContentManualExtension); + if (_propAllowManualFileExtension.boolValue) + { + EditorGUILayout.PropertyField(_propFileNameExtension, _guiContentExtension); + } + } + + if (isImageSequence) + { + EditorGUILayout.PropertyField(_propFileNamePrefix,_guiContentPrefix); + EditorGUILayout.PropertyField(_propImageSequenceStartFrame, _guiContentStartFrame); + EditorGUILayout.PropertyField(_propImageSequenceZeroDigits, _guiContentZeroDigits); + } + } + else + { + EditorGUILayout.PropertyField(_propNamedPipePath, _guiContentPipePath); + } + + + /*// File path + EditorGUILayout.LabelField("File Path", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + _outputFolderIndex = EditorGUILayout.Popup("Relative to", _outputFolderIndex, _outputFolders); + if (_outputFolderIndex == 0 || _outputFolderIndex == 1) + { + _outputFolderRelative = EditorGUILayout.TextField("SubFolder(s)", _outputFolderRelative); + } + else + { + EditorGUILayout.BeginHorizontal(); + _outputFolderAbsolute = EditorGUILayout.TextField("Path", _outputFolderAbsolute); + if (GUILayout.Button(">", GUILayout.Width(22))) + { + _outputFolderAbsolute = EditorUtility.SaveFolderPanel("Select Folder To Store Video Captures", System.IO.Path.GetFullPath(System.IO.Path.Combine(Application.dataPath, "../")), ""); + EditorUtility.SetDirty(this); + } + EditorGUILayout.EndHorizontal(); + } + EditorGUI.indentLevel--;*/ + } + + protected void GUI_StartStop() + { + EditorGUILayout.PropertyField(_propCaptureKey, _guiContentToggleKey); + + EditorGUILayout.Separator(); + + EditorGUILayout.PropertyField(_propStartTrigger, _guiContentStartMode); + EditorGUILayout.PropertyField(_propStartDelay, _guiContentStartDelay); + + if ((StartDelayMode)_propStartDelay.enumValueIndex == StartDelayMode.RealSeconds || + (StartDelayMode)_propStartDelay.enumValueIndex == StartDelayMode.GameSeconds) + { + EditorGUILayout.PropertyField(_propStartDelaySeconds, _guiContentSeconds); + } + + EditorGUILayout.Separator(); + + EditorGUILayout.PropertyField(_propStopMode, _guiContentStopMode); + if ((StopMode)_propStopMode.enumValueIndex == StopMode.FramesEncoded) + { + EditorGUILayout.PropertyField(_propStopFrames, _guiContentFrames); + } + else if ((StopMode)_propStopMode.enumValueIndex == StopMode.SecondsElapsed || (StopMode)_propStopMode.enumValueIndex == StopMode.SecondsEncoded) + { + EditorGUILayout.PropertyField(_propStopSeconds, _guiContentSeconds); + } + } + + private void BeginPlatformSelection(string title = null) + { + GUILayout.BeginVertical(_stylePlatformBox); + if (!string.IsNullOrEmpty(title)) + { + GUILayout.Label(title, EditorStyles.boldLabel); + } + int rowCount = 0; + int platformIndex = (int)_selectedPlatform; + for (int i = 0; i < NativePlugin.PlatformNames.Length; i++) + { + if (i % 3 == 0) + { + GUILayout.BeginHorizontal(); + rowCount++; + } + + Color hilight = Color.yellow; + + if (i == platformIndex) + { + } + else + { + // Unselected, unmodified + if (EditorGUIUtility.isProSkin) + { + GUI.backgroundColor = Color.grey; + GUI.color = new Color(0.65f, 0.66f, 0.65f);// Color.grey; + } + } + + if (i == platformIndex) + { + if (!GUILayout.Toggle(true, NativePlugin.PlatformNames[i], GUI.skin.button)) + { + platformIndex = -1; + } + } + else + { + if (GUILayout.Button(NativePlugin.PlatformNames[i])) + { + platformIndex = i; + } + } + if ((i+1) % 3 == 0) + { + rowCount--; + GUILayout.EndHorizontal(); + } + GUI.backgroundColor = Color.white; + GUI.contentColor = Color.white; + GUI.color = Color.white; + } + + if (rowCount > 0) + { + GUILayout.EndHorizontal(); + } + + if (platformIndex != (int)_selectedPlatform) + { + _selectedPlatform = (NativePlugin.Platform)platformIndex; + + // We do this to clear the focus, otherwise a focused text field will not change when the Toolbar index changes + EditorGUI.FocusTextInControl("ClearFocus"); + } + } + + private void EndPlatformSelection() + { + GUILayout.EndVertical(); + } + + protected virtual void GUI_Misc() + { + EditorGUILayout.PropertyField(_propLogCaptureStartStop); + EditorGUILayout.PropertyField(_propAllowVsyncDisable); + EditorGUILayout.PropertyField(_propWaitForEndOfFrame); + EditorGUILayout.PropertyField(_propSupportTextureRecreate, _guiContentSupportTextureRecreate); + EditorGUILayout.PropertyField(_propPersistAcrossSceneLoads); + #if AVPRO_MOVIECAPTURE_PLAYABLES_SUPPORT + EditorGUILayout.PropertyField(_propTimelineController); + #endif + #if AVPRO_MOVIECAPTURE_VIDEOPLAYER_SUPPORT + EditorGUILayout.PropertyField(_propVideoPlayerController); + #endif + + BeginPlatformSelection(); + if (_selectedPlatform == NativePlugin.Platform.Windows) + { + EditorGUILayout.PropertyField(_propForceGpuFlush); + EditorGUILayout.PropertyField(_propMinimumDiskSpaceMB); + } + else if (_selectedPlatform == NativePlugin.Platform.Android) + { + EditorGUILayout.PropertyField(_propAndroidNoCaptureRotation, _guiAndroidNoCaptureRotation); + } + EndPlatformSelection(); + } + + protected virtual void GUI_About() + { + CaptureEditorWindow.DrawConfigGUI_About(); + } + + protected void GUI_Visual() + { + EditorGUILayout.PropertyField(_propDownScale); + if (_propDownScale.enumValueIndex == 5) // 5 is DownScale.Custom + { + EditorGUILayout.PropertyField(_propMaxVideoSize, new GUIContent("Size")); + _propMaxVideoSize.vector2Value = new Vector2(Mathf.Clamp((int)_propMaxVideoSize.vector2Value.x, 1, NativePlugin.MaxRenderWidth), Mathf.Clamp((int)_propMaxVideoSize.vector2Value.y, 1, NativePlugin.MaxRenderHeight)); + } + GUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(_propFrameRate, GUILayout.ExpandWidth(false)); + _propFrameRate.floatValue = Mathf.Clamp(_propFrameRate.floatValue, 0.01f, 240f); + EditorUtils.FloatAsPopup("▶", "Common Frame Rates", this.serializedObject, _propFrameRate, EditorUtils.CommonFrameRateNames, EditorUtils.CommonFrameRateValues); + GUILayout.EndHorizontal(); + + EditorGUI.BeginDisabledGroup(!_propIsRealtime.boolValue); + EditorGUILayout.PropertyField(_propTimelapseScale); + _propTimelapseScale.intValue = Mathf.Max(1, _propTimelapseScale.intValue); + EditorGUI.EndDisabledGroup(); + EditorGUILayout.PropertyField(_propFrameUpdateMode); + + EditorGUILayout.PropertyField(_propFlipVertically); + + EditorGUILayout.Space(); + + if (_propOutputTarget.enumValueIndex == (int)OutputTarget.VideoFile) + { + GUI_VisualCodecs(); + GUI_VideoHints(); + } + else if (_propOutputTarget.enumValueIndex == (int)OutputTarget.ImageSequence) + { + GUI_ImageHints(); + } + + EditorGUILayout.Space(); + + EditorGUI.BeginDisabledGroup(_propIsRealtime.boolValue); + GUILayout.Label("Motion Blur", EditorStyles.boldLabel); + if (_propIsRealtime.boolValue) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Motion Blur only available in Offline Render mode"); + GUI.color = Color.white; + } + else + { + GUI_MotionBlur(); + } + EditorGUI.EndDisabledGroup(); + } + + protected void GUI_VisualCodecs_Windows() + { + bool searchByName = (_propForceVideoCodecIndexWindows.intValue < 0); + bool newSearchByName = EditorGUILayout.Toggle("Search by name", searchByName); + if (searchByName != newSearchByName) + { + if (newSearchByName) + { + _propForceVideoCodecIndexWindows.intValue = -1; + } + else + { + _propForceVideoCodecIndexWindows.intValue = 0; + } + } + + if (_propForceVideoCodecIndexWindows.intValue < 0) + { + EditorGUILayout.PropertyField(_propVideoCodecPriorityWindows, _guiContentCodecSearchOrder, true); + } + else + { + EditorGUILayout.PropertyField(_propForceVideoCodecIndexWindows); + } + } + + protected void GUI_VisualCodecs_Android() + { + EditorGUI.BeginDisabledGroup(true); + EditorGUILayout.Toggle("Search by name", false); + EditorGUI.EndDisabledGroup(); + _propForceVideoCodecIndexAndroid.intValue = EditorGUILayout.Popup(_propForceVideoCodecIndexAndroid.intValue, NativePlugin.VideoCodecNamesAndroid); + } + + protected void GUI_VisualCodecs_MacOS() + { + bool searchByName = (_propForceVideoCodecIndexMacOS.intValue < 0); + bool newSearchByName = EditorGUILayout.Toggle("Search by name", searchByName); + if (searchByName != newSearchByName) + { + if (newSearchByName) + { + _propForceVideoCodecIndexMacOS.intValue = -1; + } + else + { + _propForceVideoCodecIndexMacOS.intValue = 0; + } + } + + if (_propForceVideoCodecIndexMacOS.intValue < 0) + { + EditorGUILayout.PropertyField(_propVideoCodecPriorityMacOS, _guiContentCodecSearchOrder, true); + } + else + { + _propForceVideoCodecIndexMacOS.intValue = EditorGUILayout.Popup(_propForceVideoCodecIndexMacOS.intValue, NativePlugin.VideoCodecNamesMacOS); + } + } + + protected void GUI_VisualCodecs_IOS() + { + EditorGUI.BeginDisabledGroup(true); + EditorGUILayout.Toggle("Search by name", false); + EditorGUI.EndDisabledGroup(); + _propForceVideoCodecIndexIOS.intValue = EditorGUILayout.Popup(_propForceVideoCodecIndexIOS.intValue, NativePlugin.VideoCodecNamesIOS); + } + + protected void GUI_VisualCodecs() + { + BeginPlatformSelection("Video Codec"); + if (_selectedPlatform == NativePlugin.Platform.Windows) + { + GUI_VisualCodecs_Windows(); + } + else if (_selectedPlatform == NativePlugin.Platform.macOS) + { + GUI_VisualCodecs_MacOS(); + } + else if (_selectedPlatform == NativePlugin.Platform.iOS) + { + GUI_VisualCodecs_IOS(); + } + else if (_selectedPlatform == NativePlugin.Platform.Android) + { + GUI_VisualCodecs_Android(); + } + EndPlatformSelection(); + } + + protected void GUI_AudioCodecs() + { + BeginPlatformSelection("Audio Codec"); + if (_selectedPlatform == NativePlugin.Platform.Windows) + { + bool searchByName = (_propForceAudioCodecIndexWindows.intValue < 0); + bool newSearchByName = EditorGUILayout.Toggle("Search by name", searchByName); + if (searchByName != newSearchByName) + { + if (newSearchByName) + { + _propForceAudioCodecIndexWindows.intValue = -1; + } + else + { + _propForceAudioCodecIndexWindows.intValue = 0; + } + } + + if (_propForceAudioCodecIndexWindows.intValue < 0) + { + EditorGUILayout.PropertyField(_propAudioCodecPriorityWindows, _guiContentCodecSearchOrder, true); + } + else + { + EditorGUILayout.PropertyField(_propForceAudioCodecIndexWindows); + } + } + else if (_selectedPlatform == NativePlugin.Platform.Android) + { + EditorGUI.BeginDisabledGroup(true); + EditorGUILayout.Toggle("Search by name", false); + EditorGUI.EndDisabledGroup(); + _propForceAudioCodecIndexAndroid.intValue = EditorGUILayout.Popup(_propForceAudioCodecIndexAndroid.intValue, NativePlugin.AudioCodecNamesAndroid); + } + else if (_selectedPlatform == NativePlugin.Platform.macOS) + { + bool searchByName = (_propForceAudioCodecIndexMacOS.intValue < 0); + bool newSearchByName = EditorGUILayout.Toggle("Search by name", searchByName); + if (searchByName != newSearchByName) + { + if (newSearchByName) + { + _propForceAudioCodecIndexMacOS.intValue = -1; + } + else + { + _propForceAudioCodecIndexMacOS.intValue = 0; + } + } + + if (_propForceAudioCodecIndexMacOS.intValue < 0) + { + EditorGUILayout.PropertyField(_propAudioCodecPriorityMacOS, _guiContentCodecSearchOrder, true); + } + else + { + _propForceAudioCodecIndexMacOS.intValue = EditorGUILayout.Popup(_propForceAudioCodecIndexMacOS.intValue, NativePlugin.AudioCodecNamesMacOS); + } + } + else if (_selectedPlatform == NativePlugin.Platform.iOS) + { + EditorGUI.BeginDisabledGroup(true); + EditorGUILayout.Toggle("Search by name", false); + EditorGUI.EndDisabledGroup(); + _propForceAudioCodecIndexIOS.intValue = EditorGUILayout.Popup(_propForceAudioCodecIndexIOS.intValue, NativePlugin.AudioCodecNamesIOS); + } + EndPlatformSelection(); + } + + protected void GUI_Audio() + { + bool showAudioSources = true; + if (_propOutputTarget.enumValueIndex != (int)OutputTarget.VideoFile) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Audio Capture only available for video file output"); + GUI.color = Color.white; + showAudioSources = false; + } + if (showAudioSources) + { + EditorUtils.EnumAsDropdown("Audio Source", _propAudioCaptureSource, EditorUtils.AudioCaptureSourceNames ); + if (_propAudioCaptureSource.enumValueIndex != (int)AudioCaptureSource.None) + { + bool showAudioOptions = true; + + #if AVPRO_MOVIECAPTURE_OFFLINE_AUDIOCAPTURE + if (!_propIsRealtime.boolValue && _propAudioCaptureSource.enumValueIndex != (int)AudioCaptureSource.Manual && _propAudioCaptureSource.enumValueIndex != (int)AudioCaptureSource.Unity && _propAudioCaptureSource.enumValueIndex != (int)AudioCaptureSource.Wwise) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Only Manual, Unity and Wwise Audio Sources are available in offline capture mode"); + GUI.color = Color.white; + showAudioOptions = false; + } + #else + if (!_propIsRealtime.boolValue && _propAudioCaptureSource.enumValueIndex != (int)AudioCaptureSource.Manual && _propAudioCaptureSource.enumValueIndex != (int)AudioCaptureSource.Wwise) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Only Manual and Wwise Audio Source is available in offline capture mode"); + GUI.color = Color.white; + showAudioOptions = false; + } + #endif + if (_propIsRealtime.boolValue && _propAudioCaptureSource.enumValueIndex == (int)AudioCaptureSource.Wwise) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Wwise Audio Source is not available in realtime capture mode"); + GUI.color = Color.white; + showAudioOptions = false; + } + #if !AVPRO_MOVIECAPTURE_WWISE_SUPPORT + if (!_propIsRealtime.boolValue && _propAudioCaptureSource.enumValueIndex == (int)AudioCaptureSource.Wwise) + { + GUI.color = Color.red; + GUILayout.TextArea("To support Wwise audio capture: add AVPRO_MOVIECAPTURE_WWISE_SUPPORT to script defines in Player Settings"); + GUI.color = Color.white; + showAudioOptions = false; + } + #endif + + if (showAudioOptions) + { + if (_propAudioCaptureSource.enumValueIndex == (int)AudioCaptureSource.Microphone) + { + // TODO: change this into platform specific........ + // TODO: add search by name support................ + EditorGUILayout.PropertyField(_propForceAudioDeviceIndex); + } + else if (_propAudioCaptureSource.enumValueIndex == (int)AudioCaptureSource.Unity || _propAudioCaptureSource.enumValueIndex == (int)AudioCaptureSource.Wwise) + { + EditorGUILayout.PropertyField(_propUnityAudioCapture); + } + else if (_propAudioCaptureSource.enumValueIndex == (int)AudioCaptureSource.Manual) + { + EditorUtils.IntAsDropdown("Sample Rate", _propManualAudioSampleRate, EditorUtils.CommonAudioSampleRateNames, EditorUtils.CommonAudioSampleRateValues); + EditorGUILayout.PropertyField(_propManualAudioChannelCount, new GUIContent("Channels")); + } + + EditorGUILayout.Space(); + GUI_AudioCodecs(); + EditorGUILayout.Space(); + } + } + } + + EditorGUI.EndDisabledGroup(); + } + + protected void GUI_VideoHints() + { + BeginPlatformSelection("Encoder Hints"); + if (_selectedPlatform >= NativePlugin.Platform.First && _selectedPlatform < NativePlugin.Platform.Count) + { + PropVideoHints props = _propVideoHints[(int)_selectedPlatform]; + EditorUtils.BitrateField("Average Bitrate", props.propAverageBitrate); + EditorGUI.BeginDisabledGroup(_selectedPlatform != NativePlugin.Platform.Windows); + EditorUtils.BitrateField("Maxiumum Bitrate", props.propMaximumBitrate); + EditorGUI.EndDisabledGroup(); + EditorGUILayout.PropertyField(props.propQuality); + EditorGUILayout.PropertyField(props.propKeyframeInterval); + EditorGUILayout.PropertyField(props.propTransparency); + if (_selectedPlatform == NativePlugin.Platform.Windows) + { + EditorGUILayout.PropertyField(props.propHardwareEncoding); + } + else + { + EditorGUI.BeginDisabledGroup(true); + EditorGUILayout.Toggle("Use Hardware Encoding", true); + EditorGUI.EndDisabledGroup(); + } + + if (_selectedPlatform == NativePlugin.Platform.macOS || _selectedPlatform == NativePlugin.Platform.iOS) + { + EditorGUILayout.PropertyField(props.propEnableFragmentedWriting); + if (props.propEnableFragmentedWriting.boolValue) + { + EditorGUILayout.PropertyField(props.propMovieFragmentInterval); + } + } + } + EndPlatformSelection(); + } + + protected void GUI_ImageHints() + { + BeginPlatformSelection("Encoder Hints"); + if (_selectedPlatform >= NativePlugin.Platform.First && _selectedPlatform < NativePlugin.Platform.Count) + { + PropImageHints props = _propImageHints[(int)_selectedPlatform]; + if (_selectedPlatform != NativePlugin.Platform.Windows) + { + EditorGUILayout.PropertyField(props.propQuality); + } + EditorGUILayout.PropertyField(props.propTransparency); + } + EndPlatformSelection(); + } + + protected void GUI_PlatformSpecific() + { + BeginPlatformSelection(); + if (_selectedPlatform >= NativePlugin.Platform.First && _selectedPlatform < NativePlugin.Platform.Count) + { + GUILayout.Label("Video Codecs", EditorStyles.boldLabel); + + if (_selectedPlatform == NativePlugin.Platform.Windows) + { + GUI_VisualCodecs_Windows(); + } + else if (_selectedPlatform == NativePlugin.Platform.macOS) + { + GUI_VisualCodecs_MacOS(); + } + else if (_selectedPlatform == NativePlugin.Platform.iOS) + { + GUI_VisualCodecs_IOS(); + } + else if (_selectedPlatform == NativePlugin.Platform.Android) + { + GUI_VisualCodecs_Android(); + } + + GUILayout.Label("Encoder Hints", EditorStyles.boldLabel); + EditorGUILayout.PropertyField(_propVideoHints[(int)_selectedPlatform].propAverageBitrate); + if (_selectedPlatform == NativePlugin.Platform.Windows) + { + EditorGUILayout.PropertyField(_propVideoHints[(int)_selectedPlatform].propMaximumBitrate); + } + EditorGUILayout.PropertyField(_propVideoHints[(int)_selectedPlatform].propQuality); + EditorGUILayout.PropertyField(_propVideoHints[(int)_selectedPlatform].propKeyframeInterval); + EditorGUILayout.PropertyField(_propVideoHints[(int)_selectedPlatform].propTransparency); + if (_selectedPlatform == NativePlugin.Platform.Windows) + { + EditorGUILayout.PropertyField(_propVideoHints[(int)_selectedPlatform].propHardwareEncoding); + } + else + { + EditorGUI.BeginDisabledGroup(true); + EditorGUILayout.Toggle("Use Hardware Encoding", true); + EditorGUI.EndDisabledGroup(); + } + } + EndPlatformSelection(); + } + + protected void GUI_Post() + { + BeginPlatformSelection(); + if (_selectedPlatform >= NativePlugin.Platform.First && _selectedPlatform < NativePlugin.Platform.Count) + { + PropVideoHints propHints = _propVideoHints[(int)_selectedPlatform]; + EditorGUILayout.PropertyField(propHints.propFastStart, _guiStreamableMP4); + EditorGUILayout.PropertyField(propHints.propInjectStereoPacking, _guiStereoPacking); + if (propHints.propInjectStereoPacking.enumValueIndex == (int)NoneAutoCustom.Custom) + { + EditorGUILayout.PropertyField(propHints.propStereoPacking, _guiBlankSpace); + } + EditorGUILayout.PropertyField(propHints.propInjectSphericalVideoLayout, _guiSphericalLayout); + if (propHints.propInjectSphericalVideoLayout.enumValueIndex == (int)NoneAutoCustom.Custom) + { + EditorGUILayout.PropertyField(propHints.propSphericalVideoLayout, _guiBlankSpace); + } + } + EndPlatformSelection(); + } + + protected void GUI_MotionBlur() + { + EditorGUILayout.PropertyField(_propUseMotionBlur); + if (_propUseMotionBlur.boolValue) + { + EditorGUILayout.PropertyField(_propMotionBlurSamples, _guiContentMotionBlurSamples); + EditorGUILayout.PropertyField(_propMotionBlurCameras, _guiContentMotionBlurCameras, true); + } + } + + private void LoadSettings() + { + _isExpandedStartStop = EditorPrefs.GetBool(SettingsPrefix + "ExpandStartStop", _isExpandedStartStop); + _isExpandedOutput = EditorPrefs.GetBool(SettingsPrefix + "ExpandOutput", _isExpandedOutput); + _isExpandedVisual = EditorPrefs.GetBool(SettingsPrefix + "ExpandVisual", _isExpandedVisual); + _isExpandedAudio = EditorPrefs.GetBool(SettingsPrefix + "ExpandAudio", _isExpandedAudio); + _isExpandedPost = EditorPrefs.GetBool(SettingsPrefix + "ExpandPost", _isExpandedPost); + _isExpandedMisc = EditorPrefs.GetBool(SettingsPrefix + "ExpandMisc", _isExpandedMisc); + _selectedPlatform = (NativePlugin.Platform)EditorPrefs.GetInt(SettingsPrefix + "SelectedPlatform", (int)_selectedPlatform); + } + + private void SaveSettings() + { + EditorPrefs.SetBool(SettingsPrefix + "ExpandStartStop", _isExpandedStartStop); + EditorPrefs.SetBool(SettingsPrefix + "ExpandOutput", _isExpandedOutput); + EditorPrefs.SetBool(SettingsPrefix + "ExpandVisual", _isExpandedVisual); + EditorPrefs.SetBool(SettingsPrefix + "ExpandAudio", _isExpandedAudio); + EditorPrefs.SetBool(SettingsPrefix + "ExpandPost", _isExpandedPost); + EditorPrefs.SetBool(SettingsPrefix + "ExpandMisc", _isExpandedMisc); + EditorPrefs.SetInt(SettingsPrefix + "SelectedPlatform", (int)_selectedPlatform); + } + + protected virtual void OnEnable() + { + #if UNITY_EDITOR_WIN + _selectedPlatform = NativePlugin.Platform.Windows; + #elif UNITY_EDITOR_OSX + _selectedPlatform = NativePlugin.Platform.macOS; + #endif + + LoadSettings(); + + _baseCapture = (CaptureBase)this.target; + + _propCaptureKey = serializedObject.AssertFindProperty("_captureKey"); + _propPersistAcrossSceneLoads = serializedObject.AssertFindProperty("_persistAcrossSceneLoads"); + _propIsRealtime = serializedObject.AssertFindProperty("_isRealTime"); + _propMinimumDiskSpaceMB = serializedObject.AssertFindProperty("_minimumDiskSpaceMB"); + + _propOutputTarget = serializedObject.AssertFindProperty("_outputTarget"); + _propImageSequenceFormatWindows = serializedObject.AssertFindProperty("_imageSequenceFormatWindows"); + _propImageSequenceFormatMacOS = serializedObject.AssertFindProperty("_imageSequenceFormatMacOS"); + _propImageSequenceFormatIOS = serializedObject.AssertFindProperty("_imageSequenceFormatIOS"); + _propImageSequenceFormatAndroid = serializedObject.AssertFindProperty("_imageSequenceFormatAndroid"); + _propImageSequenceStartFrame = serializedObject.AssertFindProperty("_imageSequenceStartFrame"); + _propImageSequenceZeroDigits = serializedObject.AssertFindProperty("_imageSequenceZeroDigits"); + _propOutputFolderType = serializedObject.AssertFindProperty("_outputFolderType"); + _propOutputFolderPath = serializedObject.AssertFindProperty("_outputFolderPath"); + _propAppendFilenameTimestamp = serializedObject.AssertFindProperty("_appendFilenameTimestamp"); + _propFileNamePrefix = serializedObject.AssertFindProperty("_filenamePrefix"); + _propAllowManualFileExtension = serializedObject.AssertFindProperty("_allowManualFileExtension"); + _propFileNameExtension = serializedObject.AssertFindProperty("_filenameExtension"); + _propNamedPipePath = serializedObject.AssertFindProperty("_namedPipePath"); + + _propVideoCodecPriorityWindows = serializedObject.AssertFindProperty("_videoCodecPriorityWindows"); + _propVideoCodecPriorityMacOS = serializedObject.AssertFindProperty("_videoCodecPriorityMacOS"); + //_propVideoCodecPriorityAndroid = serializedObject.AssertFindProperty("_videoCodecPriorityAndroid"); + _propForceVideoCodecIndexWindows = serializedObject.AssertFindProperty("_forceVideoCodecIndexWindows"); + _propForceVideoCodecIndexMacOS = serializedObject.AssertFindProperty("_forceVideoCodecIndexMacOS"); + _propForceVideoCodecIndexIOS = serializedObject.AssertFindProperty("_forceVideoCodecIndexIOS"); + _propForceVideoCodecIndexAndroid = serializedObject.AssertFindProperty("_forceVideoCodecIndexAndroid"); + + _propAudioCodecPriorityWindows = serializedObject.AssertFindProperty("_audioCodecPriorityWindows"); + _propAudioCodecPriorityMacOS = serializedObject.AssertFindProperty("_audioCodecPriorityMacOS"); + //_propAudioCodecPriorityIOS = serializedObject.AssertFindProperty("_audioCodecPriorityIOS"); + //_propAudioCodecPriorityAndroid = serializedObject.AssertFindProperty("_audioCodecPriorityAndroid"); + _propForceAudioCodecIndexWindows = serializedObject.AssertFindProperty("_forceAudioCodecIndexWindows"); + _propForceAudioCodecIndexMacOS = serializedObject.AssertFindProperty("_forceAudioCodecIndexMacOS"); + _propForceAudioCodecIndexIOS = serializedObject.AssertFindProperty("_forceAudioCodecIndexIOS"); + _propForceAudioCodecIndexAndroid = serializedObject.AssertFindProperty("_forceAudioCodecIndexAndroid"); + + _propAudioCaptureSource = serializedObject.AssertFindProperty("_audioCaptureSource"); + _propUnityAudioCapture = serializedObject.AssertFindProperty("_unityAudioCapture"); + _propForceAudioDeviceIndex = serializedObject.AssertFindProperty("_forceAudioInputDeviceIndex"); + _propManualAudioSampleRate = serializedObject.AssertFindProperty("_manualAudioSampleRate"); + _propManualAudioChannelCount = serializedObject.AssertFindProperty("_manualAudioChannelCount"); + + _propDownScale = serializedObject.AssertFindProperty("_downScale"); + _propMaxVideoSize = serializedObject.AssertFindProperty("_maxVideoSize"); + _propFrameRate = serializedObject.AssertFindProperty("_frameRate"); + _propTimelapseScale = serializedObject.AssertFindProperty("_timelapseScale"); + _propFrameUpdateMode = serializedObject.AssertFindProperty("_frameUpdateMode"); + _propFlipVertically = serializedObject.AssertFindProperty("_flipVertically"); + _propForceGpuFlush = serializedObject.AssertFindProperty("_forceGpuFlush"); + _propWaitForEndOfFrame = serializedObject.AssertFindProperty("_useWaitForEndOfFrame"); + _propAndroidNoCaptureRotation = serializedObject.AssertFindProperty("_androidNoCaptureRotation"); + + _propUseMotionBlur = serializedObject.AssertFindProperty("_useMotionBlur"); + _propMotionBlurSamples = serializedObject.AssertFindProperty("_motionBlurSamples"); + _propMotionBlurCameras = serializedObject.AssertFindProperty("_motionBlurCameras"); + + _propStartTrigger = serializedObject.AssertFindProperty("_startTrigger"); + _propStartDelay = serializedObject.AssertFindProperty("_startDelay"); + _propStartDelaySeconds = serializedObject.AssertFindProperty("_startDelaySeconds"); + + _propStopMode = serializedObject.AssertFindProperty("_stopMode"); + _propStopFrames = serializedObject.AssertFindProperty("_stopFrames"); + _propStopSeconds = serializedObject.AssertFindProperty("_stopSeconds"); + + _propVideoHints = new PropVideoHints[(int)NativePlugin.Platform.Count]; + _propVideoHints[(int)NativePlugin.Platform.Windows] = GetProperties_VideoHints(serializedObject, "_encoderHintsWindows.videoHints"); + _propVideoHints[(int)NativePlugin.Platform.macOS] = GetProperties_VideoHints(serializedObject, "_encoderHintsMacOS.videoHints"); + _propVideoHints[(int)NativePlugin.Platform.iOS] = GetProperties_VideoHints(serializedObject, "_encoderHintsIOS.videoHints"); + _propVideoHints[(int)NativePlugin.Platform.Android] = GetProperties_VideoHints(serializedObject, "_encoderHintsAndroid.videoHints"); + + _propImageHints = new PropImageHints[(int)NativePlugin.Platform.Count]; + _propImageHints[(int)NativePlugin.Platform.Windows] = GetProperties_ImageHints(serializedObject, "_encoderHintsWindows.imageHints"); + _propImageHints[(int)NativePlugin.Platform.macOS] = GetProperties_ImageHints(serializedObject, "_encoderHintsMacOS.imageHints"); + _propImageHints[(int)NativePlugin.Platform.iOS] = GetProperties_ImageHints(serializedObject, "_encoderHintsIOS.imageHints"); + _propImageHints[(int)NativePlugin.Platform.Android] = GetProperties_ImageHints(serializedObject, "_encoderHintsAndroid.imageHints"); + + _propLogCaptureStartStop = serializedObject.AssertFindProperty("_logCaptureStartStop"); + _propAllowVsyncDisable = serializedObject.AssertFindProperty("_allowVSyncDisable"); + _propSupportTextureRecreate = serializedObject.AssertFindProperty("_supportTextureRecreate"); + + #if AVPRO_MOVIECAPTURE_PLAYABLES_SUPPORT + _propTimelineController = serializedObject.AssertFindProperty("_timelineController"); + #endif + #if AVPRO_MOVIECAPTURE_VIDEOPLAYER_SUPPORT + _propVideoPlayerController = serializedObject.AssertFindProperty("_videoPlayerController"); + #endif + + _isTrialVersion = false; + if (Application.isPlaying) + { + _isTrialVersion = IsTrialVersion(); + } + } + + private static PropVideoHints GetProperties_VideoHints(SerializedObject serializedObject, string prefix) + { + PropVideoHints result = new PropVideoHints(); + result.propAverageBitrate = serializedObject.AssertFindProperty(prefix + ".averageBitrate"); + result.propMaximumBitrate = serializedObject.AssertFindProperty(prefix + ".maximumBitrate"); + result.propQuality = serializedObject.AssertFindProperty(prefix + ".quality"); + result.propKeyframeInterval = serializedObject.AssertFindProperty(prefix + ".keyframeInterval"); + result.propFastStart = serializedObject.AssertFindProperty(prefix + ".allowFastStartStreamingPostProcess"); + result.propTransparency = serializedObject.AssertFindProperty(prefix + ".supportTransparency"); + result.propHardwareEncoding = serializedObject.AssertFindProperty(prefix + ".useHardwareEncoding"); + result.propInjectStereoPacking = serializedObject.AssertFindProperty(prefix + ".injectStereoPacking"); + result.propStereoPacking = serializedObject.AssertFindProperty(prefix + ".stereoPacking"); + result.propInjectSphericalVideoLayout = serializedObject.AssertFindProperty(prefix + ".injectSphericalVideoLayout"); + result.propSphericalVideoLayout = serializedObject.AssertFindProperty(prefix + ".sphericalVideoLayout"); + result.propEnableFragmentedWriting = serializedObject.AssertFindProperty(prefix + ".enableFragmentedWriting"); + result.propMovieFragmentInterval = serializedObject.AssertFindProperty(prefix + ".movieFragmentInterval"); + return result; + } + + private static PropImageHints GetProperties_ImageHints(SerializedObject serializedObject, string prefix) + { + PropImageHints result = new PropImageHints(); + result.propQuality = serializedObject.AssertFindProperty(prefix + ".quality"); + result.propTransparency = serializedObject.AssertFindProperty(prefix + ".supportTransparency"); + return result; + } + + private void OnDisable() + { + SaveSettings(); + } + + protected static bool IsTrialVersion() + { + bool result = false; + try + { + result = NativePlugin.IsTrialVersion(); + } + catch (System.DllNotFoundException) + { + // Silent catch as we report this error elsewhere + } + return result; + } + + protected static void ShowNoticeBox(MessageType messageType, string message) + { + //GUI.backgroundColor = Color.yellow; + //EditorGUILayout.HelpBox(message, messageType); + + switch (messageType) + { + case MessageType.Error: + GUI.color = Color.red; + message = "Error: " + message; + break; + case MessageType.Warning: + GUI.color = Color.yellow; + message = "Warning: " + message; + break; + } + + //GUI.color = Color.yellow; + GUILayout.TextArea(message); + GUI.color = Color.white; + } + + public override bool RequiresConstantRepaint() + { + CaptureBase capture = (this.target) as CaptureBase; + return (Application.isPlaying && capture.isActiveAndEnabled && capture.IsCapturing() && !capture.IsPaused()); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureBaseEditor.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureBaseEditor.cs.meta new file mode 100644 index 0000000..b904ed7 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureBaseEditor.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d1daa6f19b63e2c418e9046e54cd0888 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureEditorWindow.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureEditorWindow.cs new file mode 100644 index 0000000..9abf763 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureEditorWindow.cs @@ -0,0 +1,2891 @@ +#if UNITY_EDITOR +#if UNITY_2017_3_OR_NEWER + #define AVPRO_MOVIECAPTURE_OFFLINE_AUDIOCAPTURE +#endif +#if UNITY_5_4_OR_NEWER || (UNITY_5 && !UNITY_5_0) + #define AVPRO_MOVIECAPTURE_WINDOWTITLE_51 + #define AVPRO_MOVIECAPTURE_GRAPHICSDEVICETYPE_51 +#endif +#if UNITY_5_4_OR_NEWER || (UNITY_5 && !UNITY_5_0 && !UNITY_5_1 && !UNITY_5_2) + #define AVPRO_MOVIECAPTURE_SCENEMANAGER_53 +#endif +#if UNITY_5_4_OR_NEWER || UNITY_5 + #define AVPRO_MOVIECAPTURE_DEFERREDSHADING +#endif +#if UNITY_2017_1_OR_NEWER + #define AVPRO_MOVIECAPTURE_PLAYABLES_SUPPORT +#endif +#if UNITY_2018_1_OR_NEWER + // Unity 2018.1 introduces stereo cubemap render methods + #define AVPRO_MOVIECAPTURE_UNITY_STEREOCUBEMAP_RENDER +#endif +#if !UNITY_2018_3_OR_NEWER + #define SUPPORT_SCENE_VIEW_GIZMOS_CAPTURE +#endif + +using UnityEngine; +using UnityEditor; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Editor +{ + /// + /// Creates a dockable window in Unity that can be used for handy in-editor capturing + /// + public class CaptureEditorWindow : EditorWindow + { + private const string TempGameObjectName = "Temp97435_MovieCapture"; + private const string SettingsPrefix = "AVProMovieCapture.EditorWindow."; + private const string SelectorPrefix = SettingsPrefix + "CameraSelector."; + + private GameObject _gameObject; + private CaptureBase _capture; + private CaptureFromScreen _captureScreen; + private CaptureFromCamera _captureCamera; + private CaptureFromCamera360 _captureCamera360; + private CaptureFromCamera360ODS _captureCamera360ODS; + private CameraSelector _cameraSelector; +#if AVPRO_MOVIECAPTURE_PLAYABLES_SUPPORT + private TimelineController _timelineController; +#endif + + private static bool _isTrialVersion = false; + private static bool _isCreated = false; + private static bool _isInit = false; + private static bool _isFailedInit = false; + private static bool _showAlpha = false; + + private static int _superSizeIndex = 0; + [SerializeField] string _screenshotFolder = "Captures/Shots/"; + [SerializeField] EditorScreenshot.Options _screenshotOptions = new EditorScreenshot.Options(); + + private static string[] _fileExtensions = new string[0]; + private static string[] _audioDeviceNames = new string[0]; + + private readonly string[] _downScales = { "Original", "Half", "Quarter", "Eighth", "Sixteenth", "Custom" }; + private readonly string[] _captureModes = { "Realtime Capture", "Offline Render" }; + private readonly string[] _outputFolders = { "Project Folder", "Persistent Data Folder", "Absolute Folder", "Desktop", "Pictures", "Videos" }; // NOTE: PhotoLibrary is not included as Unity Editor doesn't have permission to use it anyway + private readonly string[] _sourceNames = { "Screen", "Camera", "Camera 360 (Mono+Stereo)", "Camera 360 (experimental ODS Stereo)" }; + private readonly string[] _tabNames = { "Capture", "Visual", "Audio", "Encoding" }; + + private readonly static GUIContent _guiBlankSpace = new GUIContent(" "); + private readonly static GUIContent _guiCameraSelectorTag = new GUIContent("Tag"); + private readonly static GUIContent _guiCameraSelectorName = new GUIContent("Name"); + private readonly static GUIContent _guiContributingCameras = new GUIContent("Contributing Cameras"); + private readonly static GUIContent _guiCaptureWorldSpaceUI= new GUIContent("Capture Worldspace UI"); + private readonly static GUIContent _guiCameraRotation = new GUIContent("Camera Rotation"); + private readonly static GUIContent _guiInterpupillaryDistance = new GUIContent("Interpupillary distance"); + private readonly static GUIContent _guiStartDelay = new GUIContent("Start Delay"); + private readonly static GUIContent _guiSeconds = new GUIContent("Seconds"); + private readonly static GUIContent _guiStartFrame = new GUIContent("Start Frame"); + private readonly static GUIContent _guiZeroDigits = new GUIContent("Zero Digits"); + private readonly static GUIContent _guiStereoPacking = new GUIContent("Stereo Packing"); + private readonly static GUIContent _guiSphericalLayout = new GUIContent("Spherical Layout"); + + private enum SourceType + { + Screen, + Camera, + Camera360, + Camera360ODS, + } + + private enum ConfigTabs + { + Capture = 0, + Visual = 1, + Audio = 2, + Encoding = 3, + } + + [SerializeField] SourceType _sourceType = SourceType.Screen; + + private Camera _cameraNode; + private string _cameraName; + private int _captureModeIndex; + private int _outputFolderIndex; + + [SerializeField] OutputTarget _outputTarget = OutputTarget.VideoFile; + [SerializeField] ImageSequenceFormat _imageSequenceFormat = ImageSequenceFormat.PNG; + private bool _filenamePrefixFromSceneName = true; + private string _filenamePrefix = "capture"; + private string _filenameExtension = "mp4"; + private int _fileContainerIndex = 0; + + [SerializeField] int _imageSequenceStartFrame = 0; + [SerializeField, Range(2, 12)] int _imageSequenceZeroDigits = 6; + private string _outputFolderRelative = "Captures"; + private string _outputFolderAbsolute = string.Empty; + private bool _appendTimestamp = true; + + [SerializeField] string _namedPipePath = @"\\.\pipe\pipename"; + + private int _downScaleIndex; + private int _downscaleX; + private int _downscaleY; + + private bool _captureMouseCursor = false; + private Texture2D _mouseCursorTexture = null; + + [SerializeField] CaptureBase.Resolution _renderResolution = CaptureBase.Resolution.Original; + private Vector2 _renderSize; + [SerializeField] int _renderAntiAliasing; + + [SerializeField] bool _useContributingCameras = true; + [SerializeField] float _frameRate = 30f; + [SerializeField] int _timelapseScale = 1; + + private AudioCaptureSource _audioCaptureSource = AudioCaptureSource.None; + [SerializeField, Range(8000, 96000)] int _manualAudioSampleRate = 48000; + [SerializeField, Range(1, 8)] int _manualAudioChannelCount = 2; + private Vector2 _scroll = Vector2.zero; + private bool _queueStart; + private Codec _queueConfigureVideoCodec = null; + private Codec _queueConfigureAudioCodec = null; + + private bool _useMotionBlur = false; + private int _motionBlurSampleCount = 16; + + private int _cubemapResolution = 2048; + private int _cubemapDepth = 24; + [SerializeField] bool _render180Degrees = false; + [SerializeField] bool _captureWorldSpaceGUI = false; + [SerializeField] bool _supportCameraRotation = false; + [SerializeField] bool _onlyLeftRightRotation = false; + private int _cubemapStereoPacking = 0; + private float _cubemapStereoIPD = 0.064f; + + [SerializeField] StartDelayMode _startDelay = StartDelayMode.None; + [SerializeField] float _startDelaySeconds = 0f; + + [SerializeField] StopMode _stopMode = StopMode.None; + private int _stopFrames = 300; + private float _stopSeconds = 10f; + + [SerializeField] CameraSelector.SelectByMode _selectBy = CameraSelector.SelectByMode.HighestDepthCamera; + [SerializeField] CameraSelector.ScanFrequencyMode _scanFrequency = CameraSelector.ScanFrequencyMode.SceneLoad; + [SerializeField] bool _scanHiddenCameras = false; + [SerializeField] string _selectCameraTag = "MainCamera"; + [SerializeField] string _selectCameraName = "Main Camera"; + + private SerializedProperty _propCameraSelectorSelectBy; + private SerializedProperty _propCameraSelectorScanFrequency; + private SerializedProperty _propCameraSelectorScanHiddenCameras; + private SerializedProperty _propCameraSelectorTag; + private SerializedProperty _propCameraSelectorName; + + private SerializedProperty _propSourceType; + private SerializedProperty _propOutputTarget; + private SerializedProperty _propImageSequenceFormat; + private SerializedProperty _propImageSequenceStartFrame; + private SerializedProperty _propImageSequenceZeroDigits; + private SerializedProperty _propNamedPipePath; + private SerializedProperty _propFrameRate; + [Tooltip("Timelapse scale makes the frame capture run at a fraction of the target frame rate. Default value is 1")] + private SerializedProperty _propTimelapseScale; + private SerializedProperty _propStartDelay; + private SerializedProperty _propStartDelaySeconds; + private SerializedProperty _propStopMode; + private SerializedProperty _propRenderResolution; + private SerializedProperty _propUseContributingCameras; + private SerializedProperty _propRender180Degrees; + private SerializedProperty _propCaptureWorldSpaceGUI; + private SerializedProperty _propSupportCameraRotation; + private SerializedProperty _propOnlyLeftRightRotation; + private SerializedProperty _propManualAudioSampleRate; + private SerializedProperty _propManualAudioChannelCount; + + private SerializedProperty _propRenderAntiAliasing; + private SerializedProperty _propOdsRender180Degrees; + private SerializedProperty _propOdsCamera; + private SerializedProperty _propOdsIPD; + private SerializedProperty _propOdsPixelSliceSize; + private SerializedProperty _propOdsPaddingSize; + private SerializedProperty _propOdsCameraClearMode; + private SerializedProperty _propOdsCameraClearColor; + + [SerializeField] CaptureFromCamera360ODS.Settings _odsSettings = new CaptureFromCamera360ODS.Settings(); + + private SerializedProperty _propVideoHintsAverageBitrate; +#if UNITY_EDITOR_WIN + private SerializedProperty _propVideoHintsMaximumBitrate; +#endif + private SerializedProperty _propVideoHintsQuality; + private SerializedProperty _propVideoHintsKeyframeInterval; + private SerializedProperty _propVideoHintsAllowFastStart; + private SerializedProperty _propVideoHintsSupportTransparency; +#if UNITY_EDITOR_WIN + private SerializedProperty _propVideoHintsUseHardwareEncoding; +#elif UNITY_EDITOR_OSX + private SerializedProperty _propVideoHintsEnableFragmentedWriting; + private SerializedProperty _propVideoHintsMovieFragmentInterval; +#endif + private SerializedProperty _propVideoHintsInjectStereoPacking; + private SerializedProperty _propVideoHintsStereoPacking; + private SerializedProperty _propVideoHintsInjectSphericalVideoLayout; + private SerializedProperty _propVideoHintsSphericalVideoLayout; + +#if UNITY_EDITOR_OSX + private SerializedProperty _propImageHintsQuality; +#endif + private SerializedProperty _propImageHintsSupportTransparency; + + private SerializedProperty _propScreenshotFolder; + private SerializedProperty _propScreenshotOptions; + + [SerializeField] EncoderHints _encoderHints = new EncoderHints(); + + // TODO: we should actually be saving these parameters per-scene... + + private Codec _videoCodec = null; + private Codec _audioCodec = null; + private Device _audioInputDevice = null; + + private long _lastFileSize; + private uint _lastEncodedMinutes; + private uint _lastEncodedSeconds; + private uint _lastEncodedFrame; + private int _selectedTool; + private int _selectedConfigTab; + private bool _expandSectionTrial = true; + + private static Texture2D _icon; + private string _pluginVersionWarningText = string.Empty; + + private SerializedObject _so; + + private const string LinkPluginWebsite = "http://renderheads.com/products/avpro-movie-capture/"; + private const string LinkForumPage = "http://forum.unity3d.com/threads/released-avpro-movie-capture.120717/"; + private const string LinkAssetStorePage = "https://assetstore.unity.com/packages/tools/video/avpro-movie-capture-151061?aid=1101lcNgx"; + private const string LinkSupport = "https://github.com/RenderHeads/UnityPlugin-AVProMovieCapture/issues"; + private const string LinkUserManual = "https://www.renderheads.com/content/docs/AVProMovieCapture/articles/download.html"; + + private const string SupportMessage = "If you are reporting a bug, please include any relevant files and details so that we may remedy the problem as fast as possible.\n\n" + + "Essential details:\n" + + "+ Error message\n" + + " + The exact error message\n" + + " + The console/output log if possible\n" + + "+ Development environment\n" + + " + Unity version\n" + + " + Development OS version\n" + + " + AVPro Movie Capture plugin version\n"; + + [MenuItem("Window/Open AVPro Movie Capture..")] + public static void Init() + { + if (_isInit || _isCreated) + { + CaptureEditorWindow window = (CaptureEditorWindow)EditorWindow.GetWindow(typeof(CaptureEditorWindow)); + window.Close(); + return; + } + + _isCreated = true; + + // Get existing open window or if none, make a new one: + CaptureEditorWindow window2 = (CaptureEditorWindow)EditorWindow.GetWindow(typeof(CaptureEditorWindow)); + if (window2 != null) + { + window2.SetupWindow(); + } + } + + public void SetupWindow() + { + _isCreated = true; + if ((Application.platform == RuntimePlatform.WindowsEditor) + || (Application.platform == RuntimePlatform.OSXEditor)) + { + this.minSize = new Vector2(200f, 48f); + this.maxSize = new Vector2(340f, 620f); +#if AVPRO_MOVIECAPTURE_WINDOWTITLE_51 + if (_icon != null) + { + this.titleContent = new GUIContent("Movie Capture", _icon, "AVPro Movie Capture"); + } + else + { + this.titleContent = new GUIContent("Movie Capture", "AVPro Movie Capture"); + } +#else + this.title = "Movie Capture"; +#endif + this.CreateGUI(); + this.LoadSettings(); + + _so = new SerializedObject(this); + if (_so == null) + { + Debug.LogError("[AVProMovieCapture] SerializedObject is null"); + } + + _propSourceType = _so.AssertFindProperty("_sourceType"); + _propOutputTarget = _so.AssertFindProperty("_outputTarget"); + _propImageSequenceFormat = _so.AssertFindProperty("_imageSequenceFormat"); + _propImageSequenceStartFrame = _so.AssertFindProperty("_imageSequenceStartFrame"); + _propImageSequenceZeroDigits = _so.AssertFindProperty("_imageSequenceZeroDigits"); + _propNamedPipePath = _so.AssertFindProperty("_namedPipePath"); + _propRenderResolution = _so.AssertFindProperty("_renderResolution"); + _propUseContributingCameras = _so.AssertFindProperty("_useContributingCameras"); + _propRender180Degrees = _so.AssertFindProperty("_render180Degrees"); + _propCaptureWorldSpaceGUI = _so.AssertFindProperty("_captureWorldSpaceGUI"); + _propSupportCameraRotation = _so.AssertFindProperty("_supportCameraRotation"); + _propOnlyLeftRightRotation = _so.AssertFindProperty("_onlyLeftRightRotation"); + + // Audio + _propManualAudioSampleRate = _so.AssertFindProperty("_manualAudioSampleRate"); + _propManualAudioChannelCount = _so.AssertFindProperty("_manualAudioChannelCount"); + + // Time + _propFrameRate = _so.AssertFindProperty("_frameRate"); + _propTimelapseScale = _so.AssertFindProperty("_timelapseScale"); + + // Start/Stop + _propStopMode = _so.AssertFindProperty("_stopMode"); + _propStartDelay = _so.AssertFindProperty("_startDelay"); + _propStartDelaySeconds = _so.AssertFindProperty("_startDelaySeconds"); + + // Camera Selector + _propCameraSelectorSelectBy = _so.AssertFindProperty("_selectBy"); + _propCameraSelectorScanFrequency = _so.AssertFindProperty("_scanFrequency"); + _propCameraSelectorScanHiddenCameras = _so.AssertFindProperty("_scanHiddenCameras"); + _propCameraSelectorTag = _so.AssertFindProperty("_selectCameraTag"); + _propCameraSelectorName = _so.AssertFindProperty("_selectCameraName"); + + _propRenderAntiAliasing = _so.AssertFindProperty("_renderAntiAliasing"); + _propOdsIPD = _so.AssertFindProperty("_odsSettings.ipd"); + _propOdsRender180Degrees = _so.AssertFindProperty("_odsSettings.render180Degrees"); + _propOdsPixelSliceSize = _so.AssertFindProperty("_odsSettings.pixelSliceSize"); + _propOdsPaddingSize = _so.AssertFindProperty("_odsSettings.paddingSize"); + _propOdsCameraClearMode = _so.AssertFindProperty("_odsSettings.cameraClearMode"); + _propOdsCameraClearColor = _so.AssertFindProperty("_odsSettings.cameraClearColor"); + + _propVideoHintsAverageBitrate = _so.AssertFindProperty("_encoderHints.videoHints.averageBitrate"); +#if UNITY_EDITOR_WIN + _propVideoHintsMaximumBitrate = _so.AssertFindProperty("_encoderHints.videoHints.maximumBitrate"); +#endif + _propVideoHintsQuality = _so.AssertFindProperty("_encoderHints.videoHints.quality"); + _propVideoHintsKeyframeInterval = _so.AssertFindProperty("_encoderHints.videoHints.keyframeInterval"); + _propVideoHintsAllowFastStart = _so.AssertFindProperty("_encoderHints.videoHints.allowFastStartStreamingPostProcess"); + _propVideoHintsSupportTransparency = _so.AssertFindProperty("_encoderHints.videoHints.supportTransparency"); +#if UNITY_EDITOR_WIN + _propVideoHintsUseHardwareEncoding = _so.AssertFindProperty("_encoderHints.videoHints.useHardwareEncoding"); +#elif UNITY_EDITOR_OSX + _propVideoHintsEnableFragmentedWriting = _so.AssertFindProperty("_encoderHints.videoHints.enableFragmentedWriting"); + _propVideoHintsMovieFragmentInterval = _so.AssertFindProperty("_encoderHints.videoHints.movieFragmentInterval"); +#endif + _propVideoHintsInjectStereoPacking = _so.AssertFindProperty("_encoderHints.videoHints.injectStereoPacking"); + _propVideoHintsStereoPacking = _so.AssertFindProperty("_encoderHints.videoHints.stereoPacking"); + _propVideoHintsInjectSphericalVideoLayout = _so.AssertFindProperty("_encoderHints.videoHints.injectSphericalVideoLayout"); + _propVideoHintsSphericalVideoLayout = _so.AssertFindProperty("_encoderHints.videoHints.sphericalVideoLayout"); + +#if UNITY_EDITOR_OSX + _propImageHintsQuality = _so.AssertFindProperty("_encoderHints.imageHints.quality"); +#endif + _propImageHintsSupportTransparency = _so.AssertFindProperty("_encoderHints.imageHints.supportTransparency"); + + _propScreenshotOptions = _so.AssertFindProperty("_screenshotOptions"); + _propScreenshotFolder = _so.AssertFindProperty("_screenshotFolder"); + + this.Repaint(); + } + } + + private void LoadSettings() + { + _sourceType = (SourceType)EditorPrefs.GetInt(SettingsPrefix + "SourceType", (int)_sourceType); + + _cameraName = EditorPrefs.GetString(SettingsPrefix + "CameraName", string.Empty); + _captureModeIndex = EditorPrefs.GetInt(SettingsPrefix + "CaptureModeIndex", 0); + + _captureMouseCursor = EditorPrefs.GetBool(SettingsPrefix + "CaptureMouseCursor", false); + string mouseCursorGuid = EditorPrefs.GetString(SettingsPrefix + "CaptureMouseTexture", string.Empty); + if (!string.IsNullOrEmpty(mouseCursorGuid)) + { + string mouseCursorPath = AssetDatabase.GUIDToAssetPath(mouseCursorGuid); + if (!string.IsNullOrEmpty(mouseCursorPath)) + { + _mouseCursorTexture = (Texture2D)AssetDatabase.LoadAssetAtPath(mouseCursorPath, typeof(Texture2D)); + } + } + + _outputTarget = (OutputTarget)EditorPrefs.GetInt(SettingsPrefix + "OutputTarget", (int)_outputTarget); + _imageSequenceFormat = (ImageSequenceFormat)EditorPrefs.GetInt(SettingsPrefix + "ImageSequenceFormat", (int)_imageSequenceFormat); + _namedPipePath = EditorPrefs.GetString(SettingsPrefix + "NamedPipePath", _namedPipePath); + _filenamePrefixFromSceneName = EditorPrefs.GetBool(SettingsPrefix + "FilenamePrefixFromScenename", _filenamePrefixFromSceneName); + _filenamePrefix = EditorPrefs.GetString(SettingsPrefix + "FilenamePrefix", "capture"); + _filenameExtension = EditorPrefs.GetString(SettingsPrefix + "FilenameExtension", _filenameExtension); + _fileContainerIndex = EditorPrefs.GetInt(SettingsPrefix + "FileContainerIndex", _fileContainerIndex); + _appendTimestamp = EditorPrefs.GetBool(SettingsPrefix + "AppendTimestamp", true); + _imageSequenceStartFrame = EditorPrefs.GetInt(SettingsPrefix + "ImageSequenceStartFrame", 0); + _imageSequenceZeroDigits = EditorPrefs.GetInt(SettingsPrefix + "ImageSequenceZeroDigits", 6); + + _outputFolderIndex = EditorPrefs.GetInt(SettingsPrefix + "OutputFolderIndex", (int)CaptureBase.OutputPath.RelativeToProject); + _outputFolderRelative = EditorPrefs.GetString(SettingsPrefix + "OutputFolderRelative", "Captures"); + _outputFolderAbsolute = EditorPrefs.GetString(SettingsPrefix + "OutputFolderAbsolute", string.Empty); + + _downScaleIndex = EditorPrefs.GetInt(SettingsPrefix + "DownScaleIndex", 0); + _downscaleX = EditorPrefs.GetInt(SettingsPrefix + "DownScaleX", 1); + _downscaleY = EditorPrefs.GetInt(SettingsPrefix + "DownScaleY", 1); + _frameRate = EditorPrefs.GetFloat(SettingsPrefix + "FrameRate", _frameRate); + _timelapseScale = EditorPrefs.GetInt(SettingsPrefix + "TimelapseScale", 1); + + _renderResolution = (CaptureBase.Resolution)EditorPrefs.GetInt(SettingsPrefix + "RenderResolution", (int)_renderResolution); + _renderSize.x = EditorPrefs.GetInt(SettingsPrefix + "RenderWidth", 0); + _renderSize.y = EditorPrefs.GetInt(SettingsPrefix + "RenderHeight", 0); + _renderAntiAliasing = EditorPrefs.GetInt(SettingsPrefix + "RenderAntiAliasing", 0); + _useContributingCameras = EditorPrefs.GetBool(SettingsPrefix + "UseContributingCameras", true); + + _audioCaptureSource = (AudioCaptureSource)EditorPrefs.GetInt(SettingsPrefix + "AudioCaptureSource", (int)_audioCaptureSource); + _audioInputDevice = DeviceManager.AudioInputDevices.FindDevice(EditorPrefs.GetString(SettingsPrefix + "AudioInputDeviceName", "")); + _manualAudioChannelCount = Mathf.Clamp(EditorPrefs.GetInt(SettingsPrefix + "ManualAudioChannelCount", (int)_manualAudioChannelCount), 1, 8); + _manualAudioSampleRate = Mathf.Clamp(EditorPrefs.GetInt(SettingsPrefix + "ManualAudioSampleRate", (int)_manualAudioSampleRate), 8000, 96000); + + _useMotionBlur = EditorPrefs.GetBool(SettingsPrefix + "UseMotionBlur", false); + _motionBlurSampleCount = EditorPrefs.GetInt(SettingsPrefix + "MotionBlurSampleCount", 16); + + _render180Degrees = EditorPrefs.GetBool(SettingsPrefix + "Render180Degrees", false); + _captureWorldSpaceGUI = EditorPrefs.GetBool(SettingsPrefix + "CaptureWorldSpaceGUI", false); + _supportCameraRotation = EditorPrefs.GetBool(SettingsPrefix + "SupportCameraRotation", false); + _onlyLeftRightRotation = EditorPrefs.GetBool(SettingsPrefix + "OnlyLeftRightRotation", false); + _cubemapResolution = EditorPrefs.GetInt(SettingsPrefix + "CubemapResolution", 2048); + _cubemapDepth = EditorPrefs.GetInt(SettingsPrefix + "CubemapDepth", 24); + _cubemapStereoPacking = EditorPrefs.GetInt(SettingsPrefix + "CubemapStereoPacking", 0); + _cubemapStereoIPD = EditorPrefs.GetFloat(SettingsPrefix + "CubemapStereoIPD", 0.064f); + + _startDelay = (StartDelayMode)EditorPrefs.GetInt(SettingsPrefix + "StartDelay", (int)_startDelay); + _startDelaySeconds = EditorPrefs.GetFloat(SettingsPrefix + "StartDelaySeconds", _startDelaySeconds); + + _stopMode = (StopMode)EditorPrefs.GetInt(SettingsPrefix + "StopMode", (int)_stopMode); + _stopFrames = EditorPrefs.GetInt(SettingsPrefix + "StopFrames", _stopFrames); + _stopSeconds = EditorPrefs.GetFloat(SettingsPrefix + "StopSeconds", _stopSeconds); + + _encoderHints.videoHints.averageBitrate = (uint)EditorPrefs.GetInt(SettingsPrefix + "EncoderHints.VideoHints.AverageBitrate", (int)_encoderHints.videoHints.averageBitrate); + _encoderHints.videoHints.maximumBitrate = (uint)EditorPrefs.GetInt(SettingsPrefix + "EncoderHints.VideoHints.MaximumBitrate", (int)_encoderHints.videoHints.maximumBitrate); + _encoderHints.videoHints.quality = EditorPrefs.GetFloat(SettingsPrefix + "EncoderHints.VideoHints.Quality", _encoderHints.videoHints.quality); + _encoderHints.videoHints.keyframeInterval = (uint)EditorPrefs.GetInt(SettingsPrefix + "EncoderHints.VideoHints.KeyframeInterval", (int)_encoderHints.videoHints.keyframeInterval); + _encoderHints.videoHints.allowFastStartStreamingPostProcess = EditorPrefs.GetBool(SettingsPrefix + "EncoderHints.VideoHints.AllowFastStart", _encoderHints.videoHints.allowFastStartStreamingPostProcess); + _encoderHints.videoHints.supportTransparency = EditorPrefs.GetBool(SettingsPrefix + "EncoderHints.VideoHints.SupportTransparency", _encoderHints.videoHints.supportTransparency); + _encoderHints.videoHints.useHardwareEncoding = EditorPrefs.GetBool(SettingsPrefix + "EncoderHints.VideoHints.UseHardwareEncoding", _encoderHints.videoHints.useHardwareEncoding); + _encoderHints.videoHints.enableFragmentedWriting = EditorPrefs.GetBool(SettingsPrefix + "EncoderHints.VideoHints.EnableFragmentedWriting", _encoderHints.videoHints.enableFragmentedWriting); + _encoderHints.videoHints.movieFragmentInterval = (double)EditorPrefs.GetFloat(SettingsPrefix + "EncoderHints.VideoHints.MovieFragmentInterval", (float)_encoderHints.videoHints.movieFragmentInterval); + _encoderHints.videoHints.injectStereoPacking = (NoneAutoCustom)EditorPrefs.GetInt(SettingsPrefix + "EncoderHints.VideoHints.InjectStereoPacking", (int)_encoderHints.videoHints.injectStereoPacking); + _encoderHints.videoHints.stereoPacking = (StereoPacking)EditorPrefs.GetInt(SettingsPrefix + "EncoderHints.VideoHints.StereoPacking", (int)_encoderHints.videoHints.stereoPacking); + _encoderHints.videoHints.injectSphericalVideoLayout = (NoneAutoCustom)EditorPrefs.GetInt(SettingsPrefix + "EncoderHints.VideoHints.InjectSphericalVideoLayout", (int)_encoderHints.videoHints.injectSphericalVideoLayout); + _encoderHints.videoHints.sphericalVideoLayout = (SphericalVideoLayout)EditorPrefs.GetInt(SettingsPrefix + "EncoderHints.VideoHints.SphericalVideoLayout", (int)_encoderHints.videoHints.sphericalVideoLayout); + _encoderHints.imageHints.quality = EditorPrefs.GetFloat(SettingsPrefix + "EncoderHints.ImageHints.Quality", _encoderHints.imageHints.quality); + _encoderHints.imageHints.supportTransparency = EditorPrefs.GetBool(SettingsPrefix + "EncoderHints.ImageHints.SupportTransparency", _encoderHints.imageHints.supportTransparency); + + if (!string.IsNullOrEmpty(_cameraName)) + { + Camera[] cameras = (Camera[])GameObject.FindObjectsOfType(typeof(Camera)); + foreach (Camera cam in cameras) + { + if (cam.name == _cameraName) + { + _cameraNode = cam; + break; + } + } + } + + _showAlpha = EditorPrefs.GetBool(SettingsPrefix + "ShowAlphaChannel", false); + _superSizeIndex = EditorPrefs.GetInt(SettingsPrefix + "SuperSizeIndex", 0); + _screenshotFolder = EditorPrefs.GetString(SettingsPrefix + "ScreenshotFolder", _screenshotFolder); + _screenshotOptions.exrPrecision = (EditorScreenshot.ExrPrecision)EditorPrefs.GetInt(SettingsPrefix + "ScreenshotOptions.ExrPrecision", (int)_screenshotOptions.exrPrecision); + _screenshotOptions.exrCompression = (EditorScreenshot.ExrCompression)EditorPrefs.GetInt(SettingsPrefix + "ScreenshotOptions.ExrCompression", (int)_screenshotOptions.exrCompression); + _screenshotOptions.jpgQuality = EditorPrefs.GetInt(SettingsPrefix + "ScreenshotOptions.JpgQuality", (int)_screenshotOptions.jpgQuality); + + // Codecs + _videoCodec = CodecManager.VideoCodecs.FindCodec(EditorPrefs.GetString(SettingsPrefix + "VideoCodecName", "")); + _audioCodec = CodecManager.AudioCodecs.FindCodec(EditorPrefs.GetString(SettingsPrefix + "AudioCodecName", "")); + UpdateSelectedCodec(); + + // Camera selector + _selectBy = (CameraSelector.SelectByMode)EditorPrefs.GetInt(SelectorPrefix + "SelectBy", (int)_selectBy); + _scanFrequency = (CameraSelector.ScanFrequencyMode)EditorPrefs.GetInt(SelectorPrefix + "ScanFrequency", (int)_scanFrequency); + _scanHiddenCameras = EditorPrefs.GetBool(SelectorPrefix + "ScanHiddenCameras", _scanHiddenCameras); + _selectCameraTag = EditorPrefs.GetString(SelectorPrefix + "Tag", _selectCameraTag); + _selectCameraName = EditorPrefs.GetString(SelectorPrefix + "Name", _selectCameraName); + } + + private void SaveSettings() + { + EditorPrefs.SetInt(SettingsPrefix + "SourceType", (int)_sourceType); + EditorPrefs.SetString(SettingsPrefix + "CameraName", _cameraName); + EditorPrefs.SetInt(SettingsPrefix + "CaptureModeIndex", _captureModeIndex); + EditorPrefs.SetBool(SettingsPrefix + "CaptureMouseCursor", _captureMouseCursor); + string mouseCursorGuid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(_mouseCursorTexture)); + EditorPrefs.SetString(SettingsPrefix + "CaptureMouseTexture", mouseCursorGuid); + + EditorPrefs.SetInt(SettingsPrefix + "OutputTarget", (int)_outputTarget); + EditorPrefs.SetInt(SettingsPrefix + "ImageSequenceFormat", (int)_imageSequenceFormat); + EditorPrefs.SetString(SettingsPrefix + "NamedPipePath", _namedPipePath); + EditorPrefs.SetBool(SettingsPrefix + "FilenamePrefixFromScenename", _filenamePrefixFromSceneName); + EditorPrefs.SetString(SettingsPrefix + "FilenamePrefix", _filenamePrefix); + EditorPrefs.SetString(SettingsPrefix + "FilenameExtension", _filenameExtension); + EditorPrefs.SetInt(SettingsPrefix + "FileContainerIndex", _fileContainerIndex); + EditorPrefs.SetBool(SettingsPrefix + "AppendTimestamp", _appendTimestamp); + EditorPrefs.SetInt(SettingsPrefix + "ImageSequenceStartFrame", _imageSequenceStartFrame); + EditorPrefs.SetInt(SettingsPrefix + "ImageSequenceZeroDigits", _imageSequenceZeroDigits); + + EditorPrefs.SetInt(SettingsPrefix + "OutputFolderIndex", _outputFolderIndex); + EditorPrefs.SetString(SettingsPrefix + "OutputFolderRelative", _outputFolderRelative); + EditorPrefs.SetString(SettingsPrefix + "OutputFolderAbsolute", _outputFolderAbsolute); + + EditorPrefs.SetInt(SettingsPrefix + "DownScaleIndex", _downScaleIndex); + EditorPrefs.SetInt(SettingsPrefix + "DownScaleX", _downscaleX); + EditorPrefs.SetInt(SettingsPrefix + "DownScaleY", _downscaleY); + EditorPrefs.SetFloat(SettingsPrefix + "FrameRate", _frameRate); + EditorPrefs.SetInt(SettingsPrefix + "TimelapseScale", _timelapseScale); + + EditorPrefs.SetInt(SettingsPrefix + "RenderResolution", (int)_renderResolution); + EditorPrefs.SetInt(SettingsPrefix + "RenderWidth", (int)_renderSize.x); + EditorPrefs.SetInt(SettingsPrefix + "RenderHeight", (int)_renderSize.y); + EditorPrefs.SetInt(SettingsPrefix + "RenderAntiAliasing", _renderAntiAliasing); + EditorPrefs.SetBool(SettingsPrefix + "UseContributingCameras", _useContributingCameras); + + EditorPrefs.SetString(SettingsPrefix + "VideoCodecName", (_videoCodec != null)?_videoCodec.Name:string.Empty); + EditorPrefs.SetString(SettingsPrefix + "AudioCodecName", (_audioCodec != null)?_audioCodec.Name:string.Empty); + + EditorPrefs.SetInt(SettingsPrefix + "AudioCaptureSource", (int)_audioCaptureSource); + EditorPrefs.SetString(SettingsPrefix + "AudioInputDeviceName", (_audioInputDevice != null)?_audioInputDevice.Name:string.Empty); + EditorPrefs.SetInt(SettingsPrefix + "ManualAudioChannelCount", _manualAudioChannelCount); + EditorPrefs.SetInt(SettingsPrefix + "ManualAudioSampleRate", _manualAudioSampleRate); + + EditorPrefs.SetBool(SettingsPrefix + "UseMotionBlur", _useMotionBlur); + EditorPrefs.SetInt(SettingsPrefix + "MotionBlurSampleCount", _motionBlurSampleCount); + + EditorPrefs.SetBool(SettingsPrefix + "Render180Degrees", _render180Degrees); + EditorPrefs.SetBool(SettingsPrefix + "CaptureWorldSpaceGUI", _captureWorldSpaceGUI); + EditorPrefs.SetBool(SettingsPrefix + "SupportCameraRotation", _supportCameraRotation); + EditorPrefs.SetBool(SettingsPrefix + "OnlyLeftRightRotation", _onlyLeftRightRotation); + EditorPrefs.SetInt(SettingsPrefix + "CubemapResolution", _cubemapResolution); + EditorPrefs.SetInt(SettingsPrefix + "CubemapDepth", _cubemapDepth); + EditorPrefs.SetInt(SettingsPrefix + "CubemapStereoPacking", _cubemapStereoPacking); + EditorPrefs.SetFloat(SettingsPrefix + "CubemapStereoIPD", _cubemapStereoIPD); + + EditorPrefs.SetInt(SettingsPrefix + "StartDelay", (int)_startDelay); + EditorPrefs.SetFloat(SettingsPrefix + "StartDelaySeconds", _startDelaySeconds); + + EditorPrefs.SetInt(SettingsPrefix + "StopMode", (int)_stopMode); + EditorPrefs.SetInt(SettingsPrefix + "StopFrames", _stopFrames); + EditorPrefs.SetFloat(SettingsPrefix + "StopSeconds", _stopSeconds); + + EditorPrefs.SetInt(SettingsPrefix + "EncoderHints.VideoHints.AverageBitrate", (int)_encoderHints.videoHints.averageBitrate); + EditorPrefs.SetInt(SettingsPrefix + "EncoderHints.VideoHints.MaximumBitrate", (int)_encoderHints.videoHints.maximumBitrate); + EditorPrefs.SetFloat(SettingsPrefix + "EncoderHints.VideoHints.Quality", _encoderHints.videoHints.quality); + EditorPrefs.SetInt(SettingsPrefix + "EncoderHints.VideoHints.KeyframeInterval", (int)_encoderHints.videoHints.keyframeInterval); + EditorPrefs.SetBool(SettingsPrefix + "EncoderHints.VideoHints.AllowFastStart", _encoderHints.videoHints.allowFastStartStreamingPostProcess); + EditorPrefs.SetBool(SettingsPrefix + "EncoderHints.VideoHints.SupportTransparency", _encoderHints.videoHints.supportTransparency); + EditorPrefs.SetBool(SettingsPrefix + "EncoderHints.VideoHints.UseHardwareEncoding", _encoderHints.videoHints.useHardwareEncoding); + EditorPrefs.SetBool(SettingsPrefix + "EncoderHints.VideoHints.EnableFragmentedWriting", _encoderHints.videoHints.enableFragmentedWriting); + EditorPrefs.SetFloat(SettingsPrefix + "EncoderHints.VideoHints.MovieFragmentInterval", (float)_encoderHints.videoHints.movieFragmentInterval); + EditorPrefs.SetInt(SettingsPrefix + "EncoderHints.VideoHints.InjectStereoPacking", (int)_encoderHints.videoHints.injectStereoPacking); + EditorPrefs.SetInt(SettingsPrefix + "EncoderHints.VideoHints.StereoPacking", (int)_encoderHints.videoHints.stereoPacking); + EditorPrefs.SetInt(SettingsPrefix + "EncoderHints.VideoHints.InjectSphericalVideoLayout", (int)_encoderHints.videoHints.injectSphericalVideoLayout); + EditorPrefs.SetInt(SettingsPrefix + "EncoderHints.VideoHints.SphericalVideoLayout", (int)_encoderHints.videoHints.sphericalVideoLayout); + EditorPrefs.SetFloat(SettingsPrefix + "EncoderHints.ImageHints.Quality", _encoderHints.imageHints.quality); + EditorPrefs.SetBool(SettingsPrefix + "EncoderHints.ImageHints.SupportTransparency", _encoderHints.imageHints.supportTransparency); + + EditorPrefs.SetBool(SettingsPrefix + "ShowAlphaChannel", _showAlpha); + EditorPrefs.SetInt(SettingsPrefix + "SuperSizeIndex", _superSizeIndex); + EditorPrefs.SetString(SettingsPrefix + "ScreenshotFolder", _screenshotFolder); + EditorPrefs.SetInt(SettingsPrefix + "ScreenshotOptions.ExrPrecision", (int)_screenshotOptions.exrPrecision); + EditorPrefs.SetInt(SettingsPrefix + "ScreenshotOptions.ExrCompression", (int)_screenshotOptions.exrCompression); + EditorPrefs.SetInt(SettingsPrefix + "ScreenshotOptions.JpgQuality", _screenshotOptions.jpgQuality); + + // Camera selector + EditorPrefs.SetInt(SelectorPrefix + "SelectBy", (int)_selectBy); + EditorPrefs.SetInt(SelectorPrefix + "ScanFrequency", (int)_scanFrequency); + EditorPrefs.SetBool(SelectorPrefix + "ScanHiddenCameras", _scanHiddenCameras); + EditorPrefs.SetString(SelectorPrefix + "Tag", _selectCameraTag); + EditorPrefs.SetString(SelectorPrefix + "Name", _selectCameraName); + } + + private void ResetSettings() + { + _sourceType = SourceType.Screen; + _cameraNode = null; + _cameraName = string.Empty; + _captureModeIndex = 0; + _captureMouseCursor = false; + _mouseCursorTexture = null; + _outputTarget = OutputTarget.VideoFile; + _imageSequenceFormat = ImageSequenceFormat.PNG; + _namedPipePath = @"\\.\pipe\test_pipe"; + _filenamePrefixFromSceneName = true; + _filenamePrefix = "capture"; + _filenameExtension = "mp4"; + _imageSequenceStartFrame = 0; + _imageSequenceZeroDigits = 6; + _outputFolderIndex = (int)CaptureBase.OutputPath.RelativeToProject; + _outputFolderRelative = "Captures"; + _outputFolderAbsolute = string.Empty; + _appendTimestamp = true; + _downScaleIndex = 0; + _downscaleX = 1; + _downscaleY = 1; + _frameRate = 30f; + _timelapseScale = 1; + _videoCodec = null; + _audioCodec = null; + _renderResolution = CaptureBase.Resolution.Original; + _renderSize = Vector2.one; + _renderAntiAliasing = 0; + _useContributingCameras = true; + _audioCaptureSource = AudioCaptureSource.None; + _audioInputDevice = null; + _manualAudioChannelCount = 2; + _manualAudioSampleRate = 48000; + _useMotionBlur = false; + _motionBlurSampleCount = 16; + _render180Degrees = false; + _captureWorldSpaceGUI = false; + _supportCameraRotation = false; + _onlyLeftRightRotation = false; + _cubemapResolution = 2048; + _cubemapDepth = 24; + _cubemapStereoPacking = 0; + _startDelay = StartDelayMode.None; + _startDelaySeconds = 0f; + _stopMode = StopMode.None; + _cubemapStereoIPD = 0.064f; + _stopFrames = 300; + _stopSeconds = 10f; + _encoderHints = new EncoderHints(); + _odsSettings = new CaptureFromCamera360ODS.Settings(); + + UpdateSelectedCodec(); + + // Camera selector + _selectBy = CameraSelector.SelectByMode.HighestDepthCamera; + _scanFrequency = CameraSelector.ScanFrequencyMode.SceneLoad; + _scanHiddenCameras = false; + _selectCameraTag = "MainCamera"; + _selectCameraName = "Main Camera"; + } + + private void Configure(CaptureBase capture) + { + capture.VideoCodecPriorityWindows = new string[0]; + capture.VideoCodecPriorityMacOS = new string[0]; + capture.AudioCodecPriorityWindows = new string[0]; + capture.AudioCodecPriorityMacOS = new string[0]; + + capture.FrameRate = _frameRate; + capture.TimelapseScale = _timelapseScale; + capture.ResolutionDownScale = GetDownScaleFromIndex(_downScaleIndex); + if (capture.ResolutionDownScale == CaptureBase.DownScale.Custom) + { + capture.ResolutionDownscaleCustom = new Vector2(_downscaleX, _downscaleY); + } + + capture.StartDelay = _startDelay; + capture.StartDelaySeconds = _startDelaySeconds; + capture.StopMode = _stopMode; + capture.StopAfterFramesElapsed = _stopFrames; + capture.StopAfterSecondsElapsed = _stopSeconds; + capture.SetEncoderHints(_encoderHints); + + capture.IsRealTime = IsCaptureRealTime(); + + capture.OutputTarget = _outputTarget; + if (_outputTarget == OutputTarget.VideoFile) + { + capture.FilenamePrefix = _filenamePrefix; + capture.AppendFilenameTimestamp = _appendTimestamp; + capture.AllowManualFileExtension = true; + capture.FilenameExtension = _filenameExtension; + } + else if (_outputTarget == OutputTarget.NamedPipe) + { + capture.NamedPipePath = _namedPipePath; + } + else if (_outputTarget == OutputTarget.ImageSequence) + { + capture.NativeImageSequenceFormat = _imageSequenceFormat; + capture.ImageSequenceStartFrame = _imageSequenceStartFrame; + capture.ImageSequenceZeroDigits = _imageSequenceZeroDigits; + capture.FilenamePrefix = _filenamePrefix; + } + + if (_outputFolderIndex == (int)CaptureBase.OutputPath.RelativeToPeristentData) + { + capture.OutputFolder = CaptureBase.OutputPath.RelativeToPeristentData; + capture.OutputFolderPath = _outputFolderRelative; + } + else if (_outputFolderIndex == (int)CaptureBase.OutputPath.Absolute) + { + capture.OutputFolder = CaptureBase.OutputPath.Absolute; + capture.OutputFolderPath = _outputFolderAbsolute; + } + else if (_outputFolderIndex == (int)CaptureBase.OutputPath.RelativeToDesktop) + { + capture.OutputFolder = CaptureBase.OutputPath.RelativeToDesktop; + capture.OutputFolderPath = _outputFolderRelative; + } + else if (_outputFolderIndex == (int)CaptureBase.OutputPath.RelativeToPictures) + { + capture.OutputFolder = CaptureBase.OutputPath.RelativeToPictures; + capture.OutputFolderPath = _outputFolderRelative; + } + else if (_outputFolderIndex == (int)CaptureBase.OutputPath.RelativeToVideos) + { + capture.OutputFolder = CaptureBase.OutputPath.RelativeToVideos; + capture.OutputFolderPath = _outputFolderRelative; + } + else if (_outputFolderIndex == (int)CaptureBase.OutputPath.PhotoLibrary) + { + capture.OutputFolder = CaptureBase.OutputPath.PhotoLibrary; + capture.OutputFolderPath = _outputFolderRelative; + } + else + { + capture.OutputFolder = CaptureBase.OutputPath.RelativeToProject; + capture.OutputFolderPath = _outputFolderRelative; + } + + capture.NativeForceVideoCodecIndex = (_videoCodec != null)?_videoCodec.Index:-1; + + capture.AudioCaptureSource = IsAudioCaptured()?_audioCaptureSource:AudioCaptureSource.None; + if (capture.AudioCaptureSource != AudioCaptureSource.None) + { + capture.NativeForceAudioCodecIndex = (_audioCodec != null)?_audioCodec.Index:-1; + if (capture.AudioCaptureSource == AudioCaptureSource.Microphone) + { + capture.ForceAudioInputDeviceIndex = (_audioInputDevice != null)?_audioInputDevice.Index:-1; + } + else if (capture.AudioCaptureSource == AudioCaptureSource.Manual) + { + capture.ManualAudioChannelCount = _manualAudioChannelCount; + capture.ManualAudioSampleRate = _manualAudioSampleRate; + } + } + + if (_useMotionBlur && !capture.IsRealTime && Camera.main != null) + { + capture.UseMotionBlur = _useMotionBlur; + capture.MotionBlurSamples = _motionBlurSampleCount; + capture.MotionBlurCameras = new Camera[1]; + capture.MotionBlurCameras[0] = Camera.main; + } + else + { + capture.UseMotionBlur = false; + } + + if (_captureScreen != null) + { + // Toggle mouse cursor + if (_captureMouseCursor) + { + _captureScreen.CaptureMouseCursor = true; + if (_captureScreen.MouseCursor == null) + { + _captureScreen.MouseCursor = capture.gameObject.AddComponent(); + } + if (_captureScreen.MouseCursor != null) + { + _captureScreen.MouseCursor.SetTexture(_mouseCursorTexture); + } + } + else + { + _captureScreen.CaptureMouseCursor = false; + if (_captureScreen.MouseCursor != null) + { + _captureScreen.MouseCursor.enabled = false; + } + } + } + } + + private void CreateComponents() + { + // Create hidden gameobject + if (_gameObject == null) + { + _gameObject = GameObject.Find(TempGameObjectName); + if (_gameObject == null) + { + _gameObject = new GameObject(TempGameObjectName); + _gameObject.hideFlags = HideFlags.HideAndDontSave; +#if UNITY_5 || UNITY_5_4_OR_NEWER + _gameObject.hideFlags |= HideFlags.DontSaveInBuild|HideFlags.DontSaveInEditor|HideFlags.DontUnloadUnusedAsset; +#endif + Object.DontDestroyOnLoad(_gameObject); + } + } + + // Remove old capture component if different + if (_captureScreen != null && _sourceType != SourceType.Screen) + { + Destroy(_captureScreen); + _captureScreen = null; + } + if (_captureCamera != null && _sourceType != SourceType.Camera) + { + Destroy(_captureCamera); + _captureCamera = null; + } + if (_captureCamera360 != null && _sourceType != SourceType.Camera360) + { + Destroy(_captureCamera360); + _captureCamera360 = null; + } + if (_captureCamera360ODS != null && _sourceType != SourceType.Camera360ODS) + { + Destroy(_captureCamera360ODS); + _captureCamera360ODS = null; + } + if (_cameraSelector != null && _sourceType == SourceType.Screen) + { + Destroy(_cameraSelector); + _cameraSelector = null; + } + +#if AVPRO_MOVIECAPTURE_PLAYABLES_SUPPORT + // Remove timelineController for realtime captures + if (IsCaptureRealTime()) + { + if (_timelineController != null) + { + Destroy(_timelineController); + _timelineController = null; + } + } + // Add timelineController for non-realtime captures + else + { + if (_timelineController == null) + { + _timelineController = _gameObject.AddComponent(); + } + } +#endif + switch (_sourceType) + { + case SourceType.Screen: + if (_captureScreen == null) + { + _captureScreen = _gameObject.AddComponent(); + } + _capture = _captureScreen; + break; + case SourceType.Camera: + if (_captureCamera == null) + { + _captureCamera = _gameObject.AddComponent(); + } + if (_cameraSelector == null) + { + _cameraSelector = _gameObject.AddComponent(); + } + SetupCameraSelector(); + _captureCamera.SetCamera(_cameraNode, _useContributingCameras); + _captureCamera.CameraSelector = _cameraSelector; + _capture = _captureCamera; + _capture.CameraRenderResolution = _renderResolution; + _capture.CameraRenderCustomResolution = _renderSize; + _capture.CameraRenderAntiAliasing = _renderAntiAliasing; + break; + case SourceType.Camera360: + if (_captureCamera360 == null) + { + _captureCamera360 = _gameObject.AddComponent(); + } + if (_cameraSelector == null) + { + _cameraSelector = _gameObject.AddComponent(); + } + SetupCameraSelector(); + _capture = _captureCamera360; + _capture.CameraRenderResolution = _renderResolution; + _capture.CameraRenderCustomResolution = _renderSize; + _capture.CameraRenderAntiAliasing = _renderAntiAliasing; + _captureCamera360.SetCamera(_cameraNode); + _captureCamera360.CameraSelector = _cameraSelector; + _captureCamera360.Render180Degrees = _render180Degrees; + _captureCamera360.SupportCameraRotation = _supportCameraRotation; + _captureCamera360.OnlyLeftRightRotation = _onlyLeftRightRotation; + _captureCamera360.SupportGUI = _captureWorldSpaceGUI; + _captureCamera360.CubemapFaceResolution = (CaptureBase.CubemapResolution)_cubemapResolution; + _captureCamera360.CubemapDepthResolution = (CaptureBase.CubemapDepth)_cubemapDepth; + _captureCamera360.StereoRendering = (StereoPacking)_cubemapStereoPacking; + _captureCamera360.IPD = _cubemapStereoIPD; + break; + case SourceType.Camera360ODS: + if (_captureCamera360ODS == null) + { + _captureCamera360ODS = _gameObject.AddComponent(); + } + if (_cameraSelector == null) + { + _cameraSelector = _gameObject.AddComponent(); + } + SetupCameraSelector(); + _capture = _captureCamera360ODS; + _capture.CameraRenderResolution = _renderResolution; + _capture.CameraRenderCustomResolution = _renderSize; + _capture.CameraRenderAntiAliasing = _renderAntiAliasing; + _captureCamera360ODS.Setup.camera = _cameraNode; + _captureCamera360ODS.Setup.cameraSelector = _cameraSelector; + _captureCamera360ODS.Setup.render180Degrees = _odsSettings.render180Degrees; + _captureCamera360ODS.Setup.ipd = _odsSettings.ipd; + _captureCamera360ODS.Setup.pixelSliceSize = _odsSettings.pixelSliceSize; + _captureCamera360ODS.Setup.paddingSize = _odsSettings.paddingSize; + _captureCamera360ODS.Setup.cameraClearMode = _odsSettings.cameraClearMode; + _captureCamera360ODS.Setup.cameraClearColor= _odsSettings.cameraClearColor; + break; + } +#if AVPRO_MOVIECAPTURE_PLAYABLES_SUPPORT + if (_capture != null) + { + _capture.TimelineController = _timelineController; + } +#endif + } + + private void SetupCameraSelector() + { + if (_cameraSelector == null) return; + + _cameraSelector.SelectBy = _selectBy; + _cameraSelector.ScanFrequency = _scanFrequency; + _cameraSelector.ScanHiddenCameras = _scanHiddenCameras; + if (_selectBy == CameraSelector.SelectByMode.Tag) + { + _cameraSelector.SelectTag = _selectCameraTag; + } + else if (_selectBy == CameraSelector.SelectByMode.Name) + { + _cameraSelector.SelectName = _selectCameraName; + } + else if (_selectBy == CameraSelector.SelectByMode.Manual) + { + _cameraSelector.Camera = _cameraNode; + } + } + + private void CreateGUI() + { + try + { + if (!NativePlugin.Init()) + { + Debug.LogError("[AVProMovieCapture] Failed to initialise"); + return; + } + } + catch (System.DllNotFoundException e) + { + _isFailedInit = true; + string missingDllMessage = string.Empty; +#if (UNITY_5 || UNITY_5_4_OR_NEWER) + missingDllMessage = "Unity couldn't find the plugin DLL. Please select the native plugin files in 'Plugins/RenderHeads/AVProMovieCapture/Plugins' folder and select the correct platform in the Inspector."; +#else + missingDllMessage = "Unity couldn't find the plugin DLL, Unity 4.x requires the 'Plugins' folder to be at the root of your project. Please move the contents of the 'Plugins' folder (in Plugins/RenderHeads/AVProMovieCapture/Plugins) to the 'Plugins' folder in the root of your project."; +#endif + Debug.LogError("[AVProMovieCapture] " + missingDllMessage); +#if UNITY_EDITOR + UnityEditor.EditorUtility.DisplayDialog("Plugin files not found", missingDllMessage, "Ok"); +#endif + throw e; + } + + // Audio device enumeration + { + int numAudioDevices = Mathf.Max(0, NativePlugin.GetAudioInputDeviceCount()); + _audioDeviceNames = new string[numAudioDevices]; + for (int i = 0; i < numAudioDevices; i++) + { + _audioDeviceNames[i] = i.ToString("D2") + ") " + NativePlugin.GetAudioInputDeviceName(i).Replace("/", "_"); + } + } + + _isInit = true; + } + + private void OnEnable() + { + if (_icon == null) + { + _icon = Resources.Load("AVProMovieCaptureIcon"); + } + + if (!_isCreated) + { + SetupWindow(); + } + + _isTrialVersion = IsTrialVersion(); + + // Check that the plugin version number is not too old + { + string pluginVersionString = NativePlugin.GetPluginVersionString(); + _pluginVersionWarningText = string.Empty; + if (!pluginVersionString.StartsWith(NativePlugin.ExpectedPluginVersion)) + { + _pluginVersionWarningText = "Warning: Plugin version number " + pluginVersionString + " doesn't match the expected version number " + NativePlugin.ExpectedPluginVersion + ". It looks like the plugin didn't upgrade correctly. To resolve this please restart Unity and try to upgrade the package again."; + } + } + } + + private void OnDisable() + { + SaveSettings(); + StopCapture(); + if (_gameObject != null) + { + DestroyImmediate(_gameObject); + _gameObject = null; + _capture = null; + _captureScreen = null; + _captureCamera = null; + _captureCamera360 = null; + _captureCamera360ODS = null; + _cameraSelector = null; + #if AVPRO_MOVIECAPTURE_PLAYABLES_SUPPORT + _timelineController = null; + #endif + } + _isInit = false; + _isCreated = false; + Repaint(); + } + + private void StartCapture() + { + _lastFileSize = 0; + _lastEncodedSeconds = 0; + _lastEncodedMinutes = 0; + _lastEncodedFrame = 0; + + CreateComponents(); + if (_capture != null) + { + Configure(_capture); + _capture.SelectVideoCodec(); + if (_capture.AudioCaptureSource != AudioCaptureSource.None) + { + _capture.SelectAudioCodec(); + _capture.SelectAudioInputDevice(); + } + _capture.QueueStartCapture(); + } + } + + private void StopCapture(bool cancelCapture = false) + { + if (_capture != null) + { + if (_capture.IsCapturing()) + { + if (!cancelCapture) + { + _capture.StopCapture(); + } + else + { + _capture.CancelCapture(); + } + } + _capture = null; + } + } + + // Updates 10 times/second + void OnInspectorUpdate() + { + if (_capture != null) + { + if (Application.isPlaying) + { + if (_capture.IsCapturing()) + { + _lastFileSize = _capture.GetCaptureFileSize(); + } + + if (!_capture.IsRealTime) + { + _lastEncodedSeconds = (uint)Mathf.FloorToInt((float)_capture.CaptureStats.NumEncodedFrames / _capture.FrameRate); + } + else + { + _lastEncodedSeconds = _capture.CaptureStats.TotalEncodedSeconds; + } + _lastEncodedMinutes = _lastEncodedSeconds / 60; + _lastEncodedSeconds = _lastEncodedSeconds % 60; + _lastEncodedFrame = _capture.CaptureStats.NumEncodedFrames % (uint)_capture.FrameRate; + + // If the capture has stopped automatically, we need to update the UI + if (!_capture.IsPrepared() || (_capture.StopMode != StopMode.None && _capture.CaptureStats.NumEncodedFrames > 0 && !_capture.IsCapturing() && !_capture.IsStartCaptureQueued())) + { + StopCapture(); + } + } + else + { + StopCapture(); + } + } + else + { + if (_queueConfigureVideoCodec != null) + { + Codec tempCodec = _queueConfigureVideoCodec; + _queueConfigureVideoCodec = null; + tempCodec.ShowConfigWindow(); + } + if (_queueConfigureAudioCodec != null) + { + Codec tempCodec = _queueConfigureAudioCodec; + _queueConfigureAudioCodec = null; + tempCodec.ShowConfigWindow(); + } + + if (_queueStart && Application.isPlaying) + { + _queueStart = false; + StartCapture(); + } + } + + Repaint(); + } + + private struct MediaApiItemMenuData + { + public MediaApiItemMenuData(IMediaApiItem item) + { + this.item = item; + } + + public IMediaApiItem item; + } + + private void MediaApiItemMenuCallback_Select(object obj) + { + if (((MediaApiItemMenuData)obj).item is Codec) + { + Codec codec = (Codec)((MediaApiItemMenuData)obj).item; + + if (codec.CodecType == CodecType.Video) + { + _videoCodec = codec; + } + else if (codec.CodecType == CodecType.Audio) + { + _audioCodec = codec; + } + } + else if (((MediaApiItemMenuData)obj).item is Device) + { + Device device = (Device)((MediaApiItemMenuData)obj).item; + + if (device.DeviceType == DeviceType.AudioInput) + { + _audioInputDevice = device; + } + } + UpdateSelectedCodec(); + } + + private GenericMenu CreateMediaItemMenu(System.Collections.IEnumerable items, IMediaApiItem selectedItem, IMediaApiItem matchMediaType) + { + GenericMenu menu = new GenericMenu(); + +#if UNITY_EDITOR_WIN + MediaApi lastApi = MediaApi.Unknown; +#endif + + foreach (IMediaApiItem item in items) + { + bool isEnabled = (matchMediaType == null || matchMediaType.MediaApi == item.MediaApi); +#if UNITY_EDITOR_WIN + if (isEnabled && item.MediaApi != lastApi) + { + string title = string.Empty; + switch (item.MediaApi) + { + case MediaApi.DirectShow: + title = "DirectShow Legacy API:"; + break; + case MediaApi.MediaFoundation: + title = "Media Foundation API:"; + break; + } + menu.AddSeparator(""); + menu.AddDisabledItem(new GUIContent(title)); + lastApi = item.MediaApi; + } +#endif + if (isEnabled) + { + // Have to replace '/' as Unity context menu uses to this indicate a sub-menu + string displayName = item.Name.Replace("/", "⁄"); + menu.AddItem(new GUIContent(displayName), item == selectedItem, MediaApiItemMenuCallback_Select, new MediaApiItemMenuData(item)); + } + else + { + //menu.AddDisabledItem(new GUIContent(item.Name)); + } + } + + return menu; + } + + private bool ShowMediaItemList(string title, System.Collections.IEnumerable itemList, IMediaApiItem selectedItem, IMediaApiItem matchMediaType = null) + { + bool result = false; + + if (itemList == null || selectedItem == null) + { + return result; + } + + if (!string.IsNullOrEmpty(title)) + { + EditorGUILayout.LabelField(title, EditorStyles.boldLabel); + } + + EditorGUILayout.BeginHorizontal(); + var rect = EditorGUILayout.GetControlRect(false); + if (EditorGUI.DropdownButton(rect, new GUIContent(selectedItem.Name), FocusType.Keyboard)) + { + CreateMediaItemMenu(itemList, selectedItem, matchMediaType).DropDown(rect); + } + +#if UNITY_EDITOR_WIN + if (selectedItem is Codec) + { + EditorGUI.BeginDisabledGroup(!((Codec)selectedItem).HasConfigwindow); + if (GUILayout.Button("Configure")) + { + result = true; + } + EditorGUI.EndDisabledGroup(); + } +#endif + EditorGUILayout.EndHorizontal(); + + return result; + } + + private static bool ShowConfigList(string title, string[] items, bool[] isConfigurable, ref Codec codec, ref int itemIndex, ref bool itemChanged, bool showConfig = true, bool listEnabled = true) + { + bool result = false; + + if (itemIndex < 0 || items == null) + return result; + + if (!string.IsNullOrEmpty(title)) + { + EditorGUILayout.LabelField(title, EditorStyles.boldLabel); + } + EditorGUI.BeginDisabledGroup(!listEnabled); + EditorGUILayout.BeginHorizontal(); + int newItemIndex = EditorGUILayout.Popup(itemIndex, items); + itemChanged = (newItemIndex != itemIndex); + itemIndex = newItemIndex; + +#if UNITY_EDITOR_WIN + if (showConfig && isConfigurable != null && itemIndex < isConfigurable.Length) + { + EditorGUI.BeginDisabledGroup(itemIndex == 0 || !isConfigurable[itemIndex]); + if (GUILayout.Button("Configure")) + { + result = true; + } + EditorGUI.EndDisabledGroup(); + } +#endif + EditorGUILayout.EndHorizontal(); + EditorGUI.EndDisabledGroup(); + + return result; + } + + void OnGUI() + { + if ((Application.platform != RuntimePlatform.WindowsEditor) + && (Application.platform != RuntimePlatform.OSXEditor)) + { + EditorGUILayout.LabelField("AVPro Movie Capture Window only works on the Windows and macOS platforms."); + return; + } + + if (!_isInit) + { + if (_isFailedInit) + { + GUILayout.Label("Error", EditorStyles.boldLabel); + GUI.enabled = false; + + string missingDllMessage = string.Empty; +#if (UNITY_5 || UNITY_5_4_OR_NEWER) + missingDllMessage = "Unity couldn't find the plugin DLL. Please select the native plugin files in 'Plugins/RenderHeads/AVProMovieCapture/Plugins' folder and select the correct platform in the Inspector."; +#else + missingDllMessage = "Unity couldn't find the plugin DLL, Unity 4.x requires the 'Plugins' folder to be at the root of your project. Please move the contents of the 'Plugins' folder (in Plugins/RenderHeads/AVProMovieCapture/Plugins) to the 'Plugins' folder in the root of your project."; +#endif + + GUILayout.TextArea(missingDllMessage); + GUI.enabled = true; + return; + } + else + { + EditorGUILayout.LabelField("Initialising..."); + return; + } + } + + if (!string.IsNullOrEmpty(_pluginVersionWarningText)) + { + GUI.color = Color.yellow; + GUILayout.TextArea(_pluginVersionWarningText); + GUI.color = Color.white; + } + + if (_so == null) + { + return; + } + + _so.Update(); + +#if AVPRO_MOVIECAPTURE_GRAPHICSDEVICETYPE_51 && UNITY_EDITOR_WIN + if (SystemInfo.graphicsDeviceType != UnityEngine.Rendering.GraphicsDeviceType.Direct3D11 && + SystemInfo.graphicsDeviceType != UnityEngine.Rendering.GraphicsDeviceType.Direct3D12) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Consider switching to D3D11 or D3D12 for best capture results. You may need to change your Build platform to Windows."); + GUI.color = Color.white; + } +#endif + + if (_isTrialVersion) + { + EditorUtils.DrawSectionColored("- AVPRO MOVIE CAPTURE - TRIAL VERSION", ref _expandSectionTrial, DrawTrialMessage, Color.magenta, Color.magenta, Color.magenta); + //EditorGUILayout.Space(); + } + + DrawControlButtonsGUI(); + EditorGUILayout.Space(); + + // Live Capture Stats + if (Application.isPlaying && _capture != null && (_capture.IsCapturing() || _capture.IsStartCaptureQueued())) + { + if (_propStopMode.enumValueIndex != (int)StopMode.None) + { + Rect r = GUILayoutUtility.GetRect(128f, EditorStyles.label.CalcHeight(GUIContent.none, 32f), GUILayout.ExpandWidth(true)); + float progress = _capture.GetProgress(); + EditorGUI.ProgressBar(r, progress, (progress * 100f).ToString("F1") + "%"); + } + + _scroll = EditorGUILayout.BeginScrollView(_scroll); + DrawBaseCapturingGUI(_capture); + DrawMoreCapturingGUI(); + EditorGUILayout.EndScrollView(); + } + // Configuration + else if (_capture == null) + { + string[] _toolNames = { "Settings", "Screenshot", "Help" }; + _selectedTool = GUILayout.Toolbar(_selectedTool, _toolNames); + switch (_selectedTool) + { + case 0: + DrawConfigGUI_Toolbar(); + _scroll = EditorGUILayout.BeginScrollView(_scroll); + DrawConfigGUI(); + EditorGUILayout.EndScrollView(); + break; + case 1: + _scroll = EditorGUILayout.BeginScrollView(_scroll); + DrawConfigGUI_Screenshot(); + EditorGUILayout.EndScrollView(); + break; + case 2: + _scroll = EditorGUILayout.BeginScrollView(_scroll); + DrawConfigGUI_About(); + EditorGUILayout.EndScrollView(); + break; + } + } + + if (_so.ApplyModifiedProperties()) + { + EditorUtility.SetDirty(this); + } + } + + private void DrawTrialMessage() + { + string message = "The free trial version is watermarked. Upgrade to the full package to remove the watermark."; + + //GUI.backgroundColor = Color.yellow; + //EditorGUILayout.BeginVertical(GUI.skin.box); + //GUI.color = Color.yellow; + //GUILayout.Label("AVPRO MOVIE CAPTURE - FREE TRIAL VERSION", EditorStyles.boldLabel); + GUI.color = Color.white; + GUILayout.Label(message, EditorStyles.wordWrappedLabel); + if (GUILayout.Button("Upgrade Now")) + { + Application.OpenURL(LinkAssetStorePage); + } + //EditorGUILayout.EndVertical(); + GUI.backgroundColor = Color.white; + GUI.color = Color.white; + } + + private void DrawControlButtonsGUI() + { + EditorGUILayout.BeginHorizontal(); + if (_capture == null) + { + GUI.backgroundColor = Color.green; + string startString = "Start Capture"; + if (!IsCaptureRealTime()) + { + startString = "Start Render"; + } + if (GUILayout.Button(startString, GUILayout.Height(32f))) + { + bool isReady = true; + if (_sourceType == SourceType.Camera && + _cameraNode == null && + _selectBy == CameraSelector.SelectByMode.Manual) + { + if ((ConfigTabs)_selectedConfigTab != ConfigTabs.Capture) + { + _cameraNode = Utils.GetUltimateRenderCamera(); + } + if (_cameraNode == null) + { + Debug.LogError("[AVProMovieCapture] Please select a Camera to capture from, or select to capture from Screen."); + isReady = false; + } + } + + if (isReady) + { + if (!Application.isPlaying) + { + EditorApplication.isPlaying = true; + _queueStart = true; + } + else + { + StartCapture(); + Repaint(); + } + } + } + } + else + { + GUI.backgroundColor = Color.cyan; + if (GUILayout.Button("Cancel", GUILayout.Height(32f))) + { + StopCapture(true); + Repaint(); + } + GUI.backgroundColor = Color.red; + if (GUILayout.Button("Stop", GUILayout.Height(32f))) + { + StopCapture(false); + Repaint(); + } + + if (_capture != null) + { + if (_capture.IsPaused()) + { + GUI.backgroundColor = Color.green; + if (GUILayout.Button("Resume", GUILayout.Height(32f))) + { + _capture.ResumeCapture(); + Repaint(); + } + } + else + { + GUI.backgroundColor = Color.yellow; + if (GUILayout.Button("Pause", GUILayout.Height(32f))) + { + _capture.PauseCapture(); + Repaint(); + } + } + } + } + EditorGUILayout.EndHorizontal(); + + GUI.backgroundColor = Color.white; + + GUILayout.BeginHorizontal(); + if (GUILayout.Button("Browse")) + { + if (!string.IsNullOrEmpty(CaptureBase.LastFileSaved)) + { + Utils.ShowInExplorer(CaptureBase.LastFileSaved); + } + } + { + Color prevColor = GUI.color; + GUI.color = Color.cyan; + if (GUILayout.Button("View Last Capture")) + { + if (!string.IsNullOrEmpty(CaptureBase.LastFileSaved)) + { + Utils.OpenInDefaultApp(CaptureBase.LastFileSaved); + } + } + GUI.color = prevColor; + } + GUILayout.EndHorizontal(); + } + + + public static void DrawBaseCapturingGUI(CaptureBase capture) + { + GUILayout.Space(8.0f); + Texture texture = capture.GetPreviewTexture(); + if (texture != null) + { + float aspect = (float)texture.width / (float)texture.height; + GUILayout.BeginHorizontal(); + + //if (Event.current.type == EventType.Repaint) + { + if (_showAlpha) + { + Rect textureRect = GUILayoutUtility.GetAspectRect(aspect);//(width, width / aspect, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(false)); + EditorGUI.DrawPreviewTexture(textureRect, texture, null, ScaleMode.ScaleToFit); + textureRect = GUILayoutUtility.GetAspectRect(aspect);//width, width / aspect, GUILayout.ExpandWidth(false), GUILayout.ExpandHeight(false)); ; + EditorGUI.DrawTextureAlpha(textureRect, texture, ScaleMode.ScaleToFit); + } + else + { + Rect textureRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.MaxHeight(256f));//width, width / aspect, GUILayout.ExpandWidth(false), GUILayout.ExpandHeight(false)); + EditorGUI.DrawPreviewTexture(textureRect, texture, null, ScaleMode.ScaleToFit); + } + } + GUILayout.EndHorizontal(); + + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + _showAlpha = GUILayout.Toggle(_showAlpha, "Show Alpha", GUILayout.ExpandWidth(false)); + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + GUILayout.Space(8.0f); + } + + GUILayout.Label("Output", EditorStyles.boldLabel); + EditorGUILayout.BeginVertical(GUI.skin.box); + EditorGUI.indentLevel++; + + GUILayout.Label("Recording to: " + System.IO.Path.GetFileName(capture.LastFilePath), EditorStyles.wordWrappedLabel); + GUILayout.Space(8.0f); + + GUILayout.Label("Video"); + EditorGUILayout.LabelField("Dimensions", capture.GetRecordingWidth() + "x" + capture.GetRecordingHeight() + " @ " + capture.FrameRate.ToString("F2") + "hz"); + if (capture.OutputTarget == OutputTarget.VideoFile) + { + EditorGUILayout.LabelField("Codec", (capture.SelectedVideoCodec != null)?capture.SelectedVideoCodec.Name:"None"); + } + else if (capture.OutputTarget == OutputTarget.ImageSequence) + { + EditorGUILayout.LabelField("Codec", capture.NativeImageSequenceFormat.ToString()); + } + + if (capture.AudioCaptureSource != AudioCaptureSource.None) + { + GUILayout.Label("Audio"); + if (capture.AudioCaptureSource == AudioCaptureSource.Unity && capture.UnityAudioCapture != null) + { + EditorGUILayout.LabelField("Source", "Unity"); + } + else if (capture.AudioCaptureSource == AudioCaptureSource.Microphone) + { + EditorGUILayout.LabelField("Source", (capture.SelectedAudioInputDevice != null)?capture.SelectedAudioInputDevice.Name:"None"); + } + else if (capture.AudioCaptureSource == AudioCaptureSource.Wwise && capture.UnityAudioCapture != null) + { + EditorGUILayout.LabelField("Source", "Wwise"); + } + EditorGUILayout.LabelField("Codec", (capture.SelectedAudioCodec!= null)?capture.SelectedAudioCodec.Name:"None"); + if (capture.UnityAudioCapture != null && (capture.AudioCaptureSource == AudioCaptureSource.Unity || capture.AudioCaptureSource == AudioCaptureSource.Wwise)) + { + EditorGUILayout.LabelField("Sample Rate", (capture.CaptureStats.UnityAudioSampleRate/1000f).ToString("F1") + "Khz"); + EditorGUILayout.LabelField("Channels", capture.CaptureStats.UnityAudioChannelCount.ToString()); + } + } + + EditorGUI.indentLevel--; + EditorGUILayout.EndVertical(); + + GUILayout.Space(8.0f); + + GUILayout.Label("Stats", EditorStyles.boldLabel); + EditorGUILayout.BeginVertical(GUI.skin.box); + EditorGUI.indentLevel++; + + if (capture.CaptureStats.FPS > 0f) + { + Color originalColor = GUI.color; + if (capture.IsRealTime) + { + float fpsDelta = (capture.CaptureStats.FPS - capture.FrameRate); + GUI.color = Color.red; + if (fpsDelta > -10) + { + GUI.color = Color.yellow; + } + if (fpsDelta > -2) + { + GUI.color = Color.green; + } + } + + EditorGUILayout.LabelField("Capture Rate", string.Format("{0:0.##} / {1:F2} FPS", capture.CaptureStats.FPS, capture.FrameRate)); + + GUI.color = originalColor; + } + else + { + EditorGUILayout.LabelField("Capture Rate", string.Format(".. / {0:F2} FPS", capture.FrameRate)); + } + + EditorGUILayout.LabelField("Encoded Frames", capture.CaptureStats.NumEncodedFrames.ToString()); + + EditorGUI.indentLevel--; + EditorGUILayout.EndVertical(); + } + + public void DrawMoreCapturingGUI() + { + GUILayout.Label("More Stats", EditorStyles.boldLabel); + EditorGUILayout.BeginVertical(GUI.skin.box); + EditorGUI.indentLevel++; + + EditorGUILayout.LabelField("File Size", ((float)_lastFileSize / (1024f * 1024f)).ToString("F1") + "MB"); + EditorGUILayout.LabelField("Video Length", _lastEncodedMinutes.ToString("00") + ":" + _lastEncodedSeconds.ToString("00") + "." + _lastEncodedFrame.ToString("000")); + EditorGUILayout.LabelField("Avg Bitrate", (8f * ((float)_lastFileSize / (1024f * 1024f)) / (float)((_lastEncodedMinutes * 60) + _lastEncodedSeconds)).ToString("F2") + "Mb/s"); + + EditorGUILayout.PrefixLabel("Dropped Frames"); + EditorGUI.indentLevel++; + EditorGUILayout.LabelField("In Unity", _capture.CaptureStats.NumDroppedFrames.ToString()); + EditorGUILayout.LabelField("In Encoder", _capture.CaptureStats.NumDroppedEncoderFrames.ToString()); + EditorGUI.indentLevel--; + + if (IsAudioCaptured()) + { + if (_capture.AudioCaptureSource == AudioCaptureSource.Unity && _capture.UnityAudioCapture != null) + { + EditorGUILayout.LabelField("Audio Overflows", _capture.UnityAudioCapture.OverflowCount.ToString()); + } + } + + EditorGUI.indentLevel--; + EditorGUILayout.EndVertical(); + } + + private void DrawConfigGUI_Toolbar() + { + _selectedConfigTab = GUILayout.Toolbar(_selectedConfigTab, _tabNames); + } + + private void DrawConfigGUI() + { + switch ((ConfigTabs)_selectedConfigTab) + { + case ConfigTabs.Encoding: + DrawConfigGUI_Encoding(); + break; + case ConfigTabs.Capture: + DrawConfigGUI_Capture(); + break; + case ConfigTabs.Visual: + DrawConfigGUI_Visual(); + break; + case ConfigTabs.Audio: + DrawConfigGUI_Audio(); + break; + } + + GUILayout.FlexibleSpace(); + } + + public void DrawConfigGUI_Screenshot() + { + EditorGUILayout.PropertyField(_propScreenshotFolder, new GUIContent("Folder")); + EditorGUILayout.PropertyField(_propScreenshotOptions, new GUIContent("Format Options")); + EditorGUILayout.Space(); + + string folder = System.IO.Path.GetFullPath(System.IO.Path.Combine(Application.dataPath, "../" + _screenshotFolder)); + + { + EditorGUILayout.BeginVertical(GUI.skin.box); + + int superSize = 1; + switch (_superSizeIndex) + { + case 1: + superSize = 2; + break; + case 2: + superSize = 4; + break; + } + Vector2 captureSize = EditorScreenshot.GetGameViewSize() * superSize; + + GUILayout.BeginHorizontal(); + GUILayout.Label("GameView", EditorStyles.boldLabel, GUILayout.ExpandWidth(false)); + GUILayout.Label(string.Format("({0}x{1})", (int)captureSize.x, (int)captureSize.y)); + GUILayout.EndHorizontal(); + EditorGUILayout.Space(); + + GUILayout.BeginHorizontal(); + GUILayout.Label("Supersample"); + _superSizeIndex = GUILayout.SelectionGrid(_superSizeIndex, new string[]{"1x", "2x", "4x"}, 4); + GUILayout.EndHorizontal(); + + GUILayout.BeginHorizontal(); + if (GUILayout.Button("Capture PNG")) + { + EditorScreenshot.ImageFormat format = EditorScreenshot.ImageFormat.PNG; + string filePath = EditorScreenshot.GenerateFilename("Screen", format, (int)captureSize.x, (int)captureSize.y); + filePath = EditorScreenshot.GenerateFilePath(folder, filePath); + EditorScreenshot.GameViewToPNG(filePath, superSize); + } + + { + EditorGUI.BeginDisabledGroup(!EditorScreenshot.SupportsGameViewJPGTGAEXR()); + if (GUILayout.Button("Capture JPG")) + { + EditorScreenshot.ImageFormat format = EditorScreenshot.ImageFormat.JPG; + string filePath = EditorScreenshot.GenerateFilename("Screen", format, (int)captureSize.x, (int)captureSize.y); + filePath = EditorScreenshot.GenerateFilePath(folder, filePath); + EditorScreenshot.GameViewToFile(filePath, format, _screenshotOptions, superSize); + } + GUILayout.EndHorizontal(); + GUILayout.BeginHorizontal(); + + { + EditorGUI.BeginDisabledGroup(!EditorScreenshot.SupportsTGA()); + if (GUILayout.Button("Capture TGA")) + { + EditorScreenshot.ImageFormat format = EditorScreenshot.ImageFormat.TGA; + string filePath = EditorScreenshot.GenerateFilename("Screen", format, (int)captureSize.x, (int)captureSize.y); + filePath = EditorScreenshot.GenerateFilePath(folder, filePath); + EditorScreenshot.GameViewToFile(filePath, format, _screenshotOptions, superSize); + } + EditorGUI.EndDisabledGroup(); + } + { + EditorGUI.BeginDisabledGroup(!EditorScreenshot.SupportsGameViewEXR()); + if (GUILayout.Button("Capture EXR")) + { + EditorScreenshot.ImageFormat format = EditorScreenshot.ImageFormat.EXR; + string filePath = EditorScreenshot.GenerateFilename("Screen", format, (int)captureSize.x, (int)captureSize.y); + filePath = EditorScreenshot.GenerateFilePath(folder, filePath); + EditorScreenshot.GameViewToFile(filePath, format, _screenshotOptions, superSize); + } + EditorGUI.EndDisabledGroup(); + } + EditorGUI.EndDisabledGroup(); + } + GUILayout.EndHorizontal(); + GUILayout.EndVertical(); + } + + EditorGUILayout.Space(); + + { + EditorGUILayout.BeginVertical(GUI.skin.box); + GUILayout.BeginHorizontal(); + RenderTexture sceneViewTexture = EditorScreenshot.GetSceneViewTexture(); + GUILayout.Label("Scene View", EditorStyles.boldLabel, GUILayout.ExpandWidth(false)); + if (sceneViewTexture != null) + { + GUILayout.Label(string.Format("({0}x{1})", sceneViewTexture.width, sceneViewTexture.height)); + } + else + { + GUI.color = Color.red; + GUILayout.Label("*Missing*", EditorStyles.boldLabel); + GUI.color = Color.white; + } + GUILayout.EndHorizontal(); + + GUILayout.BeginHorizontal(); + if (GUILayout.Button("Capture PNG")) + { + EditorScreenshot.SceneViewToFile("Scene", folder, EditorScreenshot.ImageFormat.PNG, _screenshotOptions); + } + if (GUILayout.Button("Capture JPG")) + { + EditorScreenshot.SceneViewToFile("Scene", folder, EditorScreenshot.ImageFormat.JPG, _screenshotOptions); + } + GUILayout.EndHorizontal(); + GUILayout.BeginHorizontal(); + if (GUILayout.Button("Capture TGA")) + { + EditorScreenshot.SceneViewToFile("Scene", folder, EditorScreenshot.ImageFormat.TGA, _screenshotOptions); + } + if (GUILayout.Button("Capture EXR")) + { + EditorScreenshot.SceneViewToFile("Scene", folder, EditorScreenshot.ImageFormat.EXR, _screenshotOptions); + } + GUILayout.EndHorizontal(); + GUILayout.EndVertical(); + } + + EditorGUILayout.Space(); + + { + GUILayout.BeginVertical(GUI.skin.box); + GUILayout.Label("Cameras", EditorStyles.boldLabel); + if (GUILayout.Button("Refresh")) + { + _cameras = Resources.FindObjectsOfTypeAll(); + } + if (_cameras != null && _cameras.Length > 0) + { + _cameraIndex = (int)GUILayout.HorizontalSlider(_cameraIndex, 0, _cameras.Length - 1, GUILayout.ExpandWidth(true)); + EditorGUILayout.Space(); + + Camera camera = _cameras[_cameraIndex]; + + string desc = _cameraIndex + "/" + _cameras.Length + ": "; + Texture texture = Texture2D.blackTexture; + if (camera != null) + { + desc += camera.name; + if (camera.targetTexture != null) + { + desc += " " + camera.targetTexture.width + "x" + camera.targetTexture.height; + #if UNITY_2019_1_OR_NEWER + desc += " " + camera.targetTexture.graphicsFormat; + #endif + texture = camera.targetTexture; + } + } + GUILayout.Label(desc); + Rect textureRect = GUILayoutUtility.GetRect(256f, 256f); + GUI.DrawTexture(textureRect, texture, ScaleMode.ScaleToFit); + } + + if (_cameras != null && _cameras.Length > 0) + { + RenderTexture rt = _cameras[_cameraIndex].targetTexture; + if (rt != null) + { + GUILayout.BeginHorizontal(); + if (GUILayout.Button("Capture PNG")) + { + EditorScreenshot.ImageFormat format = EditorScreenshot.ImageFormat.PNG; + string filePath = EditorScreenshot.GenerateFilename("RT-" + rt.name, format, rt.width, rt.height); + filePath = EditorScreenshot.GenerateFilePath(folder, filePath); + EditorScreenshot.RenderTextureToFile(filePath, format, _screenshotOptions, rt); + } + if (GUILayout.Button("Capture EXR")) + { + EditorScreenshot.ImageFormat format = EditorScreenshot.ImageFormat.EXR; + string filePath = EditorScreenshot.GenerateFilename("RT-" + rt.name, format, rt.width, rt.height); + filePath = EditorScreenshot.GenerateFilePath(folder, filePath); + EditorScreenshot.RenderTextureToFile(filePath, format, _screenshotOptions, rt); + } + GUILayout.EndHorizontal(); + } + } + GUILayout.EndVertical(); + } + + EditorGUILayout.Space(); + + { + GUILayout.BeginVertical(GUI.skin.box); + GUILayout.Label("RenderTextures", EditorStyles.boldLabel); + if (GUILayout.Button("Refresh")) + { + _rts = Resources.FindObjectsOfTypeAll(); + } + if (_rts != null && _rts.Length > 0) + { + _rtIndex = (int)GUILayout.HorizontalSlider(_rtIndex, 0, _rts.Length - 1, GUILayout.ExpandWidth(true)); + EditorGUILayout.Space(); + + RenderTexture rt = _rts[_rtIndex]; + + string desc = _rtIndex + "/" + _rts.Length + ": "; + Texture texture = Texture2D.blackTexture; + if (rt != null) + { + desc += rt.name + " " + rt.width + "x" + rt.height; + #if UNITY_2019_1_OR_NEWER + desc += " " + rt.graphicsFormat; + #endif + texture = rt; + } + + GUILayout.Label(desc); + Rect textureRect = GUILayoutUtility.GetRect(256f, 256f); + GUI.DrawTexture(textureRect, texture, ScaleMode.ScaleToFit); + } + + if (_rts != null && _rts.Length > 0) + { + RenderTexture rt = _rts[_rtIndex]; + if (rt != null) + { + GUILayout.BeginHorizontal(); + if (GUILayout.Button("Capture PNG")) + { + EditorScreenshot.ImageFormat format = EditorScreenshot.ImageFormat.PNG; + string filePath = EditorScreenshot.GenerateFilename("RT-" + rt.name, format, rt.width, rt.height); + filePath = EditorScreenshot.GenerateFilePath(folder, filePath); + EditorScreenshot.RenderTextureToFile(filePath, format, _screenshotOptions, rt); + } + if (GUILayout.Button("Capture EXR")) + { + EditorScreenshot.ImageFormat format = EditorScreenshot.ImageFormat.EXR; + string filePath = EditorScreenshot.GenerateFilename("RT-" + rt.name, format, rt.width, rt.height); + filePath = EditorScreenshot.GenerateFilePath(folder, filePath); + EditorScreenshot.RenderTextureToFile(filePath, format, _screenshotOptions, rt); + } + GUILayout.EndHorizontal(); + } + } + GUILayout.EndVertical(); + } + } + + private static int _rtIndex; + private static int _cameraIndex; + private static RenderTexture[] _rts; + private static Camera[] _cameras; + + public static void DrawConfigGUI_About() + { + string version = NativePlugin.GetPluginVersionString(); + + EditorGUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + + if (_icon == null) + { + _icon = Resources.Load("AVProMovieCaptureIcon"); + } + if (_icon != null) + { + GUILayout.Label(new GUIContent(_icon)); + } + GUILayout.FlexibleSpace(); + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + GUI.color = Color.yellow; + GUILayout.Label("AVPro Movie Capture by RenderHeads Ltd", EditorStyles.boldLabel); + GUI.color = Color.white; + GUILayout.FlexibleSpace(); + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + GUI.color = Color.yellow; + GUILayout.Label("version " + version + " (scripts v" + NativePlugin.ScriptVersion + ")"); + GUI.color = Color.white; + GUILayout.FlexibleSpace(); + EditorGUILayout.EndHorizontal(); + + // Links + { + GUILayout.Space(32f); + GUI.backgroundColor = Color.white; + + EditorGUILayout.LabelField("AVPro Movie Capture Links", EditorStyles.boldLabel); + + GUILayout.Space(8f); + + EditorGUILayout.LabelField("Documentation"); + if (GUILayout.Button("User Manual", GUILayout.ExpandWidth(false))) + { + Application.OpenURL(LinkUserManual); + } + + GUILayout.Space(16f); + + GUILayout.Label("Bugs and Support"); + if (GUILayout.Button("GitHub Issues", GUILayout.ExpandWidth(false))) + { + Application.OpenURL(LinkSupport); + } + + GUILayout.Space(16f); + + GUILayout.Label("Rate and Review (★★★★☆)", GUILayout.ExpandWidth(false)); + if (GUILayout.Button("Asset Store Page", GUILayout.ExpandWidth(false))) + { + Application.OpenURL(LinkAssetStorePage); + } + + GUILayout.Space(16f); + + GUILayout.Label("Community"); + if (GUILayout.Button("Forum Thread", GUILayout.ExpandWidth(false))) + { + Application.OpenURL(LinkForumPage); + } + + GUILayout.Space(16f); + + GUILayout.Label("Website", GUILayout.ExpandWidth(false)); + if (GUILayout.Button("Official Website", GUILayout.ExpandWidth(false))) + { + Application.OpenURL(LinkPluginWebsite); + } + } + + // Credits + { + GUILayout.Space(32f); + EditorGUILayout.LabelField("Credits", EditorStyles.boldLabel); + GUILayout.Space(8f); + EditorUtils.CentreLabel("Programming", EditorStyles.boldLabel); + EditorUtils.CentreLabel("Andrew Griffiths"); + EditorUtils.CentreLabel("Morris Butler"); + EditorUtils.CentreLabel("Richard Turnbull"); + EditorUtils.CentreLabel("Sunrise Wang"); + GUILayout.Space(8f); + EditorUtils.CentreLabel("Graphics", EditorStyles.boldLabel); + EditorUtils.CentreLabel("Jeff Rusch"); + EditorUtils.CentreLabel("Luke Godward"); + } + + // Bug reporting + { + GUILayout.Space(32f); + + EditorGUILayout.LabelField("Bug Reporting Notes", EditorStyles.boldLabel); + + EditorGUILayout.SelectableLabel(SupportMessage, EditorStyles.wordWrappedLabel, GUILayout.Height(180f)); + } + } + + private void DrawConfigGUI_Capture() + { + //GUILayout.Label("Capture", EditorStyles.boldLabel); + EditorGUILayout.BeginVertical(GUI.skin.box); + //EditorGUI.indentLevel++; + + // Time + { + GUILayout.Space(8f); + EditorGUILayout.LabelField("Time", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + _captureModeIndex = EditorGUILayout.Popup("Capture Mode", _captureModeIndex, _captureModes); + GUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(_propFrameRate, GUILayout.ExpandWidth(false)); + _propFrameRate.floatValue = Mathf.Clamp(_propFrameRate.floatValue, 0.01f, 240f); + EditorUtils.FloatAsPopup("▶", "Common Frame Rates", _so, _propFrameRate, EditorUtils.CommonFrameRateNames, EditorUtils.CommonFrameRateValues); + GUILayout.EndHorizontal(); + if (IsCaptureRealTime()) + { + EditorGUILayout.PropertyField(_propTimelapseScale); + _propTimelapseScale.intValue = Mathf.Max(1, _propTimelapseScale.intValue); + } + EditorGUI.indentLevel--; + } + + // Source + GUILayout.Space(8f); + EditorGUILayout.LabelField("Source", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + EditorUtils.EnumAsDropdown("Source", _propSourceType, _sourceNames); + + if (_sourceType == SourceType.Camera360ODS && IsCaptureRealTime()) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Warning: This source type is very slow and not suitable for 'Realtime Capture'. Consider changing the capture mode to 'Offline Render'."); + GUI.color = Color.white; + } + + EditorGUI.indentLevel--; + + //_sourceType = (SourceType)EditorGUILayout.EnumPopup("Type", _sourceType); + if (_sourceType == SourceType.Camera || _sourceType == SourceType.Camera360 || _sourceType == SourceType.Camera360ODS) + { + GUILayout.Space(8f); + EditorGUILayout.LabelField("Camera Selector", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + + EditorGUILayout.PropertyField(_propCameraSelectorSelectBy); + if (_propCameraSelectorSelectBy.enumValueIndex == (int)CameraSelector.SelectByMode.Name) + { + EditorGUILayout.PropertyField(_propCameraSelectorName, _guiCameraSelectorName); + + } + else if (_propCameraSelectorSelectBy.enumValueIndex == (int)CameraSelector.SelectByMode.Tag) + { + EditorGUILayout.PropertyField(_propCameraSelectorTag, _guiCameraSelectorTag); + } + else if (_propCameraSelectorSelectBy.enumValueIndex == (int)CameraSelector.SelectByMode.Manual) + { + if (_cameraNode == null) + { + _cameraNode = Utils.GetUltimateRenderCamera(); + } + _cameraNode = (Camera)EditorGUILayout.ObjectField("Camera", _cameraNode, typeof(Camera), true); + } +#if !SUPPORT_SCENE_VIEW_GIZMOS_CAPTURE + else if (_propCameraSelectorSelectBy.enumValueIndex == (int)CameraSelector.SelectByMode.EditorSceneView) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Warning: Scene View capture only currently supports gizmo capture up to Unity 2018.2.x"); + GUI.color = Color.white; + } +#endif + if (_sourceType == SourceType.Camera && _cameraNode != null) + { + EditorGUILayout.PropertyField(_propUseContributingCameras, _guiContributingCameras); + } + + EditorGUILayout.PropertyField(_propCameraSelectorScanFrequency); + EditorGUILayout.PropertyField(_propCameraSelectorScanHiddenCameras); + + EditorGUI.indentLevel--; + } + + + // Screen options + if (_sourceType == SourceType.Screen) + { + GUILayout.Space(8f); + EditorGUILayout.LabelField("Cursor", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + _captureMouseCursor = EditorGUILayout.Toggle("Capture Mouse Cursor", _captureMouseCursor); + _mouseCursorTexture = (Texture2D)EditorGUILayout.ObjectField("Mouse Cursor Texture", _mouseCursorTexture, typeof(Texture2D), false); + EditorGUI.indentLevel--; + } + + // Camera overrides + if (_sourceType == SourceType.Camera || _sourceType == SourceType.Camera360 || _sourceType == SourceType.Camera360ODS) + { + GUILayout.Space(8f); + EditorGUILayout.LabelField("Camera Overrides", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + + { + EditorUtils.EnumAsDropdown("Resolution", _propRenderResolution, CaptureBaseEditor.ResolutionStrings); + } + + if (_renderResolution == CaptureBase.Resolution.Custom) + { + _renderSize = EditorGUILayout.Vector2Field("Size", _renderSize); + _renderSize = new Vector2(Mathf.Clamp((int)_renderSize.x, 1, NativePlugin.MaxRenderWidth), Mathf.Clamp((int)_renderSize.y, 1, NativePlugin.MaxRenderHeight)); + } + + { + string currentAA = "None"; + if (QualitySettings.antiAliasing > 1) + { + currentAA = QualitySettings.antiAliasing.ToString() + "x"; + } + EditorUtils.IntAsDropdown("Anti-aliasing", _propRenderAntiAliasing, new string[] { "Current (" + currentAA + ")", "None", "2x", "4x", "8x" }, new int[] { -1, 1, 2, 4, 8 }); + } + + if (_cameraNode != null) + { + if (_cameraNode.actualRenderingPath == RenderingPath.DeferredLighting +#if AVPRO_MOVIECAPTURE_DEFERREDSHADING + || _cameraNode.actualRenderingPath == RenderingPath.DeferredShading +#endif + ) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Warning: Antialiasing by MSAA is not supported as camera is using deferred rendering path"); + GUI.color = Color.white; + _renderAntiAliasing = -1; + } + if (_cameraNode.clearFlags == CameraClearFlags.Nothing || _cameraNode.clearFlags == CameraClearFlags.Depth) + { + if (_renderResolution != CaptureBase.Resolution.Original || _renderAntiAliasing != -1) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Warning: Overriding camera resolution or anti-aliasing when clear flag is set to " + _cameraNode.clearFlags + " may result in incorrect captures"); + GUI.color = Color.white; + } + } + } + + EditorGUI.indentLevel--; + } + + // 360 Cubemap + if (_sourceType == SourceType.Camera360) + { + GUILayout.Space(8f); + EditorGUILayout.LabelField("360 Camera", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(_propRender180Degrees); + { + CaptureBase.CubemapResolution cubemapEnum = (CaptureBase.CubemapResolution)_cubemapResolution; + _cubemapResolution = (int)((CaptureBase.CubemapResolution)EditorGUILayout.EnumPopup("Resolution", cubemapEnum)); + } + { + CaptureBase.CubemapDepth depthEnum = (CaptureBase.CubemapDepth)_cubemapDepth; + _cubemapDepth = (int)((CaptureBase.CubemapDepth)EditorGUILayout.EnumPopup("Depth", depthEnum)); + } + { + StereoPacking stereoEnum = (StereoPacking)_cubemapStereoPacking; + _cubemapStereoPacking = (int)((StereoPacking)EditorGUILayout.EnumPopup("Stereo Mode", stereoEnum)); + } + if (_cubemapStereoPacking != (int)StereoPacking.None) + { + #if AVPRO_MOVIECAPTURE_UNITY_STEREOCUBEMAP_RENDER + if (!PlayerSettings.enable360StereoCapture) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Warning: 360 Stereo Capture needs to be enabled in PlayerSettings"); + GUI.color = Color.white; + if (GUILayout.Button("Enable 360 Stereo Capture")) + { + PlayerSettings.enable360StereoCapture = true; + } + } + #endif + _cubemapStereoIPD = EditorGUILayout.FloatField("Interpupillary distance", _cubemapStereoIPD); + } + EditorGUILayout.PropertyField(_propCaptureWorldSpaceGUI, _guiCaptureWorldSpaceUI); + EditorGUILayout.PropertyField(_propSupportCameraRotation, _guiCameraRotation); + + if (_propSupportCameraRotation.boolValue) + { + EditorGUILayout.PropertyField(_propOnlyLeftRightRotation); + } + EditorGUI.indentLevel--; + } + + // 360 Cubemap ODS + if (_sourceType == SourceType.Camera360ODS) + { + GUILayout.Space(8f); + EditorGUI.indentLevel++; + EditorGUILayout.LabelField("Source Options", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + { + EditorGUILayout.PropertyField(_propOdsRender180Degrees); + EditorGUILayout.PropertyField(_propOdsIPD, _guiInterpupillaryDistance); + EditorGUILayout.PropertyField(_propOdsPixelSliceSize); + EditorGUILayout.PropertyField(_propOdsPaddingSize); + EditorGUILayout.PropertyField(_propOdsCameraClearMode); + EditorGUILayout.PropertyField(_propOdsCameraClearColor); + } + EditorGUI.indentLevel--; + EditorGUI.indentLevel--; + } + + // Start / Stop + { + GUILayout.Space(8f); + EditorGUILayout.LabelField("Start / Stop", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + + EditorGUILayout.PropertyField(_propStartDelay, _guiStartDelay); + + if ((StartDelayMode)_propStartDelay.enumValueIndex == StartDelayMode.RealSeconds || + (StartDelayMode)_propStartDelay.enumValueIndex == StartDelayMode.GameSeconds) + { + EditorGUILayout.PropertyField(_propStartDelaySeconds, _guiSeconds); + } + + EditorGUILayout.Separator(); + + _stopMode = (StopMode)EditorGUILayout.EnumPopup("Stop Mode", _stopMode); + if (_stopMode == StopMode.FramesEncoded) + { + _stopFrames = EditorGUILayout.IntField("Frames", _stopFrames); + } + else if (_stopMode == StopMode.SecondsElapsed || _stopMode == StopMode.SecondsEncoded) + { + _stopSeconds = EditorGUILayout.FloatField("Seconds", _stopSeconds); + } + EditorGUI.indentLevel--; + } + + GUILayout.Space(8f); + if (GUILayout.Button("Reset All Settings")) + { + ResetSettings(); + } + GUILayout.Space(4f); + + //EditorGUI.indentLevel--; + EditorGUILayout.EndVertical(); + } + + private void DrawConfigGUI_Encoding() + { + //GUILayout.Label("Target", EditorStyles.boldLabel); + EditorGUILayout.BeginVertical(GUI.skin.box); + //EditorGUI.indentLevel++; + + EditorUtils.EnumAsDropdown("Output Target", _propOutputTarget, EditorUtils.OutputTargetNames); + + GUILayout.Space(8f); + if (_propOutputTarget.enumValueIndex == (int)OutputTarget.VideoFile || + _propOutputTarget.enumValueIndex == (int)OutputTarget.ImageSequence) + { + bool isImageSequence = (_propOutputTarget.enumValueIndex == (int)OutputTarget.ImageSequence); + + if (isImageSequence) + { + EditorUtils.EnumAsDropdown("Format", _propImageSequenceFormat, Utils.GetNativeImageSequenceFormatNames()); + GUILayout.Space(8f); + } + + // File path + EditorGUILayout.LabelField("File Path", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + _outputFolderIndex = EditorGUILayout.Popup("Relative to", _outputFolderIndex, _outputFolders); + if (_outputFolderIndex != (int)CaptureBase.OutputPath.Absolute) + { + _outputFolderRelative = EditorGUILayout.TextField("SubFolder(s)", _outputFolderRelative); + } + else + { + EditorGUILayout.BeginHorizontal(); + _outputFolderAbsolute = EditorGUILayout.TextField("Path", _outputFolderAbsolute); + if (GUILayout.Button(">", GUILayout.Width(22))) + { + _outputFolderAbsolute = EditorUtility.SaveFolderPanel("Select Folder To Store Video Captures", System.IO.Path.GetFullPath(System.IO.Path.Combine(Application.dataPath, "../")), ""); + EditorUtility.SetDirty(this); + } + EditorGUILayout.EndHorizontal(); + } + EditorGUI.indentLevel--; + + GUILayout.Space(8f); + + // File name + EditorGUILayout.LabelField("File Name", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + _filenamePrefixFromSceneName = EditorGUILayout.Toggle("From Scene Name", _filenamePrefixFromSceneName); + if (_filenamePrefixFromSceneName) + { +#if AVPRO_MOVIECAPTURE_SCENEMANAGER_53 + string currentScenePath = UnityEditor.SceneManagement.EditorSceneManager.GetActiveScene().path; +#else + string currentScenePath = EditorApplication.currentScene; +#endif + _filenamePrefix = System.IO.Path.GetFileNameWithoutExtension(currentScenePath); + if (string.IsNullOrEmpty(_filenamePrefix)) + { + _filenamePrefix = "capture"; + } + } + EditorGUI.BeginDisabledGroup(_filenamePrefixFromSceneName); + _filenamePrefix = EditorGUILayout.TextField("Prefix", _filenamePrefix); + EditorGUI.EndDisabledGroup(); + if (!isImageSequence) + { + _appendTimestamp = EditorGUILayout.Toggle("Append Timestamp", _appendTimestamp); + } + else + { + EditorGUILayout.PropertyField(_propImageSequenceStartFrame, _guiStartFrame); + EditorGUILayout.PropertyField(_propImageSequenceZeroDigits, _guiZeroDigits); + } + EditorGUI.indentLevel--; + GUILayout.Space(8f); + + // File container + if (!isImageSequence) + { + EditorGUILayout.LabelField("File Container", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + _fileContainerIndex = EditorGUILayout.Popup("Extension", _fileContainerIndex, _fileExtensions); + if (_fileContainerIndex >= 0 && _fileContainerIndex < _fileExtensions.Length) + { + _filenameExtension = _fileExtensions[_fileContainerIndex].ToLower(); + } + EditorGUI.indentLevel--; + } + } + else if (_propOutputTarget.enumValueIndex == (int)OutputTarget.NamedPipe) + { + EditorGUILayout.PropertyField(_propNamedPipePath); + } + + DrawVisualCodecList(); + DrawAudioCodecList(); + + if (_propOutputTarget.enumValueIndex == (int)OutputTarget.VideoFile || + _propOutputTarget.enumValueIndex == (int)OutputTarget.ImageSequence) + { + GUILayout.Space(8f); + EditorGUILayout.LabelField("Encoder Hints", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + if (_propOutputTarget.enumValueIndex == (int)OutputTarget.VideoFile) + { + EditorUtils.BitrateField("Average Bitrate", _propVideoHintsAverageBitrate); +#if UNITY_EDITOR_WIN + EditorUtils.BitrateField("Maxiumum Bitrate", _propVideoHintsMaximumBitrate); + + // Ensure that the maximum value is larger than the average value, or zero + if (_propVideoHintsMaximumBitrate.intValue != 0) + { + _propVideoHintsMaximumBitrate.intValue = Mathf.Max(_propVideoHintsMaximumBitrate.intValue, _propVideoHintsAverageBitrate.intValue); + } +#endif + EditorGUILayout.PropertyField(_propVideoHintsQuality); + EditorGUILayout.PropertyField(_propVideoHintsKeyframeInterval); + EditorGUILayout.PropertyField(_propVideoHintsSupportTransparency); + +#if UNITY_EDITOR_WIN + EditorGUILayout.PropertyField(_propVideoHintsUseHardwareEncoding, new GUIContent("Hardware Encoding")); +#elif UNITY_EDITOR_OSX + EditorGUILayout.PropertyField(_propVideoHintsEnableFragmentedWriting); + if (_propVideoHintsEnableFragmentedWriting.boolValue) + { + EditorGUILayout.PropertyField(_propVideoHintsMovieFragmentInterval); + } +#endif + } + else if (_propOutputTarget.enumValueIndex == (int)OutputTarget.ImageSequence) + { +#if UNITY_EDITOR_OSX + EditorGUILayout.PropertyField(_propImageHintsQuality); +#endif + EditorGUILayout.PropertyField(_propImageHintsSupportTransparency); + } + EditorGUI.indentLevel--; + + if (_propOutputTarget.enumValueIndex == (int)OutputTarget.VideoFile) + { + GUILayout.Space(8f); + EditorGUILayout.LabelField("Post Process", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(_propVideoHintsAllowFastStart); + + EditorGUILayout.PropertyField(_propVideoHintsInjectStereoPacking, _guiStereoPacking); + if (_propVideoHintsInjectStereoPacking.enumValueIndex == (int)NoneAutoCustom.Custom) + { + EditorGUILayout.PropertyField(_propVideoHintsStereoPacking, _guiBlankSpace); + } + EditorGUILayout.PropertyField(_propVideoHintsInjectSphericalVideoLayout, _guiSphericalLayout); + if (_propVideoHintsInjectSphericalVideoLayout.enumValueIndex == (int)NoneAutoCustom.Custom) + { + EditorGUILayout.PropertyField(_propVideoHintsSphericalVideoLayout, _guiBlankSpace); + } + } + } + + //EditorGUI.indentLevel--; + EditorGUILayout.EndVertical(); + } + + private void DrawConfigGUI_Visual() + { + //GUILayout.Label("Video", EditorStyles.boldLabel); + EditorGUILayout.BeginVertical(GUI.skin.box); + //EditorGUI.indentLevel++; + + { + Vector2 outSize = Vector2.zero; + if (_sourceType == SourceType.Screen) + { + // We can't just use Screen.width and Screen.height because Unity returns the size of this window + // So instead we look for a camera with no texture target and a valid viewport + int inWidth = 1; + int inHeight = 1; + foreach (Camera cam in Camera.allCameras) + { + if (cam.targetTexture == null) + { + float rectWidth = Mathf.Clamp01(cam.rect.width + cam.rect.x) - Mathf.Clamp01(cam.rect.x); + float rectHeight = Mathf.Clamp01(cam.rect.height + cam.rect.y) - Mathf.Clamp01(cam.rect.y); + if (rectWidth > 0.0f && rectHeight > 0.0f) + { + inWidth = Mathf.FloorToInt(cam.pixelWidth / rectWidth); + inHeight = Mathf.FloorToInt(cam.pixelHeight / rectHeight); + //Debug.Log (rectWidth + " " + (cam.rect.height - cam.rect.y) + " " + cam.pixelHeight + " = " + inWidth + "x" + inHeight); + break; + } + } + } + outSize = CaptureBase.GetRecordingResolution(inWidth, inHeight, GetDownScaleFromIndex(_downScaleIndex), new Vector2(_downscaleX, _downscaleY)); + } + else + { + if (_cameraNode != null) + { + int inWidth = Mathf.FloorToInt(_cameraNode.pixelRect.width); + int inHeight = Mathf.FloorToInt(_cameraNode.pixelRect.height); + + if (_renderResolution != CaptureBase.Resolution.Original) + { + float rectWidth = Mathf.Clamp01(_cameraNode.rect.width + _cameraNode.rect.x) - Mathf.Clamp01(_cameraNode.rect.x); + float rectHeight = Mathf.Clamp01(_cameraNode.rect.height + _cameraNode.rect.y) - Mathf.Clamp01(_cameraNode.rect.y); + + if (_renderResolution == CaptureBase.Resolution.Custom) + { + inWidth = (int)_renderSize.x; + inHeight = (int)_renderSize.y; + } + else + { + CaptureBase.GetResolution(_renderResolution, ref inWidth, ref inHeight); + inWidth = Mathf.FloorToInt(inWidth * rectWidth); + inHeight = Mathf.FloorToInt(inHeight * rectHeight); + } + } + + outSize = CaptureBase.GetRecordingResolution(inWidth, inHeight, GetDownScaleFromIndex(_downScaleIndex), new Vector2(_downscaleX, _downscaleY)); + } + } + + GUILayout.Space(8f); + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + GUI.color = Color.cyan; + GUILayout.TextArea("Output: " + (int)outSize.x + " x " + (int)outSize.y + " @ " + _frameRate.ToString("F2")); + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + GUILayout.Space(8f); + GUI.color = Color.white; + + } + + _downScaleIndex = EditorGUILayout.Popup("Down Scale", _downScaleIndex, _downScales); + if (_downScaleIndex == 5) + { + Vector2 maxVideoSize = new Vector2(_downscaleX, _downscaleY); + maxVideoSize = EditorGUILayout.Vector2Field("Size", maxVideoSize); + _downscaleX = Mathf.Clamp((int)maxVideoSize.x, 1, NativePlugin.MaxRenderWidth); + _downscaleY = Mathf.Clamp((int)maxVideoSize.y, 1, NativePlugin.MaxRenderHeight); + } + + GUILayout.Space(8f); + //EditorGUILayout.LabelField("Codec", EditorStyles.boldLabel); + + DrawConfigGUI_MotionBlur(); + + //EditorGUI.indentLevel--; + EditorGUILayout.EndVertical(); + } + + private void UpdateSelectedCodec() + { + // Assign the first codec if none is selected + if (_videoCodec == null && CodecManager.VideoCodecs.Count > 0) + { + _videoCodec = CodecManager.VideoCodecs.Codecs[0]; + } + if (_videoCodec != null) + { + // Ensure the audio codec uses the same API as the video codec, + // otherwise assign the first audio codec + if (_audioCodec == null || (_audioCodec != null && _audioCodec.MediaApi != _videoCodec.MediaApi)) + { + _audioCodec = CodecManager.AudioCodecs.GetFirstWithMediaApi(_videoCodec.MediaApi); + } + if (_audioInputDevice == null || (_audioInputDevice != null && _audioInputDevice.MediaApi != _videoCodec.MediaApi)) + { + _audioInputDevice = DeviceManager.AudioInputDevices.GetFirstWithMediaApi(_videoCodec.MediaApi); + } + } + + // Select the appropriate file extension based on the selected codecs + UpdateFileExtension(); + } + + private void UpdateFileExtension() + { + // There are cases where the plugin is deinitalised, so it needs to be inited to be able to query the file extension + if (NativePlugin.GetVideoCodecCount() <= 0) + { + NativePlugin.Init(); + } + + _fileExtensions = GetSuitableFileExtensions(_videoCodec, IsAudioCaptured()?_audioCodec:null); + if (_fileContainerIndex >= _fileExtensions.Length) + { + _fileContainerIndex = 0; + } + if (_fileContainerIndex < _fileExtensions.Length) + { + _filenameExtension = _fileExtensions[_fileContainerIndex].ToLower(); + } + } + + private void DrawVisualCodecList() + { + GUILayout.Space(8f); + if (_outputTarget == OutputTarget.VideoFile) + { + if (_videoCodec == null && CodecManager.VideoCodecs.Count > 0) + { + _videoCodec = CodecManager.VideoCodecs.Codecs[0]; + } + if (_audioCodec == null && CodecManager.AudioCodecs.Count > 0) + { + _audioCodec = CodecManager.AudioCodecs.Codecs[0]; + } + if (ShowMediaItemList("Video Codec", CodecManager.VideoCodecs, _videoCodec, null)) + { + _queueConfigureVideoCodec = _videoCodec; + } + + if (_videoCodec != null) + { +#if UNITY_EDITOR_WIN + if (_videoCodec.MediaApi == MediaApi.DirectShow) + { + if (_videoCodec.Name.EndsWith("Cinepak Codec by Radius") + || _videoCodec.Name.EndsWith("DV Video Encoder") + || _videoCodec.Name.EndsWith("Microsoft Video 1") + || _videoCodec.Name.EndsWith("Microsoft RLE") + || _videoCodec.Name.EndsWith("Logitech Video (I420)") + || _videoCodec.Name.EndsWith("Intel IYUV codec") + ) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Warning: Legacy codec, not recommended"); + GUI.color = Color.white; + } + if (_videoCodec.Name.Contains("Decoder") || _videoCodec.Name.Contains("Decompressor")) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Warning: Codec may contain decompressor only"); + GUI.color = Color.white; + } + if (CodecManager.VideoCodecs.Count < 6) + { + GUI.color = Color.cyan; + GUILayout.TextArea("Low number of codecs, consider installing more"); + GUI.color = Color.white; + } + } +#endif + if (_videoCodec.Name.EndsWith("Uncompressed")) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Warning: Uncompressed may result in very large files"); + GUI.color = Color.white; + } + } + } + } + + private bool IsCaptureRealTime() + { + return (_captureModeIndex == 0); + } + + private bool IsAudioCaptured() + { + return (_outputTarget == OutputTarget.VideoFile && _audioCaptureSource != AudioCaptureSource.None && (IsCaptureRealTime() || _audioCaptureSource != AudioCaptureSource.Manual)); + } + + private void DrawAudioCodecList() + { + if (_outputTarget != OutputTarget.VideoFile) + { + return; + } + + GUILayout.Space(8f); + EditorGUI.BeginDisabledGroup(!IsAudioCaptured()); + + if (ShowMediaItemList("Audio Codec", CodecManager.AudioCodecs, _audioCodec, _videoCodec)) + { + _queueConfigureAudioCodec = _audioCodec; + } + +#if UNITY_EDITOR_WIN + if (_audioCodec != null && (_audioCodec.Name.EndsWith("MPEG Layer-3"))) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Warning: We have had reports that this codec doesn't work. Consider using a different codec"); + GUI.color = Color.white; + } +#endif + EditorGUI.EndDisabledGroup(); + } + + private void DrawConfigGUI_MotionBlur() + { + EditorGUI.BeginDisabledGroup(IsCaptureRealTime()); + //EditorGUILayout.BeginVertical(GUI.skin.box); + //EditorGUI.indentLevel++; + + GUILayout.Space(8f); + GUILayout.Label("Motion Blur (beta)", EditorStyles.boldLabel); + //EditorGUILayout.BeginVertical(GUI.skin.box); + //EditorGUI.indentLevel++; + + if (IsCaptureRealTime()) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Motion Blur only available in Offline Render mode"); + GUI.color = Color.white; + } + + _useMotionBlur = EditorGUILayout.Toggle("Use Motion Blur", _useMotionBlur); + EditorGUI.BeginDisabledGroup(!_useMotionBlur); + EditorGUILayout.PrefixLabel("Samples"); + EditorGUILayout.BeginHorizontal(GUILayout.ExpandWidth(false)); + _motionBlurSampleCount = EditorGUILayout.IntSlider(_motionBlurSampleCount, 0, 64); + EditorGUILayout.EndHorizontal(); + EditorGUI.EndDisabledGroup(); + + //EditorGUI.indentLevel--; + //EditorGUILayout.EndVertical(); + EditorGUI.EndDisabledGroup(); + } + + private void DrawConfigGUI_Audio() + { + bool showAudioSources = true; + if (_outputTarget != OutputTarget.VideoFile) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Audio capture only available when outputing to video file"); + GUI.color = Color.white; + showAudioSources = false; + } + + if (showAudioSources) + { + EditorGUILayout.BeginVertical(GUI.skin.box); + _audioCaptureSource = (AudioCaptureSource)EditorGUILayout.EnumPopup("Audio Source", _audioCaptureSource); + + if (_audioCaptureSource != AudioCaptureSource.None) + { + bool showAudioOptions = true; + + #if AVPRO_MOVIECAPTURE_OFFLINE_AUDIOCAPTURE + if (!IsCaptureRealTime() && _audioCaptureSource != AudioCaptureSource.Manual && _audioCaptureSource != AudioCaptureSource.Unity && _audioCaptureSource != AudioCaptureSource.Wwise) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Only Manual, Unity and Wwise Audio Sources are available in offline capture mode"); + GUI.color = Color.white; + showAudioOptions = false; + } + #else + if (!IsCaptureRealTime() && _audioCaptureSource != AudioCaptureSource.Manual && _audioCaptureSource != AudioCaptureSource.Wwise) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Only Manual and Wwise Audio Source is available in offline capture mode"); + GUI.color = Color.white; + showAudioOptions = false; + } + #endif + if (IsCaptureRealTime() && _audioCaptureSource == AudioCaptureSource.Wwise) + { + GUI.color = Color.yellow; + GUILayout.TextArea("Wwise Audio Source is not available in realtime capture mode"); + GUI.color = Color.white; + showAudioOptions = false; + } + #if !AVPRO_MOVIECAPTURE_WWISE_SUPPORT + if (!IsCaptureRealTime() && _audioCaptureSource == AudioCaptureSource.Wwise) + { + GUI.color = Color.red; + GUILayout.TextArea("To support Wwise audio capture: add AVPRO_MOVIECAPTURE_WWISE_SUPPORT to script defines in Player Settings"); + GUI.color = Color.white; + showAudioOptions = false; + } + #endif + + if (showAudioOptions) + { + if (_audioCaptureSource == AudioCaptureSource.Microphone) + { + GUILayout.Space(8f); + + ShowMediaItemList("Microphone", DeviceManager.AudioInputDevices, _audioInputDevice, _videoCodec); + + GUILayout.Space(8f); + } + else if (_audioCaptureSource == AudioCaptureSource.Manual) + { + EditorUtils.IntAsDropdown("Sample Rate", _propManualAudioSampleRate, EditorUtils.CommonAudioSampleRateNames, EditorUtils.CommonAudioSampleRateValues); + EditorGUILayout.PropertyField(_propManualAudioChannelCount, new GUIContent("Channels")); + } + } + } + EditorGUILayout.EndVertical(); + } + } + + private static string[] GetSuitableFileExtensions(Codec videoCodec, Codec audioCodec = null) + { + string[] result = null; + if (videoCodec != null) + { + int audioCodecIndex = -1; + if (audioCodec != null) + { + audioCodecIndex = audioCodec.Index; + } + result = NativePlugin.GetContainerFileExtensions(videoCodec.Index, audioCodecIndex); + } + if (result != null) + { + for (int i = 0; i < result.Length; i++) + { + result[i] = result[i].ToUpper(); + } + } + else + { + result = new string[0]; + } + return result; + } + + private static CaptureBase.DownScale GetDownScaleFromIndex(int index) + { + CaptureBase.DownScale result = CaptureBase.DownScale.Original; + switch (index) + { + case 0: + result = CaptureBase.DownScale.Original; + break; + case 1: + result = CaptureBase.DownScale.Half; + break; + case 2: + result = CaptureBase.DownScale.Quarter; + break; + case 3: + result = CaptureBase.DownScale.Eighth; + break; + case 4: + result = CaptureBase.DownScale.Sixteenth; + break; + case 5: + result = CaptureBase.DownScale.Custom; + break; + } + + return result; + } + + private static bool IsTrialVersion() + { + return NativePlugin.IsTrialVersion(); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureEditorWindow.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureEditorWindow.cs.meta new file mode 100644 index 0000000..c74a8b3 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureEditorWindow.cs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b7c7fb5275f597f4ca030385c3259720 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCamera360Editor.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCamera360Editor.cs new file mode 100644 index 0000000..dbd27f4 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCamera360Editor.cs @@ -0,0 +1,129 @@ +#if UNITY_EDITOR +#if UNITY_2018_1_OR_NEWER + // Unity 2018.1 introduces stereo cubemap render methods + #define AVPRO_MOVIECAPTURE_UNITY_STEREOCUBEMAP_RENDER +#endif +using UnityEngine; +using UnityEditor; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Editor +{ + [CanEditMultipleObjects] + [CustomEditor(typeof(CaptureFromCamera360))] + public class CaptureFromCamera360Editor : CaptureBaseEditor + { + //private CaptureFromCamera360 _capture; + + private SerializedProperty _propCameraSelector; + private SerializedProperty _propCamera; + + private SerializedProperty _propRenderResolution; + private SerializedProperty _propRenderSize; + private SerializedProperty _propAntiAliasing; + + private SerializedProperty _propCubemapResolution; + private SerializedProperty _propCubemapDepth; + private SerializedProperty _propSupportGUI; + private SerializedProperty _propSupporCameraRotation; + private SerializedProperty _propOnlyLeftRightRotation; + private SerializedProperty _propStereoRendering; + private SerializedProperty _propRender180Degrees; + private SerializedProperty _propIPD; + + protected override void OnEnable() + { + base.OnEnable(); + + //_capture = (this.target) as CaptureFromCamera360; + + _propCameraSelector = serializedObject.AssertFindProperty("_cameraSelector"); + _propCamera = serializedObject.AssertFindProperty("_camera"); + + _propRenderResolution = serializedObject.AssertFindProperty("_renderResolution"); + _propRenderSize = serializedObject.AssertFindProperty("_renderSize"); + _propAntiAliasing = serializedObject.AssertFindProperty("_renderAntiAliasing"); + + _propCubemapResolution = serializedObject.AssertFindProperty("_cubemapResolution"); + _propCubemapDepth = serializedObject.AssertFindProperty("_cubemapDepth"); + _propSupportGUI = serializedObject.AssertFindProperty("_supportGUI"); + _propSupporCameraRotation = serializedObject.AssertFindProperty("_supportCameraRotation"); + _propOnlyLeftRightRotation = serializedObject.AssertFindProperty("_onlyLeftRightRotation"); + _propRender180Degrees = serializedObject.AssertFindProperty("_render180Degrees"); + _propStereoRendering = serializedObject.AssertFindProperty("_stereoRendering"); + _propIPD = serializedObject.AssertFindProperty("_ipd"); + } + + protected void GUI_Camera() + { + EditorGUILayout.PropertyField(_propCameraSelector); + + if (null == _propCameraSelector.objectReferenceValue) + { + EditorGUILayout.PropertyField(_propCamera); + } + + EditorUtils.EnumAsDropdown("Resolution", _propRenderResolution, CaptureBaseEditor.ResolutionStrings); + + if (_propRenderResolution.enumValueIndex == (int)CaptureBase.Resolution.Custom) + { + EditorGUILayout.PropertyField(_propRenderSize, new GUIContent("Size")); + _propRenderSize.vector2Value = new Vector2(Mathf.Clamp((int)_propRenderSize.vector2Value.x, 1, NativePlugin.MaxRenderWidth), Mathf.Clamp((int)_propRenderSize.vector2Value.y, 1, NativePlugin.MaxRenderHeight)); + } + { + string currentAA = "None"; + if (QualitySettings.antiAliasing > 1) + { + currentAA = QualitySettings.antiAliasing.ToString() + "x"; + } + EditorUtils.IntAsDropdown("Anti-aliasing", _propAntiAliasing, new string[] { "Current (" + currentAA + ")", "None", "2x", "4x", "8x" }, new int[] { -1, 1, 2, 4, 8 }); + } + + EditorUtils.IntAsDropdown("Cubemap Resolution", _propCubemapResolution, new string[] { "256", "512", "1024", "2048", "4096", "8192" }, new int[] { 256, 512, 1024, 2048, 4096, 8192 }); + EditorUtils.IntAsDropdown("Cubemap Depth", _propCubemapDepth, new string[] { "0", "16", "24" }, new int[] { 0, 16, 24 }); + EditorGUILayout.PropertyField(_propSupportGUI, new GUIContent("Capture GUI")); + EditorGUILayout.PropertyField(_propSupporCameraRotation, new GUIContent("Camera Rotation")); + if (_propSupporCameraRotation.boolValue) + { + EditorGUILayout.PropertyField(_propOnlyLeftRightRotation); + } + EditorGUILayout.PropertyField(_propRender180Degrees); + EditorGUILayout.PropertyField(_propStereoRendering); + if (_propStereoRendering.enumValueIndex != (int)StereoPacking.None) + { + #if AVPRO_MOVIECAPTURE_UNITY_STEREOCUBEMAP_RENDER + if (!PlayerSettings.enable360StereoCapture) + { + ShowNoticeBox(MessageType.Warning, "360 Stereo Capture needs to be enabled in PlayerSettings"); + if (GUILayout.Button("Enable 360 Stereo Capture")) + { + PlayerSettings.enable360StereoCapture = true; + } + } + #endif + // TODO: detect HDRP and warn that stereo capture is not supported + EditorGUILayout.PropertyField(_propIPD, new GUIContent("Interpupillary distance")); + } + } + + protected override void GUI_User() + { + if (_baseCapture != null && !_baseCapture.IsCapturing()) + { + serializedObject.Update(); + + bool boolTrue = true; + EditorUtils.DrawSection("Capture From Camera 360+Stereo", ref boolTrue, GUI_Camera); + + if (serializedObject.ApplyModifiedProperties()) + { + EditorUtility.SetDirty(target); + } + } + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCamera360Editor.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCamera360Editor.cs.meta new file mode 100644 index 0000000..ea43bd5 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCamera360Editor.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0c3bf56fa2bee61458e783a9f0feb685 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCamera360ODSEditor.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCamera360ODSEditor.cs new file mode 100644 index 0000000..092e900 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCamera360ODSEditor.cs @@ -0,0 +1,119 @@ +#if UNITY_5_5_OR_NEWER + #define AVPRO_MOVIECAPTURE_UNITYPROFILER_55 +#endif + +#if UNITY_EDITOR +using UnityEngine; +using UnityEditor; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Editor +{ + [CanEditMultipleObjects] + [CustomEditor(typeof(CaptureFromCamera360ODS))] + public class CaptureFromCamera360ODSEditor : CaptureBaseEditor + { + //private CaptureFromCamera360ODS _capture; + + private SerializedProperty _propCameraSelector; + private SerializedProperty _propCamera; + private SerializedProperty _propRenderResolution; + private SerializedProperty _propRenderSize; + private SerializedProperty _propAntiAliasing; + + private SerializedProperty _propRender180Degrees; + private SerializedProperty _propIPD; + private SerializedProperty _propPixelSliceSize; + private SerializedProperty _propPaddingSize; + private SerializedProperty _propCameraClearMode; + private SerializedProperty _propCameraClearColor; + private SerializedProperty _propCameraImageEffects; + + protected override void OnEnable() + { + base.OnEnable(); + + //_capture = (this.target) as CaptureFromCamera360ODS; + + _propCameraSelector = serializedObject.AssertFindProperty("_settings.cameraSelector"); + _propCamera = serializedObject.AssertFindProperty("_settings.camera"); + + _propRenderResolution = serializedObject.AssertFindProperty("_renderResolution"); + _propRenderSize = serializedObject.AssertFindProperty("_renderSize"); + _propAntiAliasing = serializedObject.AssertFindProperty("_renderAntiAliasing"); + + _propRender180Degrees = serializedObject.AssertFindProperty("_settings.render180Degrees"); + _propIPD = serializedObject.AssertFindProperty("_settings.ipd"); + _propPixelSliceSize = serializedObject.AssertFindProperty("_settings.pixelSliceSize"); + _propPaddingSize = serializedObject.AssertFindProperty("_settings.paddingSize"); + _propCameraClearMode = serializedObject.AssertFindProperty("_settings.cameraClearMode"); + _propCameraClearColor = serializedObject.AssertFindProperty("_settings.cameraClearColor"); + _propCameraImageEffects = serializedObject.AssertFindProperty("_settings.cameraImageEffects"); + } + + protected void GUI_Camera() + { + EditorGUILayout.PropertyField(_propCameraSelector); + + if (null == _propCameraSelector.objectReferenceValue) + { + EditorGUILayout.PropertyField(_propCamera); + } + + EditorUtils.EnumAsDropdown("Resolution", _propRenderResolution, CaptureBaseEditor.ResolutionStrings); + + if (_propRenderResolution.enumValueIndex == (int)CaptureBase.Resolution.Custom) + { + EditorGUILayout.PropertyField(_propRenderSize, new GUIContent("Size")); + _propRenderSize.vector2Value = new Vector2(Mathf.Clamp((int)_propRenderSize.vector2Value.x, 1, NativePlugin.MaxRenderWidth), Mathf.Clamp((int)_propRenderSize.vector2Value.y, 1, NativePlugin.MaxRenderHeight)); + } + + { + string currentAA = "None"; + if (QualitySettings.antiAliasing > 1) + { + currentAA = QualitySettings.antiAliasing.ToString() + "x"; + } + EditorUtils.IntAsDropdown("Anti-aliasing", _propAntiAliasing, new string[] { "Current (" + currentAA + ")", "None", "2x", "4x", "8x" }, new int[] { -1, 1, 2, 4, 8 }); + } + + EditorGUILayout.Space(); + + EditorGUILayout.PropertyField(_propRender180Degrees); + EditorGUILayout.PropertyField(_propIPD, new GUIContent("Interpupillary distance")); + EditorGUILayout.PropertyField(_propPixelSliceSize); + EditorGUILayout.PropertyField(_propPaddingSize); + EditorGUILayout.PropertyField(_propCameraClearMode); + EditorGUILayout.PropertyField(_propCameraClearColor); + EditorGUILayout.PropertyField(_propCameraImageEffects, true); + } + + protected override void GUI_User() + { + if (_baseCapture != null && !_baseCapture.IsCapturing()) + { + serializedObject.Update(); + + bool boolTrue = true; + EditorUtils.DrawSection("Capture from Camera 360 + ODS", ref boolTrue, GUI_Camera); + +#if AVPRO_MOVIECAPTURE_UNITYPROFILER_55 + // This component makes the profiler use a TON of memory, so warn the user to disable it + if (UnityEngine.Profiling.Profiler.enabled) + { + ShowNoticeBox(MessageType.Warning, "Having the Unity profiler enabled while using the CaptureFromCamera360ODS component is not recommended.\n\nToo many samples are generated which can make the system run out of memory\n\nDisable the profiler, close the window and remove the tab. A Unity restart may be required after disabling the profiler recording."); + } +#endif + + if (serializedObject.ApplyModifiedProperties()) + { + EditorUtility.SetDirty(target); + } + } + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCamera360ODSEditor.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCamera360ODSEditor.cs.meta new file mode 100644 index 0000000..8245103 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCamera360ODSEditor.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e864b7158340a1949b733e272c103dba +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCameraEditor.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCameraEditor.cs new file mode 100644 index 0000000..905211c --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCameraEditor.cs @@ -0,0 +1,163 @@ +#if UNITY_EDITOR +#if !UNITY_2018_3_OR_NEWER + #define SUPPORT_SCENE_VIEW_GIZMOS_CAPTURE +#endif +using UnityEngine; +using UnityEditor; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Editor +{ + [CanEditMultipleObjects] + [CustomEditor(typeof(CaptureFromCamera))] + public class CaptureFromCameraEditor : CaptureBaseEditor + { + //private CaptureFromCamera _capture; + + private SerializedProperty _propCameraSelector; + private SerializedProperty _propLastCamera; + private SerializedProperty _propContribCameras; + private SerializedProperty _propUseContribCameras; +#if SUPPORT_SCENE_VIEW_GIZMOS_CAPTURE + private SerializedProperty _propIncludeSceneViewGizmos; +#endif + + private SerializedProperty _propRenderResolution; + private SerializedProperty _propRenderSize; + private SerializedProperty _propAntiAliasing; + + private static readonly GUIContent _guiItemCamera = new GUIContent("Camera", "The top level camera you want to capture"); + private static readonly GUIContent _guiItemContribCamera = new GUIContent("Contributing Cameras", "Cameras in render order from first to last that contribute to the rendering of the main camera above"); + + protected override void OnEnable() + { + base.OnEnable(); + + //_capture = (this.target) as CaptureFromCamera; + + _propCameraSelector = serializedObject.AssertFindProperty("_cameraSelector"); + _propLastCamera = serializedObject.AssertFindProperty("_lastCamera"); + _propContribCameras = serializedObject.AssertFindProperty("_contribCameras"); + _propContribCameras.isExpanded = true; + _propUseContribCameras = serializedObject.AssertFindProperty("_useContributingCameras"); +#if SUPPORT_SCENE_VIEW_GIZMOS_CAPTURE + _propIncludeSceneViewGizmos = serializedObject.AssertFindProperty("_includeSceneViewGizmos"); +#endif + + _propRenderResolution = serializedObject.AssertFindProperty("_renderResolution"); + _propRenderSize = serializedObject.AssertFindProperty("_renderSize"); + _propAntiAliasing = serializedObject.AssertFindProperty("_renderAntiAliasing"); + } + + protected void GUI_Camera() + { + Camera prevLastCamera = null, lastCamera = null; + + EditorGUILayout.PropertyField(_propCameraSelector); + + if (null == _propCameraSelector.objectReferenceValue) + { + prevLastCamera = (Camera)_propLastCamera.objectReferenceValue; + + EditorGUILayout.PropertyField(_propLastCamera, _guiItemCamera); + + lastCamera = (Camera)_propLastCamera.objectReferenceValue; + } + + // If the user has changed the camera, reset the contributing cameras + if (lastCamera != prevLastCamera) + { + _propContribCameras.arraySize = 0; + if (lastCamera == null) + { + _propUseContribCameras.boolValue = false; + } + } + + _propUseContribCameras.boolValue = EditorGUILayout.ToggleLeft("Use Contributing Cameras", _propUseContribCameras.boolValue); + + if (lastCamera != null) + { + if (_propUseContribCameras.boolValue) + { + if (GUILayout.Button("Find Contributing Cameras", EditorStyles.miniButtonRight, GUILayout.ExpandWidth(false))) + { + bool hasContribCameras = false; + if (Utils.HasContributingCameras(lastCamera)) + { + Camera[] cameras = Utils.FindContributingCameras(lastCamera); + if (cameras != null && cameras.Length > 0) + { + hasContribCameras = true; + _propContribCameras.arraySize = cameras.Length; + for (int slotIndex = 0; slotIndex < cameras.Length; slotIndex++) + { + _propContribCameras.GetArrayElementAtIndex(slotIndex).objectReferenceValue = cameras[slotIndex]; + } + } + } + + if (!hasContribCameras) + { + _propContribCameras.arraySize = 0; + _propUseContribCameras.boolValue = false; + } + } + + EditorGUILayout.PropertyField(_propContribCameras, _guiItemContribCamera, true); + EditorGUILayout.Space(); + } + } + + EditorUtils.EnumAsDropdown("Resolution", _propRenderResolution, CaptureBaseEditor.ResolutionStrings); + + if (_propRenderResolution.enumValueIndex == (int)CaptureBase.Resolution.Custom) + { + EditorGUILayout.PropertyField(_propRenderSize, new GUIContent("Size")); + _propRenderSize.vector2Value = new Vector2(Mathf.Clamp((int)_propRenderSize.vector2Value.x, 1, NativePlugin.MaxRenderWidth), Mathf.Clamp((int)_propRenderSize.vector2Value.y, 1, NativePlugin.MaxRenderHeight)); + } + { + string currentAA = "None"; + if (QualitySettings.antiAliasing > 1) + { + currentAA = QualitySettings.antiAliasing.ToString() + "x"; + } + EditorUtils.IntAsDropdown("Anti-aliasing", _propAntiAliasing, new string[] { "Current (" + currentAA + ")", "None", "2x", "4x", "8x" }, new int[] { -1, 1, 2, 4, 8 }); + } + +#if SUPPORT_SCENE_VIEW_GIZMOS_CAPTURE + EditorGUILayout.PropertyField(_propIncludeSceneViewGizmos); +#endif + } + + protected override void GUI_User() + { + if (_baseCapture != null && !_baseCapture.IsCapturing()) + { + serializedObject.Update(); + + bool boolTrue = true; + EditorUtils.DrawSection("Capture From Camera", ref boolTrue, GUI_Camera); + + if (serializedObject.ApplyModifiedProperties()) + { + EditorUtility.SetDirty(target); + } + } + } + + /* + public override void OnInspectorGUI() + { + GUI_Header(); + + + + GUI_BaseOptions(); + }*/ + } +} +#endif \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCameraEditor.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCameraEditor.cs.meta new file mode 100644 index 0000000..0a485e6 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromCameraEditor.cs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 00cfbd397f486bc47af3c7358fef2c74 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromScreenEditor.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromScreenEditor.cs new file mode 100644 index 0000000..85d7936 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromScreenEditor.cs @@ -0,0 +1,41 @@ +#if UNITY_EDITOR +using UnityEngine; +using UnityEditor; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Editor +{ + [CanEditMultipleObjects] + [CustomEditor(typeof(CaptureFromScreen))] + public class CaptureFromScreenEditor : CaptureBaseEditor + { + private SerializedProperty _propCaptureMouseCursor; + private SerializedProperty _propMouseCursor; + + protected override void GUI_Misc() + { + GUI_MouseCursor(); + base.GUI_Misc(); + } + + protected void GUI_MouseCursor() + { + EditorGUILayout.PropertyField(_propCaptureMouseCursor); + if (_propCaptureMouseCursor.boolValue) + { + EditorGUILayout.PropertyField(_propMouseCursor); + } + } + + protected override void OnEnable() + { + base.OnEnable(); + _propCaptureMouseCursor = serializedObject.AssertFindProperty("_captureMouseCursor"); + _propMouseCursor = serializedObject.AssertFindProperty("_mouseCursor"); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromScreenEditor.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromScreenEditor.cs.meta new file mode 100644 index 0000000..47100f9 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromScreenEditor.cs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 48a8b5e7b8c7ff147bd561367991de49 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromTextureEditor.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromTextureEditor.cs new file mode 100644 index 0000000..fdc8819 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromTextureEditor.cs @@ -0,0 +1,46 @@ +#if UNITY_EDITOR +using UnityEngine; +using UnityEditor; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Editor +{ + [CanEditMultipleObjects] + [CustomEditor(typeof(CaptureFromTexture))] + public class CaptureFromTextureEditor : CaptureBaseEditor + { + private SerializedProperty _propManualUpdate; + + protected override void OnEnable() + { + base.OnEnable(); + + _propManualUpdate = serializedObject.AssertFindProperty("_manualUpdate"); + } + + protected void GUI_Camera() + { + EditorGUILayout.PropertyField(_propManualUpdate); + } + + protected override void GUI_User() + { + if (_baseCapture != null && !_baseCapture.IsCapturing()) + { + serializedObject.Update(); + + bool boolTrue = true; + EditorUtils.DrawSection("Capture From Texture", ref boolTrue, GUI_Camera); + + if (serializedObject.ApplyModifiedProperties()) + { + EditorUtility.SetDirty(target); + } + } + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromTextureEditor.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromTextureEditor.cs.meta new file mode 100644 index 0000000..54c65b3 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/CaptureFromTextureEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a9575e652d155954c9cca03aad0c6655 +timeCreated: 1526301386 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/EditorScreenshot.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/EditorScreenshot.cs new file mode 100644 index 0000000..6f2c57b --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/EditorScreenshot.cs @@ -0,0 +1,363 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Editor +{ + public class EditorScreenshot : MonoBehaviour + { + internal enum ImageFormat + { + PNG, + JPG, + TGA, + EXR, + } + + internal enum ExrPrecision + { + Half, + Float, + } + + internal enum ExrCompression + { + None, + ZIP, + RLE, + PIZ, + } + + [Serializable] + internal class Options + { + [SerializeField, Range(1, 100)] + internal int jpgQuality = 75; + + [SerializeField] + internal ExrPrecision exrPrecision; + + [SerializeField] + internal ExrCompression exrCompression; + + internal Texture2D.EXRFlags GetExrFlags() + { + Texture2D.EXRFlags result = Texture2D.EXRFlags.None; + if (exrPrecision == ExrPrecision.Float) result |= Texture2D.EXRFlags.OutputAsFloat; + if (exrCompression == ExrCompression.ZIP) result |= Texture2D.EXRFlags.CompressZIP; + else if (exrCompression == ExrCompression.RLE) result |= Texture2D.EXRFlags.CompressRLE; + else if (exrCompression == ExrCompression.PIZ) result |= Texture2D.EXRFlags.CompressPIZ; + return result; + } + } + + private const string SceneCameraName = "SceneCamera"; + + internal static RenderTexture GetSceneViewTexture() + { + RenderTexture result = null; + Camera[] cameras = FindAllCameras(); + if (cameras != null) + { + Camera camera = FindCameraByName(cameras.Length, cameras, SceneCameraName); + if (camera != null) + { + if (camera.targetTexture != null) + { + // Note we have to force a render + camera.Render(); + result = camera.targetTexture; + } + } + } + return result; + } + + private static RenderTexture GetSceneViewTexture2() + { + RenderTexture result = null; + RenderTexture[] rts = Resources.FindObjectsOfTypeAll(); + foreach (RenderTexture rt in rts) + { + if (rt.name == "SceneView RT") + { + result = rt; + break; + } + } + return result; + } + + internal static void SceneViewToFile(string fileNamePrefix, string folderPath, ImageFormat format, Options options) + { + RenderTexture cameraTexture = GetSceneViewTexture(); + if (cameraTexture != null) + { + Texture2D texture = GetReadableTexture(cameraTexture, format == ImageFormat.EXR); + if (texture != null) + { + string filePath = EditorScreenshot.GenerateFilename(fileNamePrefix, format, texture.width, texture.height); + filePath = GenerateFilePath(folderPath, filePath); + TextureToFile(texture, filePath, format, options); + if (Application.isPlaying) + { + Destroy(texture); + } + else + { + DestroyImmediate(texture); + } + } + } + else + { + Debug.LogError("SceneView texture isn't available, make sure the view is visible"); + } + } + + internal static Texture2D GetReadableTexture(RenderTexture texture, bool supportHDR) + { + var oldRT = RenderTexture.active; + TextureFormat format = TextureFormat.RGBA32; + if (supportHDR) + { + format = TextureFormat.RGBAFloat; + } + Texture2D destTex = new Texture2D(texture.width, texture.height, format, false, supportHDR); + RenderTexture.active = texture; + destTex.ReadPixels(new Rect(0, 0, texture.width, texture.height), 0, 0); + destTex.Apply(); + RenderTexture.active = oldRT; + return destTex; + } + + internal static bool SupportsTGA() + { + #if UNITY_2018_3_OR_NEWER + return true; + #else + return false; + #endif + } + + internal static bool SupportsGameViewJPGTGAEXR() + { + #if UNITY_2017_3_OR_NEWER + return Application.isPlaying; + #else + return false; + #endif + } + + internal static bool SupportsGameViewEXR() + { + #if UNITY_2019_1_OR_NEWER + return Application.isPlaying; + #else + return false; + #endif + } + + internal static void TextureToFile(Texture2D texture, string filePath, ImageFormat format, Options options) + { + byte[] data = null; + #if UNITY_2017_1_OR_NEWER + switch (format) + { + case ImageFormat.PNG: + data = ImageConversion.EncodeToPNG(texture); + break; + case ImageFormat.JPG: + data = ImageConversion.EncodeToJPG(texture, options.jpgQuality); + break; + case ImageFormat.TGA: + #if UNITY_2018_3_OR_NEWER + data = ImageConversion.EncodeToTGA(texture); + #endif + break; + case ImageFormat.EXR: + data = ImageConversion.EncodeToEXR(texture, options.GetExrFlags()); + break; + } + #else + switch (format) + { + case ImageFormat.PNG: + data = texture.EncodeToPNG(); + break; + case ImageFormat.JPG: + data = texture.EncodeToJPG(options.jpgQuality); + break; + case ImageFormat.EXR: + data = texture.EncodeToEXR(options.GetExrFlags()); + break; + } + #endif + if (data != null) + { + System.IO.File.WriteAllBytes(filePath, data); + OnFileWritten(filePath); + } + } + + internal static void GameViewToPNG(string filePath, int superSize = 1) + { + #if UNITY_2017_1_OR_NEWER + ScreenCapture.CaptureScreenshot(filePath, superSize); + #else + Application.CaptureScreenshot(filePath, superSize); + #endif + + // The screenshot will not be generated until the frame has finished (at least in Application.CaptureScreenshot()) + if (!Application.isPlaying) + { + UnityEditorInternal.InternalEditorUtility.RepaintAllViews(); + } + + OnFileWritten(filePath); + } + + internal static void OnFileWritten(string filePath) + { + Debug.Log("[AVProMovieCapture] File written: " + filePath); + CaptureBase.LastFileSaved = filePath; + } + + + internal static void RenderTextureToFile(string filePath, ImageFormat format, Options options, RenderTexture rt) + { + Texture2D texture = GetReadableTexture(rt, format == ImageFormat.EXR); + if (texture != null) + { + TextureToFile(texture, filePath, format, options); + if (Application.isPlaying) + { + Destroy(texture); + } + else + { + DestroyImmediate(texture); + } + } + } + + internal static void GameViewToFile(string filePath, ImageFormat format, Options options, int superSize = 1) + { + // Coroutines aren't supported in editor mode, so we fake it using a GameObject with EditorCoroutine component + GameObject go = new GameObject("temp-screenshot"); + go.hideFlags = HideFlags.HideAndDontSave; + EditorCoroutine co = go.AddComponent(); + co.RunCoroutine(EditorScreenshot.GameViewToFileCoroutine(filePath, format, options, go, superSize)); + } + + internal static IEnumerator GameViewToFileCoroutine(string filePath, ImageFormat format, Options options, GameObject go, int superSize = 1) + { + yield return new WaitForEndOfFrame(); + Texture2D texture = null; +#if UNITY_2017_3_OR_NEWER + if (format != ImageFormat.EXR) + { + texture = ScreenCapture.CaptureScreenshotAsTexture(superSize); + } + else + { + // For EXR we want floating point textures which CaptureScreenshotAsTexture() doesn't provide + RenderTextureFormat rtFormat = (options.exrPrecision == ExrPrecision.Float) ? RenderTextureFormat.ARGBFloat : RenderTextureFormat.ARGBHalf; + RenderTexture rt = new RenderTexture(Screen.width * superSize, Screen.height * superSize, 24, rtFormat); + rt.Create(); +#if UNITY_2019_1_OR_NEWER + ScreenCapture.CaptureScreenshotIntoRenderTexture(rt); +#endif + texture = GetReadableTexture(rt, true); + Destroy(rt); + } +#endif + + if (texture != null) + { + TextureToFile(texture, filePath, format, options); + if (Application.isPlaying) + { + Destroy(texture); + Destroy(go); + } + else + { + DestroyImmediate(texture); + DestroyImmediate(go); + } + } + } + + internal static Camera[] FindAllCameras() + { + return Resources.FindObjectsOfTypeAll(); + } + + static Camera FindCameraByName(int cameraCount, Camera[] cameras, string name) + { + Camera result = null; + for (int i = 0; i < cameraCount; i++) + { + Camera c = cameras[i]; + if (c.name == name) + { + result = c; + break; + } + } + return result; + } + + internal static string GetExtension(ImageFormat format) + { + switch (format) + { + case ImageFormat.PNG: + return "png"; + case ImageFormat.JPG: + return "jpg"; + case ImageFormat.TGA: + return "tga"; + case ImageFormat.EXR: + return "exr"; + } + throw new Exception("Unknown image format"); + } + + internal static Vector2 GetGameViewSize() + { + Vector2 result = Vector2.zero; + string[] res = UnityStats.screenRes.Split('x'); + if (res.Length == 2) + { + result.x = int.Parse(res[0]); + result.y = int.Parse(res[1]); + } + return result; + } + + internal static string GenerateFilename(string filenamePrefix, ImageFormat format, int width, int height) + { + string filenameExtension = GetExtension(format); + string dateTime = DateTime.Now.ToString("yyyyMMdd-HHmmss"); + string filename = string.Format("{0}-{1}-{2}x{3}.{4}", filenamePrefix, dateTime, width, height, filenameExtension); + return filename; + } + + internal static string GenerateFilePath(string folderPath, string fileName) + { + if (!System.IO.Directory.Exists(folderPath)) + { + System.IO.Directory.CreateDirectory(folderPath); + } + return System.IO.Path.Combine(folderPath, fileName); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/EditorScreenshot.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/EditorScreenshot.cs.meta new file mode 100644 index 0000000..17e68db --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/EditorScreenshot.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 53e4ed1851d9d49438b8d2c269ba57a2 +timeCreated: 1643542876 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/EditorUtils.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/EditorUtils.cs new file mode 100644 index 0000000..157b25d --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/EditorUtils.cs @@ -0,0 +1,279 @@ +#if UNITY_EDITOR +using UnityEngine; +using UnityEditor; +using System.Reflection; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Editor +{ + /*public static class Utils + { + public static T GetCopyOf(this Component comp, T other) where T : Component + { + System.Type type = comp.GetType(); + if (type != other.GetType()) + { + return null; // type mis-match + } + BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Default | BindingFlags.DeclaredOnly; + PropertyInfo[] pinfos = type.GetProperties(flags); + for (int i = 0; i < pinfos.Length; i++) + { + PropertyInfo pinfo = pinfos[i]; + if (pinfo.CanWrite) + { + try + { + pinfo.SetValue(comp, pinfo.GetValue(other, null), null); + } + catch { } // In case of NotImplementedException being thrown. For some reason specifying that exception didn't seem to catch it, so I didn't catch anything specific. + } + } + FieldInfo[] finfos = type.GetFields(flags); + foreach (var finfo in finfos) + { + finfo.SetValue(comp, finfo.GetValue(other)); + } + return comp as T; + } + }*/ + + internal enum BitrateUnits + { + BitsPerSecond, + KBitsPerSecond, + MBitsPerSecond, + } + + public static class EditorUtils + { + public static string[] AudioCaptureSourceNames = { "None", "Unity", "Microphone", "Manual", "Wwise", "Unity Audio Mixer" }; + public static string[] CommonFrameRateNames = { "1", "10", "15", "23.98", "24 - CINEMA", "25 - PAL", "29.97 - NTSC", "30 - PC", "50 - PAL", "59.94 - NTSC", "60 - PC", "75", "90", "120" }; + public static float[] CommonFrameRateValues = { 1f, 10f, 15f, 23.976f, 24f, 25f, 29.97f, 30f, 50f, 59.94f, 60f, 75f, 90f, 120f }; + + public static string[] CommonAudioSampleRateNames = { "8kHz", "22.5kHz", "44.1kHz", "48kHz", "96kHz" }; + public static int[] CommonAudioSampleRateValues = { 8000, 22050, 44100, 48000, 96000 }; + + internal static string[] OutputTargetNames = new string[] { "Video File", "Image Sequence", "Named Pipe" }; + + public static string[] CommonVideoBitRateNames = { "YouTube/360p30 H.264 - 1 Mbps", + "YouTube/360p60 H.264 - 1.5 Mbps", + "YouTube/480p30 H.264 - 2.5 Mbps", + }; + public static float[] CommonVideoBitRateValues = { 1f, 1.5f, 2.5f }; + + public static SerializedProperty AssertFindProperty(this SerializedObject so, string propertyName) + { + SerializedProperty result = so.FindProperty(propertyName); + Debug.Assert(result != null, "Missing property: " + propertyName); + return result; + } + + public static void CentreLabel(string text, GUIStyle style = null) + { + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + if (style == null) + { + GUILayout.Label(text); + } + else + { + GUILayout.Label(text, style); + } + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + } + + public static void BoolAsDropdown(string name, SerializedProperty prop, string trueOption, string falseOption) + { + string[] popupNames = { trueOption, falseOption }; + int popupIndex = 0; + if (!prop.boolValue) + { + popupIndex = 1; + } + popupIndex = EditorGUILayout.Popup(name, popupIndex, popupNames); + prop.boolValue = (popupIndex == 0); + } + + public static void EnumAsDropdown(string name, SerializedProperty prop, string[] options) + { + prop.enumValueIndex = EditorGUILayout.Popup(name, prop.enumValueIndex, options); + } + + public static void IntAsDropdown(string name, SerializedProperty prop, string[] options, int[] values) + { + int index = 0; + for (int i = 0; i < values.Length; i++) + { + if (values[i] == prop.intValue) + { + index = i; + break; + } + } + index = EditorGUILayout.Popup(name, index, options); + prop.intValue = values[index]; + } + + public static void FloatAsDropdown(string name, SerializedProperty prop, string[] options, float[] values, bool customAtEnd) + { + bool isFound = false; + int index = 0; + for (int i = 0; i < values.Length; i++) + { + if (values[i] == prop.floatValue) + { + isFound = true; + index = i; + break; + } + } + if (!isFound && customAtEnd) + { + index = options.Length - 1; + } + EditorGUI.BeginChangeCheck(); + if (string.IsNullOrEmpty(name)) + { + index = EditorGUILayout.Popup(index, options); + } + else + { + index = EditorGUILayout.Popup(name, index, options); + } + if (EditorGUI.EndChangeCheck()) + { + prop.floatValue = values[index]; + } + } + + private struct FloatPopupData + { + public FloatPopupData(SerializedObject obj, SerializedProperty prop, float value, Object target) + { + _obj = obj; + _prop = prop; + _value = value; + _target = target; + } + + public void Apply() + { + _prop.floatValue = _value; + if (_obj.ApplyModifiedProperties()) + { + EditorUtility.SetDirty(_target); + } + } + + private Object _target; + private SerializedObject _obj; + private SerializedProperty _prop; + private float _value; + } + + private static void FloatAsPopupCallback_Select(object obj) + { + ((FloatPopupData)obj).Apply(); + } + + public static void FloatAsPopup(string buttonText, string popupText, SerializedObject obj, SerializedProperty prop, string[] options, float[] values) + { + if (GUILayout.Button(buttonText, GUILayout.ExpandWidth(false))) + { + // Remove focus to clear the selection, otherwise the property field will not update + GUI.FocusControl(null); + + GenericMenu toolsMenu = new GenericMenu(); + toolsMenu.AddDisabledItem(new GUIContent(popupText)); + toolsMenu.AddSeparator(""); + for (int i = 0; i < options.Length; i++) + { + bool isSelected = (values[i] == prop.floatValue); + toolsMenu.AddItem(new GUIContent(options[i]), isSelected, FloatAsPopupCallback_Select, new FloatPopupData(obj, prop, values[i], obj.targetObject)); + } + + toolsMenu.ShowAsContext(); + } + } + + internal static BitrateUnits BitrateUnitsDisplay = BitrateUnits.MBitsPerSecond; + + internal static void BitrateField(string name, SerializedProperty prop) + { + GUILayout.BeginHorizontal(); + + { + double factor = 1.0; + switch (BitrateUnitsDisplay) + { + case BitrateUnits.BitsPerSecond: + factor = 1.0; + break; + case BitrateUnits.KBitsPerSecond: + factor = 1000; + break; + case BitrateUnits.MBitsPerSecond: + factor = 1000000; + break; + } + + double bitrate = (uint)prop.intValue / factor; + bitrate = EditorGUILayout.DelayedDoubleField(name, bitrate); + prop.intValue = (int)(bitrate * factor); + } + + BitrateUnitsDisplay = (BitrateUnits)EditorGUILayout.Popup((int)BitrateUnitsDisplay, new string[] { "bps", "Kbps", "Mbps" }, GUILayout.Width(64f), GUILayout.MaxWidth(64f), GUILayout.ExpandWidth(false)); + GUILayout.EndHorizontal(); + } + + public static void DrawSection(string name, ref bool isExpanded, System.Action action) + { + Color boxbgColor = new Color(0.8f, 0.8f, 0.8f, 0.1f); + if (EditorGUIUtility.isProSkin) + { + boxbgColor = Color.black; + } + DrawSectionColored(name, ref isExpanded, action, boxbgColor, Color.white, Color.white); + } + + public static void DrawSectionColored(string name, ref bool isExpanded, System.Action action, Color boxbgcolor, Color bgcolor, Color color) + { + GUI.color = Color.white; + GUI.backgroundColor = Color.clear; + //GUI.backgroundColor = bgcolor; + if (isExpanded) + { + GUI.color = Color.white; + GUI.backgroundColor = boxbgcolor; + } + + GUILayout.BeginVertical("box"); + GUI.color = color; + GUI.backgroundColor = bgcolor; + + if (GUILayout.Button(name, EditorStyles.toolbarButton)) + { + isExpanded = !isExpanded; + } + //GUI.backgroundColor = Color.white; + //GUI.color = Color.white; + + if (isExpanded) + { + action.Invoke(); + } + + GUI.backgroundColor = Color.white; + GUI.color = Color.white; + + GUILayout.EndVertical(); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/EditorUtils.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/EditorUtils.cs.meta new file mode 100644 index 0000000..24f0f62 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/EditorUtils.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f7411c9d2a49082438fc100e6d5418c2 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PluginProcessor.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PluginProcessor.cs new file mode 100644 index 0000000..47b6f06 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PluginProcessor.cs @@ -0,0 +1,212 @@ +#if UNITY_2018_1_OR_NEWER || (UNITY_2017_4_OR_NEWER && !UNITY_2017_4_0 && !UNITY_2017_4_1 && !UNITY_2017_4_2 && !UNITY_2017_4_3 && !UNITY_2017_4_4 && !UNITY_2017_4_5 && !UNITY_2017_4_6 && !UNITY_2017_4_7 && !UNITY_2017_4_8 && !UNITY_2017_4_9 && !UNITY_2017_4_10 && !UNITY_2017_4_11 && !UNITY_2017_4_12 && !UNITY_2017_4_13 && !UNITY_2017_4_14 && !UNITY_2017_4_15 && !UNITY_2017_4_15) + // Unity added Android ARM64 support in 2018.1, and backported to 2017.4.16 + #define AVPROMC_UNITY_ANDROID_ARM64_SUPPORT +#endif +#if !UNITY_2019_3_OR_NEWER || UNITY_2021_2_OR_NEWER || (UNITY_2020_3_OR_NEWER && !UNITY_2020_3_0 && !UNITY_2020_3_1 && !UNITY_2020_3_2 && !UNITY_2020_3_3 && !UNITY_2020_3_4 && !UNITY_2020_3_5 && !UNITY_2020_3_6 && !UNITY_2020_3_7 && !UNITY_2020_3_8 && !UNITY_2020_3_9 && !UNITY_2020_3_10 && !UNITY_2020_3_11 && !UNITY_2020_3_12 && !UNITY_2020_3_13 && !UNITY_2020_3_14 && !UNITY_2020_3_15 && !UNITY_2020_3_16) || (UNITY_2019_4_OR_NEWER && !UNITY_2019_4_0 && !UNITY_2019_4_1 && !UNITY_2019_4_2 && !UNITY_2019_4_3 && !UNITY_2019_4_4 && !UNITY_2019_4_5 && !UNITY_2019_4_6 && !UNITY_2019_4_7 && !UNITY_2019_4_8 && !UNITY_2019_4_9 && !UNITY_2019_4_10 && !UNITY_2019_4_11 && !UNITY_2019_4_12 && !UNITY_2019_4_13 && !UNITY_2019_4_14 && !UNITY_2019_4_15 && !UNITY_2019_4_16 && !UNITY_2019_4_17 && !UNITY_2019_4_18 && !UNITY_2019_4_19 && !UNITY_2019_4_20 && !UNITY_2019_4_21 && !UNITY_2019_4_22 && !UNITY_2019_4_23 && !UNITY_2019_4_24 && !UNITY_2019_4_25 && !UNITY_2019_4_26 && !UNITY_2019_4_27 && !UNITY_2019_4_28 && !UNITY_2019_4_29 && !UNITY_2019_4_30) + // Unity dropped Android x86 support in 2019, but then added it back in 2021.2.0 and backported to 2020.3.17 and 2019.4.31 + #define AVPROMC_UNITY_ANDROID_X86_SUPPORT +#endif +#if UNITY_2021_2_OR_NEWER || (UNITY_2020_3_OR_NEWER && !UNITY_2020_3_0 && !UNITY_2020_3_1 && !UNITY_2020_3_2 && !UNITY_2020_3_3 && !UNITY_2020_3_4 && !UNITY_2020_3_5 && !UNITY_2020_3_6 && !UNITY_2020_3_7 && !UNITY_2020_3_8 && !UNITY_2020_3_9 && !UNITY_2020_3_10 && !UNITY_2020_3_11 && !UNITY_2020_3_12 && !UNITY_2020_3_13 && !UNITY_2020_3_14 && !UNITY_2020_3_15 && !UNITY_2020_3_16) || (UNITY_2019_4_OR_NEWER && !UNITY_2019_4_0 && !UNITY_2019_4_1 && !UNITY_2019_4_2 && !UNITY_2019_4_3 && !UNITY_2019_4_4 && !UNITY_2019_4_5 && !UNITY_2019_4_6 && !UNITY_2019_4_7 && !UNITY_2019_4_8 && !UNITY_2019_4_9 && !UNITY_2019_4_10 && !UNITY_2019_4_11 && !UNITY_2019_4_12 && !UNITY_2019_4_13 && !UNITY_2019_4_14 && !UNITY_2019_4_15 && !UNITY_2019_4_16 && !UNITY_2019_4_17 && !UNITY_2019_4_18 && !UNITY_2019_4_19 && !UNITY_2019_4_20 && !UNITY_2019_4_21 && !UNITY_2019_4_22 && !UNITY_2019_4_23 && !UNITY_2019_4_24 && !UNITY_2019_4_25 && !UNITY_2019_4_26 && !UNITY_2019_4_27 && !UNITY_2019_4_28 && !UNITY_2019_4_29 && !UNITY_2019_4_30) + // Unity added Android x86_64 support in 2021.2.0 and backported to 2020.3.17 and 2019.4.31 + #define AVPROMC_UNITY_ANDROID_X8664_SUPPORT +#endif +#if UNITY_2019_1_OR_NEWER + #define AVPROMC_UNITY_UWP_ARM64_SUPPORT +#endif +#if UNITY_2018_1_OR_NEWER + #define AVPROMC_UNITY_BUILDWITHREPORT_SUPPORT +#endif + +using UnityEngine; +using UnityEditor; +using UnityEditor.Build; +#if AVPROMC_UNITY_BUILDWITHREPORT_SUPPORT +using UnityEditor.Build.Reporting; +#endif +using System.Collections.Generic; + +//----------------------------------------------------------------------------- +// Copyright 2015-2021 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Editor +{ + /// + /// Some versions of Unity do not support specific CPU architectures for plugin files + /// so this Build Preprocessor checks the plugin files for those and either disables + /// them if their arch is not supported, or assigns the correct arch and enables them + /// + public class PluginProcessor : + #if AVPROMC_UNITY_BUILDWITHREPORT_SUPPORT + IPreprocessBuildWithReport + #else + IPreprocessBuild + #endif + { + internal class CpuArchitecture + { + internal CpuArchitecture(string code, bool isSupportedByThisUnityVersion) + { + _code = code; + _isSupportedByThisUnityVersion = isSupportedByThisUnityVersion; + } + private string _code; + private bool _isSupportedByThisUnityVersion; + + internal string Code() + { + return _code; + } + + internal bool IsSupportedByThisUnityVersion() + { + return _isSupportedByThisUnityVersion; + } + } + + internal class PluginFile + { + internal PluginFile(BuildTarget buildTarget, string relativeFilePath, bool supportsEditor, CpuArchitecture cpuArchitecture) + { + _buildTarget = buildTarget; + _relativeFilePath = relativeFilePath; + _cpuArchitecture = cpuArchitecture; + _supportsEditor = supportsEditor; + } + + internal bool IsBuildTarget(BuildTarget buildTarget) + { + return (_buildTarget == buildTarget); + } + + internal BuildTarget BuildTarget() + { + return _buildTarget; + } + + internal bool IsForFile(string path) + { + return path.Replace("\\", "/").Contains(_relativeFilePath); + } + + internal bool IsSupportedByThisUnityVersion() + { + return _cpuArchitecture.IsSupportedByThisUnityVersion(); + } + + internal string CpuArchitectureCode() + { + return _cpuArchitecture.Code(); + } + + internal bool SupportsEditor() + { + return _supportsEditor; + } + + private BuildTarget _buildTarget; + private string _relativeFilePath; + private CpuArchitecture _cpuArchitecture; + private bool _supportsEditor; + } + + private static List _pluginFiles = new List(32); + + internal static void AddPluginFiles(BuildTarget buildTarget, string[] filenames, string folderPrefix, bool supportsEditor, CpuArchitecture cpuArchitecture) + { + foreach (string filename in filenames) + { + _pluginFiles.Add(new PluginFile(buildTarget, folderPrefix + filename, supportsEditor, cpuArchitecture)); + } + } + + internal static void AddPlugins_Android() + { + #if AVPROMC_UNITY_ANDROID_ARM64_SUPPORT + const bool IsAndroidArm64Supported = true; + #else + const bool IsAndroidArm64Supported = false; + #endif + #if AVPROMC_UNITY_ANDROID_X86_SUPPORT + const bool IsAndroidX86Supported = true; + #else + const bool IsAndroidX86Supported = false; + #endif + #if AVPROMC_UNITY_ANDROID_X8664_SUPPORT + const bool IsAndroidX8664Supported = true; + #else + const bool IsAndroidX8664Supported = false; + #endif + string[] filenames = { + "libAVProMovieCaptureNative.so", + }; + BuildTarget target = BuildTarget.Android; + AddPluginFiles(target, filenames, "Android/libs/armeabi-v7a/", false, new CpuArchitecture("ARMv7", true)); + AddPluginFiles(target, filenames, "Android/libs/arm64-v8a/", false, new CpuArchitecture("ARM64", IsAndroidArm64Supported)); + AddPluginFiles(target, filenames, "Android/libs/x86/", false, new CpuArchitecture("X86", IsAndroidX86Supported)); + AddPluginFiles(target, filenames, "Android/libs/x86_64/", false, new CpuArchitecture("X86_64", IsAndroidX8664Supported)); + } + + private static void BuildPluginFileList() + { + _pluginFiles.Clear(); + AddPlugins_Android(); + } + + public int callbackOrder { get { return 0; } } + +#if AVPROMC_UNITY_BUILDWITHREPORT_SUPPORT + public void OnPreprocessBuild(BuildReport report) + { + BuildPluginFileList(); + CheckNativePlugins(report.summary.platform); + } +#else + public void OnPreprocessBuild(BuildTarget target, string path) + { + BuildPluginFileList(); + CheckNativePlugins(target); + } +#endif + + internal static void CheckNativePlugins(BuildTarget target) + { + PluginImporter[] importers = PluginImporter.GetAllImporters(); + foreach (PluginImporter pi in importers) + { + // Currently we're only interested in native plugins + if (!pi.isNativePlugin) continue; + + // Skip plugins that aren't in the AVProMovieCapture path + // NOTE: This is commented out for now to allow the case where users have moved the plugin files to another folder. + // Eventually might need a more robust method, perhaps using GUIDS + //if (!pi.assetPath.Contains("AVProMovieCapture")) continue; + + foreach (PluginFile pluginFile in _pluginFiles) + { + if (pluginFile.IsBuildTarget(target) && + pluginFile.IsForFile(pi.assetPath)) + { + pi.SetCompatibleWithAnyPlatform(false); + if (pluginFile.IsSupportedByThisUnityVersion()) + { + Debug.Log("[AVProMovieCapture] Enabling " + pluginFile.CpuArchitectureCode() + " " + pi.assetPath); + pi.SetCompatibleWithEditor(pluginFile.SupportsEditor()); + pi.SetCompatibleWithPlatform(pluginFile.BuildTarget(), true); + pi.SetPlatformData(pluginFile.BuildTarget(), "CPU", pluginFile.CpuArchitectureCode()); + } + else + { + pi.SetCompatibleWithEditor(false); + pi.SetCompatibleWithPlatform(pluginFile.BuildTarget(), false); + pi.SetPlatformData(pluginFile.BuildTarget(), "CPU", ""); + Debug.Log("[AVProMovieCapture] Disabling " + pluginFile.CpuArchitectureCode() + " " + pi.assetPath); + } + pi.SaveAndReimport(); + break; + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PluginProcessor.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PluginProcessor.cs.meta new file mode 100644 index 0000000..ae64201 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PluginProcessor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c427248f07fd9524796c331b04adc886 +timeCreated: 1642957721 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PostProcessBuild_iOS.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PostProcessBuild_iOS.cs new file mode 100644 index 0000000..8a6a9f7 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PostProcessBuild_iOS.cs @@ -0,0 +1,98 @@ +#if UNITY_IOS && UNITY_2017_1_OR_NEWER +using System.Collections; +using System.Collections.Generic; +using System.IO; +using UnityEngine; +using UnityEditor; +using UnityEditor.Callbacks; +using UnityEditor.iOS.Xcode; +using UnityEditor.iOS.Xcode.Extensions; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Editor +{ + public class PostProcessBuild_iOS + { + [PostProcessBuild] + public static void ModifyProject(BuildTarget buildTarget, string path) + { + if (buildTarget != BuildTarget.iOS) + return; + + string projectPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj"; + PBXProject project = new PBXProject(); + project.ReadFromFile(projectPath); + +#if UNITY_2019_3_OR_NEWER + string targetGuid = project.GetUnityMainTargetGuid(); +#else + string targetGuid = project.TargetGuidByName(PBXProject.GetUnityTargetName()); +#endif + string fileGuid = project.FindFileGuidByProjectPath("Frameworks/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework"); + if (fileGuid != null) + { + PBXProjectExtensions.AddFileToEmbedFrameworks(project, targetGuid, fileGuid); + } + else + { + Debug.LogWarning("Failed to find AVProMovieCapture.framework in the generated project. You will need to manually set AVProMovieCapture.framework to 'Embed & Sign' in the Xcode project's framework list."); + } + project.SetBuildProperty(targetGuid, "LD_RUNPATH_SEARCH_PATHS", "$(inherited) @executable_path/Frameworks"); + project.WriteToFile(projectPath); + } + + [PostProcessBuild] + public static void ModfifyPlist(BuildTarget buildTarget, string path) + { + if (buildTarget != BuildTarget.iOS) + return; + + string plistPath = Path.Combine(path, "Info.plist"); + if (!File.Exists(plistPath)) + { + Debug.LogWarning(@"Unable to locate Info.plist, you may need to add the following keys yourself: + NSPhotoLibraryUsageDescription, + NSPhotoLibraryAddUsageDescription"); + return; + } + + Debug.Log("Modifying the Info.plist file at: " + plistPath); + + PlistDocument plist = new PlistDocument(); + plist.ReadFromFile(plistPath); + + PlistElementDict rootDict = plist.root; + + // Enable file sharing so that files can be pulled off of the device with iTunes + rootDict.SetBoolean("UIFileSharingEnabled", true); + // Enable this so that the files app can access the captured movies + rootDict.SetBoolean("LSSupportsOpeningDocumentsInPlace", true); + + SerializedObject settings = Settings.GetSerializedSettings(); + + SerializedProperty propPhotoLibraryUsageDescription = settings.FindProperty("_photoLibraryUsageDescription"); + string photoLibraryUsageDescription = propPhotoLibraryUsageDescription.stringValue; + if (photoLibraryUsageDescription != null && photoLibraryUsageDescription.Length > 0) + { + Debug.Log("Adding 'NSPhotoLibraryUsageDescription' to Info.plist"); + rootDict.SetString("NSPhotoLibraryUsageDescription", photoLibraryUsageDescription); + } + + SerializedProperty propPhotoLibraryAddUsageDescription = settings.FindProperty("_photoLibraryAddUsageDescription"); + string photoLibraryAddUsageDescription = propPhotoLibraryAddUsageDescription.stringValue; + if (photoLibraryAddUsageDescription != null && photoLibraryAddUsageDescription.Length > 0) + { + Debug.Log("Adding 'NSPhotoLibraryAddUsageDescription' to Info.plist"); + rootDict.SetString("NSPhotoLibraryAddUsageDescription", photoLibraryAddUsageDescription); + } + + File.WriteAllText(plistPath, plist.WriteToString()); + + Debug.Log("Finished modifying the Info.plist"); + } + } +} +#endif // UNITY_IOS && UNITY_2017_1_OR_NEWER diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PostProcessBuild_iOS.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PostProcessBuild_iOS.cs.meta new file mode 100644 index 0000000..c421ef3 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PostProcessBuild_iOS.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c97826f71667441159b5867d3f16032e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PostProcessBuild_macOS.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PostProcessBuild_macOS.cs new file mode 100644 index 0000000..e6ffc3c --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PostProcessBuild_macOS.cs @@ -0,0 +1,347 @@ +#if UNITY_EDITOR && UNITY_2017_1_OR_NEWER + +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using UnityEngine; +using UnityEditor; +using UnityEditor.Callbacks; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Editor +{ + public class PBXProjectHandlerException : System.Exception + { + public PBXProjectHandlerException(string message) + : base(message) + { + + } + } + + public class PBXProjectHandler + { + private static System.Type _PBXProjectType; + private static System.Type PBXProjectType + { + get + { + if (_PBXProjectType == null) + { + _PBXProjectType = System.Type.GetType("UnityEditor.iOS.Xcode.PBXProject, UnityEditor.iOS.Extensions.Xcode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"); + if (_PBXProjectType == null) + { + throw new PBXProjectHandlerException("Failed to get type \"PBXProject\""); + } + } + return _PBXProjectType; + } + } + + private static Dictionary _PBXProjectTypeMethods; + private static Dictionary PBXProjectTypeMethods + { + get + { + if (_PBXProjectTypeMethods == null) + { + _PBXProjectTypeMethods = new Dictionary(); + } + return _PBXProjectTypeMethods; + } + } + + private static MethodInfo GetMethod(string name, System.Type[] types) + { + string lookup = name + types.ToString(); + MethodInfo method; + if (!PBXProjectTypeMethods.TryGetValue(lookup, out method)) + { + method = _PBXProjectType.GetMethod(name, types); + if (method != null) + { + _PBXProjectTypeMethods[lookup] = method; + } + else + { + throw new PBXProjectHandlerException(string.Format("Unknown method \"{0}\"", name)); + } + } + return method; + } + + private object _project; + + public PBXProjectHandler() + { + _project = System.Activator.CreateInstance(PBXProjectType); + } + + public void ReadFromFile(string path) + { + MethodInfo method = GetMethod("ReadFromFile", new System.Type[] { typeof(string) }); + Debug.LogFormat("[AVProMovieCapture] Reading Xcode project at: {0}", path); + method.Invoke(_project, new object[] { path }); + } + + public void WriteToFile(string path) + { + MethodInfo method = GetMethod("WriteToFile", new System.Type[] { typeof(string) }); + Debug.LogFormat("[AVProMovieCapture] Writing Xcode project to: {0}", path); + method.Invoke(_project, new object[] { path }); + } + + public string TargetGuidByName(string name) + { + MethodInfo method = GetMethod("TargetGuidByName", new System.Type[] { typeof(string) }); + string guid = (string)method.Invoke(_project, new object[] { name }); + Debug.LogFormat("[AVProMovieCapture] Target GUID for '{0}' is '{1}'", name, guid); + return guid; + } + + public void SetBuildProperty(string guid, string property, string value) + { + MethodInfo method = GetMethod("SetBuildProperty", new System.Type[] { typeof(string), typeof(string), typeof(string) }); + Debug.LogFormat("[AVProMovieCapture] Setting build property '{0}' to '{1}' for target with guid '{2}'", property, value, guid); + method.Invoke(_project, new object[] { guid, property, value }); + } + } + + public class UnknownTypeException : System.Exception + { + public UnknownTypeException(string message) : base(message) { } + } + + public class PlistDocumentProxy + { + private static System.Type _PlistDocumentType; + private static System.Type PlistDocumentType + { + get + { + if (_PlistDocumentType == null) + { + _PlistDocumentType = System.Type.GetType("UnityEditor.iOS.Xcode.PlistDocument, UnityEditor.iOS.Extensions.Xcode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"); + if (_PlistDocumentType == null) + { + throw new UnknownTypeException("Unknown type \"PlistDocument\""); + } + } + return _PlistDocumentType; + } + } + + private object _plist; + + public PlistDocumentProxy() + { + _plist = System.Activator.CreateInstance(PlistDocumentType); + } + + public void ReadFromFile(string path) + { + PlistDocumentType.GetMethod("ReadFromFile").Invoke(_plist, new object[] { path }); + } + + public string WriteToString() + { + return (string)PlistDocumentType.GetMethod("WriteToString").Invoke(_plist, null); + } + + public PlistElementDictProxy root + { + get { return new PlistElementDictProxy(_PlistDocumentType.InvokeMember("root", BindingFlags.Public | BindingFlags.Instance | BindingFlags.GetField, null, _plist, null)); } + } + } + + public class PlistElementDictProxy + { + private static System.Type _PlistElementDictType; + public static System.Type PlistElementDictType + { + get + { + if (_PlistElementDictType == null) + { + _PlistElementDictType = System.Type.GetType("UnityEditor.iOS.Xcode.PlistElementDict, UnityEditor.iOS.Extensions.Xcode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"); + if (_PlistElementDictType == null) + { + throw new UnknownTypeException("Unknown type \"PlistElementDict\""); + } + } + return _PlistElementDictType; + } + } + + private object _element; + + public PlistElementDictProxy(object element) + { + _element = element; + } + + public void SetString(string key, string value) + { + PlistElementDictType.GetMethod("SetString").Invoke(_element, new object[] { key, value }); + } + } + + public class PostProcessBuild_macOS + { + private static bool ActualModifyProjectAtPath(string path) + { + if (!Directory.Exists(path)) + { + Debug.LogWarningFormat("[AVProMovieCapture] Failed to find Xcode project with path: {0}", path); + return false; + } + + Debug.LogFormat("[AVProMovieCapture] Modifying Xcode project at: {0}", path); + string projectPath = Path.Combine(path, "project.pbxproj"); + try + { + PBXProjectHandler handler = new PBXProjectHandler(); + handler.ReadFromFile(projectPath); + // string guid = handler.TargetGuidByName(Application.productName); + + // Modify project here + + handler.WriteToFile(projectPath); + return true; + } + catch (PBXProjectHandlerException ex) + { + Debug.LogErrorFormat("[AVProMovieCapture] {0}", ex); + } + + return false; + } + + [PostProcessBuild] + public static void ModifyProject(BuildTarget target, string path) + { + if (target != BuildTarget.StandaloneOSX) + return; + + string projectPath = Path.Combine(path, Path.GetFileName(path) + ".xcodeproj"); + if (ActualModifyProjectAtPath(projectPath)) + { + + } + } + + [PostProcessBuild(100)] + public static void ModfifyPlist(BuildTarget buildTarget, string path) + { + if (buildTarget != BuildTarget.StandaloneOSX) + return; + + // Check if we need to update Info.plist + SerializedObject settings = Settings.GetSerializedSettings(); + + SerializedProperty propPhotoLibraryUsageDescription = settings.FindProperty("_photoLibraryUsageDescription"); + string photoLibraryUsageDescription = propPhotoLibraryUsageDescription.stringValue; + + SerializedProperty propPhotoLibraryAddUsageDescription = settings.FindProperty("_photoLibraryAddUsageDescription"); + string photoLibraryAddUsageDescription = propPhotoLibraryAddUsageDescription.stringValue; + + if ((photoLibraryUsageDescription == null || photoLibraryUsageDescription.Length == 0) + && (photoLibraryAddUsageDescription == null || photoLibraryAddUsageDescription.Length == 0)) + { + // No, nothing to see here + return; + } + + bool buildingApp = false; + + // Locate the Info.plist file + string plistPath = null; + if (path.EndsWith(".app")) + { + plistPath = Path.Combine(path, "Contents"); + buildingApp = true; + } + else + { + plistPath = Path.Combine(path, PlayerSettings.productName); + } + + plistPath = Path.Combine(plistPath, "Info.plist"); + + if (!File.Exists(plistPath)) + { + Debug.LogWarning("Unable to locate Info.plist, you may need to add the following keys yourself:\n\tNSPhotoLibraryUsageDescription,\n\tNSPhotoLibraryAddUsageDescription"); + return; + } + + Debug.Log("Modifying the Info.plist file at: " + plistPath); + + PlistDocumentProxy plist = new PlistDocumentProxy(); + plist.ReadFromFile(plistPath); + + if (photoLibraryUsageDescription != null && photoLibraryUsageDescription.Length > 0) + { + Debug.Log(" Adding 'NSPhotoLibraryUsageDescription' to Info.plist"); + plist.root.SetString("NSPhotoLibraryUsageDescription", photoLibraryUsageDescription); + } + + if (photoLibraryAddUsageDescription != null && photoLibraryAddUsageDescription.Length > 0) + { + Debug.Log(" Adding 'NSPhotoLibraryAddUsageDescription' to Info.plist"); + plist.root.SetString("NSPhotoLibraryAddUsageDescription", photoLibraryAddUsageDescription); + } + + File.WriteAllText(plistPath, plist.WriteToString()); + + Debug.Log(" Finished modifying the Info.plist"); + + if (buildingApp) + { + Debug.Log("Codesigning..."); + CodeSignAppBundle(path); + } + } + + // Code signs the app bundle. + private static void CodeSignAppBundle(string path) + { +#if UNITY_EDITOR_OSX + #if UNITY_2020_3_OR_NEWER + UnityEditor.OSXStandalone.MacOSCodeSigning.CodeSignAppBundle(path); + #else + string cmd = string.Format("codesign -f -s - --deep {0}", path); + string args = string.Format("-c \"{0}\"", cmd.Replace("\"", "\\\"")); + + System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo("/bin/sh"); + startInfo.Arguments = args; + startInfo.RedirectStandardOutput = true; + startInfo.RedirectStandardError = true; + startInfo.UseShellExecute = false; + startInfo.CreateNoWindow = true; + + System.Diagnostics.Process process = System.Diagnostics.Process.Start(startInfo); + string result = process.StandardOutput.ReadToEnd(); + string error = process.StandardError.ReadToEnd(); + process.WaitForExit(); + + if (error != null && error.Length > 0) + { + Debug.LogErrorFormat("[AVProMovieCapture] Failed to codesign app bundle, error: {0}", error); + } + else if (result != null && result.Length > 0) + { + Debug.LogFormat("[AVProMovieCapture] {0}", result); + } + #endif +#else + Debug.LogWarning("- Unable to codesign application"); +#endif + } + } + +} // namespace RenderHeads.Media.AVProMovieCapture.Editor + +#endif // UNITY_EDITOR && UNITY_2017_1_OR_NEWER diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PostProcessBuild_macOS.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PostProcessBuild_macOS.cs.meta new file mode 100644 index 0000000..3bbab18 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PostProcessBuild_macOS.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: feeee8ec7317d48439f717e32424efd5 +timeCreated: 1633517340 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PreProcessBuild.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PreProcessBuild.cs new file mode 100644 index 0000000..cca168d --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PreProcessBuild.cs @@ -0,0 +1,100 @@ +#if UNITY_2018_1_OR_NEWER + #define UNITY_SUPPORTS_BUILD_REPORT +#endif +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; +using UnityEngine.Rendering; +using UnityEditor.Build; +#if UNITY_SUPPORTS_BUILD_REPORT +using UnityEditor.Build.Reporting; +#endif + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Editor +{ + public class PreProcessBuild : + #if UNITY_SUPPORTS_BUILD_REPORT + IPreprocessBuildWithReport + #else + IPreprocessBuild + #endif + { + public int callbackOrder { get { return 0; } } + + #if UNITY_SUPPORTS_BUILD_REPORT + public void OnPreprocessBuild(BuildReport report) + { + OnPreprocessBuild(report.summary.platform, report.summary.outputPath); + } + #endif + + public void OnPreprocessBuild(BuildTarget target, string path) + { + if (target == BuildTarget.iOS) + { + int indexMetal = GetGraphicsApiIndex(target, GraphicsDeviceType.Metal); + int indexOpenGLES2 = GetGraphicsApiIndex(target, GraphicsDeviceType.OpenGLES2); + int indexOpenGLES3 = GetGraphicsApiIndex(target, GraphicsDeviceType.OpenGLES3); + + if (indexMetal < 0) + { + string message = "Metal graphics API is required by AVPro Movie Capture."; + message += "\n\nPlease go to Player Settings > Auto Graphics API and add Metal to the top of the list."; + ShowAbortDialog(message); + } + + if (indexOpenGLES2 >= 0 && indexMetal >= 0 && indexOpenGLES2 < indexMetal) + { + string message = "OpenGLES 2.0 graphics API is not supported by AVPro Movie Capture."; + message += "\n\nPlease go to Player Settings > Auto Graphics API and add Metal to the top of the list."; + ShowAbortDialog(message); + } + + if (indexOpenGLES3 >= 0 && indexMetal >= 0 && indexOpenGLES3 < indexMetal) + { + string message = "OpenGLES 3.0 graphics API is not supported by AVPro Movie Capture."; + message += "\n\nPlease go to Player Settings > Auto Graphics API and add Metal to the top of the list."; + ShowAbortDialog(message); + } + } + else if (target == BuildTarget.Android) + { + int indexVulkan = GetGraphicsApiIndex(target, GraphicsDeviceType.Vulkan); + if (indexVulkan > 0) + { + string message = "Vulkan graphics API is not supported by AVPro Movie Capture."; + message += "\n\nPlease go to Player Settings > Auto Graphics API and add OpenGLES to the top of the list."; + ShowAbortDialog(message); + } + } + } + + static void ShowAbortDialog(string message) + { + if (!EditorUtility.DisplayDialog("Continue Build?", message, "Continue", "Cancel")) + { + throw new BuildFailedException(message); + } + } + + static int GetGraphicsApiIndex(BuildTarget target, GraphicsDeviceType api) + { + int result = -1; + GraphicsDeviceType[] devices = UnityEditor.PlayerSettings.GetGraphicsAPIs(target); + for (int i = 0; i < devices.Length; i++) + { + if (devices[i] == api) + { + result = i; + break; + } + } + return result; + } + } +} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PreProcessBuild.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PreProcessBuild.cs.meta new file mode 100644 index 0000000..fc49777 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PreProcessBuild.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 18fe119b1911846a1bbee7330d3cb804 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PreProcessBuild_iOS.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PreProcessBuild_iOS.cs new file mode 100644 index 0000000..58b56d8 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PreProcessBuild_iOS.cs @@ -0,0 +1,79 @@ +#if UNITY_IOS +#if UNITY_2018_1_OR_NEWER + #define UNITY_SUPPORTS_BUILD_REPORT +#endif +using System.Collections; +using System.Collections.Generic; +using System.IO; +using UnityEngine; +using UnityEditor; +using UnityEngine.Rendering; +using UnityEditor.Build; +#if UNITY_SUPPORTS_BUILD_REPORT + using UnityEditor.Build.Reporting; +#endif + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Editor +{ + public class PreProcessBuild_iOS : +#if UNITY_SUPPORTS_BUILD_REPORT + IPreprocessBuildWithReport +#else + IPreprocessBuild +#endif + { + public int callbackOrder { get { return 0; } } + +#if UNITY_SUPPORTS_BUILD_REPORT + public void OnPreprocessBuild(BuildReport report) + { + OnPreprocessBuild(report.summary.platform, report.summary.outputPath); + } +#endif + + public void OnPreprocessBuild(BuildTarget target, string path) + { + if (target != BuildTarget.iOS) + return; + + FindAndRemoveStaticLib(); + } + + private void FindAndRemoveStaticLib() + { + // Find all assets whose name begins "libAVProMovieCapture" + string libAVProMovieCapture = "libAVProMovieCapture"; + string[] guids = AssetDatabase.FindAssets(libAVProMovieCapture); + if (guids.Length == 0) + return; + + // Get the paths to those assets, discarding those who aren't a complete match + List paths = new List(); + foreach (string guid in guids) + { + string path = AssetDatabase.GUIDToAssetPath(guid); + string filename = Path.GetFileNameWithoutExtension(path); + if (filename == libAVProMovieCapture) + paths.Add(path); + } + if (paths.Count == 0) + return; + + // We need to delete some files + Debug.LogWarning("libAVProMovieCapture.a is no longer required and will be removed from your project."); + Debug.Log("If you selected 'Append' your project will not build in Xcode this time. Please select 'Replace' to refresh the project files."); + + foreach (string path in paths) + { + Debug.Log("Deleting: " + path); + System.IO.File.Delete(path); + System.IO.File.Delete(path + ".meta"); + } + } + } +} +#endif // UNITY_IOS diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PreProcessBuild_iOS.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PreProcessBuild_iOS.cs.meta new file mode 100644 index 0000000..2e242a4 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/PreProcessBuild_iOS.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 84bf6e9950e694d37a45376101b061a7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/Settings.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/Settings.cs new file mode 100644 index 0000000..00a0637 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/Settings.cs @@ -0,0 +1,99 @@ +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Editor +{ + internal class Settings : ScriptableObject + { + const string SettingsPath = "Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Settings.asset"; + #pragma warning disable 0414 // "field is assigned but its value is never used" + [SerializeField] string _photoLibraryUsageDescription = string.Empty; + [SerializeField] string _photoLibraryAddUsageDescription = string.Empty; + #pragma warning restore 0414 + + internal static Settings GetOrCreateSettings() + { + Settings settings = AssetDatabase.LoadAssetAtPath(SettingsPath); + if (settings == null) + { + settings = ScriptableObject.CreateInstance(); + AssetDatabase.CreateAsset(settings, SettingsPath); + AssetDatabase.SaveAssets(); + } + return settings; + } + + internal static SerializedObject GetSerializedSettings() + { + return new SerializedObject(GetOrCreateSettings()); + } + } + + internal static class SettingsIMGUIRegister + { +#if UNITY_2018_3_OR_NEWER + private class MySettingsProvider : SettingsProvider + { + public MySettingsProvider(string path, SettingsScope scope) + : base(path, scope) + { + this.keywords = new HashSet(new[] { "Photo" }); + } + + public override void OnGUI(string searchContext) + { + SettingsGUI(); + } + } + + [SettingsProvider] + static SettingsProvider CreateSettingsProvider() + { + return new MySettingsProvider("Project/AVPro Movie Capture", SettingsScope.Project); + } + +#elif UNITY_5_6_OR_NEWER + [PreferenceItem("AVPro Movie Capture")] +#endif + private static void SettingsGUI() + { + SerializedObject settings = Settings.GetSerializedSettings(); + SerializedProperty propPhotoLibraryUsageDescription = settings.FindProperty("_photoLibraryUsageDescription"); + SerializedProperty propPhotoLibraryAddUsageDescription = settings.FindProperty("_photoLibraryAddUsageDescription"); + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("macOS / iOS", EditorStyles.boldLabel); + + // Photo library usage description + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField( + new GUIContent( + "Photo Library Usage Description", + "Adds the NSPhotoLibraryUsageDescription key with the text provided to the generated apps Info.plist file." + ), + GUILayout.MaxWidth(250.0f) + ); + propPhotoLibraryUsageDescription.stringValue = EditorGUILayout.TextField(propPhotoLibraryUsageDescription.stringValue); + EditorGUILayout.EndHorizontal(); + + // Photo library add usage description + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField( + new GUIContent( + "Photo Library Add Usage Description", + "Adds the NSPhotoLibraryAddUsageDescription key with the text provided to the generated apps Info.plist file." + ), + GUILayout.MaxWidth(250.0f) + ); + propPhotoLibraryAddUsageDescription.stringValue = EditorGUILayout.TextField(propPhotoLibraryAddUsageDescription.stringValue); + EditorGUILayout.EndHorizontal(); + + settings.ApplyModifiedPropertiesWithoutUndo(); + } + } +} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/Settings.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/Settings.cs.meta new file mode 100644 index 0000000..e854ca9 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Editor/Scripts/Settings.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0f604e3ea9bd2a14a8485a32aea8809d +timeCreated: 1633517338 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime.meta new file mode 100644 index 0000000..243e895 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7f48815a51d64a3438c65aa13dd6b05a +folderAsset: yes +timeCreated: 1563637382 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/AVProMovieCapture.Runtime.asmdef b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/AVProMovieCapture.Runtime.asmdef new file mode 100644 index 0000000..91dc139 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/AVProMovieCapture.Runtime.asmdef @@ -0,0 +1,7 @@ +{ + "name": "RenderHeads.AVProMovieCapture.Runtime", + "references": [ ], + "includePlatforms": [ ], + "excludePlatforms": [ ], + "allowUnsafeCode": true +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/AVProMovieCapture.Runtime.asmdef.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/AVProMovieCapture.Runtime.asmdef.meta new file mode 100644 index 0000000..90ec366 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/AVProMovieCapture.Runtime.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7f67a24487fdc894d971ca11121da006 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins.meta new file mode 100644 index 0000000..a08079d --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5362c8dafcfd8a64995d54700a59b398 +folderAsset: yes +timeCreated: 1563636592 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android.meta new file mode 100644 index 0000000..5c21639 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c154e6995e096454bb75a9d78b1bf1ef +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/AVProMovieCapture.jar b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/AVProMovieCapture.jar new file mode 100644 index 0000000..3dac146 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/AVProMovieCapture.jar differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/AVProMovieCapture.jar.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/AVProMovieCapture.jar.meta new file mode 100644 index 0000000..63770c1 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/AVProMovieCapture.jar.meta @@ -0,0 +1,32 @@ +fileFormatVersion: 2 +guid: d7b44096ee7abaf419ad9005dfc37186 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Android: Android + second: + enabled: 1 + settings: {} + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs.meta new file mode 100644 index 0000000..6693c3f --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e167589785f37fb438677f173dd02e20 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/arm64-v8a.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/arm64-v8a.meta new file mode 100644 index 0000000..6b96e60 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/arm64-v8a.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 09c8549502cff8742a82dcde62c48f90 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/arm64-v8a/libAVProMovieCaptureNative.so b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/arm64-v8a/libAVProMovieCaptureNative.so new file mode 100644 index 0000000..9170175 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/arm64-v8a/libAVProMovieCaptureNative.so differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/arm64-v8a/libAVProMovieCaptureNative.so.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/arm64-v8a/libAVProMovieCaptureNative.so.meta new file mode 100644 index 0000000..7d9b0ae --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/arm64-v8a/libAVProMovieCaptureNative.so.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 9a557b808d81ca2478c762e88fe0fda7 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Android: Android + second: + enabled: 1 + settings: + CPU: ARM64 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/armeabi-v7a.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/armeabi-v7a.meta new file mode 100644 index 0000000..11f15e5 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/armeabi-v7a.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 446152b294033974ab40fec564610fb2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/armeabi-v7a/libAVProMovieCaptureNative.so b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/armeabi-v7a/libAVProMovieCaptureNative.so new file mode 100644 index 0000000..9b1611a Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/armeabi-v7a/libAVProMovieCaptureNative.so differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/armeabi-v7a/libAVProMovieCaptureNative.so.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/armeabi-v7a/libAVProMovieCaptureNative.so.meta new file mode 100644 index 0000000..0f66651 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/armeabi-v7a/libAVProMovieCaptureNative.so.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 257261939046dba4380ba62f3ebbb2eb +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Android: Android + second: + enabled: 1 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86.meta new file mode 100644 index 0000000..4fed0c7 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f1a5df945f351cc49bd7e68e177ea2e3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86/libAVProMovieCaptureNative.so b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86/libAVProMovieCaptureNative.so new file mode 100644 index 0000000..fe6247a Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86/libAVProMovieCaptureNative.so differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86/libAVProMovieCaptureNative.so.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86/libAVProMovieCaptureNative.so.meta new file mode 100644 index 0000000..fe1456c --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86/libAVProMovieCaptureNative.so.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 25ff0024cead2e345b57f44ff8172ce2 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Android: Android + second: + enabled: 1 + settings: + CPU: x86 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86_64.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86_64.meta new file mode 100644 index 0000000..0a370f5 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86_64.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 315388b4dbf3b674fadcc512365e67fa +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86_64/libAVProMovieCaptureNative.so b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86_64/libAVProMovieCaptureNative.so new file mode 100644 index 0000000..76d645a Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86_64/libAVProMovieCaptureNative.so differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86_64/libAVProMovieCaptureNative.so.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86_64/libAVProMovieCaptureNative.so.meta new file mode 100644 index 0000000..235b3f6 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/Android/libs/x86_64/libAVProMovieCaptureNative.so.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 25ff0024cead2e345b57f38ae8172ce2 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Android: Android + second: + enabled: 1 + settings: + CPU: X86_64 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS.meta new file mode 100644 index 0000000..4651dd1 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 860fad11a1a2f4c20b90029eb9850122 +folderAsset: yes +timeCreated: 1567780998 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework.meta new file mode 100644 index 0000000..111db2a --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework.meta @@ -0,0 +1,136 @@ +fileFormatVersion: 2 +guid: 6e008eb194eb942a79e7a8290a2bbbae +folderAsset: yes +PluginImporter: + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + data: + first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 0 + data: + first: + '': Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + OS: AnyOS + data: + first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + data: + first: + Any: + second: + enabled: 0 + settings: {} + data: + first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + data: + first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: None + data: + first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Linux + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: LinuxUniversal + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: OSXIntel + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: OSXIntel64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + iPhone: iOS + second: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/AVProMovieCapture b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/AVProMovieCapture new file mode 100644 index 0000000..dd2adf0 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/AVProMovieCapture differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/AVProMovieCapture.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/AVProMovieCapture.meta new file mode 100644 index 0000000..c15a236 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/AVProMovieCapture.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 195e7863cd7a44365a1265924b68d42a +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers.meta new file mode 100644 index 0000000..da7ed23 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5d93aa68b9237491a919055d50d49af1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/AVProMovieCapture.h b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/AVProMovieCapture.h new file mode 100644 index 0000000..a59b74a --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/AVProMovieCapture.h @@ -0,0 +1,19 @@ +// +// AVProMovieCapture.h +// AVProMovieCapture +// +// Created by Morris Butler on 31/03/2020. +// Copyright © 2020 RenderHeads. All rights reserved. +// + +#import + +//! Project version number for AVProMovieCapture_framework. +FOUNDATION_EXPORT double AVProMovieCapture_frameworkVersionNumber; + +//! Project version string for AVProMovieCapture_framework. +FOUNDATION_EXPORT const unsigned char AVProMovieCapture_frameworkVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/AVProMovieCapture.h.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/AVProMovieCapture.h.meta new file mode 100644 index 0000000..21c4c3f --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/AVProMovieCapture.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f0685314fefcb48b99af22cd82c0451d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/MCTypes.h b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/MCTypes.h new file mode 100644 index 0000000..8c99687 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/MCTypes.h @@ -0,0 +1,99 @@ +// +// MCTypes.h +// MovieCapture +// +// Created by Morris Butler on 30/11/2020. +// Copyright © 2020 RenderHeads. All rights reserved. +// + +#import + +typedef NS_ENUM(int, MCColourSpace) +{ + MCColourSpaceUnknown = -1, + MCColourSpaceGamma, + MCColourSpaceLinear +}; + +// +typedef struct __attribute__((packed)) VideoEncoderHints { + uint32_t averageBitrate; + uint32_t maximumBitrate; // Unsupported + float quality; + uint32_t keyframeInterval; + bool allowFastStartStreamingPostProcess; + bool supportTransparency; + bool useHardwareEncoding; // Unsupported + int injectStereoPacking; // Unsupported + int stereoPacking; // Unsupported + int injectSphericalVideoLayout; // Unsupported + int sphericalVideoLayout; // Unsupported + bool enableFragmentedWriting; + double movieFragmentInterval; + MCColourSpace colourSpace; + int sourceWidth; + int sourceHeight; +} VideoEncoderHints; + +// +typedef struct __attribute__((packed)) ImageEncoderHints { + float quality; + bool supportTransparency; + MCColourSpace colourSpace; + int sourceWidth; + int sourceHeight; +} ImageEncoderHints; + +typedef NS_OPTIONS(int, MCMicrophoneRecordingOptions) { + MCMicrophoneRecordingOptionsNone, + MCMicrophoneRecordingOptionsMixWithOthers, + MCMicrophoneRecordingOptionsDefaultToSpeaker, +}; + +// MARK: Ambisonics + +typedef void *MCAmbisonicSourceRef; + +typedef NS_ENUM(int, MCAmbisonicOrder) +{ + MCAmbisonicOrderFirst, + MCAmbisonicOrderSecond, + MCAmbisonicOrderThird +}; + +typedef NS_ENUM(int, MCAmbisonicChannelOrder) +{ + MCAmbisonicChannelOrderFuMa, + MCAmbisonicChannelOrderACN +}; + +// MARK: Audio Capture + +typedef NS_ENUM(int, MCAudioCaptureDeviceAuthorisationStatus) +{ + MCAudioCaptureDeviceAuthorisationStatusUnavailable = -1, + MCAudioCaptureDeviceAuthorisationStatusNotDetermined, + MCAudioCaptureDeviceAuthorisationStatusDenied, + MCAudioCaptureDeviceAuthorisationStatusAuthorised, +}; + +typedef void (*MCRequestAudioCaptureAuthorisationCallback)(MCAudioCaptureDeviceAuthorisationStatus status); + +// MARK: Photo Library + +typedef NS_ENUM(int, MCPhotoLibraryAccessLevel) +{ + MCPhotoLibraryAccessLevelAddOnly, + MCPhotoLibraryAccessLevelReadWrite +}; + +typedef NS_ENUM(int, MCPhotoLibraryAuthorisationStatus) +{ + MCPhotoLibraryAuthorisationStatusUnavailable = -1, + MCPhotoLibraryAuthorisationStatusNotDetermined, + MCPhotoLibraryAuthorisationStatusDenied, + MCPhotoLibraryAuthorisationStatusAuthorised, +}; + +typedef void (*MCRequestPhotoLibraryAuthorisationCallback)(MCPhotoLibraryAuthorisationStatus status); + diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/MCTypes.h.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/MCTypes.h.meta new file mode 100644 index 0000000..f071423 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/MCTypes.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2109d2b76cac74afe9ee9e1d0e73656a +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/MovieCapture.h b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/MovieCapture.h new file mode 100644 index 0000000..430c7e3 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/MovieCapture.h @@ -0,0 +1,79 @@ +// +// MovieCapture.h +// MovieCapture +// +// Created by Morris Butler on 13/05/2019. +// Copyright © 2019 RenderHeads. All rights reserved. +// + +#include "MCTypes.h" + +#ifdef __cplusplus +extern "C" { +#endif + +NS_ASSUME_NONNULL_BEGIN + +void *AVPMC_GetRenderEventFunc(void); +void *AVPMC_GetFreeResourcesEventFunc(void); +bool AVPMC_Init(void); +void AVPMC_Deinit(void); +void AVPMC_SetMicrophoneRecordingHint(bool enabled, MCMicrophoneRecordingOptions options); +bool AVPMC_IsTrialVersion(void); +int AVPMC_GetVideoCodecMediaApi(int index); +int AVPMC_GetVideoCodecCount(void); +bool AVPMC_IsConfigureVideoCodecSupported(int index); +void AVPMC_ConfigureVideoCodec(int index); +int AVPMC_GetAudioCodecMediaApi(int index); +int AVPMC_GetAudioCodecCount(void); +bool AVPMC_IsConfigureAudioCodecSupported(int index); +void AVPMC_ConfigureAudioCodec(int index); +int AVPMC_GetAudioInputDeviceCount(void); +int AVPMC_CreateRecorderVideo(const unichar *filename, uint width, uint height, float frameRate, int format, bool isRealTime, bool isTopDown, int videoCodecIndex, int audioSource, int audioSampleRate, int audioChannelCount, int audioInputDeviceIndex, int audioCodecIndex, bool forceGpuFlush, VideoEncoderHints *hints); +int AVPMC_CreateRecorderImages(const unichar *filename, uint width, uint height, float frameRate, int format, bool isRealTime, bool isTopDown, int imageFormatType, bool forceGpuFlush, int startFrame, ImageEncoderHints *hints); +int AVPMC_CreateRecorderPipe(const unichar *filename, uint width, uint height, float frameRate, int format, bool isTopDown, bool supportAlpha, bool forceGpuFlush); +bool AVPMC_Start(int handle); +bool AVPMC_IsNewFrameDue(int handle); +void AVPMC_EncodeFrame(int handle, void *data); +void AVPMC_EncodeAudio(int handle, void *data, uint length); +void AVPMC_EncodeFrameWithAudio(int handle, void *videoData, void *audioData, uint audioLength); +void AVPMC_Pause(int handle); +void AVPMC_Stop(int handle, bool skipPendingFrames); +bool AVPMC_IsFileWritingComplete(int handle); +int AVPMC_SetEncodedFrameLimit(int handle, uint limit); +void AVPMC_SetTexturePointer(int handle, void *texture); +void AVPMC_FreeRecorder(int handle); +uint AVPMC_GetNumDroppedFrames(int handle); +uint AVPMC_GetNumDroppedEncoderFrames(int handle); +uint AVPMC_GetNumEncodedFrames(int handle); +uint AVPMC_GetEncodedSeconds(int handle); +uint AVPMC_GetFileSize(int handle); +void *AVPMC_GetPluginVersion(void); +bool AVPMC_GetVideoCodecName(int index, unichar *name, int nameBufferLength); +bool AVPMC_GetAudioCodecName(int index, unichar *name, int nameBufferLength); +bool AVPMC_GetAudioInputDeviceName(int index, unichar *name, int nameBufferLength); +bool AVPMC_GetContainerFileExtensions(int videoCodecIndex, int audioCodecIndex, unichar *extensions, int extensionsLength); +void AVPMC_SetLogFunction(void *logFunction); +void AVPMC_SetErrorHandler(int index, void *errorHandler); + +// Audio Capture +MCAudioCaptureDeviceAuthorisationStatus AVPMC_AudioCaptureDeviceAuthorisationStatus(void); +void AVPMC_RequestAudioCaptureDeviceAuthorisation(MCRequestAudioCaptureAuthorisationCallback callback); + +// Photo Library +MCPhotoLibraryAuthorisationStatus AVPMC_PhotoLibraryAuthorisationStatus(MCPhotoLibraryAccessLevel level); +void AVPMC_RequestPhotoLibraryAuthorisation(MCPhotoLibraryAccessLevel level, MCRequestPhotoLibraryAuthorisationCallback callback); + +// Ambisonic support +MCAmbisonicSourceRef _Nullable AVPMC_AddAmbisonicSourceInstance(int maxCoefficients); +void AVPMC_RemoveAmbisonicSourceInstance(MCAmbisonicSourceRef source); +void AVPMC_UpdateAmbisonicWeights(MCAmbisonicSourceRef source, float azimuth, float elevation, MCAmbisonicOrder ambisonicOrder, MCAmbisonicChannelOrder channelOrder, float *weights); +void AVPMC_EncodeMonoToAmbisonic(MCAmbisonicSourceRef source, float *inSamples, int inOffset, int inCount, int numChannels, void *outSamples, int outOffset, int outCount, MCAmbisonicOrder ambisonicOrder); + +void AVPMC_UnityRegisterRenderingPlugin(void *unityRegisterRenderingPluginFunction); + +NS_ASSUME_NONNULL_END + +#if __cplusplus +} +#endif diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/MovieCapture.h.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/MovieCapture.h.meta new file mode 100644 index 0000000..cbc0f90 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Headers/MovieCapture.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 738e42deda4b444f2b9444eadc36c73f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Info.plist b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Info.plist new file mode 100644 index 0000000..8028277 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Info.plist differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Info.plist.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Info.plist.meta new file mode 100644 index 0000000..8e5d0e7 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Info.plist.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b53bf83e86d5c4ab09e1fc40126aea16 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Modules.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Modules.meta new file mode 100644 index 0000000..a66e7f4 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Modules.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5fdb1d44492b9486bb9fbfd3c6c360a0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Modules/module.modulemap b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Modules/module.modulemap new file mode 100644 index 0000000..b6af800 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module AVProMovieCapture { + umbrella header "AVProMovieCapture.h" + + export * + module * { export * } +} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Modules/module.modulemap.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Modules/module.modulemap.meta new file mode 100644 index 0000000..eec7d2c --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/Modules/module.modulemap.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d20a729dabe0d45bfbc0409401929448 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/_CodeSignature.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/_CodeSignature.meta new file mode 100644 index 0000000..ed6ad25 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/_CodeSignature.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 777233b146761fb4390178ddd38af874 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/_CodeSignature/CodeResources b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..a0f5cff --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/_CodeSignature/CodeResources @@ -0,0 +1,146 @@ + + + + + files + + Headers/AVProMovieCapture.h + + 9YZ/q5ijrBqbJp6MrMqlJHQ7nlo= + + Headers/MCTypes.h + + 9+U+W8b2t/4nxscuzrB+aFBxdg8= + + Headers/MovieCapture.h + + dyeHFweQ4ZEIH/7xXURNUAOLbPE= + + Info.plist + + /rxpwXTDMQ7YMmBZEnlISoxRl4U= + + Modules/module.modulemap + + 782iV8WhlGjz7NRgA94xMI4RcIM= + + + files2 + + Headers/AVProMovieCapture.h + + hash2 + + ol0INL5abS9k7PoYi9VSI8CL6T9UcqhdqyUJgR8c20E= + + + Headers/MCTypes.h + + hash2 + + EZrbEBJjAVT/cCImOngmLX73o9B4pDxusHSgH4El22s= + + + Headers/MovieCapture.h + + hash2 + + s4V0315UojSS1ZW06S7dRir5spFZzxV5ooClA5wHfgs= + + + Modules/module.modulemap + + hash2 + + zUawK2p5kaOnpYvDnwihm1jSawzJKpmqB2uhlxoYW18= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/_CodeSignature/CodeResources.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/_CodeSignature/CodeResources.meta new file mode 100644 index 0000000..fa97b43 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.framework/_CodeSignature/CodeResources.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 84d707d8edd291c4a87bedecf969ec9d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.m b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.m new file mode 100644 index 0000000..157e1c8 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.m @@ -0,0 +1,14 @@ +// +// AVProMovieCapture.m +// AVPro Movie Capture +// +// Created by Morris Butler on 13/10/2021. +// Copyright © 2021 RenderHeads. All rights reserved. +// + +extern void AVPMC_UnityRegisterRenderingPlugin(void *unityRegisterRenderingPluginFunction); + +void AVPMC_PluginBootstrap(void) +{ + AVPMC_UnityRegisterRenderingPlugin(UnityRegisterRenderingPluginV5); +} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.m.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.m.meta new file mode 100644 index 0000000..a029b5d --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/iOS/AVProMovieCapture.m.meta @@ -0,0 +1,137 @@ +fileFormatVersion: 2 +guid: d719076ccc7224c19ab08f13626b51c6 +timeCreated: 1634202955 +licenseType: Store +PluginImporter: + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + data: + first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 0 + data: + first: + '': Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + OS: AnyOS + data: + first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + data: + first: + Any: + second: + enabled: 0 + settings: {} + data: + first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + data: + first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: None + data: + first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Linux + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: LinuxUniversal + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: OSXIntel + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: OSXIntel64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + iPhone: iOS + second: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS.meta new file mode 100644 index 0000000..1c59a40 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ccf5f4b2f5ddf4c38936c107893d900d +folderAsset: yes +timeCreated: 1560875668 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle.meta new file mode 100644 index 0000000..96f5f5f --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle.meta @@ -0,0 +1,147 @@ +fileFormatVersion: 2 +guid: 38686e16b2bd048aab4f237980525ba6 +folderAsset: yes +timeCreated: 1560875736 +licenseType: Store +PluginImporter: + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + data: + first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXIntel: 0 + Exclude OSXIntel64: 0 + Exclude OSXUniversal: 0 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + data: + first: + '': Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + OS: OSX + data: + first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + data: + first: + Any: + second: + enabled: 0 + settings: {} + data: + first: + Editor: Editor + second: + enabled: 1 + settings: + DefaultValueInitialized: true + data: + first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + Standalone: Linux + second: + enabled: 0 + settings: + CPU: x86 + data: + first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: x86_64 + data: + first: + Standalone: LinuxUniversal + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: OSXIntel + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXIntel64 + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + data: + first: + iPhone: iOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + data: + first: + tvOS: tvOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents.meta new file mode 100644 index 0000000..f763135 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b8f7ea6c87f658c45a4987e72b5ae8e9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/CodeResources b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/CodeResources new file mode 100644 index 0000000..ae34408 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/CodeResources differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/CodeResources.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/CodeResources.meta new file mode 100644 index 0000000..012c2dd --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/CodeResources.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d59742f1bf640f5498855d5ce0da2f1f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/Info.plist b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/Info.plist new file mode 100644 index 0000000..5c26d72 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/Info.plist @@ -0,0 +1,48 @@ + + + + + BuildMachineOSBuild + 21G83 + CFBundleDevelopmentRegion + en + CFBundleExecutable + AVProMovieCapture + CFBundleIdentifier + com.renderheads.AVPro.MovieCapture + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + AVProMovieCapture + CFBundlePackageType + BNDL + CFBundleShortVersionString + 5.0.3 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 646 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 13C100 + DTPlatformName + macosx + DTPlatformVersion + 12.1 + DTSDKBuild + 21C46 + DTSDKName + macosx12.1 + DTXcode + 1321 + DTXcodeBuild + 13C100 + LSMinimumSystemVersion + 10.13 + NSHumanReadableCopyright + Copyright © 2022 RenderHeads. All rights reserved. + + diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/Info.plist.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/Info.plist.meta new file mode 100644 index 0000000..306caae --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/Info.plist.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e1171f86e8fd17d4089c39fd5872ca77 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/MacOS.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/MacOS.meta new file mode 100644 index 0000000..ecc6d63 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/MacOS.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: da0f5d1e259967e44a5d95a836592ebe +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/MacOS/AVProMovieCapture b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/MacOS/AVProMovieCapture new file mode 100644 index 0000000..48da024 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/MacOS/AVProMovieCapture differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/MacOS/AVProMovieCapture.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/MacOS/AVProMovieCapture.meta new file mode 100644 index 0000000..d0a76dd --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/MacOS/AVProMovieCapture.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0035a0c4cabe37e4d85db485adcdd074 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/_CodeSignature.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/_CodeSignature.meta new file mode 100644 index 0000000..bd1ca72 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/_CodeSignature.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6fa7c871d8f38bb4cb0612a7081062ef +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/_CodeSignature/CodeResources b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/_CodeSignature/CodeResources new file mode 100644 index 0000000..d5d0fd7 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/_CodeSignature/CodeResources @@ -0,0 +1,115 @@ + + + + + files + + files2 + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/_CodeSignature/CodeResources.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/_CodeSignature/CodeResources.meta new file mode 100644 index 0000000..8e13d35 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/macOS/AVProMovieCapture.bundle/Contents/_CodeSignature/CodeResources.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d8701b4b96f169e4a91a40591ff721ca +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86.meta new file mode 100644 index 0000000..2a3a7e0 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 1f0b8f9d98e9b4e4c868d6583195b054 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86/AVProMovieCapture.dll b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86/AVProMovieCapture.dll new file mode 100644 index 0000000..9602778 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86/AVProMovieCapture.dll differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86/AVProMovieCapture.dll.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86/AVProMovieCapture.dll.meta new file mode 100644 index 0000000..b373963 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86/AVProMovieCapture.dll.meta @@ -0,0 +1,163 @@ +fileFormatVersion: 2 +guid: ed39a3a4bc4794b4583d8c96de9d451c +PluginImporter: + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + data: + first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 0 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude OSXIntel: 0 + Exclude OSXIntel64: 0 + Exclude OSXUniversal: 0 + Exclude Win: 0 + Exclude Win64: 1 + Exclude iOS: 1 + data: + first: + '': Editor + second: + enabled: 0 + settings: + CPU: x86 + OS: Windows + data: + first: + '': WP8 + second: + enabled: 0 + settings: + CPU: AnyCPU + DontProcess: False + PlaceholderPath: + data: + first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + data: + first: + Any: + second: + enabled: 0 + settings: {} + data: + first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: x86 + DefaultValueInitialized: true + OS: Windows + data: + first: + Facebook: Win + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + Samsung TV: SamsungTV + second: + enabled: 0 + settings: + STV_MODEL: STANDARD_13 + data: + first: + Standalone: Linux + second: + enabled: 1 + settings: + CPU: x86 + data: + first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: x86_64 + data: + first: + Standalone: LinuxUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXIntel + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXIntel64 + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: Win + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + DontProcess: False + PlaceholderPath: + SDK: AnySDK + data: + first: + iPhone: iOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86/AudioPluginAVProMovieCapture.dll b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86/AudioPluginAVProMovieCapture.dll new file mode 100644 index 0000000..f2f59aa Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86/AudioPluginAVProMovieCapture.dll differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86/AudioPluginAVProMovieCapture.dll.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86/AudioPluginAVProMovieCapture.dll.meta new file mode 100644 index 0000000..89be727 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86/AudioPluginAVProMovieCapture.dll.meta @@ -0,0 +1,163 @@ +fileFormatVersion: 2 +guid: 2e46bec9709b2b14ab39d884e2dca5cd +PluginImporter: + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + data: + first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 0 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude OSXIntel: 0 + Exclude OSXIntel64: 0 + Exclude OSXUniversal: 0 + Exclude Win: 0 + Exclude Win64: 1 + Exclude iOS: 1 + data: + first: + '': Editor + second: + enabled: 0 + settings: + CPU: x86 + OS: Windows + data: + first: + '': WP8 + second: + enabled: 0 + settings: + CPU: AnyCPU + DontProcess: False + PlaceholderPath: + data: + first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + data: + first: + Any: + second: + enabled: 0 + settings: {} + data: + first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: x86 + DefaultValueInitialized: true + OS: Windows + data: + first: + Facebook: Win + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + Samsung TV: SamsungTV + second: + enabled: 0 + settings: + STV_MODEL: STANDARD_13 + data: + first: + Standalone: Linux + second: + enabled: 1 + settings: + CPU: x86 + data: + first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: x86_64 + data: + first: + Standalone: LinuxUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXIntel + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXIntel64 + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: Win + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + DontProcess: False + PlaceholderPath: + SDK: AnySDK + data: + first: + iPhone: iOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86_64.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86_64.meta new file mode 100644 index 0000000..9c1aaf8 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86_64.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 798e239b9839d5240a37851de7070adf +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86_64/AVProMovieCapture.dll b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86_64/AVProMovieCapture.dll new file mode 100644 index 0000000..afb25e7 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86_64/AVProMovieCapture.dll differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86_64/AVProMovieCapture.dll.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86_64/AVProMovieCapture.dll.meta new file mode 100644 index 0000000..9a9aeac --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86_64/AVProMovieCapture.dll.meta @@ -0,0 +1,163 @@ +fileFormatVersion: 2 +guid: 78afd43fa6c7bc8438e4b5a805c20efa +PluginImporter: + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + data: + first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 0 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude OSXIntel: 0 + Exclude OSXIntel64: 0 + Exclude OSXUniversal: 0 + Exclude Win: 1 + Exclude Win64: 0 + Exclude iOS: 1 + data: + first: + '': Editor + second: + enabled: 0 + settings: + CPU: x86_64 + OS: Windows + data: + first: + '': WP8 + second: + enabled: 0 + settings: + CPU: AnyCPU + DontProcess: False + PlaceholderPath: + data: + first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + data: + first: + Any: + second: + enabled: 0 + settings: {} + data: + first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: x86_64 + DefaultValueInitialized: true + OS: Windows + data: + first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: None + data: + first: + Facebook: Win64 + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Samsung TV: SamsungTV + second: + enabled: 0 + settings: + STV_MODEL: STANDARD_13 + data: + first: + Standalone: Linux + second: + enabled: 1 + settings: + CPU: x86 + data: + first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: x86_64 + data: + first: + Standalone: LinuxUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXIntel + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXIntel64 + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Win64 + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + DontProcess: False + PlaceholderPath: + SDK: AnySDK + data: + first: + iPhone: iOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86_64/AudioPluginAVProMovieCapture.dll b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86_64/AudioPluginAVProMovieCapture.dll new file mode 100644 index 0000000..f56e36d Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86_64/AudioPluginAVProMovieCapture.dll differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86_64/AudioPluginAVProMovieCapture.dll.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86_64/AudioPluginAVProMovieCapture.dll.meta new file mode 100644 index 0000000..d89f269 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins/x86_64/AudioPluginAVProMovieCapture.dll.meta @@ -0,0 +1,163 @@ +fileFormatVersion: 2 +guid: ac2390c995001bc4fb7ffd5d3a1da027 +PluginImporter: + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + data: + first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 0 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude OSXIntel: 0 + Exclude OSXIntel64: 0 + Exclude OSXUniversal: 0 + Exclude Win: 1 + Exclude Win64: 0 + Exclude iOS: 1 + data: + first: + '': Editor + second: + enabled: 0 + settings: + CPU: x86_64 + OS: Windows + data: + first: + '': WP8 + second: + enabled: 0 + settings: + CPU: AnyCPU + DontProcess: False + PlaceholderPath: + data: + first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + data: + first: + Any: + second: + enabled: 0 + settings: {} + data: + first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: x86_64 + DefaultValueInitialized: true + OS: Windows + data: + first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: None + data: + first: + Facebook: Win64 + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Samsung TV: SamsungTV + second: + enabled: 0 + settings: + STV_MODEL: STANDARD_13 + data: + first: + Standalone: Linux + second: + enabled: 1 + settings: + CPU: x86 + data: + first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: x86_64 + data: + first: + Standalone: LinuxUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXIntel + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXIntel64 + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Win64 + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + DontProcess: False + PlaceholderPath: + SDK: AnySDK + data: + first: + iPhone: iOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources.meta new file mode 100644 index 0000000..5a33526 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3faece8495bacd443b70aaaf387a9768 +folderAsset: yes +timeCreated: 1563636592 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_MotionBlur_Add.shader b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_MotionBlur_Add.shader new file mode 100644 index 0000000..3a3b94b --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_MotionBlur_Add.shader @@ -0,0 +1,67 @@ +Shader "Hidden/AVProMovieCapture/MotionBlur-Add" +{ + Properties + { + _MainTex ("Base (RGB)", 2D) = "white" {} + } + + SubShader + { + Pass + { + ZTest Always Cull Off ZWrite Off + Lighting Off + Fog { Mode off } + Blend One One + + CGPROGRAM + #pragma exclude_renderers flash xbox360 ps3 gles + #pragma vertex vert + #pragma fragment frag + //#pragma target 3.0 + //#pragma fragmentoption ARB_precision_hint_fastest + #include "UnityCG.cginc" + + uniform sampler2D _MainTex; + uniform float4 _MainTex_TexelSize; + uniform float _Weight; + + struct appdata + { + float4 vertex : POSITION; + half2 texcoord : TEXCOORD0; + }; + + struct v2f + { + float4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + }; + + v2f vert(appdata v) + { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.texcoord; + + // Note: this flip is not needed because motion blur never target anti-aliased rendertextures +/*#if UNITY_UV_STARTS_AT_TOP + if (_MainTex_TexelSize.y < 0) + { + o.uv.y = 1.0 - o.uv.y; + } +#endif*/ + return o; + } + + fixed4 frag (v2f i) : COLOR + { + float4 col = tex2D(_MainTex, i.uv) * _Weight; + return col; + } + ENDCG + } + } + +Fallback off +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_MotionBlur_Add.shader.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_MotionBlur_Add.shader.meta new file mode 100644 index 0000000..332850f --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_MotionBlur_Add.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 6550cb921f6637a44afa8288b2f14b10 +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_MotionBlur_Div.shader b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_MotionBlur_Div.shader new file mode 100644 index 0000000..9d99820 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_MotionBlur_Div.shader @@ -0,0 +1,67 @@ +Shader "Hidden/AVProMovieCapture/MotionBlur-Div" +{ + Properties + { + _MainTex ("Base (RGB)", 2D) = "white" {} + } + + SubShader + { + Pass + { + ZTest Always Cull Off ZWrite Off + Lighting Off + Fog { Mode off } + + CGPROGRAM + #pragma exclude_renderers flash xbox360 ps3 gles + #pragma vertex vert + #pragma fragment frag + //#pragma target 3.0 + //#pragma fragmentoption ARB_precision_hint_fastest + #include "UnityCG.cginc" + + uniform float _NumSamples; + uniform sampler2D _MainTex; + uniform float4 _MainTex_TexelSize; + + struct appdata + { + float4 vertex : POSITION; + half2 texcoord : TEXCOORD0; + }; + + struct v2f + { + float4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + }; + + v2f vert(appdata v) + { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.texcoord; + + // Note: this flip is not needed because motion blur never target anti-aliased rendertextures +/*#if UNITY_UV_STARTS_AT_TOP + if (_MainTex_TexelSize.y < 0) + { + o.uv.y = 1.0 - o.uv.y; + } +#endif*/ + + return o; + } + + fixed4 frag (v2f i) : COLOR + { + float4 col = tex2D(_MainTex, i.uv); + return col / _NumSamples; + } + ENDCG + } + } + +Fallback off +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_MotionBlur_Div.shader.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_MotionBlur_Div.shader.meta new file mode 100644 index 0000000..eb115bf --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_MotionBlur_Div.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: dbc6e2b736a206b46bc8f26e05240095 +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_ODSMerge.shader b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_ODSMerge.shader new file mode 100644 index 0000000..b6ec583 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_ODSMerge.shader @@ -0,0 +1,125 @@ +Shader "Hidden/AVProMovieCapture/ODSMerge" +{ + Properties + { + } + SubShader + { + Lighting Off + ZTest Always + Cull Off + ZWrite Off + Fog { Mode off } + + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma target 3.0 + #pragma multi_compile LAYOUT_EQUIRECT360 LAYOUT_EQUIRECT180 + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + float4 vertex : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + #define QUARTERPI 0.7853981633974483 + + uniform sampler2D _leftTopTex; + uniform sampler2D _leftBotTex; + uniform sampler2D _rightTopTex; + uniform sampler2D _rightBotTex; + + uniform float4 _leftTopTex_TexelSize; + uniform float4 _leftBotTex_TexelSize; + uniform float4 _rightTopTex_TexelSize; + uniform float4 _rightBotTex_TexelSize; + + uniform float _sliceCenter; + uniform float _pixelSliceSize; + uniform int _paddingSize; + + uniform float _targetXTexelSize; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.uv = v.uv; + return o; + } + + fixed4 computePixelColour(float2 uv) + { + fixed4 col; + + // uv.y > 0.5 is top of texture (left eye) + // uv.y < 0.5 is bottom of texture (right eye) + if (uv.y < 0.25f) { + uv.y = uv.y * 4.0; + float phi = ((uv.y - 0.5) * 2.0) * QUARTERPI; + uv.y = (tan(phi) * 0.5) + 0.5; + col = tex2D(_rightBotTex, uv); + } + else if (uv.y < 0.5) { + uv.y = (uv.y - 0.25) * 4.0; + float phi = ((uv.y - 0.5) * 2.0) * QUARTERPI; + uv.y = (tan(phi) * 0.5) + 0.5; + col = tex2D(_rightTopTex, uv); + } + else if (uv.y < 0.75) { + uv.y = (uv.y - 0.5) * 4.0; + float phi = ((uv.y - 0.5) * 2.0) * QUARTERPI; + uv.y = (tan(phi) * 0.5) + 0.5; + col = tex2D(_leftBotTex, uv); + } + else { + uv.y = (uv.y - 0.75) * 4.0; + float phi = ((uv.y - 0.5) * 2.0) * QUARTERPI; + uv.y = (tan(phi) * 0.5) + 0.5; + col = tex2D(_leftTopTex, uv); + } + + return col; + } + + fixed4 frag (v2f i) : SV_Target + { + fixed4 col = 0.0; + + float column = float(_sliceCenter) * _targetXTexelSize; + float range = _pixelSliceSize * _targetXTexelSize / 2.0 + 0.000001; + #if defined(LAYOUT_EQUIRECT180) + float dif = ((i.uv.x + 0.5) * 0.5) - column; + #else + float dif = i.uv.x - column; + #endif + float adif = abs(dif); + + if (adif < range) + { + float r = _pixelSliceSize * _targetXTexelSize / 2.0; + float rp = (_pixelSliceSize + 2.0 * _paddingSize) * _targetXTexelSize / 2.0; + float xRescaled = (dif < 0 ? r - adif : r + adif) / (rp * 2.0) + _paddingSize * _targetXTexelSize; + col = computePixelColour(float2(xRescaled, i.uv.y)); + } + else + { + discard; + } + + return col; + } + ENDCG + } + } +} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_ODSMerge.shader.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_ODSMerge.shader.meta new file mode 100644 index 0000000..faf3fc8 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/AVProMovieCapture_ODSMerge.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 31c12557dc75fc34086d04b2d68aa6df +timeCreated: 1499693626 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/CubemapToEquirectangular.shader b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/CubemapToEquirectangular.shader new file mode 100644 index 0000000..b2316f3 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/CubemapToEquirectangular.shader @@ -0,0 +1,95 @@ +// Originally By James O'Hare, from his Gist: https://gist.github.com/Farfarer/5664694 +// This takes in the cubemap generated by your cubemap camera and feeds back out an equirectangular image. +// Create a new material and give it this shader. Then give that material to the "cubemapToEquirectangularMateral" property of the dynamicAmbient.js script in this gist. +// You could probably abstract this to C#/JS code and feed it in a pre-baked cubemap to sample and then spit out an equirectangular map if you don't have render textures. +Shader "Hidden/CubemapToEquirectangular" +{ + Properties + { + _MainTex ("Cubemap (RGB)", CUBE) = "" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 texcoord : TEXCOORD0; + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + uniform samplerCUBE _MainTex; + uniform float _FlipX; + + #define PI 3.141592653589793 + #define HALFPI 1.57079632679 + + + v2f vert(appdata v ) + { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + + #if STEREOPACK_TOP + o.pos.y = (o.pos.y / 2.0) - 0.5; + #elif STEREOPACK_BOTTOM + o.pos.y = (o.pos.y / 2.0) + 0.5; + #elif STEREOPACK_LEFT + o.pos.x = (o.pos.x / 2.0) - 0.5; + #elif STEREOPACK_RIGHT + o.pos.x = (o.pos.x / 2.0) + 0.5; + #endif + + float2 uv = v.texcoord.xy; + if (_FlipX > 0.5) + { + uv.x = 1.0 - uv.x; + } + #if defined(LAYOUT_EQUIRECT180) + uv = uv * float2(1.0, 2.0) - float2(0.0, 1.0); + #else + uv = uv * 2.0 - float2(0.5, 1.0); + #endif + uv *= float2(PI, HALFPI); + + o.uv = uv; + return o; + } + + fixed4 frag(v2f i) : COLOR + { + float cosy = cos(i.uv.y); + float3 normal = float3(0.0, 0.0, 0.0); + normal.x = cos(i.uv.x) * cosy; + normal.y = i.uv.y; + normal.z = cos(i.uv.x - HALFPI) * cosy; + return texCUBE(_MainTex, normalize(normal)); + } + ENDCG + + Subshader + { + ZTest Always + Cull Off + ZWrite Off + Fog{ Mode off } + + Pass + { + CGPROGRAM + #pragma multi_compile __ STEREOPACK_TOP STEREOPACK_BOTTOM STEREOPACK_LEFT STEREOPACK_RIGHT + #pragma multi_compile LAYOUT_EQUIRECT360 LAYOUT_EQUIRECT180 + #pragma vertex vert + #pragma fragment frag + ENDCG + } + } + Fallback Off +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/CubemapToEquirectangular.shader.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/CubemapToEquirectangular.shader.meta new file mode 100644 index 0000000..2dfd1d5 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/CubemapToEquirectangular.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 1d2050ca093044341b7cb2c1b80ed0b6 +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/MouseCursorArrow.png b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/MouseCursorArrow.png new file mode 100644 index 0000000..ba158f2 Binary files /dev/null and b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/MouseCursorArrow.png differ diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/MouseCursorArrow.png.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/MouseCursorArrow.png.meta new file mode 100644 index 0000000..896362b --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Resources/MouseCursorArrow.png.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 9c4f7c434dc500448b24eb25af7314d7 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 128 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts.meta new file mode 100644 index 0000000..60193a3 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3262444f60e827b438232b66d5987daf +folderAsset: yes +timeCreated: 1563636592 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components.meta new file mode 100644 index 0000000..7e39d77 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: a0cb794f4483c3241b41977cd4bb13a1 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AmbisonicSource.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AmbisonicSource.cs new file mode 100644 index 0000000..a459c70 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AmbisonicSource.cs @@ -0,0 +1,242 @@ +using System.Collections.Generic; +using UnityEngine; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Plays an AudioSource (which should only have a single mono channel) for ambisonic encoding + /// + [AddComponentMenu("AVPro Movie Capture/Audio/Ambisonic Source", 601)] + public partial class AmbisonicSource : MonoBehaviour + { + [SerializeField] AmbisonicWavWriter _sink = null; + + [Tooltip("Listener is optional but allows positions to be calculated relative to a transform. This is useful if the listener is not located at 0,0,0.")] + [SerializeField] Transform _listener = null; + + private Vector3 _position = Vector3.zero; + private AmbisonicOrder _order; + private AmbisonicChannelOrder _channelOrder; + private AmbisonicNormalisation _normalisation; + private System.IntPtr _sourceInstance = System.IntPtr.Zero; + + private int _activeSampleIndex = 0; + private float[] _activeSamples = null; + private Queue _fullBuffers = new Queue(8); + private Queue _emptyBuffers = new Queue(8); + + void OnEnable() + { + AudioSource audioSource = this.GetComponent(); + if (audioSource && audioSource.clip) + { + audioSource.PlayOneShot(audioSource.clip, 0f); + } + + Debug.Assert(_sourceInstance == System.IntPtr.Zero); + _sourceInstance = NativePlugin.AddAmbisonicSourceInstance(Ambisonic.MaxCoeffs); + + _position = this.transform.position; + UpdateCoefficients(); + if (_sink) + { + _sink.AddSource(this); + } + } + + void OnDisable() + { + lock (this) + { + if (_sink) + { + _sink.RemoveSource(this); + } + + if (_sourceInstance != System.IntPtr.Zero) + { + NativePlugin.RemoveAmbisonicSourceInstance(_sourceInstance); + _sourceInstance = System.IntPtr.Zero; + } + } + } + + internal void Setup(AmbisonicOrder order, AmbisonicChannelOrder channelOrder, AmbisonicNormalisation normalisation, int bufferCount) + { + Debug.Assert(bufferCount > 1 && bufferCount < 100); + lock (this) + { + _order = order; + _channelOrder = channelOrder; + _normalisation = normalisation; + int sampleCount = Ambisonic.GetCoeffCount(order) * AudioSettings.outputSampleRate / 10; // 1/10 second buffer + + _activeSampleIndex = 0; + _activeSamples = null; + _fullBuffers.Clear(); + _emptyBuffers.Clear(); + for (int i = 0; i < bufferCount; i++) + { + float[] buffer = new float[sampleCount]; + _emptyBuffers.Enqueue(buffer); + } + + UpdateCoefficients(); + } + } + + void OnDrawGizmos() + { + Gizmos.color = Color.green; + Gizmos.DrawWireSphere(_position, 1.2f); + if (_listener) + { + Gizmos.DrawLine(this.transform.position, _listener.position); + } + } + + void LateUpdate() + { + // Convert position relative to listener + Vector3 p = this.transform.position; + if (_listener) + { + p = (p - _listener.position); + //Debug.Log(this.transform.parent.name + ": " + p + " " + _listener.position + " - " + this.transform.position); + } + + // If the relative audiosource position has changed + if (p != _position) + { + SetListenerRelativePosition(p); + } + } + + void SetListenerRelativePosition(Vector3 position) + { + // Optionally smooth out the motion + //_position = Vector3.MoveTowards(_position, position, Time.deltaTime * 10f); + + _position = position; + UpdateCoefficients(); + } + + void UpdateCoefficients() + { + Ambisonic.PolarCoord p = new Ambisonic.PolarCoord(); + p.FromCart(_position); + + lock (this) + { + float[] normaliseWeights = Ambisonic.GetNormalisationWeights(_normalisation); + NativePlugin.UpdateAmbisonicWeights(_sourceInstance, p.azimuth, p.elevation, _order, _channelOrder, normaliseWeights); + } + } + + void OnAudioFilterRead(float[] samples, int channelCount) + { + lock (this) + { + int coeffCount = Ambisonic.GetCoeffCount(_order); + if (_sink != null && coeffCount > 0) + { + int samplesOffset = 0; + // While there are sample to process + while (samplesOffset < samples.Length) + { + // If the pending buffer is full, move it to the full ist + if (_activeSamples != null && _activeSamples.Length == _activeSampleIndex) + { + _fullBuffers.Enqueue(_activeSamples); + _activeSamples = null; + _activeSampleIndex = 0; + } + // Assign a new pending queue + if (_activeSamples == null && _emptyBuffers.Count > 0) + { + _activeSamples = _emptyBuffers.Dequeue(); + } + if (_activeSamples == null) + { + // Remaining samples are lost! + break; + } + int remainingFrameCount = (samples.Length - samplesOffset) / channelCount; + int generatedSampleCount = remainingFrameCount * coeffCount; + int remainingSampleSpace = (_activeSamples.Length - _activeSampleIndex); + + int samplesToProcess = Mathf.Min(remainingSampleSpace, generatedSampleCount); + // TODO: should we specify Floor/Ceil rounding behaviour? + int framesToProcess = samplesToProcess / coeffCount; + generatedSampleCount = framesToProcess * coeffCount; + + if (framesToProcess > 0) + { + NativePlugin.EncodeMonoToAmbisonic(_sourceInstance, samples, samplesOffset, framesToProcess, channelCount, _activeSamples, _activeSampleIndex, _activeSamples.Length, _order); + _activeSampleIndex += generatedSampleCount; + samplesOffset += framesToProcess * channelCount; + } + else + { + Debug.Log(coeffCount + " " + framesToProcess + " " + remainingSampleSpace + " >> " + samplesOffset + " / " + samples.Length); + break; + } + } + } + } + } + + internal void FlushBuffers() + { + lock (this) + { + _activeSampleIndex = 0; + foreach (float[] buffer in _fullBuffers) + { + _emptyBuffers.Enqueue(buffer); + } + if (_activeSamples != null) + { + _emptyBuffers.Enqueue(_activeSamples); + _activeSamples = null; + } + } + } + + internal int GetFullBufferCount() + { + return _fullBuffers.Count; + } + + internal void SendSamplesToSink(bool isAdditive, bool isDraining) + { + lock (this) + { + float[] samples = null; + if (_fullBuffers.Count > 0) + { + // Send a full buffer + samples = _fullBuffers.Dequeue(); + _sink.MixSamples(samples, samples.Length, isAdditive); + } + else if (isDraining) + { + // Send partial of the active buffer + samples = _activeSamples; + _sink.MixSamples(_activeSamples, _activeSampleIndex, isAdditive); + _activeSampleIndex = 0; + _activeSamples = null; + } + + if (samples != null) + { + _emptyBuffers.Enqueue(samples); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AmbisonicSource.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AmbisonicSource.cs.meta new file mode 100644 index 0000000..b3a382f --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AmbisonicSource.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7fb5927f10eb767468d3bb55a913ed3b +timeCreated: 1615307316 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AmbisonicWavWriter.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AmbisonicWavWriter.cs new file mode 100644 index 0000000..265a27e --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AmbisonicWavWriter.cs @@ -0,0 +1,198 @@ +using UnityEngine; +using System.Collections.Generic; +using System.IO; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Combine multiple AmbisonicSource streams into a single ambisonic mix + /// We had to use an overcomplicated buffer queue system because the with the audio thread + /// we have no idea which frame we are on, and so no reliable way to know when to write + /// or accumulate the audio into the mix. + /// + [AddComponentMenu("AVPro Movie Capture/Audio/Ambisonic WAV Writer", 601)] + public class AmbisonicWavWriter : MonoBehaviour + { + [SerializeField] CaptureBase _capture = null; + [SerializeField] AmbisonicOrder _order = AmbisonicOrder.Third; + [SerializeField] AmbisonicFormat _format = AmbisonicFormat.ACN_SN3D; + [SerializeField] string _filename = "output.wav"; + [SerializeField, Range(4, 32)] int _bufferCount = 16; + + private float[] _outSamples = null; + private WavWriter _wavWriter = null; + private List _sources = new List(8); + private int _pendingSampleCount = 0; + + public AmbisonicOrder Order { get { return _order; } } + public AmbisonicFormat Format { get { return _format; } } + + internal void AddSource(AmbisonicSource source) + { + lock (_sources) + { + SetupSource(source); + _sources.Add(source); + } + } + + internal void RemoveSource(AmbisonicSource source) + { + lock (_sources) + { + _sources.Remove(source); + } + } + + void OnDisable() + { + StopCapture(); + } + + void SetupSource(AmbisonicSource source) + { + source.Setup(_order, Ambisonic.GetChannelOrder(_format), Ambisonic.GetNormalisation(_format), _bufferCount); + source.FlushBuffers(); + } + + void ToggleCapturing(bool isCapturing) + { + if (isCapturing && !IsCapturing()) + { + StartCapture(); + } + else if (!isCapturing && IsCapturing()) + { + StopCapture(); + } + } + + void StartCapture() + { + #if UNITY_EDITOR + if (UnityEditor.EditorApplication.isPaused) return; + #endif + + Debug.Assert(_outSamples == null); + Debug.Assert(_wavWriter == null); + + _pendingSampleCount = 0; + int coeffCount = Ambisonic.GetCoeffCount(_order); + Debug.Assert(coeffCount == 4 || coeffCount == 9 || coeffCount == 16); + + lock (this) + { + foreach (AmbisonicSource source in _sources) + { + SetupSource(source); + } + + string path = Path.Combine(Application.persistentDataPath, _filename); + if (_capture) + { + path = _capture.LastFilePath + ".wav"; + } + Debug.Log("[AVProMovieCapture] Writing Ambisonic WAV to " + path); + _wavWriter = new WavWriter(path, coeffCount, AudioSettings.outputSampleRate, WavWriter.SampleFormat.Float32); + + _outSamples = new float[coeffCount * AudioSettings.outputSampleRate * 1]; // 1 second buffer + } + } + + void StopCapture() + { + if (_wavWriter != null) + { + lock (_wavWriter) + { + FlushWavWriter(); + _wavWriter.Dispose(); + _wavWriter = null; + _outSamples = null; + } + } + } + + bool IsCapturing() + { + return (_wavWriter != null && _outSamples != null); + } + + void LateUpdate() + { + ToggleCapturing(_capture != null && _capture.IsCapturing()); + + ProcessSources(isDraining:false); + } + + void ProcessSources(bool isDraining) + { + if (!IsCapturing() || _capture.IsPaused()) return; + + lock(this) + { + if (_sources.Count > 0) + { + // Find the minimum number of full buffers across all sources + int minBuffers = int.MaxValue; + for (int i = 0; i < _sources.Count; i++) + { + int bufferCount = _sources[i].GetFullBufferCount(); + minBuffers = Mathf.Min(bufferCount, minBuffers); + } + + // Process the minimum number of full buffers + for (int j = 0; j < minBuffers; j++) + { + for (int i = 0; i < _sources.Count; i++) + { + // TODO: fix this draining - it doesn't take into account cases where some of the sources + // still have a full buffer, but other's don't. + _sources[i].SendSamplesToSink(i != 0, isDraining); + } + FlushWavWriter(); + } + } + } + } + + internal void MixSamples(float[] samples, int sampleCount, bool addSamples) + { + Debug.Assert(sampleCount < _outSamples.Length); + + if (sampleCount < _outSamples.Length) + { + if (!addSamples) + { + _pendingSampleCount = sampleCount; + System.Buffer.BlockCopy(samples, 0, _outSamples, 0, sampleCount * sizeof(float)); + } + else + { + // Accumulate samples into the mix + for (int i = 0; i < sampleCount; i++) + { + _outSamples[i] += samples[i]; + } + } + } + else + { + Debug.LogError("too many samples"); + } + } + + void FlushWavWriter() + { + if (_pendingSampleCount > 0) + { + _wavWriter.WriteInterleaved(_outSamples, _pendingSampleCount); + _pendingSampleCount = 0; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AmbisonicWavWriter.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AmbisonicWavWriter.cs.meta new file mode 100644 index 0000000..0c1325f --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AmbisonicWavWriter.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d496180929275434c90b945a345cbaa2 +timeCreated: 1615307326 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AudioSourceToWav.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AudioSourceToWav.cs new file mode 100644 index 0000000..365ad1f --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AudioSourceToWav.cs @@ -0,0 +1,39 @@ +using System.Collections; +using System.Collections.Generic; +using System.IO; +using UnityEngine; + +//----------------------------------------------------------------------------- +// Copyright 2014-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Place this component below an AudioSource or AudioListener to capture to WAV file + /// + [AddComponentMenu("AVPro Movie Capture/Audio/AudioSource To WAV", 701)] + public class AudioSourceToWav : MonoBehaviour + { + [SerializeField] string _filename = "output.wav"; + private WavWriter _wavWriter; + + void OnEnable() + { + string path = Path.Combine(Application.persistentDataPath, _filename); + Debug.Log("[AVProMovieCapture] Writing WAV to " + path); + _wavWriter = new WavWriter(path, UnityAudioCapture.GetUnityAudioChannelCount(), AudioSettings.outputSampleRate, WavWriter.SampleFormat.Float32); + } + + void OnDisable() + { + _wavWriter.Dispose(); + _wavWriter = null; + } + + void OnAudioFilterRead(float[] data, int channels) + { + _wavWriter.WriteInterleaved(data); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AudioSourceToWav.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AudioSourceToWav.cs.meta new file mode 100644 index 0000000..17ff52b --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/AudioSourceToWav.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 927d0f9ab1ea4f242a3ae81f75d8d380 +timeCreated: 1599855182 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CameraSelector.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CameraSelector.cs new file mode 100644 index 0000000..2e0e742 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CameraSelector.cs @@ -0,0 +1,265 @@ +using UnityEngine; +using UnityEngine.SceneManagement; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Selects the camera to use for captures based on various factors + /// TODO: add support for persisting across scene changes + /// + [AddComponentMenu("AVPro Movie Capture/Utils/Camera Selector", 300)] + public class CameraSelector : MonoBehaviour + { + public enum SelectByMode + { + HighestDepthCamera, + MainCameraTag, + EditorSceneView, + Tag, + Name, + Manual, + } + + public enum ScanFrequencyMode + { + Manual, + SceneLoad, + Frame, + } + + [SerializeField] SelectByMode _selectBy = SelectByMode.HighestDepthCamera; + [SerializeField] ScanFrequencyMode _scanFrequency = ScanFrequencyMode.SceneLoad; + [SerializeField] bool _scanHiddenCameras = false; + [SerializeField] string _tag = "MainCamera"; + [SerializeField] string _name = "Main Camera"; + [SerializeField] Camera _camera = null; + +#if UNITY_EDITOR + private const string SceneCameraName = "SceneCamera"; +#endif + + private Camera[] _cameraCache = new Camera[0]; + private int _cameraCount; + private int _cameraCacheFrame = -1; + private bool _selectionDirty = false; + +#if UNITY_EDITOR + public int CameraCacheCount + { + get { return _cameraCount; } + } + public Camera[] CameraCache + { + get { return _cameraCache; } + } +#endif + + public Camera Camera + { + get { return _camera; } + set { _camera = value; _selectBy = SelectByMode.Manual; } + } + + public SelectByMode SelectBy + { + get { return _selectBy; } + set { _selectBy = value; _selectionDirty = true; } + } + + public ScanFrequencyMode ScanFrequency + { + get { return _scanFrequency; } + set { _scanFrequency = value; ResetSceneLoading(); } + } + + public bool ScanHiddenCameras + { + get { return _scanHiddenCameras; } + set { _scanHiddenCameras = value; _selectionDirty = true; } + } + + public string SelectTag + { + get { return _tag; } + set { _tag = value; _selectionDirty = true; } + } + + public string SelectName + { + get { return _name; } + set { _name = value; _selectionDirty = true; } + } + + void Awake() + { + ResetSceneLoading(); + } + + void Start() + { + ScanForCameraChange(); + } + + void OnValidate() + { + ResetSceneLoading(); + } + + void Update() + { + if (_selectionDirty || _scanFrequency == ScanFrequencyMode.Frame) + { + ScanForCameraChange(); + } + } + + void OnDestroy() + { + SceneManager.sceneLoaded -= OnSceneLoaded; + } + + void ResetSceneLoading() + { + SceneManager.sceneLoaded -= OnSceneLoaded; + if (_scanFrequency == ScanFrequencyMode.SceneLoad) + { + SceneManager.sceneLoaded += OnSceneLoaded; + } + } + + void OnSceneLoaded(Scene scene, LoadSceneMode mode) + { + if (_scanFrequency == ScanFrequencyMode.SceneLoad) + { + ScanForCameraChange(); + } + } + + public bool ScanForCameraChange() + { + bool result = false; + Camera camera = FindCamera(); + if (_camera != camera) + { + _camera = camera; + if (_camera != null) + { + //Debug.Log("Camera " + _camera.name); + } + result = true; + } + _selectionDirty = false; + return result; + } + + Camera FindCamera() + { + Camera result = null; + switch (_selectBy) + { + case SelectByMode.HighestDepthCamera: + UpdateCameraCache(); + result = FindCameraByHighestDepth(_cameraCount, _cameraCache); + break; + case SelectByMode.MainCameraTag: + result = Camera.main; + break; + case SelectByMode.EditorSceneView: +#if UNITY_EDITOR + UpdateCameraCache(true); + result = FindCameraByName(_cameraCount, _cameraCache, SceneCameraName); +#else + Debug.LogWarning("[AVProMovieCapture] Scene View can only be captured in the Unity editor. Select a different camera."); +#endif + break; + case SelectByMode.Tag: + UpdateCameraCache(); + result = FindCameraByTag(_cameraCount, _cameraCache, _tag); + break; + case SelectByMode.Name: + UpdateCameraCache(); + result = FindCameraByName(_cameraCount, _cameraCache, _name); + break; + case SelectByMode.Manual: + result = _camera; + break; + } + return result; + } + + public void UpdateCameraCache(bool forceScanHiddenCameras = false) + { + // Prevent multiple scans per frame + if (Time.frameCount == _cameraCacheFrame) return; + + if (!_scanHiddenCameras && !forceScanHiddenCameras) + { + // FAST - list active cameras + if (_cameraCache.Length < Camera.allCamerasCount) + { + _cameraCache = new Camera[Camera.allCamerasCount]; + + } + _cameraCount = Camera.GetAllCameras(_cameraCache); + } + else + { + // SLOW - list all cameras + _cameraCache = Resources.FindObjectsOfTypeAll(); + _cameraCount = _cameraCache.Length; + } + + _cameraCacheFrame = Time.frameCount; + } + + static Camera FindCameraByHighestDepth(int cameraCount, Camera[] cameras) + { + Camera result = null; + float maxDepth = float.MinValue; + for (int i = 0; i < cameraCount; i++) + { + Camera c = cameras[i]; + if (result == null || c.depth > maxDepth) + { + result = c; + maxDepth = c.depth; + } + } + return result; + } + + static Camera FindCameraByTag(int cameraCount, Camera[] cameras, string tag) + { + Camera result = null; + for (int i = 0; i < cameraCount; i++) + { + Camera c = cameras[i]; + if (c.CompareTag(tag)) + { + result = c; + break; + } + } + return result; + } + + static Camera FindCameraByName(int cameraCount, Camera[] cameras, string name) + { + Camera result = null; + for (int i = 0; i < cameraCount; i++) + { + Camera c = cameras[i]; + if (c.name == name) + { + result = c; + break; + } + } + return result; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CameraSelector.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CameraSelector.cs.meta new file mode 100644 index 0000000..4101637 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CameraSelector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dbfc4cbb9957c704f912cd32368f81dc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioClip.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioClip.cs new file mode 100644 index 0000000..c68e967 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioClip.cs @@ -0,0 +1,110 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Encodes audio directly from an AudioClip + /// Requires AudioCaptureSource.Manual to be set on the Capture component + /// Make sure the AudioClip sample rate and channel count matches that of the Capture component + /// Designed to work in offline capture mode + /// + [AddComponentMenu("AVPro Movie Capture/Audio/Capture Audio (From AudioClip)", 500)] + public class CaptureAudioFromAudioClip : MonoBehaviour + { + [SerializeField] CaptureBase _capture = null; + [SerializeField] AudioClip _audioClip = null; + //[SerializeField] bool _loopAudio = false; + + private int _videoOffsetInSamples = 0; + private int _committedFrames = 0; + private int _committedSamples = 0; + private int _lastCommittedSample = -1; + + private float[] _frameBuffer = null; + + void OnEnable() + { + _lastCommittedSample = -1; + if (_audioClip && _capture) + { + if (_audioClip.frequency != _capture.ManualAudioSampleRate) + { + Debug.LogError(string.Format("[AVProMovieCapture] AudioClip audio frequency {0} doesn't match the encoding frequency {1}", _audioClip.frequency, _capture.ManualAudioSampleRate)); + } + if (_audioClip.channels != _capture.ManualAudioChannelCount) + { + Debug.LogError(string.Format("[AVProMovieCapture] AudioClip audio channelCount {0} doesn't match the encoding channelCount {1}", _audioClip.channels, _capture.ManualAudioChannelCount)); + } + } + } + + void Update() + { + if (_capture != null && _capture.IsCapturing()) + { + float[] samples = GetAudioSamplesForFrame(); + if (samples != null) + { + _capture.EncodeAudio(samples); + } + _committedFrames++; + } + } + + private float[] GetAudioSamplesForFrame() + { + float[] result = null; + if (_audioClip != null && _audioClip.samples > 0) + { + int sampleCommitSize = (int)(_capture.ManualAudioSampleRate / _capture.FrameRate); + float videoRenderTime = (float)_committedFrames / _capture.FrameRate; + float videoTimeInSamples = videoRenderTime * (float)_audioClip.frequency; + + if (_lastCommittedSample < videoTimeInSamples && videoTimeInSamples >= 0) + { + int startSampleIndex = (_lastCommittedSample + 1) - _videoOffsetInSamples; + int endSampleIndex = startSampleIndex + sampleCommitSize - 1; + + int requiredSamples = (_audioClip.channels * sampleCommitSize); + if (_lastCommittedSample < _audioClip.samples - 1) + { + if (endSampleIndex >= _audioClip.samples) + { + // We've reached the end of the clip samples, so just grab what remains + requiredSamples = (_audioClip.channels * (_audioClip.samples - startSampleIndex)); + } + + // Allocate buffer if needed + if (_frameBuffer == null || _frameBuffer.Length != requiredSamples) + { + _frameBuffer = new float[requiredSamples]; + } + + _audioClip.GetData(_frameBuffer, startSampleIndex); + + _committedSamples++; + _lastCommittedSample = (_committedSamples * sampleCommitSize) - 1; + } + else + { + // We've reached the end of the audio clip, so just create empty audio data + requiredSamples = (_audioClip.channels * sampleCommitSize); + // Allocate buffer if needed + if (_frameBuffer == null || _frameBuffer.Length != requiredSamples) + { + _frameBuffer = new float[requiredSamples]; + } + } + result = _frameBuffer; + } + } + return result; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioClip.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioClip.cs.meta new file mode 100644 index 0000000..89e32a3 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioClip.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f97f27e49ff520c458f40bb303e04882 +timeCreated: 1594851659 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioListener.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioListener.cs new file mode 100644 index 0000000..c75e1ab --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioListener.cs @@ -0,0 +1,141 @@ +using UnityEngine; +using System.Collections; +using System.Runtime.InteropServices; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Captures audio from an AudioListener and adds it to a buffer + /// The AVPro Movie Capture plugin pulls the data from this buffer and flushes it periodically + /// Add this component below the main AudioLister to capture all audio, or add it below + /// an AudioSource component to only capture that source + /// + [AddComponentMenu("AVPro Movie Capture/Audio/Capture Audio (From AudioListener)", 500)] + [RequireComponent(typeof(AudioListener))] + public class CaptureAudioFromAudioListener : UnityAudioCapture + { + [SerializeField] bool _debugLogging = false; + [SerializeField] bool _muteAudio = false; + + private const int BufferSize = 16; + private float[] _buffer = new float[0]; + private float[] _readBuffer = new float[0]; + private int _bufferIndex; + private GCHandle _bufferHandle; + private int _numChannels; + + private int _overflowCount; + private object _lockObject = new object(); + + public float[] Buffer { get { return _readBuffer; } } + public int BufferLength { get { return _bufferIndex; } } + public System.IntPtr BufferPtr { get { return _bufferHandle.AddrOfPinnedObject(); } } + + public override int OverflowCount { get { return _overflowCount; } } + public override int SampleRate { get { return AudioSettings.outputSampleRate; } } + public override int ChannelCount { get { return _numChannels; } } + + public override void PrepareCapture() + { + int bufferLength = 0; + int numBuffers = 0; + AudioSettings.GetDSPBufferSize(out bufferLength, out numBuffers); + + _numChannels = GetUnityAudioChannelCount(); + if (_debugLogging) + { + Debug.Log(string.Format("[UnityAudioCapture] SampleRate: {0}hz SpeakerMode: {1} BestDriverMode: {2} (DSP using {3} buffers of {4} bytes using {5} channels)", AudioSettings.outputSampleRate, AudioSettings.speakerMode.ToString(), AudioSettings.driverCapabilities.ToString(), numBuffers, bufferLength, _numChannels)); + } + + _buffer = new float[bufferLength * _numChannels * numBuffers * BufferSize]; + _readBuffer = new float[bufferLength * _numChannels * numBuffers * BufferSize]; + _bufferIndex = 0; + _bufferHandle = GCHandle.Alloc(_readBuffer, GCHandleType.Pinned); + _overflowCount = 0; + } + + public override void StartCapture() + { + FlushBuffer(); + } + + public override void StopCapture() + { + lock (_lockObject) + { + _bufferIndex = 0; + if (_bufferHandle.IsAllocated) + _bufferHandle.Free(); + _readBuffer = _buffer = null; + } + _numChannels = 0; + } + + public override System.IntPtr ReadData(out int length) + { + lock (_lockObject) + { + System.Array.Copy(_buffer, 0, _readBuffer, 0, _bufferIndex); + length = _bufferIndex; + _bufferIndex = 0; + } + return _bufferHandle.AddrOfPinnedObject(); + } + + public override void FlushBuffer() + { + lock (_lockObject) + { + _bufferIndex = 0; + _overflowCount = 0; + } + } + + private void OnAudioFilterRead(float[] data, int channels) + { + if (_buffer != null && _buffer.Length > 0) + { + // TODO: use double buffering + lock (_lockObject) + { + int length = Mathf.Min(data.Length, _buffer.Length - _bufferIndex); + + //System.Array.Copy(data, 0, _buffer, _bufferIndex, length); + + if (!_muteAudio) + { + for (int i = 0; i < length; i++) + { + _buffer[i + _bufferIndex] = data[i]; + } + } + else + { + for (int i = 0; i < length; i++) + { + _buffer[i + _bufferIndex] = data[i]; + data[i] = 0f; + } + } + _bufferIndex += length; + + if (length < data.Length) + { + _overflowCount++; + // Check how many times we've overflowed and disable the warning if more than 10 + if (_overflowCount < 10) + { + Debug.LogWarning("[AVProMovieCapture] Audio buffer has overflowed which may cause sync issues. " + + "Disable this component if not recording Unity audio. " + + ((_overflowCount == 9) ? "Silencing this warning now." : ("(" + _overflowCount + ")."))); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioListener.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioListener.cs.meta new file mode 100644 index 0000000..d041827 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioListener.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 55a2116db61217943919d064d7177709 +timeCreated: 1598021333 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioRenderer.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioRenderer.cs new file mode 100644 index 0000000..b8da4ab --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioRenderer.cs @@ -0,0 +1,128 @@ +#if UNITY_2017_3_OR_NEWER + #define AVPRO_MOVIECAPTURE_OFFLINE_AUDIOCAPTURE +#endif + +#if UNITY_2019_3_OR_NEWER + #define UNITY_NATIVEARRAY_GETSUBARRAY_SUPPORT +#endif + +#if AVPRO_MOVIECAPTURE_OFFLINE_AUDIOCAPTURE +using UnityEngine; +#if UNITY_2018_1_OR_NEWER +using Unity.Collections; +#else +using UnityEngine.Collections; +#endif + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Encodes audio directly from AudioRenderer (https://docs.unity3d.com/ScriptReference/AudioRenderer.html) + /// While capturing, audio playback in Unity becomes muted + /// + [AddComponentMenu("AVPro Movie Capture/Audio/Capture Audio (From AudioRenderer)", 500)] + public class CaptureAudioFromAudioRenderer : UnityAudioCapture + { + [SerializeField] CaptureBase _capture = null; + + private int _unityAudioChannelCount; + private bool _isRendererRecording; + + public CaptureBase Capture { get { return _capture; } set { _capture = value; } } + public override int SampleRate { get { return AudioSettings.outputSampleRate; } } + public override int ChannelCount { get { return _unityAudioChannelCount; } } + + public override void PrepareCapture() + { + _unityAudioChannelCount = GetUnityAudioChannelCount(); + } + +#if UNITY_NATIVEARRAY_GETSUBARRAY_SUPPORT + private NativeArray _audioBuffer; +#endif + + private NativeArray GetAudioBufferOfLength(int length) + { +#if UNITY_NATIVEARRAY_GETSUBARRAY_SUPPORT + if (_audioBuffer.Length < length) + { + Debug.Log("Creating new audio buffer with length: " + length); + if (_audioBuffer.IsCreated) + _audioBuffer.Dispose(); + _audioBuffer = new NativeArray(length, Allocator.Persistent); + } + return _audioBuffer.GetSubArray(0, length); +#else + return new NativeArray(length, Allocator.TempJob); +#endif + } + + private void DisposeAudioBuffer(NativeArray buffer) + { +#if !UNITY_NATIVEARRAY_GETSUBARRAY_SUPPORT + buffer.Dispose(); +#endif + } + + public override void StartCapture() + { + if (_capture == null) + { + Debug.LogWarning("[AVProMovieCapture] CaptureAudioFromAudioRenderer has no Capture source set"); + return; + } + if (!_isRendererRecording) + { +#if UNITY_NATIVEARRAY_GETSUBARRAY_SUPPORT + // Allocate a big buffer for capturing the audio into + _audioBuffer = new NativeArray(65536, Allocator.Persistent); +#endif + AudioRenderer.Start(); + _isRendererRecording = true; + } + FlushBuffer(); + } + + public override void StopCapture() + { + if (_isRendererRecording) + { + _isRendererRecording = false; + AudioRenderer.Stop(); +#if UNITY_NATIVEARRAY_GETSUBARRAY_SUPPORT + _audioBuffer.Dispose(); +#endif + } + } + + public override void FlushBuffer() + { + int sampleFrameCount = AudioRenderer.GetSampleCountForCaptureFrame(); + int sampleCount = sampleFrameCount * _unityAudioChannelCount; + NativeArray buffer = GetAudioBufferOfLength(sampleCount); + AudioRenderer.Render(buffer); + DisposeAudioBuffer(buffer); + } + + void Update() + { + if (_isRendererRecording && _capture != null && _capture.IsCapturing() && !_capture.IsPaused()) + { + int sampleFrameCount = AudioRenderer.GetSampleCountForCaptureFrame(); + int sampleCount = sampleFrameCount * _unityAudioChannelCount; + NativeArray buffer = GetAudioBufferOfLength(sampleCount); + if (AudioRenderer.Render(buffer)) + { + _capture.EncodeAudio(buffer); + } + DisposeAudioBuffer(buffer); + } + } + } +} + +#endif // AVPRO_MOVIECAPTURE_OFFLINE_AUDIOCAPTURE \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioRenderer.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioRenderer.cs.meta new file mode 100644 index 0000000..d88ee7f --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromAudioRenderer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: db575066881ddb84b8e9da497f0059ed +timeCreated: 1598021342 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromWwise.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromWwise.cs new file mode 100644 index 0000000..a390583 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromWwise.cs @@ -0,0 +1,123 @@ +using UnityEngine; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Encodes audio directly from Wwise in offline render mode + /// + [AddComponentMenu("AVPro Movie Capture/Audio/Capture Audio (From Wwise)", 500)] + public class CaptureAudioFromWwise : UnityAudioCapture + { + [SerializeField] CaptureBase _capture = null; + + public CaptureBase Capture { get { return _capture; } set { _capture = value; } } + +#if AVPRO_MOVIECAPTURE_WWISE_SUPPORT + private int _audioChannelCount; + private int _audioSampleRate; + private ulong _outputDeviceId; + private bool _isRendererRecording; + + public override int SampleRate { get { return _audioSampleRate; } } + public override int ChannelCount { get { return _audioChannelCount; } } + + public override void PrepareCapture() + { + if (_capture == null) + { + Debug.LogWarning("[AVProMovieCapture] CaptureAudioFromWwise has no Capture source set"); + return; + } + + var sampleRate = AkSoundEngine.GetSampleRate(); + var channelConfig = new AkChannelConfig(); + var audioSinkCapabilities = new Ak3DAudioSinkCapabilities(); + AkSoundEngine.GetOutputDeviceConfiguration(_outputDeviceId, channelConfig, audioSinkCapabilities); + + _audioSampleRate = (int)sampleRate; + _audioChannelCount = (int)channelConfig.uNumChannels; + _outputDeviceId = AkSoundEngine.GetOutputID(AkSoundEngine.AK_INVALID_UNIQUE_ID, 0); + + #if UNITY_EDITOR + // Ensure that the editor update does not call AkSoundEngine.RenderAudio(). + AkSoundEngineController.Instance.DisableEditorLateUpdate(); + #endif + + AkSoundEngine.StartDeviceCapture(_outputDeviceId); + AkSoundEngine.SetOfflineRenderingFrameTime(1f / _capture.FrameRate); + AkSoundEngine.SetOfflineRendering(true); + } + + public override void StartCapture() + { + if (_capture == null) + { + Debug.LogWarning("[AVProMovieCapture] CaptureAudioFromWwise has no Capture source set"); + return; + } + if (!_isRendererRecording) + { + _isRendererRecording = true; + } + FlushBuffer(); + } + + public override void StopCapture() + { + if (_isRendererRecording) + { + _isRendererRecording = false; + AkSoundEngine.StopDeviceCapture(_outputDeviceId); + + #if UNITY_EDITOR + // Bring back editor update calls to AkSoundEngine.RenderAudio(). + AkSoundEngineController.Instance.EnableEditorLateUpdate(); + #endif + + AkSoundEngine.SetOfflineRenderingFrameTime(0f); + AkSoundEngine.SetOfflineRendering(false); + } + } + + public override void FlushBuffer() + { + AkSoundEngine.ClearCaptureData(); + } + + void Update() + { + if (_isRendererRecording && _capture != null && _capture.IsCapturing() && !_capture.IsPaused()) + { + var sampleCount = AkSoundEngine.UpdateCaptureSampleCount(_outputDeviceId); + if (sampleCount <= 0) + { + return; + } + + var buffer = new float[sampleCount]; + var count = AkSoundEngine.GetCaptureSamples(_outputDeviceId, buffer, (uint)buffer.Length); + if (count <= 0) + { + return; + } + _capture.EncodeAudio(buffer); + } + } +#else + void Awake() + { + Debug.LogError("[AVProMovieCapture] CaptureAudioFromWise component requires AVPRO_MOVIECAPTURE_WWISE_SUPPORT to be added to Script Define Symbols"); + } + public override int SampleRate { get { return 0; } } + public override int ChannelCount { get { return 0; } } + public override void PrepareCapture() {} + public override void FlushBuffer() {} + public override void StartCapture() {} + public override void StopCapture() {} +#endif // AVPRO_MOVIECAPTURE_WWISE_SUPPORT + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromWwise.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromWwise.cs.meta new file mode 100644 index 0000000..e400df8 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureAudioFromWwise.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d2fedbcffc4ef29449c2f26f57b5e27b +timeCreated: 1598021342 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera.cs new file mode 100644 index 0000000..d179e5d --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera.cs @@ -0,0 +1,613 @@ +#if UNITY_EDITOR && !UNITY_2018_3_OR_NEWER + #define SUPPORT_SCENE_VIEW_GIZMOS_CAPTURE +#endif +using UnityEngine; +using System.Collections; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Capture from a specific Unity camera. This component re-renders the camera manually, so it does add extra draw calls. + /// + //[RequireComponent(typeof(Camera))] + [AddComponentMenu("AVPro Movie Capture/Capture From Camera", 1)] + public class CaptureFromCamera : CaptureBase + { + [SerializeField] CameraSelector _cameraSelector = null; + [SerializeField] Camera _lastCamera = null; + [SerializeField] Camera[] _contribCameras = null; + [SerializeField] bool _useContributingCameras = true; +#if SUPPORT_SCENE_VIEW_GIZMOS_CAPTURE + [Tooltip("When capturing from the Scene View camera, whether to include rendering of Gizmos or not. If Gizmos are included then resolution and AA options cannot be overridde and will use the current Scene View window settings")] + [SerializeField] bool _includeSceneViewGizmos = true; +#endif + + private bool _supportTransparency; + private RenderTexture _target; + private RenderTexture _resolveTexture; + private System.IntPtr _targetNativePointer = System.IntPtr.Zero; + private Texture _targetNativeTexture; + private Texture _previewTexture; + + public CameraSelector CameraSelector + { + get { return _cameraSelector; } + set { _cameraSelector = value; } + } + + public bool UseContributingCameras + { + get { return _useContributingCameras; } + set { _useContributingCameras = value; } + } + + public void SetCamera(Camera topCamera, bool useContributingCameras = true) + { + _lastCamera = topCamera; + _contribCameras = null; + _useContributingCameras = useContributingCameras; + + if (_useContributingCameras && _lastCamera != null) + { + if (Utils.HasContributingCameras(_lastCamera)) + { + _contribCameras = Utils.FindContributingCameras(topCamera); + } + } + } + + public void SetCamera(Camera topCamera, Camera[] contributingCameras) + { + _lastCamera = topCamera; + _contribCameras = contributingCameras; + } + + private bool RequiresResolve(Texture texture) + { +#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX || (UNITY_IOS && !UNITY_EDITOR) + // Texture resolve wholly unnecessary on macOS and iOS + return false; +#else + bool result = false; + + if (texture is RenderTexture) + { + RenderTexture rt = texture as RenderTexture; + + // Linear textures require resolving to sRGB + result = !rt.sRGB; + + if (!result && + (rt.format != RenderTextureFormat.ARGB32) && + (rt.format != RenderTextureFormat.Default) && + (rt.format != RenderTextureFormat.BGRA32) + ) + { + // Exotic texture formats require resolving + result = true; + } + } + else + { + // Any other texture type needs to be resolve to RenderTexture + result = true; + } + + return result; +#endif + } + + private bool HasCamera() + { + return (_lastCamera != null); + } + + private bool HasContributingCameras() + { + return (_useContributingCameras && _contribCameras != null && _contribCameras.Length > 0); + } + + public override void UpdateFrame() + { + // Detect changes from camera selector + if (_cameraSelector != null) + { + if (_lastCamera != _cameraSelector.Camera) + { + SetCamera(_cameraSelector.Camera, _useContributingCameras); + } + } + + if (_useWaitForEndOfFrame) + { + if (_capturing && !_paused && HasCamera()) + { + StartCoroutine(FinalRenderCapture()); + } + + base.UpdateFrame(); + } + else + { + base.UpdateFrame(); + Capture(); + } + } + +#if EXPERIMENTAL_FRAME_PAUSE + private bool _stillBusy = false; + + private IEnumerator FinalRenderCapture() + { + if (_stillBusy) + { + yield return null; + } + else + { + _stillBusy = true; + + Time.timeScale = 0.0f; + yield return new WaitUntil(CanContinue); + Time.timeScale = 1.0f; + + yield return _waitForEndOfFrame; + yield return Capture(); + + _stillBusy = false; + } + } +#else + private IEnumerator FinalRenderCapture() + { + yield return _waitForEndOfFrame; + yield return Capture(); + } +#endif + + // If we're forcing a resolution or AA change then we have to render the camera again to the new target + // If we try to just set the targetTexture of the camera and grab it in OnRenderImage we can't render it to the screen as before :( + public IEnumerator Capture() + { + TickFrameTimer(); + + if (_capturing && !_paused && HasCamera()) + { + bool canGrab = true; + + if (IsUsingMotionBlur()) + { + // If the motion blur is still accumulating, don't grab this frame + canGrab = _motionBlur.IsFrameAccumulated; + } + + if (canGrab) + { + /*while (_handle >= 0 && !AVProMovieCapturePlugin.IsNewFrameDue(_handle)) + { + System.Threading.Thread.Sleep(1); + }*/ + if (_handle >= 0 && CanOutputFrame()) + { + RenderTexture sourceTexture = _target; + + // In 2018.3 and above a different method is used to render the gizmos etc, so we don't yet support capturing these +#if SUPPORT_SCENE_VIEW_GIZMOS_CAPTURE + // Support capturing the Scene View target texture directly so that we get all gizmo rendering + if (_lastCamera != null && _includeSceneViewGizmos && (_lastCamera.hideFlags & HideFlags.NotEditable) != 0 && _lastCamera.targetTexture != null) + { + sourceTexture = _lastCamera.targetTexture; + } +#endif + if (sourceTexture == _target) + { + // Render the camera(s) + if (!IsUsingMotionBlur()) + { + UpdateTexture(); + } + else + { + // Just grab the last result of the motion blur + _target.DiscardContents(); + Graphics.Blit(_motionBlur.FinalTexture, _target); + } + } + + // If the texture isn't suitable then blit it to the Rendertexture so the native plugin can grab it + if (RequiresResolve(sourceTexture)) + { + CreateResolveTexture(sourceTexture.width, sourceTexture.height); + _resolveTexture.DiscardContents(); + + // Between Unity 2018.1.0 and 2018.3.0 Unity doesn't seem to set the correct sRGBWrite state and keeps it as false + #if (UNITY_2018_1_OR_NEWER && !UNITY_2018_3_OR_NEWER) + bool sRGBWritePrev = GL.sRGBWrite; + GL.sRGBWrite = true; + #endif + + Graphics.Blit(sourceTexture, _resolveTexture); + sourceTexture = _resolveTexture; + + #if (UNITY_2018_1_OR_NEWER && !UNITY_2018_3_OR_NEWER) + GL.sRGBWrite = sRGBWritePrev; + #endif + } + + if (_supportTextureRecreate || _targetNativeTexture != sourceTexture) + { + // NOTE: If support for captures to survive through alt-tab events, or window resizes where the GPU resources are recreated + // is required, then this line is needed. It is very expensive though as it does a sync with the rendering thread. + _targetNativePointer = sourceTexture.GetNativeTexturePtr(); + _targetNativeTexture = sourceTexture; + } + + _previewTexture = sourceTexture; + + NativePlugin.SetTexturePointer(_handle, _targetNativePointer); + + RenderThreadEvent(NativePlugin.PluginEvent.CaptureFrameBuffer); + EncodeUnityAudio(); + + UpdateFPS(); + } + } + } + base.UpdateFrame(); + + RenormTimer(); + + yield break; + } + + private bool RequiresHDR() + { + // Check if any of the cameras in the chain are set to allow HDR + bool result = _lastCamera.allowHDR; + + if (!result && HasContributingCameras()) + { + for (int cameraIndex = 0; cameraIndex < _contribCameras.Length; cameraIndex++) + { + Camera camera = _contribCameras[cameraIndex]; + if (camera != null && camera.isActiveAndEnabled) + { + result = camera.allowHDR; + if (result) + { + break; + } + } + } + } + return result; + } + + private void UpdateTexture() + { + // Between Unity 2018.1.0 and 2018.3.0 Unity doesn't seem to set the correct sRGBWrite state and keeps it as false + #if (UNITY_2018_1_OR_NEWER && !UNITY_2018_3_OR_NEWER) + bool sRGBWritePrev = GL.sRGBWrite; + GL.sRGBWrite = _target.sRGB; + #endif + + // Render a single camera + if (!HasContributingCameras()) + { + RenderTexture prev = _lastCamera.targetTexture; + // Reset the viewport rect as we're rendering to a texture captures the full viewport + Rect prevRect = _lastCamera.rect; + CameraClearFlags prevClear = _lastCamera.clearFlags; + Color prevColor = _lastCamera.backgroundColor; + bool clearChanged = false; + if (_lastCamera.clearFlags == CameraClearFlags.Nothing || _lastCamera.clearFlags == CameraClearFlags.Depth) + { + clearChanged = true; + _lastCamera.clearFlags = CameraClearFlags.SolidColor; + if (!_supportTransparency) + { + _lastCamera.backgroundColor = Color.black; + } + else + { + _lastCamera.backgroundColor = new Color(0f, 0f, 0f, 0f); + } + } + + // Render + _lastCamera.rect = new Rect(0f, 0f, 1f, 1f); + _lastCamera.targetTexture = _target; + _lastCamera.Render(); + + // Restore camera + { + _lastCamera.rect = prevRect; + if (clearChanged) + { + _lastCamera.clearFlags = prevClear; + _lastCamera.backgroundColor = prevColor; + } + _lastCamera.targetTexture = prev; + } + } + // Render the camera chain + else + { + // First render contributing cameras + for (int cameraIndex = 0; cameraIndex < _contribCameras.Length; cameraIndex++) + { + Camera camera = _contribCameras[cameraIndex]; + if (camera != null && camera.isActiveAndEnabled) + { + RenderTexture prev = camera.targetTexture; + camera.targetTexture = _target; + camera.Render(); + camera.targetTexture = prev; + } + } + // Finally render the last camera + if (_lastCamera != null) + { + RenderTexture prev = _lastCamera.targetTexture; + _lastCamera.targetTexture = _target; + _lastCamera.Render(); + _lastCamera.targetTexture = prev; + } + } + + //UnityEditor.Selection.activeObject = _lastCamera.targetTexture; + + #if (UNITY_2018_1_OR_NEWER && !UNITY_2018_3_OR_NEWER) + GL.sRGBWrite = sRGBWritePrev; + #endif + } + + #if false + // NOTE: This is old code based on OnRenderImage...may be revived at some point + private void OnRenderImage(RenderTexture source, RenderTexture dest) + { + if (_capturing && !_paused) + { + while (_handle >= 0 && !NativePlugin.IsNewFrameDue(_handle)) + { + System.Threading.Thread.Sleep(1); + } + if (_handle >= 0) + { + if (_audioCapture && _audioDeviceIndex < 0 && !_noAudio && _isRealTime) + { + int audioDataLength = 0; + System.IntPtr audioDataPtr = _audioCapture.ReadData(out audioDataLength); + if (audioDataLength > 0) + { + NativePlugin.EncodeAudio(_handle, audioDataPtr, (uint)audioDataLength); + } + } + + // In Direct3D the RT can be flipped vertically + /*if (source.texelSize.y < 0) + { + + }*/ + + Graphics.Blit(source, dest); + + _lastSource = source; + _lastDest = dest; + + if (dest != _originalTarget) + { + Graphics.Blit(dest, _originalTarget); + } + + #if AVPRO_MOVIECAPTURE_GLISSUEEVENT_52 + GL.IssuePluginEvent(NativePlugin.GetRenderEventFunc(), NativePlugin.PluginID | (int)NativePlugin.PluginEvent.CaptureFrameBuffer | _handle); + #else + GL.IssuePluginEvent(NativePlugin.PluginID | (int)NativePlugin.PluginEvent.CaptureFrameBuffer | _handle); + #endif + GL.InvalidateState(); + + UpdateFPS(); + + return; + } + } + + // Pass-through + Graphics.Blit(source, dest); + + _lastSource = source; + _lastDest = dest; + } + #endif + + public override void UnprepareCapture() + { + NativePlugin.SetTexturePointer(_handle, System.IntPtr.Zero); + + if (_target != null) + { + _target.DiscardContents(); + } + + _targetNativePointer = System.IntPtr.Zero; + _targetNativeTexture = null; + _previewTexture = null; + + base.UnprepareCapture(); + } + + private void CreateResolveTexture(int width, int height) + { + if (_resolveTexture != null) + { + if (_resolveTexture.width != width || + _resolveTexture.height != height) + { + RenderTexture.ReleaseTemporary(_resolveTexture); + _resolveTexture = null; + } + } + if (_resolveTexture == null) + { + _resolveTexture = RenderTexture.GetTemporary(width, height, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB); + _resolveTexture.Create(); + } + + if (_resolveTexture != null) + { + _targetNativePointer = _resolveTexture.GetNativeTexturePtr(); + _targetNativeTexture = _resolveTexture; + } + } + + public override Texture GetPreviewTexture() + { + return _previewTexture; + } + + public override bool PrepareCapture() + { + if (_capturing) + { + return false; + } +#if UNITY_EDITOR_WIN || (!UNITY_EDITOR && UNITY_STANDALONE_WIN) + if (SystemInfo.graphicsDeviceVersion.StartsWith("Direct3D 9")) + { + Debug.LogError("[AVProMovieCapture] Direct3D9 not yet supported, please use Direct3D11 instead."); + return false; + } + else if (SystemInfo.graphicsDeviceVersion.StartsWith("OpenGL") && !SystemInfo.graphicsDeviceVersion.Contains("emulated")) + { + Debug.LogError("[AVProMovieCapture] OpenGL not yet supported for CaptureFromCamera component, please use Direct3D11 instead. You may need to switch your build platform to Windows."); + return false; + } +#endif + // Setup material + _pixelFormat = NativePlugin.PixelFormat.RGBA32; + _isTopDown = true; + + _supportTransparency = ((_outputTarget == OutputTarget.VideoFile || _outputTarget == OutputTarget.NamedPipe) && GetEncoderHints().videoHints.supportTransparency) || + (_outputTarget == OutputTarget.ImageSequence && GetEncoderHints().imageHints.supportTransparency); + + if (!HasCamera()) + { + if (_cameraSelector != null) + { + if (_lastCamera != _cameraSelector.Camera) + { + SetCamera(_cameraSelector.Camera, _useContributingCameras); + } + } + + if (!HasCamera()) + { + SetCamera(this.GetComponent(), _useContributingCameras); + } + if (!HasCamera()) + { + SetCamera(Camera.main, _useContributingCameras); + } + if (!HasCamera()) + { + Debug.LogError("[AVProMovieCapture] No camera assigned to CaptureFromCamera"); + return false; + } + } + + if (!HasContributingCameras() && (_lastCamera.clearFlags == CameraClearFlags.Depth || _lastCamera.clearFlags == CameraClearFlags.Nothing)) + { + Debug.LogWarning("[AVProMovieCapture] This camera doesn't clear, consider setting contributing cameras"); + } + + int width = Mathf.FloorToInt(_lastCamera.pixelRect.width); + int height = Mathf.FloorToInt(_lastCamera.pixelRect.height); + + // Setup rendering a different render target if we're overriding resolution or anti-aliasing + { + if (_renderResolution == Resolution.Custom) + { + width = (int)_renderSize.x; + height = (int)_renderSize.y; + } + else if (_renderResolution != Resolution.Original) + { + GetResolution(_renderResolution, ref width, ref height); + } + + int aaLevel = GetCameraAntiAliasingLevel(_lastCamera); + + // Create the render target + if (_target != null) + { + _target.DiscardContents(); + if (_target.width != width || _target.height != height || _target.antiAliasing != aaLevel) + { + _targetNativePointer = System.IntPtr.Zero; + _targetNativeTexture = null; + RenderTexture.ReleaseTemporary(_target); + _target = null; + } + } + + if (_target == null) + { + RenderTextureFormat textureFormat = Utils.GetBestRenderTextureFormat(RequiresHDR(), _supportTransparency, IsRealTime); + _target = RenderTexture.GetTemporary(width, height, 24, textureFormat, RenderTextureReadWrite.Default, aaLevel); + _target.name = "[AVProMovieCapture] Camera Target"; + _target.Create(); + } + + if (_target != null) + { + _targetNativePointer = _target.GetNativeTexturePtr(); + _targetNativeTexture = _target; + } + + // Adjust size for camera rectangle + /*if (camera.rect.width < 1f || camera.rect.height < 1f) + { + float rectWidth = Mathf.Clamp01(camera.rect.width + camera.rect.x) - Mathf.Clamp01(camera.rect.x); + float rectHeight = Mathf.Clamp01(camera.rect.height + camera.rect.y) - Mathf.Clamp01(camera.rect.y); + width = Mathf.FloorToInt(width * rectWidth); + height = Mathf.FloorToInt(height * rectHeight); + }*/ + + if (_useMotionBlur) + { + _motionBlurCameras = new Camera[1]; + _motionBlurCameras[0] = _lastCamera; + } + } + + SelectRecordingResolution(width, height); + + GenerateFilename(); + + return base.PrepareCapture(); + } + + public override void OnDestroy() + { + if (_resolveTexture != null) + { + RenderTexture.ReleaseTemporary(_resolveTexture); + _resolveTexture = null; + } + + if (_target != null) + { + _targetNativePointer = System.IntPtr.Zero; + RenderTexture.ReleaseTemporary(_target); + _target = null; + } + + base.OnDestroy(); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera.cs.meta new file mode 100644 index 0000000..514cf9f --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f41e58c74463edf43a9624fcdf483d19 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - _shaderSwapRedBlue: {fileID: 4800000, guid: f8dc701632c759e4a8f2ee16201149cd, + type: 3} + - _shaderRGBA2YCbCr: {fileID: 4800000, guid: d21befa361dcbc6489decfa310898604, type: 3} + executionOrder: 29000 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera360.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera360.cs new file mode 100644 index 0000000..84e41e9 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera360.cs @@ -0,0 +1,833 @@ +#if UNITY_5_6_0 || UNITY_5_6_1 + #define AVPRO_MOVIECAPTURE_UNITYBUG_RENDERTOCUBEMAP_56 +#endif +#if UNITY_2018_1_OR_NEWER + // Unity 2018.1 introduces stereo cubemap render methods, but with no camera rotation + #define AVPRO_MOVIECAPTURE_UNITY_STEREOCUBEMAP_RENDER + #if UNITY_2018_2_OR_NEWER || UNITY_2018_1_9 + // Unity 2018.2 adds camera rotation + #define AVPRO_MOVIECAPTURE_UNITY_STEREOCUBEMAP_RENDER_WITHROTATION + #endif +#endif +using UnityEngine; +using UnityEngine.Rendering; +using System.Collections; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Capture a camera view in 360 equi-rectangular format. + /// The camera is rendered into a cubemap, so the scene is rendered an extra 6 times. + /// Finally the cubemap is converted to equi-rectangular format and encoded. + /// + //[RequireComponent(typeof(Camera))] + [AddComponentMenu("AVPro Movie Capture/Capture From Camera 360 (VR)", 100)] + public class CaptureFromCamera360 : CaptureBase + { + [SerializeField] CameraSelector _cameraSelector = null; + + public CameraSelector CameraSelector + { + get { return _cameraSelector; } + set { _cameraSelector = value; } + } + + [SerializeField] CubemapResolution _cubemapResolution = CubemapResolution.POW2_2048; + [SerializeField] CubemapDepth _cubemapDepth = CubemapDepth.Depth_24; + + public CubemapResolution CubemapFaceResolution + { + get { return _cubemapResolution; } + set { _cubemapResolution = value; } + } + public CubemapDepth CubemapDepthResolution + { + get { return _cubemapDepth; } + set { _cubemapDepth = value; } + } + + [SerializeField] bool _supportGUI = false; + [SerializeField] bool _supportCameraRotation = false; + [SerializeField] bool _onlyLeftRightRotation = false; + + public bool SupportGUI + { + get { return _supportGUI; } + set { _supportGUI = value; } + } + public bool SupportCameraRotation + { + get { return _supportCameraRotation; } + set { _supportCameraRotation = value; } + } + public bool OnlyLeftRightRotation + { + get { return _onlyLeftRightRotation; } + set { _onlyLeftRightRotation = value; } + } + + [Tooltip("Render 180 degree equirectangular instead of 360 degrees")] + [SerializeField] bool _render180Degrees = false; + [SerializeField] StereoPacking _stereoRendering = StereoPacking.None; + + public bool Render180Degrees + { + get { return _render180Degrees; } + set { _render180Degrees = value; } + } + + public StereoPacking StereoRendering + { + get { return _stereoRendering; } + set { _stereoRendering = value; } + } + + [Tooltip("Makes assumption that 1 Unity unit is 1m")] + [SerializeField] float _ipd = 0.064f; + + public float IPD + { + get { return _ipd; } + set { _ipd = value; } + } + + [SerializeField] Camera _camera = null; + + // State + private RenderTexture _faceTarget; + private Material _blitMaterial; + private Material _cubemapToEquirectangularMaterial; + private RenderTexture _cubeTarget; + private RenderTexture _finalTarget; + private System.IntPtr _targetNativePointer = System.IntPtr.Zero; + private int _propFlipX; + #if SUPPORT_SHADER_ROTATION + private int _propRotation; + #endif + + private enum CubemapRenderMethod + { + Manual, // Manually render the cubemaps - supports world space GUI, camera rotation, but is slow and doesn't give correct stereo + Unity, // No stereo, no world space GUI, no camera rotation + Unity2018, // Good fast stereo, no world space GUI, camera rotation only in 2018.2 and above + } + + public CaptureFromCamera360() + { + // Override the default values to match more common use cases for this capture component + _renderResolution = Resolution.POW2_2048x2048; + } + + private CubemapRenderMethod GetCubemapRenderingMethod() + { + if (_supportGUI) + { + return CubemapRenderMethod.Manual; + } + if (_supportCameraRotation) + { +#if AVPRO_MOVIECAPTURE_UNITY_STEREOCUBEMAP_RENDER_WITHROTATION + return CubemapRenderMethod.Unity2018; +#else + return CubemapRenderMethod.Manual; +#endif + } + if (_stereoRendering == StereoPacking.None) + { +#if AVPRO_MOVIECAPTURE_UNITY_STEREOCUBEMAP_RENDER_WITHROTATION + return CubemapRenderMethod.Unity2018; +#else + return CubemapRenderMethod.Unity; +#endif + } + else + { +#if AVPRO_MOVIECAPTURE_UNITY_STEREOCUBEMAP_RENDER + return CubemapRenderMethod.Unity2018; +#else + return CubemapRenderMethod.Manual; +#endif + } + } + + public void SetCamera(Camera camera) + { + _camera = camera; + } + +#if false + private void OnRenderImage(RenderTexture source, RenderTexture dest) + { +#if false + if (_capturing && !_paused) + { + while (_handle >= 0 && !NativePlugin.IsNewFrameDue(_handle)) + { + System.Threading.Thread.Sleep(1); + } + if (_handle >= 0) + { + if (_audioCapture && _audioDeviceIndex < 0 && !_noAudio) + { + uint bufferLength = (uint)_audioCapture.BufferLength; + if (bufferLength > 0) + { + NativePlugin.EncodeAudio(_handle, _audioCapture.BufferPtr, bufferLength); + _audioCapture.FlushBuffer(); + } + } + + // In Direct3D the RT can be flipped vertically + /*if (source.texelSize.y < 0) + { + + }*/ + + Graphics.Blit(_cubeTarget, _target, _cubemapToEquirectangularMaterial); + + RenderThreadEvent(NativePlugin.PluginEvent.CaptureFrameBuffer); + GL.InvalidateState(); + + UpdateFPS(); + } + } +#endif + // Pass-through + + if (_cubeTarget != null) + { + Graphics.Blit(_cubeTarget, dest, _cubemapToEquirectangularMaterial); + } + else + { + Graphics.Blit(source, dest); + } + } +#endif + + public override void UpdateFrame() + { + if (_cameraSelector != null) + { + if (_camera != _cameraSelector.Camera) + { + SetCamera(_cameraSelector.Camera); + } + } + + if (_useWaitForEndOfFrame) + { + if (_capturing && !_paused) + { + StartCoroutine(FinalRenderCapture()); + } + } + else + { + Capture(); + } + base.UpdateFrame(); + } + + private IEnumerator FinalRenderCapture() + { + yield return _waitForEndOfFrame; + + Capture(); + } + + private void Capture() + { + TickFrameTimer(); + + AccumulateMotionBlur(); + + if (_capturing && !_paused) + { + if (_cubeTarget != null && _camera != null) + { + bool canGrab = true; + + if (IsUsingMotionBlur()) + { + // TODO: fix motion blur + //this._motionBlur.RenderImage() + // If the motion blur is still accumulating, don't grab this frame + canGrab = _motionBlur.IsFrameAccumulated; + } + + if (canGrab && CanOutputFrame()) + { + EncodeUnityAudio(); + + RenderTexture finalTexture = _finalTarget; + if (!IsUsingMotionBlur()) + { + UpdateTexture(); + } + else + { + finalTexture = _motionBlur.FinalTexture; + } + + if (_targetNativePointer == System.IntPtr.Zero || _supportTextureRecreate) + { + // NOTE: If support for captures to survive through alt-tab events, or window resizes where the GPU resources are recreated + // is required, then this line is needed. It is very expensive though as it does a sync with the rendering thread. + _targetNativePointer = finalTexture.GetNativeTexturePtr(); + } + + NativePlugin.SetTexturePointer(_handle, _targetNativePointer); + + RenderThreadEvent(NativePlugin.PluginEvent.CaptureFrameBuffer); + + // ADG NOTE: Causes screen flickering under D3D12, even if we're not doing any rendering at native level + // And also seems to cause GL.sRGBWrite to be set to false, which causes screen darkening in Linear mode + if (SystemInfo.graphicsDeviceType != GraphicsDeviceType.Direct3D12) + { + GL.InvalidateState(); + } + + UpdateFPS(); + } + } + } + + RenormTimer(); + } + + private static void ClearCubemap(RenderTexture texture, Color color) + { + // TODO: Find a better way to do this? + bool clearDepth = (texture.depth != 0); + Graphics.SetRenderTarget(texture, 0, CubemapFace.PositiveX); + GL.Clear(true, clearDepth, color); + Graphics.SetRenderTarget(texture, 0, CubemapFace.PositiveY); + GL.Clear(true, clearDepth, color); + Graphics.SetRenderTarget(texture, 0, CubemapFace.PositiveZ); + GL.Clear(true, clearDepth, color); + Graphics.SetRenderTarget(texture, 0, CubemapFace.NegativeX); + GL.Clear(true, clearDepth, color); + Graphics.SetRenderTarget(texture, 0, CubemapFace.NegativeY); + GL.Clear(true, clearDepth, color); + Graphics.SetRenderTarget(texture, 0, CubemapFace.NegativeZ); + GL.Clear(true, clearDepth, color); + Graphics.SetRenderTarget(null); + } + + private void RenderCubemapToEquiRect(RenderTexture cubemap, RenderTexture target, bool supportRotation, Quaternion rotation, bool isEyeLeft) + { + #if SUPPORT_SHADER_ROTATION + if (supportRotation) + { + // Note: Because Unity's Camera.RenderCubemap() doesn't support rotated cameras, we apply the rotation matrix in the cubemap lookup + _cubemapToEquirectangularMaterial.EnableKeyword("USE_ROTATION"); + Matrix4x4 rotationMatrix = Matrix4x4.TRS(Vector3.zero, rotation, Vector3.one); + _cubemapToEquirectangularMaterial.SetMatrix(_propRotation, rotationMatrix); + } + else + { + _cubemapToEquirectangularMaterial.DisableKeyword("USE_ROTATION"); + } + #endif + + if (_stereoRendering == StereoPacking.TopBottom) + { + if (isEyeLeft) + { + // Render to top + _cubemapToEquirectangularMaterial.DisableKeyword("STEREOPACK_BOTTOM"); + _cubemapToEquirectangularMaterial.EnableKeyword("STEREOPACK_TOP"); + } + else + { + // Render to bottom + _cubemapToEquirectangularMaterial.DisableKeyword("STEREOPACK_TOP"); + _cubemapToEquirectangularMaterial.EnableKeyword("STEREOPACK_BOTTOM"); + } + } + else if (_stereoRendering == StereoPacking.LeftRight) + { + if (isEyeLeft) + { + // Render to left + _cubemapToEquirectangularMaterial.DisableKeyword("STEREOPACK_RIGHT"); + _cubemapToEquirectangularMaterial.EnableKeyword("STEREOPACK_LEFT"); + } + else + { + // Render to right + _cubemapToEquirectangularMaterial.DisableKeyword("STEREOPACK_LEFT"); + _cubemapToEquirectangularMaterial.EnableKeyword("STEREOPACK_RIGHT"); + } + } + + // Between Unity 2018.1.0 and 2018.3.0 Unity doesn't seem to set the correct sRGBWrite state and keeps it as false + #if (UNITY_2018_1_OR_NEWER && !UNITY_2018_3_OR_NEWER) + bool sRGBWritePrev = GL.sRGBWrite; + GL.sRGBWrite = target.sRGB; + #endif + + Graphics.Blit(cubemap, target, _cubemapToEquirectangularMaterial); + + #if (UNITY_2018_1_OR_NEWER && !UNITY_2018_3_OR_NEWER) + GL.sRGBWrite = sRGBWritePrev; + #endif + } + + private void UpdateTexture() + { + // Between Unity 2018.1.0 and 2018.3.0 Unity doesn't seem to set the correct sRGBWrite state and keeps it as false + #if (UNITY_2018_1_OR_NEWER && !UNITY_2018_3_OR_NEWER) + bool sRGBWritePrev = GL.sRGBWrite; + GL.sRGBWrite = _cubeTarget.sRGB; + #endif + + // In Direct3D the RT can be flipped vertically + /*if (source.texelSize.y < 0) + { + + }*/ + + //_cubeCamera.transform.position = _camera.transform.position; + //_cubeCamera.transform.rotation = _camera.transform.rotation; + + Camera camera = _camera; + + Rect prevRect = camera.rect; + camera.rect = new Rect(0f, 0f, 1f, 1f); // NOTE: the Scene View camera will change it's rect when being interacted with, so we need to make sure it's overridden + + CubemapRenderMethod cubemapRenderMethod = GetCubemapRenderingMethod(); + + if (_stereoRendering == StereoPacking.None) + { + if (cubemapRenderMethod == CubemapRenderMethod.Unity) + { + #if AVPRO_MOVIECAPTURE_UNITYBUG_RENDERTOCUBEMAP_56 + RenderTexture prev = camera.targetTexture; + #endif + + // Note: Camera.RenderToCubemap() doesn't support camera rotation + camera.RenderToCubemap(_cubeTarget, 63); + + #if AVPRO_MOVIECAPTURE_UNITYBUG_RENDERTOCUBEMAP_56 + // NOTE: We need this to clean up the state in at least Unity 5.6.0 - 5.6.1p1 + camera.targetTexture = prev; + #endif + } + #if AVPRO_MOVIECAPTURE_UNITY_STEREOCUBEMAP_RENDER + else if (cubemapRenderMethod == CubemapRenderMethod.Unity2018) + { + // Note: If we use Mono instead of Left then rotation isn't supported + if (this.transform.rotation == Quaternion.identity) + { + camera.RenderToCubemap(_cubeTarget, 63, Camera.MonoOrStereoscopicEye.Mono); + } + else + { + camera.stereoSeparation = 0f; + camera.RenderToCubemap(_cubeTarget, 63, Camera.MonoOrStereoscopicEye.Left); + } + } + #endif + else if (cubemapRenderMethod == CubemapRenderMethod.Manual) + { + RenderCameraToCubemap(camera, _cubeTarget); + } + RenderCubemapToEquiRect(_cubeTarget, _finalTarget, false, Quaternion.identity, true); + } + else + { + #if AVPRO_MOVIECAPTURE_UNITY_STEREOCUBEMAP_RENDER + if (cubemapRenderMethod == CubemapRenderMethod.Unity2018) + { + //Left eye + camera.stereoSeparation = _ipd; + camera.RenderToCubemap(_cubeTarget, 63, Camera.MonoOrStereoscopicEye.Left); + RenderCubemapToEquiRect(_cubeTarget, _finalTarget, false, camera.transform.rotation, true); + + // Right eye + _cubeTarget.DiscardContents(); + camera.RenderToCubemap(_cubeTarget, 63, Camera.MonoOrStereoscopicEye.Right); + RenderCubemapToEquiRect(_cubeTarget, _finalTarget, false, camera.transform.rotation, false); + } else + #endif + if (cubemapRenderMethod == CubemapRenderMethod.Manual) + { + // Save camera state + Vector3 cameraPosition = camera.transform.localPosition; + + // Left eye + camera.transform.Translate(new Vector3(-_ipd / 2f, 0f, 0f), Space.Self); + RenderCameraToCubemap(camera, _cubeTarget); + RenderCubemapToEquiRect(_cubeTarget, _finalTarget, false, Quaternion.identity, true); + + // Right eye + camera.transform.localPosition = cameraPosition; + camera.transform.Translate(new Vector3(_ipd / 2f, 0f, 0f), Space.Self); + RenderCameraToCubemap(camera, _cubeTarget); + RenderCubemapToEquiRect(_cubeTarget, _finalTarget, false, Quaternion.identity, false); + + // Restore camera state + camera.transform.localPosition = cameraPosition; + } + } + + camera.rect = prevRect; + + #if (UNITY_2018_1_OR_NEWER && !UNITY_2018_3_OR_NEWER) + GL.sRGBWrite = sRGBWritePrev; + #endif + } + + private void RenderCameraToCubemap(Camera camera, RenderTexture cubemapTarget) + { + RenderTexture prevRT = RenderTexture.active; + + // Cache old camera values + float prevFieldOfView = camera.fieldOfView; + RenderTexture prevtarget = camera.targetTexture; + Quaternion prevRotation = camera.transform.rotation; + + // Ignore the camera rotation + Quaternion xform = camera.transform.rotation; + if (!_supportCameraRotation) + { + xform = Quaternion.identity; + } + else if (_onlyLeftRightRotation) + { + xform = Quaternion.Euler(0f, camera.transform.eulerAngles.y, 0f); + } + // NOTE: There is a bug in Unity 2017.1.0f3 to at least 2017.2beta7 which causes deferred rendering mode to always clear the cubemap target to white + + camera.targetTexture = _faceTarget; + camera.fieldOfView = 90f; + + // Front + camera.transform.rotation = xform * Quaternion.LookRotation(Vector3.forward, Vector3.down); + _faceTarget.DiscardContents(); + camera.Render(); + Graphics.SetRenderTarget(cubemapTarget, 0, CubemapFace.PositiveZ); + Graphics.Blit(_faceTarget, _blitMaterial); + + // Back + camera.transform.rotation = xform * Quaternion.LookRotation(Vector3.back, Vector3.down); + _faceTarget.DiscardContents(); + camera.Render(); + Graphics.SetRenderTarget(cubemapTarget, 0, CubemapFace.NegativeZ); + Graphics.Blit(_faceTarget, _blitMaterial); + + // Right + camera.transform.rotation = xform * Quaternion.LookRotation(Vector3.right, Vector3.down); + _faceTarget.DiscardContents(); + camera.Render(); + Graphics.SetRenderTarget(cubemapTarget, 0, CubemapFace.NegativeX); + Graphics.Blit(_faceTarget, _blitMaterial); + + // Left + camera.transform.rotation = xform * Quaternion.LookRotation(Vector3.left, Vector3.down); + _faceTarget.DiscardContents(); + camera.Render(); + Graphics.SetRenderTarget(cubemapTarget, 0, CubemapFace.PositiveX); + Graphics.Blit(_faceTarget, _blitMaterial); + + // Up + camera.transform.rotation = xform * Quaternion.LookRotation(Vector3.up, Vector3.forward); + _faceTarget.DiscardContents(); + camera.Render(); + Graphics.SetRenderTarget(cubemapTarget, 0, CubemapFace.PositiveY); + Graphics.Blit(_faceTarget, _blitMaterial); + + // Down + camera.transform.rotation = xform * Quaternion.LookRotation(Vector3.down, Vector3.back); + _faceTarget.DiscardContents(); + camera.Render(); + Graphics.SetRenderTarget(cubemapTarget, 0, CubemapFace.NegativeY); + Graphics.Blit(_faceTarget, _blitMaterial); + + Graphics.SetRenderTarget(prevRT); + + // Restore camera values + camera.transform.rotation = prevRotation; + camera.fieldOfView = prevFieldOfView; + camera.targetTexture = prevtarget; + } + + private void AccumulateMotionBlur() + { + if (_motionBlur != null) + { + if (_capturing && !_paused) + { + if (_camera != null && _handle >= 0) + { + UpdateTexture(); + _motionBlur.Accumulate(_finalTarget); + } + } + } + } + + public override bool PrepareCapture() + { + if (_capturing) + { + return false; + } +#if UNITY_EDITOR_WIN || (!UNITY_EDITOR && UNITY_STANDALONE_WIN) + if (SystemInfo.graphicsDeviceVersion.StartsWith("Direct3D 9")) + { + Debug.LogError("[AVProMovieCapture] Direct3D9 not yet supported, please use Direct3D11 instead."); + return false; + } + else if (SystemInfo.graphicsDeviceVersion.StartsWith("OpenGL") && !SystemInfo.graphicsDeviceVersion.Contains("emulated")) + { + Debug.LogError("[AVProMovieCapture] OpenGL not yet supported for CaptureFromCamera360 component, please use Direct3D11 instead. You may need to switch your build platform to Windows."); + return false; + } +#endif + + // Check cubemap resolution support + int cubemapResolution = (int)_cubemapResolution; + if (cubemapResolution > SystemInfo.maxCubemapSize) + { + cubemapResolution = SystemInfo.maxCubemapSize; + Debug.LogWarning("[AVProMovieCapture] Reducing cubemap size to system max: " + cubemapResolution); + } + + // Setup material + _pixelFormat = NativePlugin.PixelFormat.RGBA32; + _isTopDown = true; + if (_cameraSelector != null) + { + //if (_camera != _cameraSelector.Camera) + { + SetCamera(_cameraSelector.Camera); + } + } + if (_camera == null) + { + SetCamera(this.GetComponent()); + } + if (_camera == null) + { + Debug.LogError("[AVProMovieCapture] No camera assigned to CaptureFromCamera360"); + return false; + } + + // Resolution + int finalWidth = Mathf.FloorToInt(_camera.pixelRect.width); + int finalHeight = Mathf.FloorToInt(_camera.pixelRect.height); + if (_renderResolution == Resolution.Custom) + { + finalWidth = (int)_renderSize.x; + finalHeight = (int)_renderSize.y; + } + else if (_renderResolution != Resolution.Original) + { + GetResolution(_renderResolution, ref finalWidth, ref finalHeight); + } + + // Setup rendering a different render target if we're overriding resolution or anti-aliasing + //if (_renderResolution != Resolution.Original || _renderAntiAliasing != QualitySettings.antiAliasing) + { + int aaLevel = GetCameraAntiAliasingLevel(_camera); + + CubemapRenderMethod cubemapRenderMethod = GetCubemapRenderingMethod(); + Debug.Log("[AVProMovieCapture] Using cubemap render method: " + cubemapRenderMethod.ToString()); + + // Create the final render target + _targetNativePointer = System.IntPtr.Zero; + if (_finalTarget != null) + { + _finalTarget.DiscardContents(); + if (_finalTarget.width != finalWidth || _finalTarget.height != finalHeight) + { + RenderTexture.ReleaseTemporary(_finalTarget); + _finalTarget = null; + } + } + if (_finalTarget == null) + { + _finalTarget = RenderTexture.GetTemporary(finalWidth, finalHeight, 0, RenderTextureFormat.Default, RenderTextureReadWrite.Default, 1); + _finalTarget.name = "[AVProMovieCapture] 360 Final Target"; + } + + // Create the per-face render target (only when need to support GUI rendering) + if (_faceTarget != null) + { + _faceTarget.DiscardContents(); + if (_faceTarget.width != (int)cubemapResolution || + _faceTarget.height != (int)cubemapResolution || + _faceTarget.depth != (int)_cubemapDepth || + _faceTarget.antiAliasing != aaLevel) + { + RenderTexture.Destroy(_faceTarget); + _faceTarget = null; + } + } + if (cubemapRenderMethod == CubemapRenderMethod.Manual) + { + if (_faceTarget == null) + { + _faceTarget = new RenderTexture((int)cubemapResolution, (int)cubemapResolution, (int)_cubemapDepth, RenderTextureFormat.Default, RenderTextureReadWrite.Default); + _faceTarget.name = "[AVProMovieCapture] 360 Face Target"; + _faceTarget.isPowerOfTwo = true; + _faceTarget.wrapMode = TextureWrapMode.Clamp; + _faceTarget.filterMode = FilterMode.Bilinear; + _faceTarget.autoGenerateMips = false; + _faceTarget.antiAliasing = aaLevel; + } + + _cubemapToEquirectangularMaterial.SetFloat(_propFlipX, 0.0f); + } + else + { + // Unity's RenderToCubemap result needs flipping + _cubemapToEquirectangularMaterial.SetFloat(_propFlipX, 1.0f); + } + + _cubemapToEquirectangularMaterial.DisableKeyword("USE_ROTATION"); + _cubemapToEquirectangularMaterial.DisableKeyword("STEREOPACK_TOP"); + _cubemapToEquirectangularMaterial.DisableKeyword("STEREOPACK_BOTTOM"); + _cubemapToEquirectangularMaterial.DisableKeyword("STEREOPACK_LEFT"); + _cubemapToEquirectangularMaterial.DisableKeyword("STEREOPACK_RIGHT"); + + if (_render180Degrees) + { + _cubemapToEquirectangularMaterial.DisableKeyword("LAYOUT_EQUIRECT360"); + _cubemapToEquirectangularMaterial.EnableKeyword("LAYOUT_EQUIRECT180"); + } + else + { + _cubemapToEquirectangularMaterial.DisableKeyword("LAYOUT_EQUIRECT180"); + _cubemapToEquirectangularMaterial.EnableKeyword("LAYOUT_EQUIRECT360"); + } + + // Create the cube render target + int cubeDepth = 0; + if (cubemapRenderMethod != CubemapRenderMethod.Manual) + { + cubeDepth = (int)_cubemapDepth; + } + int cubeAA = 1; + if (cubemapRenderMethod != CubemapRenderMethod.Manual) + { + cubeAA = aaLevel; + } + if (_cubeTarget != null) + { + _cubeTarget.DiscardContents(); + if (_cubeTarget.width != cubemapResolution || + _cubeTarget.height != cubemapResolution || + _cubeTarget.depth != cubeDepth || + _cubeTarget.antiAliasing != cubeAA) + { + RenderTexture.Destroy(_cubeTarget); + _cubeTarget = null; + } + } + if (_cubeTarget == null) + { + _cubeTarget = new RenderTexture(cubemapResolution, cubemapResolution, cubeDepth, RenderTextureFormat.Default, RenderTextureReadWrite.Default); + _cubeTarget.name = "[AVProMovieCapture] 360 Cube Target"; + _cubeTarget.isPowerOfTwo = true; + _cubeTarget.dimension = UnityEngine.Rendering.TextureDimension.Cube; + _cubeTarget.useMipMap = false; + _cubeTarget.autoGenerateMips = false; + _cubeTarget.antiAliasing = cubeAA; + _cubeTarget.wrapMode = TextureWrapMode.Clamp; + _cubeTarget.filterMode = FilterMode.Bilinear; + } + + if (_useMotionBlur) + { + _motionBlurCameras = new Camera[1]; + _motionBlurCameras[0] = _camera; + } + } + + SelectRecordingResolution(finalWidth, finalHeight); + + GenerateFilename(); + + if (base.PrepareCapture()) + { + UpdateInjectionOptions(_stereoRendering, _render180Degrees?SphericalVideoLayout.Equirectangular180:SphericalVideoLayout.Equirectangular360); + return true; + } + return false; + } + + public override Texture GetPreviewTexture() + { + if (IsUsingMotionBlur()) + { + return _motionBlur.FinalTexture; + } + return _finalTarget; + } + + public override void Start() + { + Shader shader = Resources.Load("CubemapToEquirectangular"); + if (shader != null) + { + _cubemapToEquirectangularMaterial = new Material(shader); + } + else + { + Debug.LogError("[AVProMovieCapture] Can't find CubemapToEquirectangular shader"); + } + + Shader blitShader = Shader.Find("Hidden/BlitCopy"); + if (blitShader != null) + { + _blitMaterial = new Material(blitShader); + } + else + { + Debug.LogError("[AVProMovieCapture] Can't find Hidden/BlitCopy shader"); + } + _propFlipX = Shader.PropertyToID("_FlipX"); + #if SUPPORT_SHADER_ROTATION + _propRotation = Shader.PropertyToID("_RotationMatrix"); + #endif + + base.Start(); + } + + public override void OnDestroy() + { + _targetNativePointer = System.IntPtr.Zero; + + if (_blitMaterial != null) + { + Material.Destroy(_blitMaterial); + _blitMaterial = null; + } + + if (_faceTarget != null) + { + RenderTexture.Destroy(_faceTarget); + _faceTarget = null; + } + if (_cubeTarget != null) + { + RenderTexture.Destroy(_cubeTarget); + _cubeTarget = null; + } + if (_finalTarget != null) + { + RenderTexture.ReleaseTemporary(_finalTarget); + _finalTarget = null; + } + base.OnDestroy(); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera360.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera360.cs.meta new file mode 100644 index 0000000..6b9ef22 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera360.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2f452da2383e6e24991a212542347f4b +MonoImporter: + serializedVersion: 2 + defaultReferences: + - _shaderSwapRedBlue: {fileID: 4800000, guid: f8dc701632c759e4a8f2ee16201149cd, + type: 3} + - _shaderRGBA2YCbCr: {fileID: 4800000, guid: d21befa361dcbc6489decfa310898604, type: 3} + executionOrder: 29000 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera360ODS.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera360ODS.cs new file mode 100644 index 0000000..2ed2ce2 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera360ODS.cs @@ -0,0 +1,563 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Capture to a stereo 360 view from camera in equi-rectangular format. + /// Based on Google's Omni-direction Stereo paper: https://developers.google.com/vr/jump/rendering-ods-content.pdf + /// + [AddComponentMenu("AVPro Movie Capture/Capture From Camera 360 Stereo ODS (VR)", 101)] + public class CaptureFromCamera360ODS : CaptureBase + { + [System.Serializable] + public class Settings + { + [SerializeField] + public Camera camera = null; + + [SerializeField] + public CameraSelector cameraSelector = null; + + [SerializeField] + [Tooltip("Render 180 degree equirectangular instead of 360 degrees. Also faster rendering")] + public bool render180Degrees = false; + + [SerializeField] + [Tooltip("Makes assumption that 1 Unity unit is 1m")] + public float ipd = 0.064f; + + [SerializeField] + [Tooltip("Higher value meant less slices to render, but can affect quality.")] + public int pixelSliceSize = 1; + + [SerializeField] + [Range(1, 31)] + [Tooltip("May need to be increased to work with some post image effects. Value is in pixels.")] + public int paddingSize = 1; + + [SerializeField] + public CameraClearFlags cameraClearMode = CameraClearFlags.Color; + + [SerializeField] + public Color cameraClearColor = Color.black; + + [SerializeField] + public Behaviour[] cameraImageEffects = null; + } + + [SerializeField] Settings _settings = new Settings(); + + public Settings Setup + { + get { return _settings; } + } + + // State + + private int _eyeWidth = 1920; + private int _eyeHeight = 1080; + + private Transform _cameraGroup; + private Camera _leftCameraTop; + private Camera _leftCameraBot; + private Camera _rightCameraTop; + private Camera _rightCameraBot; + + private RenderTexture _final; + private System.IntPtr _targetNativePointer = System.IntPtr.Zero; + private Material _finalMaterial; + private int _propSliceCenter; + + public CaptureFromCamera360ODS() + { + // Override the default values to match more common use cases for this capture component + this.IsRealTime = false; + _renderResolution = Resolution.POW2_4096x4096; + + /*_settings.camera = this.GetComponent(); + if (_settings.camera != null) + { + _settings.cameraClearMode = _settings.camera.clearFlags; + _settings.cameraClearColor = _settings.camera.backgroundColor; + }*/ + } + + public void SetCamera(Camera camera) + { + _settings.camera = camera; + // TODO: add support for camera chains + } + + public override void Start() + { + Shader mergeShader = Shader.Find("Hidden/AVProMovieCapture/ODSMerge"); + if (mergeShader != null) + { + _finalMaterial = new Material(mergeShader); + } + else + { + Debug.LogError("[AVProMovieCapture] Can't find Hidden/AVProMovieCapture/ODSMerge shader"); + } + + _propSliceCenter = Shader.PropertyToID("_sliceCenter"); + + base.Start(); + } + + private Camera CreateEye(Camera camera, string gameObjectName, float yRot, float xOffset, int cameraTargetHeight, int cullingMask, float fov, float aspect, int aalevel) + { + bool isCreated = false; + if (camera == null) + { + GameObject eye = new GameObject(gameObjectName); + eye.transform.parent = _cameraGroup; + eye.transform.rotation = Quaternion.AngleAxis(-yRot, Vector3.right); + eye.transform.localPosition = new Vector3(xOffset, 0f, 0f); + // NOTE: We copy the hideFlags otherwise when instantiated by the Movie Capture window which has the DontSave flag + // Unity throws an error about destroying transforms when coming out of play mode. + eye.hideFlags = this.gameObject.hideFlags; + camera = eye.AddComponent(); + isCreated = true; + } + + camera.fieldOfView = fov; + camera.aspect = aspect; + camera.clearFlags = _settings.cameraClearMode; + camera.backgroundColor = _settings.cameraClearColor; + camera.cullingMask = cullingMask; + camera.useOcclusionCulling = false; + camera.renderingPath = _settings.camera.renderingPath; + camera.nearClipPlane = _settings.camera.nearClipPlane; + camera.farClipPlane = _settings.camera.farClipPlane; +#if UNITY_5_6_OR_NEWER + camera.allowHDR = _settings.camera.allowHDR; + camera.allowMSAA = _settings.camera.allowMSAA; + if (camera.renderingPath == RenderingPath.DeferredShading +#if AVPRO_MOVIECAPTURE_DEFERREDSHADING + || camera.renderingPath == RenderingPath.DeferredLighting +#endif + ) + { + camera.allowMSAA = false; + } +#endif + + { + int textureWidth = _settings.pixelSliceSize + 2 * _settings.paddingSize; + int textureHeight = cameraTargetHeight; + + if (camera.targetTexture != null) + { + camera.targetTexture.DiscardContents(); + if (camera.targetTexture.width != textureWidth || camera.targetTexture.height != textureHeight || camera.targetTexture.antiAliasing != aalevel) + { + RenderTexture.ReleaseTemporary(camera.targetTexture); + camera.targetTexture = null; + } + } + if (camera.targetTexture == null) + { + camera.targetTexture = RenderTexture.GetTemporary(textureWidth, textureHeight, 24, RenderTextureFormat.Default, RenderTextureReadWrite.Default, aalevel); + } + } + + // Disable the camera as we render it manually + camera.enabled = false; + + // Copy any image effects to the new cameras + if (isCreated) + { + // TODO: make it so the components can be added/updated each time if they have changed + if (_settings.cameraImageEffects != null) + { + for (int i = 0; i < _settings.cameraImageEffects.Length; i++) + { + Behaviour origComponent = _settings.cameraImageEffects[i]; + if (origComponent != null) + { + if (origComponent.enabled) + { +#if UNITY_EDITOR + Behaviour newComponent = (Behaviour)camera.gameObject.AddComponent(origComponent.GetType()); + // TODO: we need to copy any post image effect component fields here via reflection? or perhaps use prefabs? + UnityEditor.EditorUtility.CopySerialized(origComponent, newComponent); + + // Some effects (such as MICHAËL JIMENEZ HBAO) need to be toggled to apply the settings + newComponent.enabled = false; + newComponent.enabled = true; +#endif + } + } + else + { + Debug.LogWarning("[AVProMovieCapture] Image effect is null"); + } + } + } + } + + return camera; + } + + public override void UpdateFrame() + { + if (_settings.cameraSelector != null) + { + if (_settings.camera != _settings.cameraSelector.Camera) + { + SetCamera(_settings.cameraSelector.Camera); + } + } + + if (_useWaitForEndOfFrame) + { + if (_capturing && !_paused) + { + StartCoroutine(FinalRenderCapture()); + } + } + else + { + Capture(); + } + base.UpdateFrame(); + } + + private IEnumerator FinalRenderCapture() + { + yield return _waitForEndOfFrame; + + Capture(); + } + + private void Capture() + { + TickFrameTimer(); + + AccumulateMotionBlur(); + + if (_capturing && !_paused) + { + if (_settings.camera != null && _handle >= 0) + { + bool canGrab = true; + + if (IsUsingMotionBlur()) + { + // If the motion blur is still accumulating, don't grab this frame + canGrab = _motionBlur.IsFrameAccumulated; + } + + if (canGrab && CanOutputFrame()) + { + // Frame to encode either comes from rendering, or motion blur accumulation + RenderTexture finalTexture = null; + if (!IsUsingMotionBlur()) + { + RenderFrame(); + finalTexture = _final; + } + else + { + finalTexture = _motionBlur.FinalTexture; + } + + if (_targetNativePointer == System.IntPtr.Zero || _supportTextureRecreate) + { + // NOTE: If support for captures to survive through alt-tab events, or window resizes where the GPU resources are recreated + // is required, then this line is needed. It is very expensive though as it does a sync with the rendering thread. + _targetNativePointer = finalTexture.GetNativeTexturePtr(); + } + + NativePlugin.SetTexturePointer(_handle, _targetNativePointer); + + RenderThreadEvent(NativePlugin.PluginEvent.CaptureFrameBuffer); + GL.InvalidateState(); + + UpdateFPS(); + } + } + } + + RenormTimer(); + } + + private void AccumulateMotionBlur() + { + if (_motionBlur != null) + { + if (_capturing && !_paused) + { + if (_settings.camera != null && _handle >= 0) + { + RenderFrame(); + _motionBlur.Accumulate(_final); + } + } + } + } + + private void RenderFrame() + { + _cameraGroup.position = _settings.camera.transform.position; + Quaternion originalRot = _settings.camera.transform.rotation * Quaternion.AngleAxis(180f, Vector3.up); // Apply 180 degree correction align the front camera vector to the center of the output image + + float rotationStep = 360f / _eyeWidth; + int startPixelX = 0; + int maxPixelX = _eyeWidth / _settings.pixelSliceSize; + int endPixelX = maxPixelX; + + if (_settings.render180Degrees) + { + // Remove the first and last quarter of the rendering + startPixelX = endPixelX / 4; + endPixelX -= startPixelX; + // Add a few pixels back in case of bilinear filtering issues + startPixelX = Mathf.Max(0, startPixelX - 2); + endPixelX = Mathf.Min(maxPixelX, endPixelX + 2); + } + + _final.DiscardContents(); + for (int i = startPixelX; i < endPixelX; ++i) + { + int step = i * _settings.pixelSliceSize; + float v = step * rotationStep; + + _cameraGroup.rotation = originalRot * Quaternion.AngleAxis(v, Vector3.up); + + _leftCameraTop.targetTexture.DiscardContents(); + _leftCameraBot.targetTexture.DiscardContents(); + _rightCameraTop.targetTexture.DiscardContents(); + _rightCameraBot.targetTexture.DiscardContents(); + + _leftCameraTop.Render(); + _leftCameraBot.Render(); + _rightCameraTop.Render(); + _rightCameraBot.Render(); + + _finalMaterial.SetFloat(_propSliceCenter, step + _settings.pixelSliceSize / 2f); + + Graphics.Blit(null, _final, _finalMaterial); + //System.GC.Collect(); + } + } + + public override Texture GetPreviewTexture() + { + if (IsUsingMotionBlur()) + { + return _motionBlur.FinalTexture; + } + return _final; + } + + public override bool PrepareCapture() + { + if (_capturing) + { + return false; + } +#if UNITY_EDITOR_WIN || (!UNITY_EDITOR && UNITY_STANDALONE_WIN) + if (SystemInfo.graphicsDeviceVersion.StartsWith("Direct3D 9")) + { + Debug.LogError("[AVProMovieCapture] Direct3D9 not yet supported, please use Direct3D11 instead."); + return false; + } + else if (SystemInfo.graphicsDeviceVersion.StartsWith("OpenGL") && !SystemInfo.graphicsDeviceVersion.Contains("emulated")) + { + Debug.LogError("[AVProMovieCapture] OpenGL not yet supported for CaptureFromCamera360ODS component, please use Direct3D11 instead. You may need to switch your build platform to Windows."); + return false; + } +#endif + + // This component makes the profiler use a TON of memory, so warn the user to disable it + if (UnityEngine.Profiling.Profiler.enabled) + { + Debug.LogWarning("[AVProMovieCapture] Having the Unity profiler enabled while using the CaptureFromCamera360ODS component is not recommended. Too many samples are generated which can make the system run out of memory. Disable the profiler, close the window and remove the tab. A Unity restart may be required after disabling the profiler recording"); + } + + // Setup material + _pixelFormat = NativePlugin.PixelFormat.RGBA32; + _isTopDown = true; + if (_settings.cameraSelector != null) + { + if (_settings.camera != _settings.cameraSelector.Camera) + { + SetCamera(_settings.cameraSelector.Camera); + } + } + if (_settings.camera == null) + { + SetCamera(this.GetComponent()); + } + if (_settings.camera == null) + { + Debug.LogError("[AVProMovieCapture] No camera assigned to CaptureFromCamera360ODS"); + return false; + } + + // Resolution + int finalWidth = Mathf.FloorToInt(_settings.camera.pixelRect.width); + int finalHeight = Mathf.FloorToInt(_settings.camera.pixelRect.height); + if (_renderResolution == Resolution.Custom) + { + finalWidth = (int)_renderSize.x; + finalHeight = (int)_renderSize.y; + } + else if (_renderResolution != Resolution.Original) + { + GetResolution(_renderResolution, ref finalWidth, ref finalHeight); + } + + _eyeWidth = Mathf.Clamp(finalWidth, 1, 8192); + // NOTE: Height must be even + _eyeHeight = Mathf.Clamp(finalHeight / 2, 1, 4096); + _eyeHeight -= _eyeHeight & 1; + + finalWidth = _eyeWidth; + finalHeight = _eyeHeight * 2; + + int aaLevel = GetCameraAntiAliasingLevel(_settings.camera); + + // NOTE: Pixel slice size must be divisible by the total width + _settings.pixelSliceSize = Mathf.Clamp(_settings.pixelSliceSize, 1, _eyeWidth); + _settings.pixelSliceSize = _settings.pixelSliceSize - (_eyeWidth % _settings.pixelSliceSize); + + _settings.paddingSize = Mathf.Clamp(_settings.paddingSize, 0, 31); + + float offset = _settings.ipd / 2f; + + float aspect = (_settings.pixelSliceSize * 2f) / _eyeHeight; + + if (_cameraGroup == null) + { + GameObject go = new GameObject("OdsCameraGroup"); + go.transform.parent = this.gameObject.transform; + // NOTE: We copy the hideFlags otherwise when instantiated by the Movie Capture window which has the DontSave flag + // Unity throws an error about destroying transforms when coming out of play mode. + go.hideFlags = this.gameObject.hideFlags; + _cameraGroup = go.transform; + } + + // TODO: only recreate textures if they don't already exist or size has changed + _leftCameraTop = CreateEye(_leftCameraTop, "LeftEyeTop", 45f, -offset, _eyeHeight / 2, _settings.camera.cullingMask, 90f, aspect, aaLevel); + _leftCameraBot = CreateEye(_leftCameraBot, "LeftEyeBot", -45f, -offset, _eyeHeight / 2, _settings.camera.cullingMask, 90f, aspect, aaLevel); + _rightCameraTop = CreateEye(_rightCameraTop, "RightEyeTop", 45f, offset, _eyeHeight / 2, _settings.camera.cullingMask, 90f, aspect, aaLevel); + _rightCameraBot = CreateEye(_rightCameraBot, "RightEyeBot", -45f, offset, _eyeHeight / 2, _settings.camera.cullingMask, 90f, aspect, aaLevel); + + // Create final texture (if not already created) + _targetNativePointer = System.IntPtr.Zero; + if (_final != null) + { + _final.DiscardContents(); + if (_final.width != finalWidth || _final.height != finalHeight || _final.antiAliasing != aaLevel) + { + RenderTexture.ReleaseTemporary(_final); + _final = null; + } + _final = null; + } + if (_final == null) + { + _final = RenderTexture.GetTemporary(finalWidth, finalHeight, 0); + } + + // Setup material + _finalMaterial.SetTexture("_leftTopTex", _leftCameraTop.targetTexture); + _finalMaterial.SetTexture("_leftBotTex", _leftCameraBot.targetTexture); + _finalMaterial.SetTexture("_rightTopTex", _rightCameraTop.targetTexture); + _finalMaterial.SetTexture("_rightBotTex", _rightCameraBot.targetTexture); + _finalMaterial.SetFloat("_pixelSliceSize", _settings.pixelSliceSize); + _finalMaterial.SetInt("_paddingSize", _settings.paddingSize); + _finalMaterial.SetFloat("_targetXTexelSize", 1.0f / finalWidth); + + if (_settings.render180Degrees) + { + _finalMaterial.DisableKeyword("LAYOUT_EQUIRECT360"); + _finalMaterial.EnableKeyword("LAYOUT_EQUIRECT180"); + } + else + { + _finalMaterial.DisableKeyword("LAYOUT_EQUIRECT180"); + _finalMaterial.EnableKeyword("LAYOUT_EQUIRECT360"); + } + + // Setup capture + SelectRecordingResolution(finalWidth, finalHeight); + GenerateFilename(); + if (base.PrepareCapture()) + { + UpdateInjectionOptions(StereoPacking.TopBottom, _settings.render180Degrees?SphericalVideoLayout.Equirectangular180:SphericalVideoLayout.Equirectangular360); + return true; + } + return false; + } + + private static void DestroyEye(Camera camera) + { + if (camera != null) + { + RenderTexture.ReleaseTemporary(camera.targetTexture); + if (Application.isPlaying) + { + GameObject.Destroy(camera.gameObject); + } + #if UNITY_EDITOR + else + { + GameObject.DestroyImmediate(camera.gameObject); + } + #endif + } + } + + public override void OnDestroy() + { + _targetNativePointer = System.IntPtr.Zero; + if (_final != null) + { + RenderTexture.ReleaseTemporary(_final); + _final = null; + } + + DestroyEye(_leftCameraTop); + DestroyEye(_leftCameraBot); + DestroyEye(_rightCameraTop); + DestroyEye(_rightCameraBot); + _leftCameraTop = null; + _leftCameraBot = null; + _rightCameraTop = null; + _rightCameraBot = null; + + if (_cameraGroup != null) + { + if (Application.isPlaying) + { + GameObject.Destroy(_cameraGroup.gameObject); + } + #if UNITY_EDITOR + else + { + GameObject.DestroyImmediate(_cameraGroup.gameObject); + } + #endif + _cameraGroup = null; + } + + if (_finalMaterial) + { + Destroy(_finalMaterial); + _finalMaterial = null; + } + + base.OnDestroy(); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera360ODS.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera360ODS.cs.meta new file mode 100644 index 0000000..e6c4165 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromCamera360ODS.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5945507e76c77da41ad8dd25ae6ac95c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 29000 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromScreen.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromScreen.cs new file mode 100644 index 0000000..85e047d --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromScreen.cs @@ -0,0 +1,232 @@ +using UnityEngine; +using UnityEngine.Rendering; +using System.Collections; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Capture from the screen (backbuffer). Everything is captured as it appears on the screen, including IMGUI rendering. + /// This component waits for the frame to be completely rendered and then captures it. + /// + [AddComponentMenu("AVPro Movie Capture/Capture From Screen", 0)] + public class CaptureFromScreen : CaptureBase + { + //private const int NewFrameSleepTimeMs = 6; + [SerializeField] bool _captureMouseCursor = false; + [SerializeField] MouseCursor _mouseCursor = null; + + private System.IntPtr _targetNativePointer = System.IntPtr.Zero; + private RenderTexture _resolveTexture = null; + private CommandBuffer _commandBuffer = null; + + public bool CaptureMouseCursor + { + get { return _captureMouseCursor; } + set { _captureMouseCursor = value; } + } + + public MouseCursor MouseCursor + { + get { return _mouseCursor; } + set { _mouseCursor = value; } + } + + public override bool PrepareCapture() + { + if (_capturing) + { + return false; + } +#if UNITY_EDITOR_WIN || (!UNITY_EDITOR && UNITY_STANDALONE_WIN) + if (SystemInfo.graphicsDeviceVersion.StartsWith("Direct3D 9")) + { + Debug.LogError("[AVProMovieCapture] Direct3D9 not yet supported, please use Direct3D11 instead."); + return false; + } + else if (SystemInfo.graphicsDeviceVersion.StartsWith("OpenGL") && !SystemInfo.graphicsDeviceVersion.Contains("emulated")) + { + Debug.LogError("[AVProMovieCapture] OpenGL not yet supported for CaptureFromScreen component, please use Direct3D11 instead. You may need to switch your build platform to Windows."); + return false; + } +#endif + + if (_mouseCursor != null) + { + _mouseCursor.enabled = _captureMouseCursor; + } + +#if UNITY_EDITOR + if (Display.displays.Length > 1) + { + bool isSecondDisplayActive = false; + for (int i = 1; i < Display.displays.Length; i++) + { + if (Display.displays[i].active) + { + isSecondDisplayActive = true; + break; + } + } + if (isSecondDisplayActive) + { + Debug.LogError("[AVProMovieCapture] CaptureFromScreen doesn't work correctly (can cause stretching or incorrect display capture) when there are multiple displays are active. Use CaptureFromCamera instead."); + } + } +#endif + + SelectRecordingResolution(Screen.width, Screen.height); + + _pixelFormat = NativePlugin.PixelFormat.RGBA32; + if (SystemInfo.graphicsDeviceVersion.StartsWith("OpenGL") && !SystemInfo.graphicsDeviceVersion.Contains("emulated")) + { + // TODO: add this back in once we have fixed opengl support + _pixelFormat = NativePlugin.PixelFormat.BGRA32; + _isTopDown = true; + } + else + { + _isTopDown = false; + + if (_isDirectX11) + { + _isTopDown = false; + } + } + + GenerateFilename(); + + return base.PrepareCapture(); + } + + private void CopyRenderTargetToTexture() + { +#if false + // RJT TODO: If using D3D12 we need to read the current 'Display.main.colorBuffer', pass it down + // to native and extract the texture using 'IUnityGraphicsD3D12v5::TextureFromRenderBuffer()' + // - Although, as is, this doesn't work: https://forum.unity.com/threads/direct3d12-native-plugin-render-to-screen.733025/ + if (_targetNativePointer == System.IntPtr.Zero) + { + _targetNativePointer = Display.main.colorBuffer.GetNativeRenderBufferPtr(); +// _targetNativePointer = Graphics.activeColorBuffer.GetNativeRenderBufferPtr(); + NativePlugin.SetColourBuffer(_handle, _targetNativePointer); + } +#endif +#if true + if ((_targetNativePointer == System.IntPtr.Zero) || + (_resolveTexture && ((_resolveTexture.width != Screen.width) || (_resolveTexture.height != Screen.height))) + ) + { + FreeRenderResources(); + + // Create RT matching screen extents + _resolveTexture = RenderTexture.GetTemporary(Screen.width, Screen.height, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB, 1); + _resolveTexture.Create(); + _targetNativePointer = _resolveTexture.GetNativeTexturePtr(); + NativePlugin.SetTexturePointer(_handle, _targetNativePointer); + + // Create command buffer + _commandBuffer = new CommandBuffer(); + _commandBuffer.name = "AVPro Movie Capture copy"; + _commandBuffer.Blit(BuiltinRenderTextureType.CurrentActive, _resolveTexture); + } +#endif + + Graphics.ExecuteCommandBuffer(_commandBuffer); + } + + private void FreeRenderResources() + { + // Command buffer + if (_commandBuffer != null) + { + _commandBuffer.Release(); + _commandBuffer = null; + } + + // Resolve texture + _targetNativePointer = System.IntPtr.Zero; + if (_resolveTexture) + { + RenderTexture.ReleaseTemporary(_resolveTexture); + _resolveTexture = null; + } + } + + public override void UnprepareCapture() + { + if (_handle != -1) + { + #if false + NativePlugin.SetColourBuffer(_handle, System.IntPtr.Zero); + #endif + NativePlugin.SetTexturePointer(_handle, System.IntPtr.Zero); + } + + FreeRenderResources(); + + if (_mouseCursor != null) + { + _mouseCursor.enabled = false; + } + + base.UnprepareCapture(); + } + + private IEnumerator FinalRenderCapture() + { + yield return _waitForEndOfFrame; + + TickFrameTimer(); + + bool canGrab = true; + + if (IsUsingMotionBlur()) + { + // If the motion blur is still accumulating, don't grab this frame + canGrab = _motionBlur.IsFrameAccumulated; + } + + if (canGrab && CanOutputFrame()) + { + // Grab final RenderTexture into texture and encode + EncodeUnityAudio(); + + // RJT NOTE: Separate D3D12 path for now as it can't grab native RT + if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Direct3D12) + { + CopyRenderTargetToTexture(); + RenderThreadEvent(NativePlugin.PluginEvent.CaptureFrameBuffer); + } + else + { + RenderThreadEvent(NativePlugin.PluginEvent.CaptureFrameBuffer); + + // RJT NOTE: Causes screen flickering under D3D12, even if we're not doing any rendering at native level + if (SystemInfo.graphicsDeviceType != GraphicsDeviceType.Direct3D12) + { + GL.InvalidateState(); + } + } + + UpdateFPS(); + } + + RenormTimer(); + + //yield return null; + } + + public override void UpdateFrame() + { + if (_capturing && !_paused) + { + StartCoroutine(FinalRenderCapture()); + } + base.UpdateFrame(); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromScreen.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromScreen.cs.meta new file mode 100644 index 0000000..f0ede5c --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromScreen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7d29444a3446e8b4fbe2e76a72d7d598 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - _audioCapture: {instanceID: 0} + - _shaderSwapRedBlue: {fileID: 4800000, guid: f8dc701632c759e4a8f2ee16201149cd, + type: 3} + executionOrder: 29000 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromTexture.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromTexture.cs new file mode 100644 index 0000000..d1b2ba6 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromTexture.cs @@ -0,0 +1,304 @@ +using UnityEngine; +using System.Collections; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Capture from a Texture object (including RenderTexture, WebcamTexture) + /// + [AddComponentMenu("AVPro Movie Capture/Capture From Texture", 3)] + public class CaptureFromTexture : CaptureBase + { + [Tooltip("If enabled the method the encoder will only process frames each time UpdateSourceTexture() is called. This is useful if the texture is updating at a different rate compared to Unity, eg for webcam capture.")] + [SerializeField] bool _manualUpdate = false; + + public bool IsManualUpdate + { + get { return _manualUpdate; } + set { _manualUpdate = value; } + } + + private Texture _sourceTexture; + private RenderTexture _resolveTexture; + private System.IntPtr _targetNativePointer = System.IntPtr.Zero; + private bool _isSourceTextureChanged = false; + + public void SetSourceTexture(Texture texture) + { + _sourceTexture = texture; + } + + private bool RequiresResolve(Texture texture) + { +#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX || (UNITY_IOS && !UNITY_EDITOR) || (UNITY_ANDROID) + // Texture resolve wholly unnecessary on macOS and iOS + return false; +#else + bool result = false; + + if (texture is RenderTexture) + { + RenderTexture rt = texture as RenderTexture; + + // Linear textures require resolving to sRGB + result = !rt.sRGB; + + if (!result && + (rt.format != RenderTextureFormat.ARGB32) && + (rt.format != RenderTextureFormat.Default) && + (rt.format != RenderTextureFormat.BGRA32) + ) + { + // Exotic texture formats require resolving + result = true; + } + } + else + { + // Any other texture type needs to be resolve to RenderTexture + result = true; + } + + return result; +#endif + } + + public void UpdateSourceTexture() + { + _isSourceTextureChanged = true; + } + + private bool ShouldCaptureFrame() + { + return (_capturing && !_paused && _sourceTexture != null); + } + + private bool HasSourceTextureChanged() + { + return (!_manualUpdate || (_manualUpdate && _isSourceTextureChanged)); + } + + public override void UpdateFrame() + { + if (_useWaitForEndOfFrame) + { + StartCoroutine(FinalRenderCapture()); + base.UpdateFrame(); + } + else + { + Capture(); + base.UpdateFrame(); + } + } + + private IEnumerator FinalRenderCapture() + { + yield return _waitForEndOfFrame; + + Capture(); + } + + private void Capture() + { + TickFrameTimer(); + + AccumulateMotionBlur(); + + if (ShouldCaptureFrame()) + { + bool hasSourceTextureChanged = HasSourceTextureChanged(); + + // If motion blur is enabled, wait until all frames are accumulated + if (IsUsingMotionBlur()) + { + // If the motion blur is still accumulating, don't grab this frame + hasSourceTextureChanged = _motionBlur.IsFrameAccumulated; + } + + _isSourceTextureChanged = false; + if (hasSourceTextureChanged) + { + if ((_manualUpdate /*&& NativePlugin.IsNewFrameDue(_handle)*/) || CanOutputFrame()) + { + // If motion blur is enabled, use the motion blur result + Texture sourceTexture = _sourceTexture; + if (IsUsingMotionBlur()) + { + sourceTexture = _motionBlur.FinalTexture; + } + + // If the texture isn't suitable then blit it to the Rendertexture so the native plugin can grab it + if (RequiresResolve(sourceTexture)) + { + CreateResolveTexture(_targetWidth, _targetHeight); + _resolveTexture.DiscardContents(); + + // Between Unity 2018.1.0 and 2018.3.0 Unity doesn't seem to set the correct sRGBWrite state and keeps it as false +#if (UNITY_2018_1_OR_NEWER && !UNITY_2018_3_OR_NEWER) + bool sRGBWritePrev = GL.sRGBWrite; + GL.sRGBWrite = true; +#endif + + Graphics.Blit(sourceTexture, _resolveTexture); + sourceTexture = _resolveTexture; + +#if (UNITY_2018_1_OR_NEWER && !UNITY_2018_3_OR_NEWER) + GL.sRGBWrite = sRGBWritePrev; +#endif + } + + if (_targetNativePointer == System.IntPtr.Zero || _supportTextureRecreate) + { + // NOTE: If support for captures to survive through alt-tab events, or window resizes where the GPU resources are recreated + // is required, then this line is needed. It is very expensive though as it does a sync with the rendering thread. + _targetNativePointer = sourceTexture.GetNativeTexturePtr(); + } + + NativePlugin.SetTexturePointer(_handle, _targetNativePointer); + + RenderThreadEvent(NativePlugin.PluginEvent.CaptureFrameBuffer); + + if (!IsUsingMotionBlur()) + { + _isSourceTextureChanged = false; + } + EncodeUnityAudio(); + + UpdateFPS(); + } + } + } + + RenormTimer(); + } + + private void CreateResolveTexture(int width, int height) + { + if (_resolveTexture != null) + { + if (_resolveTexture.width != width || + _resolveTexture.height != height) + { + RenderTexture.ReleaseTemporary(_resolveTexture); + _resolveTexture = null; + } + } + if (_resolveTexture == null) + { + RenderTextureReadWrite readWriteMode = RenderTextureReadWrite.sRGB; +#if AVPRO_MOVIECAPTURE_WEBCAMTEXTURE_SUPPORT + if (QualitySettings.activeColorSpace == ColorSpace.Linear && _sourceTexture is WebCamTexture) + { + // WebCamTexture has odd behaviour, and we're found that we need to resolve without the sRGB conversion + // It's still not 100% correct though - dark colours seem to get crushed to black - we suspect + // this is due to it using limited range instead of full... + + // NOTE: This is now commented out as the behaviour isn't correct in Unity 2020 + // readWriteMode = RenderTextureReadWrite.Linear; + } +#endif + _resolveTexture = RenderTexture.GetTemporary(width, height, 0, RenderTextureFormat.ARGB32, readWriteMode); + _resolveTexture.Create(); + _targetNativePointer = _resolveTexture.GetNativeTexturePtr(); + } + } + + private void AccumulateMotionBlur() + { + if (_motionBlur != null) + { + if (ShouldCaptureFrame() && HasSourceTextureChanged()) + { + _motionBlur.Accumulate(_sourceTexture); + _isSourceTextureChanged = false; + } + } + } + + public override Texture GetPreviewTexture() + { + if (IsUsingMotionBlur()) + { + return _motionBlur.FinalTexture; + } + if (_resolveTexture != null) + { + return _resolveTexture; + } + if (_sourceTexture is RenderTexture) + { + return _sourceTexture; + } +#if AVPRO_MOVIECAPTURE_WEBCAMTEXTURE_SUPPORT + if (_sourceTexture is WebCamTexture) + { + return _sourceTexture; + } +#endif + return Texture2D.whiteTexture; + } + + public override bool PrepareCapture() + { + if (_capturing) + { + return false; + } + + if (_sourceTexture == null) + { + Debug.LogError("[AVProMovieCapture] No texture set to capture"); + return false; + } +#if UNITY_EDITOR_WIN || (!UNITY_EDITOR && UNITY_STANDALONE_WIN) + if (SystemInfo.graphicsDeviceVersion.StartsWith("Direct3D 9")) + { + Debug.LogError("[AVProMovieCapture] Direct3D9 not yet supported, please use Direct3D11 instead."); + return false; + } + else if (SystemInfo.graphicsDeviceVersion.StartsWith("OpenGL") && !SystemInfo.graphicsDeviceVersion.Contains("emulated")) + { + Debug.LogError("[AVProMovieCapture] OpenGL not yet supported for CaptureFromTexture component, please use Direct3D11 instead. You may need to switch your build platform to Windows."); + return false; + } +#endif + _pixelFormat = NativePlugin.PixelFormat.RGBA32; + _isSourceTextureChanged = false; + + SelectRecordingResolution(_sourceTexture.width, _sourceTexture.height); + + if (_resolveTexture != null) + { + RenderTexture.ReleaseTemporary(_resolveTexture); + _resolveTexture = null; + } + + GenerateFilename(); + + return base.PrepareCapture(); + } + + public override void UnprepareCapture() + { + _targetNativePointer = System.IntPtr.Zero; + + if (_handle != -1) + { + NativePlugin.SetTexturePointer(_handle, System.IntPtr.Zero); + } + + if (_resolveTexture != null) + { + RenderTexture.ReleaseTemporary(_resolveTexture); + _resolveTexture = null; + } + + base.UnprepareCapture(); + } + } +} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromTexture.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromTexture.cs.meta new file mode 100644 index 0000000..ad99ad2 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromTexture.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: de5a7a2f274da2340a2de24a1fffee45 +MonoImporter: + serializedVersion: 2 + defaultReferences: + - _shaderSwapRedBlue: {fileID: 4800000, guid: f8dc701632c759e4a8f2ee16201149cd, + type: 3} + - _shaderRGBA2YCbCr: {fileID: 4800000, guid: d21befa361dcbc6489decfa310898604, type: 3} + executionOrder: 29000 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromWebCamTexture.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromWebCamTexture.cs new file mode 100644 index 0000000..4b5d194 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromWebCamTexture.cs @@ -0,0 +1,41 @@ +using UnityEngine; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Capture from a WebCamTexture object + /// + [AddComponentMenu("AVPro Movie Capture/Capture From WebCamTexture", 3)] + public class CaptureFromWebCamTexture : CaptureFromTexture + { +#if AVPRO_MOVIECAPTURE_WEBCAMTEXTURE_SUPPORT + private WebCamTexture _webcam = null; + + public WebCamTexture WebCamTexture + { + get { return _webcam; } + set { _webcam = value; SetSourceTexture(_webcam); } + } + + public override void UpdateFrame() + { + // WebCamTexture doesn't update every Unity frame + if (_webcam != null && _webcam.didUpdateThisFrame) + { + UpdateSourceTexture(); + } + + base.UpdateFrame(); + } +#else + public override void Start() + { + Debug.LogError("[AVProMovieCapture] To use WebCamTexture capture component/demo you must add the string AVPRO_MOVIECAPTURE_WEBCAMTEXTURE_SUPPORT must be added to `Scriping Define Symbols` in `Player Settings > Other Settings > Script Compilation`"); + } +#endif // AVPRO_MOVIECAPTURE_WEBCAMTEXTURE_SUPPORT + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromWebCamTexture.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromWebCamTexture.cs.meta new file mode 100644 index 0000000..b930811 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureFromWebCamTexture.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: ea41b0330d3eea243b45fd4355c3080c +MonoImporter: + serializedVersion: 2 + defaultReferences: + - _shaderSwapRedBlue: {fileID: 4800000, guid: f8dc701632c759e4a8f2ee16201149cd, + type: 3} + - _shaderRGBA2YCbCr: {fileID: 4800000, guid: d21befa361dcbc6489decfa310898604, type: 3} + executionOrder: 29000 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureGUI.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureGUI.cs new file mode 100644 index 0000000..5a1788c --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureGUI.cs @@ -0,0 +1,881 @@ +#if UNITY_2017_3_OR_NEWER + #define AVPRO_MOVIECAPTURE_OFFLINE_AUDIOCAPTURE +#endif + +using UnityEngine; +using System.Text; +using System.Collections; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Uses IMGUI to render a GUI to control video capture. This is mainly used for the demos. + /// + [AddComponentMenu("AVPro Movie Capture/Utils/Capture GUI", 300)] + public class CaptureGUI : MonoBehaviour + { + private enum Section + { + None, + VideoCodecs, + AudioCodecs, + AudioInputDevices, + ImageCodecs, + } + [SerializeField] CaptureBase _movieCapture = null; + [SerializeField] bool _showUI = true; + [SerializeField] bool _whenRecordingAutoHideUI = true; + [SerializeField] GUISkin _guiSkin = null; + + public CaptureBase MovieCapture + { + get { return _movieCapture; } + set { _movieCapture = value; } + } + public bool HideUiWhenRecording + { + get { return _whenRecordingAutoHideUI; } + set { _whenRecordingAutoHideUI = value; } + } + public bool ShowUI + { + get { return _showUI; } + set { _showUI = value; } + } + + private readonly static string[] CommonFrameRateNames = { "1", "10", "15", "23.98", "24", "25", "29.97", "30", "50", "59.94", "60", "75", "90", "120" }; + private readonly static float[] CommonFrameRateValues = { 1f, 10f, 15f, 23.976f, 24f, 25f, 29.97f, 30f, 50f, 59.94f, 60f, 75f, 90f, 120f }; + + // GUI + private Section _shownSection = Section.None; + private string[] _videoCodecNames = new string[0]; + private string[] _audioCodecNames = new string[0]; + private bool[] _videoCodecConfigurable = new bool[0]; + private bool[] _audioCodecConfigurable = new bool[0]; + private string[] _audioDeviceNames = new string[0]; + private string[] _downScales = { "Original", "Half", "Quarter", "Eighth", "Sixteenth", "Custom" }; + private string[] _outputType = { "Video File", "Image Sequence", "Named Pipe" }; + private int _downScaleIndex; + private GUIStyle _tintableBox; + + private Vector2 _videoPos = Vector2.zero; + private Vector2 _audioPos = Vector2.zero; + private Vector2 _audioCodecPos = Vector2.zero; + private Vector2 _imageCodecPos = Vector2.zero; + + // Status + private long _lastFileSize; + private uint _lastEncodedMinutes; + private uint _lastEncodedSeconds; + private uint _lastEncodedFrame; + + private void Start() + { + if (_movieCapture != null) + { + CreateGUI(); + } + } + + private void CreateGUI() + { + switch (_movieCapture.ResolutionDownScale) + { + default: + case CaptureBase.DownScale.Original: + _downScaleIndex = 0; + break; + case CaptureBase.DownScale.Half: + _downScaleIndex = 1; + break; + case CaptureBase.DownScale.Quarter: + _downScaleIndex = 2; + break; + case CaptureBase.DownScale.Eighth: + _downScaleIndex = 3; + break; + case CaptureBase.DownScale.Sixteenth: + _downScaleIndex = 4; + break; + case CaptureBase.DownScale.Custom: + _downScaleIndex = 5; + break; + } + + if (CodecManager.VideoCodecs.Count > 0) + { + _videoCodecNames = new string[CodecManager.VideoCodecs.Count]; + _videoCodecConfigurable = new bool[CodecManager.VideoCodecs.Count]; + int i = 0; + foreach (Codec codec in CodecManager.VideoCodecs) + { + _videoCodecNames[i] = codec.Name; + _videoCodecConfigurable[i] = codec.HasConfigwindow; + i++; + } + } + if (CodecManager.AudioCodecs.Count > 0) + { + _audioCodecNames = new string[CodecManager.AudioCodecs.Count]; + _audioCodecConfigurable = new bool[CodecManager.AudioCodecs.Count]; + int i = 0; + foreach (Codec codec in CodecManager.AudioCodecs) + { + _audioCodecNames[i] = codec.Name; + _audioCodecConfigurable[i] = codec.HasConfigwindow; + i++; + } + } + int numAudioDevices = NativePlugin.GetAudioInputDeviceCount(); + if (numAudioDevices > 0) + { + _audioDeviceNames = new string[numAudioDevices]; + for (int i = 0; i < numAudioDevices; i++) + { + _audioDeviceNames[i] = NativePlugin.GetAudioInputDeviceName(i); + } + } + + _movieCapture.SelectVideoCodec(); + _movieCapture.SelectAudioCodec(); + _movieCapture.SelectAudioInputDevice(); + } + + private void OnGUI() + { + GUI.skin = _guiSkin; + GUI.depth = -10; + + if (_tintableBox == null) + { + _tintableBox = new GUIStyle(GUI.skin.box); + _tintableBox.normal.background = Texture2D.whiteTexture; + _tintableBox.border.left = _tintableBox.border.right = _tintableBox.border.top = _tintableBox.border.bottom = 0; + } + + #if (UNITY_IOS || UNITY_ANDROID) && !UNITY_EDITOR + float sf = Screen.dpi > 300.0f ? 2.0f : 1.5f; + #else + float sf = 1.0f; + #endif + if (Screen.width >= Screen.height) + GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, new Vector3(Screen.width / 1920f * sf, Screen.height / 1080f * sf, 1f)); + else + GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, new Vector3(Screen.width / 1080f * sf, Screen.height / 1920f * sf, 1f)); + + if (_showUI) + { + #if UNITY_IOS && !UNITY_EDITOR_OSX + float y = 40.0f; + #else + float y = 0.0f; + #endif + GUILayout.Window(4, new Rect(0f, y, 480f, 256f), MyWindow, "AVPro Movie Capture UI"); + } + } + + private void MyWindow(int id) + { + if (_movieCapture == null) + { + GUILayout.Label("CaptureGUI - No CaptureFrom component set"); + return; + } + + // NOTE: From Unity 2020.1 onwards it seems this correction isn't needed, but it's needed + // for older versions of Unity when running in Linear colorspace + bool sRGBWritePrev = GL.sRGBWrite; + GL.sRGBWrite = false; + + if (_movieCapture.IsCapturing()) + { + GUI_RecordingStatus(); + GL.sRGBWrite = sRGBWritePrev; + return; + } + + GUILayout.BeginVertical(); + + if (_movieCapture != null) + { + GUILayout.Label("Resolution:"); + GUILayout.BeginHorizontal(); + _downScaleIndex = GUILayout.SelectionGrid(_downScaleIndex, _downScales, _downScales.Length); + switch (_downScaleIndex) + { + case 0: + _movieCapture.ResolutionDownScale = CaptureBase.DownScale.Original; + break; + case 1: + _movieCapture.ResolutionDownScale = CaptureBase.DownScale.Half; + break; + case 2: + _movieCapture.ResolutionDownScale = CaptureBase.DownScale.Quarter; + break; + case 3: + _movieCapture.ResolutionDownScale = CaptureBase.DownScale.Eighth; + break; + case 4: + _movieCapture.ResolutionDownScale = CaptureBase.DownScale.Sixteenth; + break; + case 5: + _movieCapture.ResolutionDownScale = CaptureBase.DownScale.Custom; + break; + } + GUILayout.EndHorizontal(); + + GUILayout.BeginHorizontal(GUILayout.Width(256)); + if (_movieCapture.ResolutionDownScale == CaptureBase.DownScale.Custom) + { + string maxWidthString = GUILayout.TextField(Mathf.FloorToInt(_movieCapture.ResolutionDownscaleCustom.x).ToString(), 4); + int maxWidth = 0; + if (int.TryParse(maxWidthString, out maxWidth)) + { + _movieCapture.ResolutionDownscaleCustom = new Vector2(Mathf.Clamp(maxWidth, 0, NativePlugin.MaxRenderWidth), _movieCapture.ResolutionDownscaleCustom.y); + } + + GUILayout.Label("x", GUILayout.Width(20)); + + string maxHeightString = GUILayout.TextField(Mathf.FloorToInt(_movieCapture.ResolutionDownscaleCustom.y).ToString(), 4); + int maxHeight = 0; + if (int.TryParse(maxHeightString, out maxHeight)) + { + _movieCapture.ResolutionDownscaleCustom = new Vector2(_movieCapture.ResolutionDownscaleCustom.x, Mathf.Clamp(maxHeight, 0, NativePlugin.MaxRenderHeight)); + } + } + GUILayout.EndHorizontal(); + + GUILayout.Space(16f); + + GUILayout.Label("Frame Rate: " + _movieCapture.FrameRate.ToString("F2")); + GUILayout.BeginHorizontal(); + for (int i = 0; i < CommonFrameRateNames.Length; i++) + { + if (GUILayout.Toggle(_movieCapture.FrameRate == CommonFrameRateValues[i], CommonFrameRateNames[i])) + { + _movieCapture.FrameRate = CommonFrameRateValues[i]; + } + } + GUILayout.EndHorizontal(); + + GUILayout.Space(16f); + + GUILayout.BeginHorizontal(); + GUILayout.Label("Output:", GUILayout.ExpandWidth(false)); + OutputTarget outputType = (OutputTarget)GUILayout.SelectionGrid((int)_movieCapture.OutputTarget, _outputType, _outputType.Length); + if (outputType != _movieCapture.OutputTarget) + { + _movieCapture.OutputTarget = outputType; + // TODO: Set this to last used or sensible platform default + switch (outputType) { + case OutputTarget.VideoFile: + break; + case OutputTarget.ImageSequence: + break; + case OutputTarget.NamedPipe: + break; + } + } + GUILayout.EndHorizontal(); + + GUILayout.Space(16f); + + _movieCapture.IsRealTime = GUILayout.Toggle(_movieCapture.IsRealTime, "RealTime"); + + GUILayout.Space(16f); + + + if (_movieCapture.OutputTarget == OutputTarget.VideoFile) + { + // Video Codec + GUILayout.BeginHorizontal(); + if (_shownSection != Section.VideoCodecs) + { + if (GUILayout.Button("+", GUILayout.Width(24))) + { + _shownSection = Section.VideoCodecs; + } + } + else + { + if (GUILayout.Button("-", GUILayout.Width(24))) + { + _shownSection = Section.None; + } + } + GUILayout.Label("Using Video Codec: " + ((_movieCapture.SelectedVideoCodec != null)?_movieCapture.SelectedVideoCodec.Name:"None")); +#if UNITY_EDITOR_WIN || (!UNITY_EDITOR && UNITY_STANDALONE_WIN) + if (_movieCapture.SelectedVideoCodec != null && _movieCapture.SelectedVideoCodec.HasConfigwindow) + { + GUILayout.Space(16f); + if (GUILayout.Button("Configure Codec")) + { + _movieCapture.SelectedVideoCodec.ShowConfigWindow(); + } + } +#endif + GUILayout.EndHorizontal(); + + if (_videoCodecNames != null && _shownSection == Section.VideoCodecs) + { + GUILayout.Label("Select Video Codec:"); + _videoPos = GUILayout.BeginScrollView(_videoPos, GUILayout.Height(100)); + int videoIndex = _movieCapture.NativeForceVideoCodecIndex; + int newCodecIndex = GUILayout.SelectionGrid(videoIndex, _videoCodecNames, 1); + GUILayout.EndScrollView(); + + if (newCodecIndex != videoIndex) + { + _movieCapture.NativeForceVideoCodecIndex = newCodecIndex; + Codec newCodec = _movieCapture.SelectVideoCodec(); + if (newCodec != null) + { + _movieCapture.NativeForceVideoCodecIndex = newCodec.Index; + } + newCodec = _movieCapture.SelectAudioCodec(); + if (newCodec != null) + { + _movieCapture.NativeForceAudioCodecIndex = newCodec.Index; + } + Device newDevice = _movieCapture.SelectAudioInputDevice(); + if (newDevice != null) + { + _movieCapture.ForceAudioInputDeviceIndex = newDevice.Index; + } + _shownSection = Section.None; + } + } + GUILayout.Space(16f); + + + GUILayout.BeginHorizontal(); + GUILayout.Label("Audio Source:", GUILayout.ExpandWidth(false)); + _movieCapture.AudioCaptureSource = (AudioCaptureSource)GUILayout.SelectionGrid((int)_movieCapture.AudioCaptureSource, new string[] { "None", "Unity", "Microphone", "Manual", "Wwise" }, 5); + GUILayout.EndHorizontal(); + GUILayout.Space(16f); + + GUI.enabled = (_movieCapture.IsRealTime || _movieCapture.AudioCaptureSource == AudioCaptureSource.Manual + #if AVPRO_MOVIECAPTURE_OFFLINE_AUDIOCAPTURE + || _movieCapture.AudioCaptureSource == AudioCaptureSource.Unity + #endif + || _movieCapture.AudioCaptureSource == AudioCaptureSource.Wwise + ); + + if (_movieCapture.AudioCaptureSource == AudioCaptureSource.Microphone && _audioDeviceNames != null) + { + // Audio Device + GUILayout.BeginHorizontal(); + if (_shownSection != Section.AudioInputDevices) + { + if (GUILayout.Button("+", GUILayout.Width(24))) + { + _shownSection = Section.AudioInputDevices; + } + } + else + { + if (GUILayout.Button("-", GUILayout.Width(24))) + { + _shownSection = Section.None; + } + } + + if (_movieCapture.ForceAudioInputDeviceIndex >= 0 && _movieCapture.ForceAudioInputDeviceIndex < _audioDeviceNames.Length) + { + GUILayout.Label("Using Microphone: " + _audioDeviceNames[_movieCapture.ForceAudioInputDeviceIndex]); + } + GUILayout.EndHorizontal(); + + if (_shownSection == Section.AudioInputDevices) + { + GUILayout.Label("Select Microphone:"); + _audioPos = GUILayout.BeginScrollView(_audioPos, GUILayout.Height(100)); + int audioIndex = _movieCapture.ForceAudioInputDeviceIndex; + int newAudioIndex = GUILayout.SelectionGrid(audioIndex, _audioDeviceNames, 1); + GUILayout.EndScrollView(); + + if (newAudioIndex != audioIndex) + { + _movieCapture.ForceAudioInputDeviceIndex = newAudioIndex; + Device newDevice = _movieCapture.SelectAudioInputDevice(); + if (newDevice != null) + { + _movieCapture.ForceAudioInputDeviceIndex = newDevice.Index; + } + _shownSection = Section.None; + } + } + GUILayout.Space(16f); + } + if (_movieCapture.AudioCaptureSource != AudioCaptureSource.None) + { + // Audio Codec + GUILayout.BeginHorizontal(); + if (_shownSection != Section.AudioCodecs) + { + if (GUILayout.Button("+", GUILayout.Width(24))) + { + _shownSection = Section.AudioCodecs; + } + } + else + { + if (GUILayout.Button("-", GUILayout.Width(24))) + { + _shownSection = Section.None; + } + } + GUILayout.Label("Using Audio Codec: " + ((_movieCapture.SelectedAudioCodec != null)?_movieCapture.SelectedAudioCodec.Name:"None")); + if (_movieCapture.SelectedAudioCodec != null && _movieCapture.SelectedAudioCodec.HasConfigwindow) + { + GUILayout.Space(16f); + if (GUILayout.Button("Configure Codec")) + { + _movieCapture.SelectedAudioCodec.ShowConfigWindow(); + } + } + GUILayout.EndHorizontal(); + + if (_audioCodecNames != null && _shownSection == Section.AudioCodecs) + { + GUILayout.Label("Select Audio Codec:"); + _audioCodecPos = GUILayout.BeginScrollView(_audioCodecPos, GUILayout.Height(100)); + int codecIndex = _movieCapture.NativeForceAudioCodecIndex; + int newCodecIndex = GUILayout.SelectionGrid(codecIndex, _audioCodecNames, 1); + GUILayout.EndScrollView(); + if (newCodecIndex != codecIndex) + { + _movieCapture.NativeForceAudioCodecIndex = newCodecIndex; + Codec newCodec = _movieCapture.SelectAudioCodec(); + if (newCodec != null) + { + _movieCapture.NativeForceAudioCodecIndex = newCodec.Index; + } + newCodec = _movieCapture.SelectVideoCodec(); + if (newCodec != null) + { + _movieCapture.NativeForceVideoCodecIndex = newCodec.Index; + } + newCodec = _movieCapture.SelectAudioCodec(); + if (newCodec != null) + { + _movieCapture.NativeForceAudioCodecIndex = newCodec.Index; + } + Device newDevice = _movieCapture.SelectAudioInputDevice(); + if (newDevice != null) + { + _movieCapture.ForceAudioInputDeviceIndex = newDevice.Index; + } + _shownSection = Section.None; + } + + } + GUILayout.Space(16f); + } + + GUI.enabled = true; + + GUILayout.Space(16f); + } + else if (_movieCapture.OutputTarget == OutputTarget.ImageSequence) + { + // Image Codec + GUILayout.BeginHorizontal(); + if (_shownSection != Section.ImageCodecs) + { + if (GUILayout.Button("+", GUILayout.Width(24))) + { + _shownSection = Section.ImageCodecs; + } + } + else + { + if (GUILayout.Button("-", GUILayout.Width(24))) + { + _shownSection = Section.None; + } + } + GUILayout.Label("Using Image Codec: " + _movieCapture.NativeImageSequenceFormat); + GUILayout.EndHorizontal(); + + if (_shownSection == Section.ImageCodecs) + { + GUILayout.Label("Select Image Codec:"); + _imageCodecPos = GUILayout.BeginScrollView(_imageCodecPos, GUILayout.Height(100)); + int newCodecIndex = GUILayout.SelectionGrid(-1, Utils.GetNativeImageSequenceFormatNames(), 1); + GUILayout.EndScrollView(); + if (newCodecIndex >= 0) + { + _movieCapture.NativeImageSequenceFormat = (ImageSequenceFormat)newCodecIndex; + _shownSection = Section.None; + } + } + GUILayout.Space(16f); + } + + GUILayout.BeginHorizontal(); + if (_movieCapture.OutputTarget == OutputTarget.VideoFile) + { + _movieCapture.AllowManualFileExtension = false; + GUILayout.Label("Filename Prefix: "); + _movieCapture.FilenamePrefix = GUILayout.TextField(_movieCapture.FilenamePrefix, 64); + } + else if (_movieCapture.OutputTarget == OutputTarget.ImageSequence) + { + GUILayout.Label("Filename Prefix: "); + _movieCapture.FilenamePrefix = GUILayout.TextField(_movieCapture.FilenamePrefix, 64); + } + else if (_movieCapture.OutputTarget == OutputTarget.NamedPipe) + { + GUILayout.Label("Path: "); + _movieCapture.NamedPipePath = GUILayout.TextField(_movieCapture.NamedPipePath, 64); + } + + + GUILayout.EndHorizontal(); + GUILayout.Space(16f); + GUILayout.Space(16f); + + if (_whenRecordingAutoHideUI) + { + GUILayout.Label("(Press CTRL-F5 to stop capture)"); + } + + GUILayout.BeginHorizontal(); + if (!_movieCapture.IsCapturing()) + { + GUI.color = Color.green; + if (GUILayout.Button(_movieCapture.IsRealTime?"Start Capture":"Start Render")) + { + StartCapture(); + } + GUI.color = Color.white; + } + else + { + /*if (!_movieCapture.IsPaused()) + { + if (GUILayout.Button("Pause Capture")) + { + PauseCapture(); + } + } + else + { + if (GUILayout.Button("Resume Capture")) + { + ResumeCapture(); + } + } + + if (GUILayout.Button("Cancel Capture")) + { + CancelCapture(); + } + if (GUILayout.Button("Stop Capture")) + { + StopCapture(); + }*/ + } + GUILayout.EndHorizontal(); + + if (_movieCapture.IsCapturing()) + { + if (!string.IsNullOrEmpty(_movieCapture.LastFilePath)) + { + GUILayout.Label("Writing file: '" + System.IO.Path.GetFileName(_movieCapture.LastFilePath) + "'"); + } + } + else + { + if (!string.IsNullOrEmpty(CaptureBase.LastFileSaved)) + { + GUILayout.Space(16f); + GUILayout.Label("Last file written: '" + System.IO.Path.GetFileName(CaptureBase.LastFileSaved) + "'"); + + GUILayout.BeginHorizontal(); + #if (!UNITY_EDITOR && UNITY_ANDROID) + #else + if (GUILayout.Button("Browse")) + { + Utils.ShowInExplorer(CaptureBase.LastFileSaved); + } + #endif + Color prevColor = GUI.color; + GUI.color = Color.cyan; + if (GUILayout.Button("View Last Capture")) + { + #if (!UNITY_EDITOR && UNITY_ANDROID) + if (CaptureBase.LastFileSaved.ToLower().EndsWith(".mp4")) + { + Handheld.PlayFullScreenMovie(CaptureBase.LastFileSaved, Color.black, FullScreenMovieControlMode.CancelOnInput); + } + #else + Utils.OpenInDefaultApp(CaptureBase.LastFileSaved); + #endif + } + GUI.color = prevColor; + + GUILayout.EndHorizontal(); + } + } + } + + GUILayout.EndVertical(); + + GL.sRGBWrite = sRGBWritePrev; + } + + private void GUI_RecordingStatus() + { + GUILayout.Space(8.0f); + DrawPauseResumeButtons(); + GUILayout.Label("Output", GUI.skin.box); + GUILayout.BeginVertical(GUI.skin.box); + + Texture texture = _movieCapture.GetPreviewTexture(); + if (texture != null) + { + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + float width = (Screen.width / 8f); + float aspect = (float)texture.width / (float)texture.height; + Rect textureRect = GUILayoutUtility.GetRect(width, width / aspect, GUILayout.ExpandWidth(false), GUILayout.ExpandHeight(false)); + GUI.DrawTexture(textureRect, texture, ScaleMode.ScaleToFit, false); + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + } + + GUILayout.Label(System.IO.Path.GetFileName(_movieCapture.LastFilePath), GUI.skin.box); + GUILayout.Space(8.0f); + + GUILayout.Label("Video", GUI.skin.box); + DrawGuiField("Dimensions", _movieCapture.GetRecordingWidth() + "x" + _movieCapture.GetRecordingHeight() + " @ " + _movieCapture.FrameRate.ToString("F2") + "hz"); + if (_movieCapture.OutputTarget == OutputTarget.VideoFile) + { + DrawGuiField("Codec", (_movieCapture.SelectedVideoCodec != null)?_movieCapture.SelectedVideoCodec.Name:"None"); + } + else if (_movieCapture.OutputTarget == OutputTarget.ImageSequence) + { + DrawGuiField("Codec",_movieCapture.NativeImageSequenceFormat.ToString()); + } + + if (_movieCapture.OutputTarget == OutputTarget.VideoFile) + { + if (_movieCapture.CaptureStats.AudioCaptureSource != AudioCaptureSource.None) + { + GUILayout.Label("Audio", GUI.skin.box); + if (_movieCapture.AudioCaptureSource == AudioCaptureSource.Unity) + { + DrawGuiField("Source", "Unity"); + } + else if (_movieCapture.AudioCaptureSource == AudioCaptureSource.Microphone) + { + DrawGuiField("Source", (_movieCapture.SelectedAudioInputDevice != null)?_movieCapture.SelectedAudioInputDevice.Name:"None"); + } + DrawGuiField("Codec", (_movieCapture.SelectedAudioCodec != null)?_movieCapture.SelectedAudioCodec.Name:"None"); + if (_movieCapture.AudioCaptureSource == AudioCaptureSource.Unity) + { + DrawGuiField("Sample Rate", _movieCapture.CaptureStats.UnityAudioSampleRate.ToString() + "hz"); + DrawGuiField("Channels", _movieCapture.CaptureStats.UnityAudioChannelCount.ToString()); + } + } + } + + GUILayout.EndVertical(); + + GUILayout.Space(8.0f); + + // Draw progress bar + if (_movieCapture.StopMode != (int)StopMode.None) + { + Rect r = GUILayoutUtility.GetRect(128f, GUI.skin.label.CalcHeight(GUIContent.none, 32f), GUILayout.ExpandWidth(true)); + float progress = _movieCapture.GetProgress(); + Rect progressRect = new Rect(r); + progressRect.width *= progress; + GUI.color = new Color(0f, 0.5f, 0f, 1f); + GUI.Box(progressRect, GUIContent.none, _tintableBox); + GUI.color = Color.white; + GUI.backgroundColor = Color.clear; + GUI.Box(r, (progress * 100f).ToString("F1") + "%", _tintableBox); + GUI.color = Color.white; + } + + GUILayout.Label("Stats", GUI.skin.box); + GUILayout.BeginVertical(GUI.skin.box); + + if (_movieCapture.CaptureStats.FPS > 0f) + { + Color originalColor = GUI.color; + if (_movieCapture.IsRealTime) + { + float fpsDelta = (_movieCapture.CaptureStats.FPS - _movieCapture.FrameRate); + GUI.color = Color.red; + if (fpsDelta > -10) + { + GUI.color = Color.yellow; + } + if (fpsDelta > -2) + { + GUI.color = Color.green; + } + } + + DrawGuiField("Capture Rate", string.Format("{0:0.##} / {1:F2} FPS", _movieCapture.CaptureStats.FPS, _movieCapture.FrameRate)); + + GUI.color = originalColor; + } + else + { + DrawGuiField("Capture Rate", string.Format(".. / {0:F2} FPS", _movieCapture.FrameRate)); + } + + DrawGuiField("File Size", ((float)_lastFileSize / (1024f * 1024f)).ToString("F1") + "MB"); + DrawGuiField("Video Length", _lastEncodedMinutes.ToString("00") + ":" + _lastEncodedSeconds.ToString("00") + "." + _lastEncodedFrame.ToString("000")); + + GUILayout.Label("Dropped Frames", GUI.skin.box); + DrawGuiField("In Unity", _movieCapture.CaptureStats.NumDroppedFrames.ToString()); + DrawGuiField("In Encoder ", _movieCapture.CaptureStats.NumDroppedEncoderFrames.ToString()); + if (_movieCapture.CaptureStats.AudioCaptureSource != AudioCaptureSource.None) + { + if (_movieCapture.AudioCaptureSource == AudioCaptureSource.Unity && _movieCapture.UnityAudioCapture != null) + { + DrawGuiField("Audio Overflows", _movieCapture.UnityAudioCapture.OverflowCount.ToString()); + } + } + + GUILayout.EndVertical(); + } + + private void DrawPauseResumeButtons() + { + GUILayout.BeginHorizontal(); + + if (!_movieCapture.IsPaused()) + { + GUI.backgroundColor = Color.yellow; + if (GUILayout.Button("Pause Capture")) + { + PauseCapture(); + } + } + else + { + GUI.backgroundColor = Color.green; + if (GUILayout.Button("Resume Capture")) + { + ResumeCapture(); + } + } + + GUI.backgroundColor = Color.cyan; + if (GUILayout.Button("Cancel Capture")) + { + CancelCapture(); + } + GUI.backgroundColor = Color.red; + if (GUILayout.Button("Stop Capture")) + { + StopCapture(); + } + GUI.backgroundColor = Color.white; + + GUILayout.EndHorizontal(); + } + + private void DrawGuiField(string a, string b) + { + GUILayout.BeginHorizontal(); + GUILayout.Label(a); + GUILayout.FlexibleSpace(); + GUILayout.Label(b); + GUILayout.EndHorizontal(); + } + + private void StartCapture() + { + _lastFileSize = 0; + _lastEncodedMinutes = _lastEncodedSeconds = _lastEncodedFrame = 0; + if (_whenRecordingAutoHideUI) + { + _showUI = false; + } + if (_movieCapture != null) + { + _movieCapture.StartCapture(); + } + } + + private void StopCapture() + { + if (_movieCapture != null) + { + _movieCapture.StopCapture(); + } + } + + private void CancelCapture() + { + if (_movieCapture != null) + { + _movieCapture.CancelCapture(); + } + } + + private void ResumeCapture() + { + if (_movieCapture != null) + { + _movieCapture.ResumeCapture(); + } + } + + private void PauseCapture() + { + if (_movieCapture != null) + { + _movieCapture.PauseCapture(); + } + } + + private void Update() + { + if (_movieCapture != null) + { + if (_whenRecordingAutoHideUI && !_showUI) + { + if (!_movieCapture.IsCapturing()) + _showUI = true; + } + + if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.F5)) + { + if (_movieCapture.IsCapturing()) + { + _movieCapture.StopCapture(); + } + } + + if (_movieCapture.IsCapturing()) + { + _lastFileSize = _movieCapture.GetCaptureFileSize(); + if (!_movieCapture.IsRealTime) + { + _lastEncodedSeconds = (uint)Mathf.FloorToInt((float)_movieCapture.CaptureStats.NumEncodedFrames / _movieCapture.FrameRate); + } + else + { + _lastEncodedSeconds = _movieCapture.CaptureStats.TotalEncodedSeconds; + } + _lastEncodedMinutes = _lastEncodedSeconds / 60; + _lastEncodedSeconds = _lastEncodedSeconds % 60; + _lastEncodedFrame = _movieCapture.CaptureStats.NumEncodedFrames % (uint)_movieCapture.FrameRate; + } + } + } + } +} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureGUI.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureGUI.cs.meta new file mode 100644 index 0000000..1cc62d1 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/CaptureGUI.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7ca3e27221be35d41a4ff608f4ef327e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 500 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/MotionBlur.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/MotionBlur.cs new file mode 100644 index 0000000..0c100aa --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/MotionBlur.cs @@ -0,0 +1,250 @@ +using UnityEngine; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Accumulates frames to average for generating motion blur in renders + /// + [AddComponentMenu("AVPro Movie Capture/Utils/Motion Blur", 301)] + public class MotionBlur : MonoBehaviour + { + [SerializeField] RenderTextureFormat _format = RenderTextureFormat.ARGBFloat; + [SerializeField] int _numSamples = 16; + + // State + private RenderTexture _accum; + private RenderTexture _lastComp; + private Material _addMaterial; + private Material _divMaterial; + private int _frameCount; + private int _targetWidth; + private int _targetHeight; + private bool _isDirty; + + private static int _propNumSamples; + private static int _propWeight; + + public bool IsFrameAccumulated + { + get; + private set; + } + + public int NumSamples + { + get { return _numSamples; } + set { _numSamples = value; OnNumSamplesChanged(); } + } + + public int FrameCount + { + get { return _frameCount; } + } + + public RenderTexture FinalTexture + { + get { return _lastComp; } + } + + private void Awake() + { + if (_propNumSamples == 0) + { + _propNumSamples = Shader.PropertyToID("_NumSamples"); + _propWeight = Shader.PropertyToID("_Weight"); + } + } + + public void SetTargetSize(int width, int height) + { + if (_targetWidth != width || _targetHeight != height) + { + _targetWidth = width; + _targetHeight = height; + _isDirty = true; + } + } + + private void Start() + { + Setup(); + } + + private void OnEnable() + { + _frameCount = 0; + IsFrameAccumulated = false; + ClearAccumulation(); + } + + private void Setup() + { + if (_addMaterial == null) + { + Shader addShader = Resources.Load("AVProMovieCapture_MotionBlur_Add"); + Shader divShader = Resources.Load("AVProMovieCapture_MotionBlur_Div"); + _addMaterial = new Material(addShader); + _divMaterial = new Material(divShader); + } + + if (_targetWidth == 0 && _targetHeight == 0) + { + // TODO: change the size of these RenderTextures based on the output size of the capture + _targetWidth = Screen.width; + _targetHeight = Screen.height; + } + + if (_accum != null) + { + _accum.Release(); + RenderTexture.Destroy(_accum); + _accum = null; + } + if (_lastComp != null) + { + _lastComp.Release(); + RenderTexture.Destroy(_lastComp); + _lastComp = null; + } + + _accum = new RenderTexture(_targetWidth, _targetHeight, 0, _format, RenderTextureReadWrite.Default); + _lastComp = new RenderTexture(_targetWidth, _targetHeight, 0, RenderTextureFormat.Default, RenderTextureReadWrite.Default); + _accum.filterMode = FilterMode.Point; + _lastComp.filterMode = FilterMode.Bilinear; + _accum.Create(); + _lastComp.Create(); + + OnNumSamplesChanged(); + + _isDirty = false; + } + + private void ClearAccumulation() + { + RenderTexture prev = RenderTexture.active; + RenderTexture.active = _accum; + GL.Clear(false, true, Color.black); + RenderTexture.active = prev; + } + + private void OnDestroy() + { + if (_addMaterial != null) + { + Material.Destroy(_addMaterial); + _addMaterial = null; + } + if (_divMaterial != null) + { + Material.Destroy(_divMaterial); + _divMaterial = null; + } + + if (_accum != null) + { + _accum.Release(); + RenderTexture.Destroy(_accum); + _accum = null; + } + if (_lastComp != null) + { + _lastComp.Release(); + RenderTexture.Destroy(_lastComp); + _lastComp = null; + } + } + + public void OnNumSamplesChanged() + { + if (_divMaterial != null) + { + _addMaterial.SetFloat(_propWeight, 1f); + _divMaterial.SetFloat(_propNumSamples, _numSamples); + } + } + + private static float LerpUnclamped(float a, float b, float t) + { + return a + ((b - a) * t); + } + + [SerializeField] + public float _bias = 1f; + + private float _total = 0f; + + private void ApplyWeighting() + { + // Apply some frame weighting so the newer frames have the most contribution + // Not sure this is better than non-weighted averaging. + float weight = ((float)_frameCount / (float)_numSamples); + weight = Mathf.Pow(weight, 2f); + _total += weight; + float numSamples = ((float)_numSamples / 2f) + 0.5f; + numSamples = _total; + weight = LerpUnclamped(weight, 1f, _bias); + numSamples = LerpUnclamped(numSamples, _numSamples, _bias); + _addMaterial.SetFloat(_propWeight, weight); + _divMaterial.SetFloat(_propNumSamples, numSamples); + } + + public void Accumulate(Texture src) + { + if (_isDirty) + { + Setup(); + } + //ApplyWeighting(); + //_divMaterial.SetFloat(_propNumSamples, _numSamples); + + Graphics.Blit(src, _accum, _addMaterial); + _frameCount++; + + if (_frameCount >= _numSamples) + { + // Divide the accumation texture + Graphics.Blit(_accum, _lastComp, _divMaterial); + + // Clear the accumation texture so it is ready to start again + ClearAccumulation(); + + //Graphics.Blit(src, _accum, _addMaterial); + //Graphics.Blit(_lastComp, _accum, _divMaterial); + IsFrameAccumulated = true; + _frameCount = 0; + _total = 0f; + } + else + { + IsFrameAccumulated = false; + } + } + + private void OnRenderImage(RenderTexture src, RenderTexture dst) + { + // Take the result of the camera render and accumulate it + // NOTE: Some capture components disable the this MotionBlur component so that OnRenderImage() isn't called as the component is used manually + Accumulate(src); + Graphics.Blit(_lastComp, dst); + } + + /*void OnGUI() + { + GUILayout.Label("Real (slow) Motion Blur Demo"); + GUILayout.BeginHorizontal(); + GUILayout.Label("Samples"); + int numSamples = (int)GUILayout.HorizontalSlider(_numSamples, 1, 64, GUILayout.Width(128f)); + if (numSamples != _numSamples) + { + _numSamples = numSamples; + OnNumSamplesChanged(); + } + GUILayout.Label(_numSamples.ToString()); + GUILayout.EndHorizontal(); + }*/ + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/MotionBlur.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/MotionBlur.cs.meta new file mode 100644 index 0000000..16338cf --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/MotionBlur.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 1162239fab614b546b7002771f32f83f +MonoImporter: + serializedVersion: 2 + defaultReferences: + - _addShader: {fileID: 4800000, guid: 6550cb921f6637a44afa8288b2f14b10, type: 3} + - _divShader: {fileID: 4800000, guid: dbc6e2b736a206b46bc8f26e05240095, type: 3} + executionOrder: 0 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/MouseCursor.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/MouseCursor.cs new file mode 100644 index 0000000..4a80658 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/MouseCursor.cs @@ -0,0 +1,52 @@ +using UnityEngine; +using System.Collections; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Draws a mouse cursor on the screen using IMGUI, allowing the cursor to be captured when using CaptureFromScreen component + /// + [AddComponentMenu("AVPro Movie Capture/Utils/Render Mouse Cursor", 302)] + public class MouseCursor : MonoBehaviour + { + [SerializeField] Texture2D _texture = null; + [SerializeField] Vector2 _hotspotOffset = Vector2.zero; + [SerializeField, Range(1, 16)] int _sizeScale = 1; + [SerializeField] int _depth = -9999; + + // State + private GUIContent _content; + + void Start() + { + SetTexture(_texture); + } + + public void SetTexture(Texture2D texture) + { + if (texture != null) + { + _content = new GUIContent(texture); + _texture = texture; + } + } + + private void OnGUI() + { + if (_content != null) + { + GUI.depth = _depth; + + Vector2 p = Event.current.mousePosition; + + Rect rect = new Rect(p.x - _hotspotOffset.x, p.y - _hotspotOffset.y, _texture.width * _sizeScale, _texture.height * _sizeScale); + + GUI.Label(rect, _content); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/MouseCursor.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/MouseCursor.cs.meta new file mode 100644 index 0000000..81e2075 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/MouseCursor.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 91143688852a8eb4aa503b8dbec98438 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/TimelineController.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/TimelineController.cs new file mode 100644 index 0000000..3a5cf13 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/TimelineController.cs @@ -0,0 +1,259 @@ +#if UNITY_2017_1_OR_NEWER +using UnityEngine; +using System.Collections.Generic; +using UnityEngine.SceneManagement; +using UnityEngine.Playables; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Controls timeline updates time during offline captures + /// This class used to try to control the timestep of the Timeline, but features like Markers/Signals no longer work in Manual update mode + /// So now we just change any DSPClock directors to GameTime + /// + [AddComponentMenu("AVPro Movie Capture/Utils/Timeline Controller", 300)] + public class TimelineController : MonoBehaviour + { + public enum ScanFrequencyMode + { + SceneLoad, + Frame, + } + + [SerializeField] ScanFrequencyMode _scanFrequency = ScanFrequencyMode.SceneLoad; + + public ScanFrequencyMode ScanFrequency + { + get { return _scanFrequency; } + set { _scanFrequency = value; ResetSceneLoading(); } + } + + internal class TimelineInstance + { + private PlayableDirector _director = null; + private DirectorUpdateMode _originalTimeUpdateMode = DirectorUpdateMode.DSPClock; + private bool _isControlling = false; + private bool _isCapturing = false; + + internal TimelineInstance(PlayableDirector director) + { + _director = director; + } + + internal bool Is(PlayableDirector director) + { + return (_director == director); + } + + internal void StartCapture() + { + // First capture to touch the playable directors + if (!_isCapturing) + { + // Null check in case director no longer exists + if (_director != null) + { + // Want to manually update? + // TODO: should we include ALL directors, as they may switch from manual to something else later on? + // DSPClock doesn't change rate when rendering offline, so we need to change to GameTime + _isControlling = (_director.timeUpdateMode == DirectorUpdateMode.DSPClock); + + if (_isControlling) + { + // Cache original update mode + _originalTimeUpdateMode = _director.timeUpdateMode; + + bool wasPlaying = (_director.state == PlayState.Playing); + + // Set to manual update mode + // NOTE: Prior to Unity 2018.2 changing from DSP Clock to Manual did nothing, as DSP Clock mode was set to ignore manual updates + _director.timeUpdateMode = DirectorUpdateMode.GameTime; + + // NOTE: In newer versions of Unity (post 2018.2) changing the timeUpdateMode to Manual pauses playback, so we must resume it + if (wasPlaying && _director.state == PlayState.Paused) + { + _director.Resume(); + } + } + } + _isCapturing = true; + } + } + + #if false + internal void Update(float deltaTime) + { + if (_isControlling && _isCapturing) + { + if (_director != null && _director.isActiveAndEnabled) + { + if (_director.state == PlayState.Playing) + { + double time = _director.time + deltaTime; + if (time < _director.duration) + { + _director.time = time; + _director.Evaluate(); + } + else + { + switch (_director.extrapolationMode) + { + case DirectorWrapMode.Loop: + _director.time = time % _director.duration; + _director.Evaluate(); + break; + case DirectorWrapMode.Hold: + _director.time = _director.duration; + _director.Evaluate(); + break; + case DirectorWrapMode.None: + _director.time = 0f; + _director.Pause(); + break; + } + } + } + } + } + } + #endif + + internal void StopCapture() + { + if (_isCapturing) + { + // TODO: what happens to the director when the scene is unloaded? + if (_director != null) + { + // We were controlling? + if (_isControlling) + { + bool wasPlaying = (_director.state == PlayState.Playing); + + // Revert update mode to original + _director.timeUpdateMode = _originalTimeUpdateMode; + + if (wasPlaying) + { + // Timeline seems to get paused after changing play mode (in some versions of Unity), only a pause and resume keeps it going + _director.Pause(); + _director.Resume(); + } + _isControlling = false; + } + } + _isCapturing = false; + } + } + } + + private List _timelines = new List(8); + + void Awake() + { + ResetSceneLoading(); + } + + void OnValidate() + { + ResetSceneLoading(); + } + + internal void UpdateFrame() + { + if (_scanFrequency == ScanFrequencyMode.Frame) + { + ScanForPlayableDirectors(); + } + #if false + foreach (TimelineInstance timeline in _timelines) + { + timeline.Update(Time.deltaTime); + } + #endif + } + + internal void StartCapture() + { + ScanForPlayableDirectors(); + foreach (TimelineInstance timeline in _timelines) + { + timeline.StartCapture(); + } + } + + internal void StopCapture() + { + foreach (TimelineInstance timeline in _timelines) + { + timeline.StopCapture(); + } + } + + public void ScanForPlayableDirectors() + { + // Remove any timeline instances with deleted (null) directors + for (int i = 0; i < _timelines.Count; i++) + { + TimelineInstance timeline = _timelines[i]; + if (timeline.Is(null)) + { + _timelines.RemoveAt(i); i--; + } + } + + // Find all inactive and active directors + PlayableDirector[] directors = Resources.FindObjectsOfTypeAll(); + + // Create a unique instance for each director + foreach (PlayableDirector playableDirector in directors) + { + // Check we don't already have this director + bool hasDirector = false; + foreach (TimelineInstance timeline in _timelines) + { + if (timeline.Is(playableDirector)) + { + hasDirector = true; + break; + } + } + + // Add to the list + if (!hasDirector) + { + _timelines.Add(new TimelineInstance(playableDirector)); + } + } + } + + void OnDestroy() + { + SceneManager.sceneLoaded -= OnSceneLoaded; + StopCapture(); + } + + void ResetSceneLoading() + { + SceneManager.sceneLoaded -= OnSceneLoaded; + if (_scanFrequency == ScanFrequencyMode.SceneLoad) + { + SceneManager.sceneLoaded += OnSceneLoaded; + } + } + + void OnSceneLoaded(Scene scene, LoadSceneMode mode) + { + if (_scanFrequency == ScanFrequencyMode.SceneLoad) + { + ScanForPlayableDirectors(); + } + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/TimelineController.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/TimelineController.cs.meta new file mode 100644 index 0000000..dfcc907 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/TimelineController.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a645c0f2b1469bc43a83410d8b0896f7 +timeCreated: 1586269216 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/UnityAudioCapture.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/UnityAudioCapture.cs new file mode 100644 index 0000000..63a80cf --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/UnityAudioCapture.cs @@ -0,0 +1,87 @@ +using UnityEngine; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Base class for capturing audio from Unity + /// Two classes derive from this: + /// 1) CaptureAudioFromAudioListener - used for real-time capture + /// 2) CaptureAudioFromAudioRenderer - used for offline rendering + /// + public abstract class UnityAudioCapture : MonoBehaviour + { + public virtual int OverflowCount + { + get { return 0; } + } + + public abstract int SampleRate + { + get; + } + + public abstract int ChannelCount + { + get; + } + + public abstract void PrepareCapture(); + public abstract void StartCapture(); + public abstract void StopCapture(); + public abstract void FlushBuffer(); + + public virtual System.IntPtr ReadData(out int length) { length = 0; return System.IntPtr.Zero; } + + public static int GetUnityAudioChannelCount() + { + int result = GetChannelCount(AudioSettings.driverCapabilities); + if ( +#if !UNITY_2019_2_OR_NEWER + AudioSettings.speakerMode != AudioSpeakerMode.Raw && +#endif + AudioSettings.speakerMode < AudioSettings.driverCapabilities) + { + result = GetChannelCount(AudioSettings.speakerMode); + } + return result; + } + + private static int GetChannelCount(AudioSpeakerMode mode) + { + int result = 0; + switch (mode) + { +#if !UNITY_2019_2_OR_NEWER + case AudioSpeakerMode.Raw: + break; +#endif + case AudioSpeakerMode.Mono: + result = 1; + break; + case AudioSpeakerMode.Stereo: + result = 2; + break; + case AudioSpeakerMode.Quad: + result = 4; + break; + case AudioSpeakerMode.Surround: + result = 5; + break; + case AudioSpeakerMode.Mode5point1: + result = 6; + break; + case AudioSpeakerMode.Mode7point1: + result = 8; + break; + case AudioSpeakerMode.Prologic: + result = 2; + break; + } + return result; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/UnityAudioCapture.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/UnityAudioCapture.cs.meta new file mode 100644 index 0000000..b1513fd --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/UnityAudioCapture.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8085d0bf94f741a49b8983cb900c5865 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/VideoPlayerController.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/VideoPlayerController.cs new file mode 100644 index 0000000..510e1c2 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/VideoPlayerController.cs @@ -0,0 +1,368 @@ +#if UNITY_5_6_OR_NEWER +#if UNITY_2018_3_OR_NEWER // The "length" property is only supported from 2018.3 +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using UnityEngine.SceneManagement; +using UnityEngine.Video; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Controls VideoPlayer updates time during offline captures + /// + [AddComponentMenu("AVPro Movie Capture/Utils/VideoPlayer Controller", 300)] + public class VideoPlayerController : MonoBehaviour + { + public enum ScanFrequencyMode + { + SceneLoad, + Frame, + } + + [SerializeField] ScanFrequencyMode _scanFrequency = ScanFrequencyMode.SceneLoad; + + public ScanFrequencyMode ScanFrequency + { + get { return _scanFrequency; } + set { _scanFrequency = value; ResetSceneLoading(); } + } + + internal class VideoPlayerInstance + { + private VideoPlayer _videoPlayer = null; + private bool _isCapturing = false; + private bool _isControlling = false; + private bool _isSeekPending = false; + private double _videoTime = 0.0; + private float _postSeekTimer = 0f; + internal VideoPlayerInstance(VideoPlayer videoPlayer) + { + _videoPlayer = videoPlayer; + } + + internal bool Is(VideoPlayer videoPlayer) + { + return (_videoPlayer == videoPlayer); + } + + internal void StartCapture() + { + // First capture to touch the playable directors + if (!_isCapturing) + { + // Null check in case director no longer exists + if (_videoPlayer != null) + { + TryTakeControl(); + } + _isCapturing = true; + } + } + + internal bool IsSeekPending() + { + float d = (Time.realtimeSinceStartup - _postSeekTimer); + return (_isSeekPending || (d < 0.2f)); + } + + internal void TryTakeControl() + { + if (!_isControlling) + { + if (_videoPlayer.isPrepared) + { + if (_videoPlayer.isPlaying && _videoPlayer.frame >= 0) + { + _videoPlayer.seekCompleted += VideoSeekCompleted; + _videoPlayer.frameReady += VideoFrameReady; + _videoPlayer.sendFrameReadyEvents = true; + _videoPlayer.Pause(); + _isControlling = true; + _videoTime = _videoPlayer.time; + //Debug.Log("pause"); + //Debug.Log(_videoPlayer.canSetSkipOnDrop + " " + _videoPlayer.skipOnDrop); + _videoPlayer.skipOnDrop = true; + _postSeekTimer = Time.realtimeSinceStartup - 2f; + Debug.Log("start " + _videoPlayer.frame + " " + _videoTime + " " + (_videoPlayer.time * 1000)); + } + } + } + } + + void VideoFrameReady(VideoPlayer source, long frameIdx) + { + Debug.Log("frame " + frameIdx); + _postSeekTimer = Time.realtimeSinceStartup - 2f; + _isSeekPending = false; + } + + void VideoSeekCompleted(VideoPlayer source) + { + Debug.Log("seek complete " + source.frame + " " + source.time * 1000); + _isSeekPending = false; + _postSeekTimer = Time.realtimeSinceStartup; + } + + internal void ReleaseControl() + { + _isControlling = false; + _isSeekPending = false; + _videoPlayer.seekCompleted -= VideoSeekCompleted; + } + + internal bool Update(float deltaTime) + { + bool updated = false; + if (_isCapturing) + { + if (_videoPlayer != null) + { + if (!_isControlling) + { + TryTakeControl(); + } + if (_isControlling) + { + if (!_videoPlayer.isPrepared) + { + ReleaseControl(); + } + if (_isControlling && !_isSeekPending) + { + float delta = Time.realtimeSinceStartup - _postSeekTimer; + //Debug.Log("post " + _postSeekTimer); + if (delta > 0.2f) + { + _videoTime += deltaTime; + if (_videoPlayer.isLooping && _videoTime >= _videoPlayer.length) + { + _videoTime %= _videoPlayer.length; + } + + _isSeekPending = true; + Debug.Log("seek begin " + _videoPlayer.frame + " " + _videoTime + " " + (_videoPlayer.time * 1000) + " " + (deltaTime * 1000)); + _videoPlayer.time = _videoTime; + //_videoPlayer.frame = 18; + + //Debug.Log("seek begin2 " + _videoPlayer.frame + " " + (_videoPlayer.time * 1000)); + updated = true; + //_isSeekPending = false; + } + } + } + } + } + return updated; + } + + internal void StopCapture() + { + if (_isCapturing) + { + // TODO: what happens to the VideoPlayer when the scene is unloaded? + if (_videoPlayer != null) + { + // We were controlling? + if (_isControlling) + { + // Restore to original state + _videoPlayer.Play(); + } + } + ReleaseControl(); + _isCapturing = false; + } + } + } + + private List _instances = new List(8); + + void Awake() + { + ResetSceneLoading(); + } + + void Start() + { + //StartCapture(); + } + + void OnValidate() + { + ResetSceneLoading(); + } + + void Update() + { + //UpdateFrame(); + } + + internal void UpdateFrame() + { + if (!this.isActiveAndEnabled) + return; + + + if (_scanFrequency == ScanFrequencyMode.Frame) + { + ScanForVideoPlayers(); + } + + + + + bool anyUpdates = false; + foreach (VideoPlayerInstance instance in _instances) + { + //if (Input.GetKeyDown(KeyCode.P)) + { + if (instance.Update(Time.deltaTime)) + { + anyUpdates = true; + } + } + } + + if (anyUpdates) + { + //StartCoroutine(WaitforSeekCompletes()); + //WaitforSeekCompletes2(); + //System.Threading.Thread.Sleep(500); + } + } + + public bool CanContinue() + { + bool result = true; + foreach (VideoPlayerInstance instance in _instances) + { + if (instance.IsSeekPending()) + { + result = false; + break; + } + } + return result; + } + + internal IEnumerator WaitforSeekCompletes() + { + yield return new WaitUntil(() => + { + bool isSeekPending = false; + foreach (VideoPlayerInstance instance in _instances) + { + if (instance.IsSeekPending()) + { + isSeekPending = true; + break; + } + } + return !isSeekPending; + }); + + System.Threading.Thread.Sleep(100); + yield return new WaitForEndOfFrame(); + } + internal void WaitforSeekCompletes2() + { + /*bool isSeekPending = false; + foreach (VideoPlayerInstance instance in _instances) + { + if (instance.IsSeekPending()) + { + isSeekPending = true; + break; + } + }*/ + //Debug.Log("any pending: " + isSeekPending); + } + + internal void StartCapture() + { + Debug.Log("startcap"); + ScanForVideoPlayers(); + foreach (VideoPlayerInstance instance in _instances) + { + instance.StartCapture(); + } + } + + internal void StopCapture() + { + foreach (VideoPlayerInstance instance in _instances) + { + instance.StopCapture(); + } + } + + public void ScanForVideoPlayers() + { + Debug.Log("scan"); + // Remove any VideoPlayer instances with deleted (null) VideoPlayers + for (int i = 0; i < _instances.Count; i++) + { + VideoPlayerInstance instance = _instances[i]; + if (instance.Is(null)) + { + _instances.RemoveAt(i); i--; + } + } + + // Find all inactive and active VideoPlayers + VideoPlayer[] videoPlayers = Resources.FindObjectsOfTypeAll(); + + // Create a unique instance for each director + foreach (VideoPlayer videoPlayer in videoPlayers) + { + // Check we don't already have this VideoPlayer + bool hasVideoPlayer = false; + foreach (VideoPlayerInstance instance in _instances) + { + if (instance.Is(videoPlayer)) + { + hasVideoPlayer = true; + break; + } + } + + // Add to the list + if (!hasVideoPlayer) + { + _instances.Add(new VideoPlayerInstance(videoPlayer)); + Debug.Log("add"); + } + } + } + + void OnDestroy() + { + SceneManager.sceneLoaded -= OnSceneLoaded; + StopCapture(); + } + + void ResetSceneLoading() + { + SceneManager.sceneLoaded -= OnSceneLoaded; + if (_scanFrequency == ScanFrequencyMode.SceneLoad) + { + SceneManager.sceneLoaded += OnSceneLoaded; + } + } + + void OnSceneLoaded(Scene scene, LoadSceneMode mode) + { + if (_scanFrequency == ScanFrequencyMode.SceneLoad) + { + ScanForVideoPlayers(); + } + } + } +} +#endif +#endif \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/VideoPlayerController.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/VideoPlayerController.cs.meta new file mode 100644 index 0000000..bc3a0f6 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Components/VideoPlayerController.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 19b3afe210dfd8347b080138335d1faa +timeCreated: 1586269216 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 9dadcbc01dfb782409ab9f21874995f1, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal.meta new file mode 100644 index 0000000..b00a07b --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 05fec8bab72c1f041855a90741fdfefa +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Ambisonic.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Ambisonic.cs new file mode 100644 index 0000000..ff7904b --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Ambisonic.cs @@ -0,0 +1,226 @@ +using UnityEngine; +using System; +using System.Runtime.InteropServices; +#if UNITY_IOS || UNITY_TVOS || ENABLE_IL2CPP +using AOT; +#endif + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + public enum AmbisonicOrder : int + { + //Zero = 0, + First = 1, + Second = 2, + Third = 3, + } + + public enum AmbisonicFormat + { + FuMa, // FuMa channel ordering and normalisation + ACN_SN3D, // ACN channel ordering with SN3D normalisation + } + + public enum AmbisonicChannelOrder : int + { + FuMa, + ACN, + } + + public enum AmbisonicNormalisation : int + { + FuMa, + SN3D, + } + + public partial class NativePlugin + { + ////////////////////////////////////////////////////////////////////////// + // Ambisonic + + [DllImport(PluginName, EntryPoint="AVPMC_AddAmbisonicSourceInstance")] + public static extern IntPtr AddAmbisonicSourceInstance(int maxCoefficients); + + [DllImport(PluginName, EntryPoint="AVPMC_RemoveAmbisonicSourceInstance")] + public static extern void RemoveAmbisonicSourceInstance(IntPtr instance); + + [DllImport(PluginName, EntryPoint = "AVPMC_UpdateAmbisonicWeights")] + public static extern void UpdateAmbisonicWeights(IntPtr instance, float azimuth, float elevation, AmbisonicOrder order, AmbisonicChannelOrder channelOrder, float[] normalisationWeights); + + [DllImport(PluginName, EntryPoint = "AVPMC_EncodeMonoToAmbisonic")] + public static extern void EncodeMonoToAmbisonic(IntPtr instance, float[] inSamples, int inSamplesOffset, int inFrameCount, int inChannelCount, float[] outSamples, int outSamplesOffset, int outSamplesLength, AmbisonicOrder order); + } + + /// + /// Internal helper class for encoding ambisonic audio + /// + public static class Ambisonic + { + public const int MaxCoeffs = 16; + static float[] _weightsFuMa = null; + static float[] _weightsSN3D = null; + + public static float[] GetNormalisationWeights(AmbisonicNormalisation normalisation) + { + return (normalisation == AmbisonicNormalisation.FuMa) ? _weightsFuMa : _weightsSN3D; + } + + public static int GetCoeffCount(AmbisonicOrder order) + { + if (order == AmbisonicOrder.First) { return 4; } + else if (order == AmbisonicOrder.Second) { return 9; } + else if (order == AmbisonicOrder.Third) { return 16; } + return 0; + } + + public static AmbisonicChannelOrder GetChannelOrder(AmbisonicFormat format) + { + return (format == AmbisonicFormat.FuMa) ? AmbisonicChannelOrder.FuMa : AmbisonicChannelOrder.ACN; + } + + public static AmbisonicNormalisation GetNormalisation(AmbisonicFormat format) + { + return (format == AmbisonicFormat.FuMa) ? AmbisonicNormalisation.FuMa : AmbisonicNormalisation.SN3D; + } + + static Ambisonic() + { + _weightsFuMa = BuildWeightsFuMa(); + _weightsSN3D = BuildWeightsSN3D(); + } + + static float[] BuildWeightsFuMa() + { + float[] w = new float[MaxCoeffs]; + w[0] = 1f / Mathf.Sqrt(2f); + + w[1] = 1f; + w[2] = 1f; + w[3] = 1f; + + w[4] = 1f; + w[5] = 2f / Mathf.Sqrt(3f); + w[6] = 2f / Mathf.Sqrt(3f); + w[7] = 2f / Mathf.Sqrt(3f); + w[8] = 2f / Mathf.Sqrt(3f); + + w[9] = 1f; + w[10] = Mathf.Sqrt(45f / 32f); + w[11] = Mathf.Sqrt(45f / 32f); + w[12] = 3f / Mathf.Sqrt(5f); + w[13] = 3f / Mathf.Sqrt(5f); + w[14] = Mathf.Sqrt(8f / 5f); + w[15] = Mathf.Sqrt(8f / 5f); + + return w; + } + + // Returns N which is the same as the order + static int GetN(int acn) + { + return Mathf.FloorToInt(Mathf.Sqrt(acn)); + } + + // Returns M which is the signed delta offset from the middle of the pyramid + static int GetM(int acn) + { + int n = GetN(acn); + return acn - (n * n) - n; + } + + static int Factorial(int x) + { + int result = 1; + for (int i = 2; i <= x; i++) + { + result *= i; + } + return result; + } + + static float GetNormalisationSN3D(int acn) + { + int n = GetN(acn); + int m = GetM(acn); + return GetNormalisationSN3D(n, m); + } + + static float GetNormalisationSN3D(int n, int m) + { + float dm = (m == 0) ? 1f : 0f; + float l1 = (2f - dm); + + float a = Factorial(n - Mathf.Abs(m)); + float b = Factorial(n + Mathf.Abs(m)); + float l2 = a / b; + + return Mathf.Sqrt(l1 * l2); + } + + static float GetNormalisationN3D(int n, int m) + { + return GetNormalisationSN3D(n, m) * Mathf.Sqrt(2f * n + 1f); + } + + static float[] BuildWeightsSN3D() + { + float[] w = new float[MaxCoeffs]; + for (int acn = 0; acn < w.Length; acn++) + { + w[acn] = GetNormalisationSN3D(acn); + } + return w; + } + + /// + /// The coordinate system used in Ambisonics follows the right hand rule convention with + /// positive X pointing forwards, + /// positive Y pointing to the left and + /// positive Z pointing upwards + /// Horizontal angles run anticlockwise from due front and + /// vertical angles are positive above the horizontal, negative below. + /// + internal struct PolarCoord + { + /// Azimuth (horizontal) angle in radians, 0..2PI + public float azimuth; + + /// Elevation (vertical) angle in radians, -PI..PI + public float elevation; + + //public float distance; + + public void FromCart(Vector3 position) + { + // Convert from Unity's left-hand system to Ambisonics right-hand system + float x = position.z; + float y = -position.x; + float z = position.y; + + // The azimuth angle is zero straight ahead and increases counter-clockwise. + azimuth = Mathf.Rad2Deg * Mathf.Atan2(y, x); + + // Clamp + if (azimuth < 0f) + { + azimuth += 360f; + } + + // The elevation angle is zero on the horizontal plane and positive in the upper hemisphere. + elevation = Mathf.Rad2Deg * Mathf.Atan2(z, Mathf.Sqrt(x * x + y * y)); + elevation = Mathf.Clamp(elevation, -90f, 90f); + + // NOTE: Distance is not currently used, but there may be scope in the future + //distance = Mathf.Sqrt( x * x + y * y + z * z ); + + // Back to radians + azimuth = Mathf.Deg2Rad * azimuth; + elevation = Mathf.Deg2Rad * elevation; + } + }; + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Ambisonic.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Ambisonic.cs.meta new file mode 100644 index 0000000..91fb8d0 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Ambisonic.cs.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 1 +guid: 1ef4a5d87a275c14d8742ca336bb1447 +labels: +- capture +- avi +- video +- grab +- record +- renderheads +- recording +- screen +- movie +- fraps +- camstudio +- recorder diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CaptureBase.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CaptureBase.cs new file mode 100644 index 0000000..318a0f1 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CaptureBase.cs @@ -0,0 +1,3471 @@ +#if UNITY_2017_3_OR_NEWER + #define AVPRO_MOVIECAPTURE_OFFLINE_AUDIOCAPTURE +#endif +#if UNITY_5_6_OR_NEWER && UNITY_2018_3_OR_NEWER + #define AVPRO_MOVIECAPTURE_VIDEOPLAYER_SUPPORT +#endif +#if UNITY_2017_1_OR_NEWER + #define AVPRO_MOVIECAPTURE_PLAYABLES_SUPPORT +#endif +#if UNITY_2019_2_OR_NEWER + #define AVPRO_MOVIECAPTURE_CAPTUREDELTA_SUPPORT +#endif +#if UNITY_2018_1_OR_NEWER + #define UNITY_NATIVEARRAY_UNSAFE_SUPPORT +#endif +#if ENABLE_IL2CPP +using AOT; +#endif +#if UNITY_2018_1_OR_NEWER +using Unity.Collections; +#else +using UnityEngine.Collections; +#endif +using UnityEngine; +using System.IO; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +#if UNITY_ANDROID && !UNITY_EDITOR +using UnityEngine.Android; +#endif + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// + /// Live stats about an active capture session + /// + public class CaptureStats + { + public float FPS { get { return _fps; } } + public float FramesTotal { get { return _frameTotal; } } + + public uint NumDroppedFrames { get { return _numDroppedFrames; } internal set { _numDroppedFrames = value; } } + public uint NumDroppedEncoderFrames { get { return _numDroppedEncoderFrames; } internal set { _numDroppedEncoderFrames = value; } } + public uint NumEncodedFrames { get { return _numEncodedFrames; } internal set { _numEncodedFrames = value; } } + public uint TotalEncodedSeconds { get { return _totalEncodedSeconds; } internal set { _totalEncodedSeconds = value; } } + + public AudioCaptureSource AudioCaptureSource { get { return _audioCaptureSource; } internal set { _audioCaptureSource = value; } } + public int UnityAudioSampleRate { get { return _unityAudioSampleRate; } internal set { _unityAudioSampleRate = value; } } + public int UnityAudioChannelCount { get { return _unityAudioChannelCount; } internal set { _unityAudioChannelCount = value; } } + + // Frame stats + private uint _numDroppedFrames = 0; + private uint _numDroppedEncoderFrames = 0; + private uint _numEncodedFrames = 0; + private uint _totalEncodedSeconds = 0; + + // Audio + private AudioCaptureSource _audioCaptureSource = AudioCaptureSource.None; + private int _unityAudioSampleRate = -1; + private int _unityAudioChannelCount = -1; + + // Capture rate + private float _fps = 0f; + private int _frameTotal = 0; + private int _frameCount = 0; + private float _startFrameTime = 0f; + + internal void ResetFPS() + { + _frameCount = 0; + _frameTotal = 0; + _fps = 0.0f; + _startFrameTime = 0.0f; + } + + internal void UpdateFPS() + { + _frameCount++; + _frameTotal++; + + float timeNow = Time.realtimeSinceStartup; + float timeDelta = timeNow - _startFrameTime; + if (timeDelta >= 1.0f) + { + _fps = (float)_frameCount / timeDelta; + _frameCount = 0; + _startFrameTime = timeNow; + } + } + } + + [System.Serializable] + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public class VideoEncoderHints + { + public VideoEncoderHints() + { + SetDefaults(); + } + + public void SetDefaults() + { + averageBitrate = 0; + maximumBitrate = 0; + quality = 1.0f; + keyframeInterval = 0; + allowFastStartStreamingPostProcess = true; + supportTransparency = false; + useHardwareEncoding = true; + injectStereoPacking = NoneAutoCustom.Auto; + stereoPacking = StereoPacking.None; + injectSphericalVideoLayout = NoneAutoCustom.Auto; + sphericalVideoLayout = SphericalVideoLayout.None; + enableFragmentedWriting = false; + movieFragmentInterval = 120; // Default to two minutes + colourSpace = ColourSpace.Unknown; + sourceWidth = 0; + sourceHeight = 0; + androidNoCaptureRotation = false; + } + + internal void Validate() + { + quality = Mathf.Clamp(quality, 0f, 1f); + } + + [Tooltip("Average number of bits per second for the resulting video. Zero uses the codec defaults.")] + public uint averageBitrate; + [Tooltip("Maximum number of bits per second for the resulting video. Zero uses the codec defaults.")] + public uint maximumBitrate; + [Range(0f, 1f)] public float quality; + [Tooltip("How often a keyframe is inserted. Zero uses the codec defaults.")] + public uint keyframeInterval; + + // Only for MOV / MP4 files + [Tooltip("Move the 'moov' atom in the video file from the end to the start of the file to make streaming start fast. Also known as 'Fast Start' in some encoders")] + [MarshalAs(UnmanagedType.U1)] + public bool allowFastStartStreamingPostProcess; + + // Currently only for HEVC and ProRes 4444 on macOS/iOS, and supported DirectShow codecs (eg Lagarith/Uncompressed) on Windows + [Tooltip("Hints to the encoder to use the alpha channel for transparency if possible")] + [MarshalAs(UnmanagedType.U1)] + public bool supportTransparency; + + // Windows only (on macOS/iOS hardware is always used if available) + [MarshalAs(UnmanagedType.U1)] + public bool useHardwareEncoding; + + // Only for MP4 files on Windows + [Tooltip("Inject atoms to define stereo video mode")] + public NoneAutoCustom injectStereoPacking; + + [Tooltip("Inject atoms to define stereo video mode")] + public StereoPacking stereoPacking; + + // Only for MP4 files on Windows + [Tooltip("Inject atoms to define spherical video layout")] + public NoneAutoCustom injectSphericalVideoLayout; + + [Tooltip("Inject atoms to define spherical video layout")] + public SphericalVideoLayout sphericalVideoLayout; + + // Support fragmented writing of mov/mp4 on macOS/iOS + [Tooltip("Enable fragmented writing support for QuickTime (mov, mp4) files")] + [MarshalAs(UnmanagedType.U1)] + public bool enableFragmentedWriting; + + // Not sure of sensible uppoer/lower bounds for this + [Tooltip("The interval at which to write movie fragments in seconds")] + [Range(0f, 300f)] + public double movieFragmentInterval; + + public enum ColourSpace : int { Unknown = -1, Gamma = 0, Linear = 1 }; + public ColourSpace colourSpace; + + // The width and height of the source + public int sourceWidth; + public int sourceHeight; + + public bool androidNoCaptureRotation; + } + + [System.Serializable] + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public class ImageEncoderHints + { + public ImageEncoderHints() + { + SetDefaults(); + } + + public void SetDefaults() + { + quality = 0.85f; + supportTransparency = false; + colourSpace = ColourSpace.Unknown; + sourceWidth = 0; + sourceHeight = 0; + } + + internal void Validate() + { + quality = Mathf.Clamp(quality, 0f, 1f); + } + + // Currently only affects JPG and HEIF formats (macOS only) + [Range(0f, 1f)] public float quality; + + // Currently only for PNG + [Tooltip("Hints to the encoder to use the alpha channel for transparency if possible")] + [MarshalAs(UnmanagedType.U1)] + public bool supportTransparency; + + public enum ColourSpace : int { Unknown = -1, Gamma = 0, Linear = 1 }; + public ColourSpace colourSpace; + + // The width and height of the source + public int sourceWidth; + public int sourceHeight; + } + + [System.Serializable] + public class EncoderHints + { + public EncoderHints() + { + SetDefaults(); + } + + public void SetDefaults() + { + videoHints = new VideoEncoderHints(); + imageHints = new ImageEncoderHints(); + } + + public VideoEncoderHints videoHints; + public ImageEncoderHints imageHints; + } + + /// + /// Base class wrapping common capture functionality + /// + public partial class CaptureBase : MonoBehaviour + { + private const string DocEditionsURL = "https://www.renderheads.com/content/docs/AVProMovieCapture/articles/download.html#editions"; + + public enum Resolution + { + POW2_8192x8192, + POW2_8192x4096, + POW2_4096x4096, + POW2_4096x2048, + POW2_2048x4096, + UHD_3840x2160, + UHD_3840x2048, + UHD_3840x1920, + UHD_2560x1440, + POW2_2048x2048, + POW2_2048x1024, + HD_1920x1080, + HD_1280x720, + SD_1024x768, + SD_800x600, + SD_800x450, + SD_640x480, + SD_640x360, + SD_320x240, + Original, + Custom, + } + + public enum CubemapDepth + { + Depth_24 = 24, + Depth_16 = 16, + Depth_Zero = 0, + } + + public enum CubemapResolution + { + POW2_8192 = 8192, + POW2_4096 = 4096, + POW2_2048 = 2048, + POW2_1024 = 1024, + POW2_512 = 512, + POW2_256 = 256, + } + + public enum AntiAliasingLevel + { + UseCurrent, + ForceNone, + ForceSample2, + ForceSample4, + ForceSample8, + } + + public enum DownScale + { + Original = 1, + Half = 2, + Quarter = 4, + Eighth = 8, + Sixteenth = 16, + Custom = 100, + } + + public enum OutputPath + { + RelativeToProject, + RelativeToPeristentData, + Absolute, + RelativeToDesktop, + RelativeToPictures, + RelativeToVideos, + PhotoLibrary, + RelativeToTemporaryCachePath + } + + public enum FrameUpdateMode + { + Automatic, + Manual, + } + + /*public enum OutputExtension + { + AVI, + MP4, + PNG, + Custom = 100, + }*/ + +#if false + [System.Serializable] + public class WindowsPostCaptureSettings + { + [SerializeField] + [Tooltip("Move the 'moov' atom in the MP4 file from the end to the start of the file to make streaming start fast. Also called 'Fast Start' in some encoders")] + public bool writeFastStartStreamingForMp4 = true; + } + + [System.Serializable] + public class PostCaptureSettings + { + [SerializeField] + [Tooltip("Move the 'moov' atom in the MP4 file from the end to the start of the file to make streaming start fast. Also called 'Fast Start' in some encoders")] + public WindowsPostCaptureSettings windows = new WindowsPostCaptureSettings(); + } + + [SerializeField] PostCaptureSettings _postCaptureSettings = new PostCaptureSettings(); +#endif + + [SerializeField] EncoderHints _encoderHintsWindows = new EncoderHints(); + [SerializeField] EncoderHints _encoderHintsMacOS = new EncoderHints(); + [SerializeField] EncoderHints _encoderHintsIOS = new EncoderHints(); + [SerializeField] EncoderHints _encoderHintsAndroid = new EncoderHints(); + + // General options + + [SerializeField] KeyCode _captureKey = KeyCode.None; + [SerializeField] bool _isRealTime = true; + [SerializeField] bool _persistAcrossSceneLoads = false; + + // Start options + + [SerializeField] StartTriggerMode _startTrigger = StartTriggerMode.Manual; + [SerializeField] StartDelayMode _startDelay = StartDelayMode.None; + [SerializeField] float _startDelaySeconds = 0f; + + // Stop options + + [SerializeField] StopMode _stopMode = StopMode.None; + // TODO: add option to pause instead of stop? + [SerializeField] int _stopFrames = 0; + [SerializeField] float _stopSeconds = 0f; + + // Video options + + public static readonly string[] DefaultVideoCodecPriorityWindows = { "H264", + "HEVC", + "Lagarith Lossless Codec", + "Uncompressed", + "x264vfw - H.264/MPEG-4 AVC codec", + "Xvid MPEG-4 Codec" }; + + public static readonly string[] DefaultVideoCodecPriorityMacOS = { "H264", + "HEVC", + "Apple ProRes 422", + "Apple ProRes 4444" }; + + public static readonly string[] DefaultVideoCodecPriorityAndroid = { "H264", + "HEVC"/*, + "VP8", + "VP9"*/ }; + + public static readonly string[] DefaultAudioCodecPriorityWindows = { "AAC", + "FLAC", + "Uncompressed" }; + + public static readonly string[] DefaultAudioCodecPriorityMacOS = { "AAC", + "FLAC", + "Apple Lossless", + "Linear PCM", + "Uncompresssed" }; + + public static readonly string[] DefaultAudioCodecPriorityIOS = { "AAC", + "FLAC", + "Apple Lossless", + "Linear PCM", + "Uncompresssed" }; + + public static readonly string[] DefaultAudioCodecPriorityAndroid = {"AAC"/*, + "FLAC", + "OPUS"*/}; + + public static readonly string[] DefaultAudioCaptureDevicePriorityWindow = { "Microphone (Realtek Audio)", "Stereo Mix", "What U Hear", "What You Hear", "Waveout Mix", "Mixed Output" }; + public static readonly string[] DefaultAudioCaptureDevicePriorityMacOS = { }; + public static readonly string[] DefaultAudioCaptureDevicePriorityIOS = { }; + public static readonly string[] DefaultAudioCaptureDevicePriorityAndroid = { }; + + [SerializeField] string[] _videoCodecPriorityWindows = DefaultVideoCodecPriorityWindows; + [SerializeField] string[] _videoCodecPriorityMacOS = DefaultVideoCodecPriorityMacOS; + #pragma warning disable 0414 // "is assigned but its value is never used" + [SerializeField] string[] _videoCodecPriorityAndroid = DefaultVideoCodecPriorityAndroid; + #pragma warning restore 0414 + + [SerializeField] string[] _audioCodecPriorityWindows = DefaultAudioCodecPriorityWindows; + [SerializeField] string[] _audioCodecPriorityMacOS = DefaultAudioCodecPriorityMacOS; + #pragma warning disable 0414 // "is assigned but its value is never used" + [SerializeField] string[] _audioCodecPriorityAndroid = DefaultAudioCodecPriorityAndroid; + #pragma warning restore 0414 + + [SerializeField] float _frameRate = 30f; + + [Tooltip("Timelapse scale makes the frame capture run at a fraction of the target frame rate. Default value is 1")] + [SerializeField] int _timelapseScale = 1; + [Tooltip("Manual update mode requires user to call FrameUpdate() each time a frame is ready")] + [SerializeField] FrameUpdateMode _frameUpdateMode = FrameUpdateMode.Automatic; + + [SerializeField] DownScale _downScale = DownScale.Original; + [SerializeField] Vector2 _maxVideoSize = Vector2.zero; + + #pragma warning disable 414 + [SerializeField, Range(-1, 128)] int _forceVideoCodecIndexWindows = -1; + [SerializeField, Range(-1, 128)] int _forceVideoCodecIndexMacOS = 0; + [SerializeField, Range(0, 128)] int _forceVideoCodecIndexIOS = 0; + [SerializeField, Range(0, 128)] int _forceVideoCodecIndexAndroid = 0; + [SerializeField, Range(-1, 128)] int _forceAudioCodecIndexWindows = -1; + [SerializeField, Range(-1, 128)] int _forceAudioCodecIndexMacOS = 0; + [SerializeField, Range(0, 128)] int _forceAudioCodecIndexIOS = 0; + [SerializeField, Range(0, 128)] int _forceAudioCodecIndexAndroid = -1; + #pragma warning restore 414 + [SerializeField] bool _flipVertically = false; + + [Tooltip("Flushing the GPU during each capture results in less latency, but can slow down rendering performance for complex scenes.")] + [SerializeField] bool _forceGpuFlush = false; + + [Tooltip("This option can help issues where skinning is used, or other animation/rendering effects that only complete later in the frame.")] + [SerializeField] protected bool _useWaitForEndOfFrame = true; + + [Tooltip("Portrait captures may be rotated 90° to better utilise the encoder, check this to disable the rotation at the risk of not being able to capture the full vertical resolution.")] + [SerializeField] bool _androidNoCaptureRotation = false; + + [Tooltip("Log the start and stop of the capture. Disable this for less garbage generation.")] + [SerializeField] bool _logCaptureStartStop = true; + + // Audio options + + [SerializeField] AudioCaptureSource _audioCaptureSource = AudioCaptureSource.None; + [SerializeField] UnityAudioCapture _unityAudioCapture = null; + [SerializeField, Range(0, 32)] int _forceAudioInputDeviceIndex = 0; + [SerializeField, Range(8000, 96000)] int _manualAudioSampleRate = 48000; + [SerializeField, Range(1, 8)] int _manualAudioChannelCount = 2; + + // Output options + + [SerializeField] protected OutputTarget _outputTarget = OutputTarget.VideoFile; + + public OutputTarget OutputTarget + { + get { return _outputTarget; } + set { _outputTarget = value; } + } + + public const OutputPath DefaultOutputFolderType = OutputPath.RelativeToProject; + private const string DefaultOutputFolderPath = "Captures"; + + [SerializeField] OutputPath _outputFolderType = DefaultOutputFolderType; + [SerializeField] string _outputFolderPath = DefaultOutputFolderPath; + [SerializeField] string _filenamePrefix = "MovieCapture"; + [SerializeField] bool _appendFilenameTimestamp = true; + [SerializeField] bool _allowManualFileExtension = false; + [SerializeField] string _filenameExtension = "mp4"; + [SerializeField] string _namedPipePath = @"\\.\pipe\test_pipe"; + + public OutputPath OutputFolder + { + get { return _outputFolderType; } + set { _outputFolderType = value; } + } + public string OutputFolderPath + { + get { return _outputFolderPath; } + set { _outputFolderPath = value; } + } + public string FilenamePrefix + { + get { return _filenamePrefix; } + set { _filenamePrefix = value; } + } + public bool AppendFilenameTimestamp + { + get { return _appendFilenameTimestamp; } + set { _appendFilenameTimestamp = value; } + } + public bool AllowManualFileExtension + { + get { return _allowManualFileExtension; } + set { _allowManualFileExtension = value; } + } + public string FilenameExtension + { + get { return _filenameExtension; } + set { _filenameExtension = value; } + } + public string NamedPipePath + { + get { return _namedPipePath; } + set { _namedPipePath = value; } + } + + [SerializeField] int _imageSequenceStartFrame = 0; + [SerializeField, Range(2, 12)] int _imageSequenceZeroDigits = 6; + #pragma warning disable 414 + [SerializeField] ImageSequenceFormat _imageSequenceFormatWindows = ImageSequenceFormat.PNG; + [SerializeField] ImageSequenceFormat _imageSequenceFormatMacOS = ImageSequenceFormat.PNG; + [SerializeField] ImageSequenceFormat _imageSequenceFormatIOS = ImageSequenceFormat.PNG; + [SerializeField] ImageSequenceFormat _imageSequenceFormatAndroid = ImageSequenceFormat.PNG; + #pragma warning restore 414 + + public int ImageSequenceStartFrame + { + get { return _imageSequenceStartFrame; } + set { _imageSequenceStartFrame = value; } + } + public int ImageSequenceZeroDigits + { + get { return _imageSequenceZeroDigits; } + set { _imageSequenceZeroDigits = Mathf.Clamp(_imageSequenceZeroDigits, 2, 12); } + } + + // Camera specific options + + [SerializeField] protected Resolution _renderResolution = Resolution.Original; + [SerializeField] protected Vector2 _renderSize = Vector2.one; + [SerializeField] protected int _renderAntiAliasing = -1; + + // Motion blur options + + [SerializeField] protected bool _useMotionBlur = false; + [SerializeField, Range(0, 64)] protected int _motionBlurSamples = 16; + [SerializeField] protected Camera[] _motionBlurCameras = null; + [SerializeField] protected MotionBlur _motionBlur; + + public bool UseMotionBlur + { + get { return _useMotionBlur; } + set { _useMotionBlur = value; } + } + public int MotionBlurSamples + { + get { return _motionBlurSamples; } + set { _motionBlurSamples = (int)Mathf.Clamp((float)value, 0f, 64f); } + } + public Camera[] MotionBlurCameras + { + get { return _motionBlurCameras; } + set { _motionBlurCameras = value; } + } + public MotionBlur MotionBlur + { + get { return _motionBlur; } + set { _motionBlur = value; } + } + + // Performance options + + [SerializeField] bool _allowVSyncDisable = true; + [SerializeField] protected bool _supportTextureRecreate = false; + + // Other options + + [SerializeField] int _minimumDiskSpaceMB = -1; + +#if AVPRO_MOVIECAPTURE_PLAYABLES_SUPPORT + [SerializeField] TimelineController _timelineController = null; +#endif +#if AVPRO_MOVIECAPTURE_VIDEOPLAYER_SUPPORT + [SerializeField] VideoPlayerController _videoPlayerController = null; +#endif + + //public bool _allowFrameRateChange = true; + + protected Texture2D _texture; + protected int _handle = -1; + protected int _sourceWidth, _sourceHeight; + protected int _targetWidth, _targetHeight; + protected bool _capturing = false; + protected bool _paused = false; + protected string _filePath; + protected string _finalFilePath; + protected FileInfo _fileInfo; + protected NativePlugin.PixelFormat _pixelFormat = NativePlugin.PixelFormat.YCbCr422_YUY2; + private Codec _selectedVideoCodec = null; + private Codec _selectedAudioCodec = null; + private Device _selectedAudioInputDevice = null; + private int _oldVSyncCount = 0; + //private int _oldTargetFrameRate = -1; + private float _oldFixedDeltaTime = 0f; + protected bool _isTopDown = true; + protected bool _isDirectX11 = false; + private bool _queuedStartCapture = false; + private bool _queuedStopCapture = false; + private float _captureStartTime = 0f; + private float _capturePrePauseTotalTime = 0f; + private float _timeSinceLastFrame = 0f; + protected YieldInstruction _waitForEndOfFrame; + private long _freeDiskSpaceMB; + + private float _startDelayTimer; + private bool _startPaused; + private System.Action _beginFinalFileWritingAction; + private System.Action _completedFileWritingAction; + private List _pendingFileWrites = new List(4); + + private static HashSet _activeFilePaths = new HashSet(); + public static HashSet ActiveFilePaths + { + get { return _activeFilePaths; } + } + + public string LastFilePath + { + get { return _filePath; } + } + + // Register for notification of when the final file writing begins + public System.Action BeginFinalFileWritingAction + { + get { return _beginFinalFileWritingAction; } + set { _beginFinalFileWritingAction = value; } + } + + // Register for notification of when the final file writing completes + public System.Action CompletedFileWritingAction + { + get { return _completedFileWritingAction; } + set { _completedFileWritingAction = value; } + } + + // Stats + private CaptureStats _stats = new CaptureStats(); + + private static bool _isInitialised = false; + private static bool _isApplicationQuiting = false; + + public Resolution CameraRenderResolution + { + get { return _renderResolution; } + set { _renderResolution = value; } + } + public Vector2 CameraRenderCustomResolution + { + get { return _renderSize; } + set { _renderSize = value; } + } + + public int CameraRenderAntiAliasing + { + get { return _renderAntiAliasing; } + set { _renderAntiAliasing = value; } + } + + public bool IsRealTime + { + get { return _isRealTime; } + set { _isRealTime = value; } + } + + public bool PersistAcrossSceneLoads + { + get { return _persistAcrossSceneLoads; } + set { _persistAcrossSceneLoads = value; } + } + + public AudioCaptureSource AudioCaptureSource + { + get { return _audioCaptureSource; } + set { _audioCaptureSource = value; } + } + + public int ManualAudioSampleRate + { + get { return _manualAudioSampleRate; } + set { _manualAudioSampleRate = value; } + } + + public int ManualAudioChannelCount + { + get { return _manualAudioChannelCount; } + set { _manualAudioChannelCount = value; } + } + + public UnityAudioCapture UnityAudioCapture + { + get { return _unityAudioCapture; } + set { _unityAudioCapture = value; } + } + + public int ForceAudioInputDeviceIndex + { + get { return _forceAudioInputDeviceIndex; } + set { _forceAudioInputDeviceIndex = value; SelectAudioInputDevice(); } + } + + public float FrameRate + { + get { return _frameRate; } + set { _frameRate = Mathf.Clamp(value, 0.01f, 240f); } + } + + public StartTriggerMode StartTrigger + { + get { return _startTrigger; } + set { _startTrigger = value; } + } + + public StartDelayMode StartDelay + { + get { return _startDelay; } + set { _startDelay = value; } + } + + public float StartDelaySeconds + { + get { return _startDelaySeconds; } + set { _startDelaySeconds = Mathf.Max(0f, value); } + } + + public StopMode StopMode + { + get { return _stopMode; } + set { _stopMode = value; } + } + + public int StopAfterFramesElapsed + { + get { return _stopFrames; } + set { _stopFrames = Mathf.Max(0, value); } + } + + public float StopAfterSecondsElapsed + { + get { return _stopSeconds; } + set { _stopSeconds = Mathf.Max(0f, value); } + } + + public CaptureStats CaptureStats + { + get { return _stats; } + } + + public string[] VideoCodecPriorityWindows + { + get { return _videoCodecPriorityWindows; } + set { _videoCodecPriorityWindows = value; SelectVideoCodec(false); } + } + + public string[] VideoCodecPriorityMacOS + { + get { return _videoCodecPriorityMacOS; } + set { _videoCodecPriorityMacOS = value; SelectVideoCodec(false); } + } + + public string[] AudioCodecPriorityWindows + { + get { return _audioCodecPriorityWindows; } + set { _audioCodecPriorityWindows = value; SelectAudioCodec(); } + } + + public string[] AudioCodecPriorityMacOS + { + get { return _audioCodecPriorityMacOS; } + set { _audioCodecPriorityMacOS = value; SelectAudioCodec(); } + } + + public int TimelapseScale + { + get { return _timelapseScale; } + set { _timelapseScale = value; } + } + + public FrameUpdateMode FrameUpdate + { + get { return _frameUpdateMode; } + set { _frameUpdateMode = value; } + } + + public DownScale ResolutionDownScale + { + get { return _downScale; } + set { _downScale = value; } + } + + public Vector2 ResolutionDownscaleCustom + { + get { return _maxVideoSize; } + set { _maxVideoSize = value; } + } + + public bool FlipVertically + { + get { return _flipVertically; } + set { _flipVertically = value; } + } + + public bool UseWaitForEndOfFrame + { + get { return _useWaitForEndOfFrame; } + set { _useWaitForEndOfFrame = value; } + } + + public bool LogCaptureStartStop + { + get { return _logCaptureStartStop; } + set { _logCaptureStartStop = value; } + } + +#if false + public PostCaptureSettings PostCapture + { + get { return _postCaptureSettings; } + } +#endif + + public bool AllowOfflineVSyncDisable + { + get { return _allowVSyncDisable; } + set { _allowVSyncDisable = value; } + } + + public bool SupportTextureRecreate + { + get { return _supportTextureRecreate; } + set { _supportTextureRecreate = value; } + } + + #if AVPRO_MOVIECAPTURE_PLAYABLES_SUPPORT + public TimelineController TimelineController + { + get { return _timelineController; } + set { _timelineController = value; } + } + #endif + + #if AVPRO_MOVIECAPTURE_VIDEOPLAYER_SUPPORT + public VideoPlayerController VideoPlayerController + { + get { return _videoPlayerController; } + set { _videoPlayerController = value; } + } + #endif + + public Codec SelectedVideoCodec + { + get { return _selectedVideoCodec; } + } + + public Codec SelectedAudioCodec + { + get { return _selectedAudioCodec; } + } + + public Device SelectedAudioInputDevice + { + get { return _selectedAudioInputDevice; } + } + + public int NativeForceVideoCodecIndex + { + #if UNITY_EDITOR + #if UNITY_EDITOR_WIN + get { return _forceVideoCodecIndexWindows; } + set { _forceVideoCodecIndexWindows = value; } + #elif UNITY_EDITOR_OSX + get { return _forceVideoCodecIndexMacOS; } + set { _forceVideoCodecIndexMacOS = value; } + #else + get { return -1; } + set { } + #endif + #else + #if UNITY_STANDALONE_WIN + get { return _forceVideoCodecIndexWindows; } + set { _forceVideoCodecIndexWindows = value; } + #elif UNITY_STANDALONE_OSX + get { return _forceVideoCodecIndexMacOS; } + set { _forceVideoCodecIndexMacOS = value; } + #elif UNITY_IOS + get { return _forceVideoCodecIndexIOS; } + set { _forceVideoCodecIndexIOS = value; } + #elif UNITY_ANDROID + get { return _forceVideoCodecIndexAndroid; } + set { _forceVideoCodecIndexAndroid = value; } + #else + get { return -1; } + set { } + #endif + #endif + } + + public int NativeForceAudioCodecIndex + { + #if UNITY_EDITOR + #if UNITY_EDITOR_WIN + get { return _forceAudioCodecIndexWindows; } + set { _forceAudioCodecIndexWindows = value; } + #elif UNITY_EDITOR_OSX + get { return _forceAudioCodecIndexMacOS; } + set { _forceAudioCodecIndexMacOS = value; } + #else + get { return -1; } + set { } + #endif + #else + #if UNITY_STANDALONE_WIN + get { return _forceAudioCodecIndexWindows; } + set { _forceAudioCodecIndexWindows = value; } + #elif UNITY_STANDALONE_OSX + get { return _forceAudioCodecIndexMacOS; } + set { _forceAudioCodecIndexMacOS = value; } + #elif UNITY_IOS + get { return _forceAudioCodecIndexIOS; } + set { _forceAudioCodecIndexIOS = value; } + #elif UNITY_ANDROID + get { return _forceAudioCodecIndexAndroid; } + set { _forceAudioCodecIndexAndroid = value; } + #else + get { return -1; } + set { } + #endif + #endif + } + + public ImageSequenceFormat NativeImageSequenceFormat + { + #if UNITY_EDITOR + #if UNITY_EDITOR_WIN + get { return _imageSequenceFormatWindows; } + set { _imageSequenceFormatWindows = value; } + #elif UNITY_EDITOR_OSX + get { return _imageSequenceFormatMacOS; } + set { _imageSequenceFormatMacOS = value; } + #else + get { return ImageSequenceFormat.PNG; } + set { } + #endif + #else + #if UNITY_STANDALONE_WIN + get { return _imageSequenceFormatWindows; } + set { _imageSequenceFormatWindows = value; } + #elif UNITY_STANDALONE_OSX + get { return _imageSequenceFormatMacOS; } + set { _imageSequenceFormatMacOS = value; } + #elif UNITY_IOS + get { return _imageSequenceFormatIOS; } + set { _imageSequenceFormatIOS = value; } + #elif UNITY_ANDROID + get { return _imageSequenceFormatAndroid; } + set { _imageSequenceFormatAndroid = value; } + #else + get { return ImageSequenceFormat.PNG; } + set { } + #endif + #endif + } + + protected static NativePlugin.Platform GetCurrentPlatform() + { + NativePlugin.Platform result = NativePlugin.Platform.Unknown; + #if UNITY_EDITOR + #if UNITY_EDITOR_WIN + result = NativePlugin.Platform.Windows; + #elif UNITY_EDITOR_OSX + result = NativePlugin.Platform.macOS; + #endif + #else + #if UNITY_STANDALONE_WIN + result = NativePlugin.Platform.Windows; + #elif UNITY_STANDALONE_OSX + result = NativePlugin.Platform.macOS; + #elif UNITY_IOS + result = NativePlugin.Platform.iOS; + #elif UNITY_ANDROID + result = NativePlugin.Platform.Android; + #endif + #endif + return result; + } + + public EncoderHints GetEncoderHints(NativePlugin.Platform platform = NativePlugin.Platform.Current) + { + EncoderHints result = null; + + if (platform == NativePlugin.Platform.Current) + { + platform = GetCurrentPlatform(); + } + switch (platform) + { + case NativePlugin.Platform.Windows: + result = _encoderHintsWindows; + break; + case NativePlugin.Platform.macOS: + result = _encoderHintsMacOS; + break; + case NativePlugin.Platform.iOS: + result = _encoderHintsIOS; + break; + case NativePlugin.Platform.Android: + result = _encoderHintsAndroid; + break; + } + return result; + } + + public void SetEncoderHints(EncoderHints hints, NativePlugin.Platform platform = NativePlugin.Platform.Current) + { + if (platform == NativePlugin.Platform.Current) + { + platform = GetCurrentPlatform(); + } + switch (platform) + { + case NativePlugin.Platform.Windows: + _encoderHintsWindows = hints; + break; + case NativePlugin.Platform.macOS: + _encoderHintsMacOS = hints; + break; + case NativePlugin.Platform.iOS: + _encoderHintsIOS = hints; + break; + case NativePlugin.Platform.Android: + _encoderHintsAndroid = hints; + break; + } + } + + +#if UNITY_ANDROID && !UNITY_EDITOR + protected static AndroidJavaObject s_ActivityContext = null; + protected static AndroidJavaClass s_Interface = null; +#endif + + public static void UpdateMediaGallery( string videoFilePath ) + { + if( videoFilePath != null ) + { +#if UNITY_ANDROID && !UNITY_EDITOR + // Update video gallery on Android + if( s_Interface != null ) + { + s_Interface.CallStatic("UpdateMediaGallery", videoFilePath); + } +#endif + } + } + + protected virtual void Awake() + { + if (!_isInitialised) + { +#if UNITY_ANDROID && !UNITY_EDITOR + // Get the activity context + if (s_ActivityContext == null) + { + AndroidJavaClass activityClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); + if (activityClass != null) + { + s_ActivityContext = activityClass.GetStatic("currentActivity"); + } + } + + s_Interface = new AndroidJavaClass("com.renderheads.AVPro.MovieCapture.Manager"); + s_Interface.CallStatic("setContext", s_ActivityContext); +#endif + + try + { + string pluginVersionString = NativePlugin.GetPluginVersionString(); + + // Check that the plugin version number is not too old + if (!pluginVersionString.StartsWith(NativePlugin.ExpectedPluginVersion)) + { + Debug.LogWarning("[AVProMovieCapture] Plugin version number " + pluginVersionString + " doesn't match the expected version number " + NativePlugin.ExpectedPluginVersion + ". It looks like the plugin didn't upgrade correctly. To resolve this please restart Unity and try to upgrade the package again."); + } + + #if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX + #if !UNITY_2017_1_OR_NEWER + if (SystemInfo.graphicsDeviceVersion.StartsWith("Metal")) + { + Debug.LogError("[AVProMovieCapture] Metal is not supported below Unity 2017, please switch to OpenGLCore in Player Settings."); + return; + } + #endif + #elif !UNITY_EDITOR && UNITY_IOS && !UNITY_2017_1_OR_NEWER + if (Application.isPlaying) + { + Debug.LogError("[AVProMovieCapture] iOS is not supported below Unity 2017."); + return; + } + #endif + if (NativePlugin.Init()) + { + Debug.Log("[AVProMovieCapture] Init version: " + NativePlugin.ScriptVersion + " (plugin v" + pluginVersionString +") with GPU " + SystemInfo.graphicsDeviceName + " " + SystemInfo.graphicsDeviceVersion + " OS: " + SystemInfo.operatingSystem); + _isInitialised = true; + } + else + { + Debug.LogError("[AVProMovieCapture] Failed to initialise plugin on version: " + NativePlugin.ScriptVersion + " (plugin v" + pluginVersionString + ") with GPU " + SystemInfo.graphicsDeviceName + " " + SystemInfo.graphicsDeviceVersion + " OS: " + SystemInfo.operatingSystem); + } + } + catch (DllNotFoundException e) + { + string missingDllMessage = string.Empty; + missingDllMessage = "Unity couldn't find the plugin DLL. Please select the native plugin files in 'Plugins/RenderHeads/AVProMovieCapture/Runtime/Plugins' folder and select the correct platform in the Inspector."; + Debug.LogError("[AVProMovieCapture] " + missingDllMessage); + #if UNITY_EDITOR + UnityEditor.EditorUtility.DisplayDialog("Plugin files not found", missingDllMessage, "Ok"); + #endif + throw e; + } + } + + _isDirectX11 = SystemInfo.graphicsDeviceVersion.StartsWith("Direct3D 11"); + + SelectVideoCodec(); + SelectAudioCodec(); + SelectAudioInputDevice(); + + if (_persistAcrossSceneLoads) + { + GameObject.DontDestroyOnLoad(this.gameObject); + } + } + + static CaptureBase() + { + #if UNITY_EDITOR + SetupEditorPlayPauseSupport(); + #endif + } + + public virtual void Start() + { + Application.runInBackground = true; + _waitForEndOfFrame = new WaitForEndOfFrame(); + + if (_startTrigger == StartTriggerMode.OnStart) + { + StartCapture(); + } + } + + // Select the best codec based on criteria + private static bool SelectCodec(ref Codec codec, CodecList codecList, int forceCodecIndex, string[] codecPriorityList, MediaApi matchMediaApi, bool allowFallbackToFirstCodec, bool logFallbackWarning) + { + codec = null; + + // The user has specified their own codec index + if (forceCodecIndex >= 0) + { + if (forceCodecIndex < codecList.Count) + { + codec = codecList.Codecs[forceCodecIndex]; + } + } + else + { + // The user has specified an ordered list of codec name to search for + if (codecPriorityList != null && codecPriorityList.Length > 0) + { + foreach (string codecName in codecPriorityList) + { + codec = codecList.FindCodec(codecName.Trim(), matchMediaApi); + if (codec != null) + { + break; + } + } + } + } + + // If the found codec doesn't match the required MediaApi, set it to null + if (codec != null && matchMediaApi != MediaApi.Unknown) + { + if (codec.MediaApi != matchMediaApi) + { + codec = null; + } + } + + // Fallback to the first codec + if (codec == null && allowFallbackToFirstCodec) + { + if (codecList.Count > 0) + { + if (matchMediaApi != MediaApi.Unknown) + { + codec = codecList.GetFirstWithMediaApi(matchMediaApi); + } + else + { + codec = codecList.Codecs[0]; + } + if (logFallbackWarning) + { + Debug.LogWarning("[AVProMovieCapture] Codec not found. Using the first codec available."); + } + } + } + + return (codec != null); + } + + public Codec SelectVideoCodec(bool isStartingCapture = false) + { + _selectedVideoCodec = null; +#if UNITY_EDITOR_WIN || (!UNITY_EDITOR && UNITY_STANDALONE_WIN) + SelectCodec(ref _selectedVideoCodec, CodecManager.VideoCodecs, NativeForceVideoCodecIndex, _videoCodecPriorityWindows, MediaApi.Unknown, true, isStartingCapture); +#elif UNITY_EDITOR_OSX || (!UNITY_EDITOR && UNITY_STANDALONE_OSX) + SelectCodec(ref _selectedVideoCodec, CodecManager.VideoCodecs, NativeForceVideoCodecIndex, _videoCodecPriorityMacOS, MediaApi.Unknown, true, isStartingCapture); +#elif !UNITY_EDITOR && UNITY_IOS + SelectCodec(ref _selectedVideoCodec, CodecManager.VideoCodecs, NativeForceVideoCodecIndex, null, MediaApi.Unknown, true, isStartingCapture); +#elif !UNITY_EDITOR && UNITY_ANDROID + SelectCodec(ref _selectedVideoCodec, CodecManager.VideoCodecs, NativeForceVideoCodecIndex, _videoCodecPriorityAndroid, MediaApi.Unknown, true, isStartingCapture); +#endif + + if (isStartingCapture && _selectedVideoCodec == null) + { + Debug.LogError("[AVProMovieCapture] Failed to select a suitable video codec"); + } + return _selectedVideoCodec; + } + + public Codec SelectAudioCodec() + { + _selectedAudioCodec = null; + if (_audioCaptureSource != AudioCaptureSource.None) + { +#if UNITY_EDITOR_WIN || (!UNITY_EDITOR && UNITY_STANDALONE_WIN) + // Audio codec selection requires a video codec to be selected first on Windows + if (_selectedVideoCodec != null) + { + SelectCodec(ref _selectedAudioCodec, CodecManager.AudioCodecs, NativeForceAudioCodecIndex, _audioCodecPriorityWindows, _selectedVideoCodec.MediaApi, true, false); + } +#elif UNITY_EDITOR_OSX || (!UNITY_EDITOR && UNITY_STANDALONE_OSX) + SelectCodec(ref _selectedAudioCodec, CodecManager.AudioCodecs, NativeForceAudioCodecIndex, _audioCodecPriorityMacOS, MediaApi.Unknown, true, false); +#elif !UNITY_EDITOR && UNITY_IOS + SelectCodec(ref _selectedAudioCodec, CodecManager.AudioCodecs, NativeForceAudioCodecIndex, null, MediaApi.Unknown, true, false); +#elif !UNITY_EDITOR && UNITY_ANDROID + SelectCodec(ref _selectedAudioCodec, CodecManager.AudioCodecs, NativeForceAudioCodecIndex, _audioCodecPriorityAndroid, MediaApi.Unknown, true, false); +#endif + + if (_selectedAudioCodec == null) + { + //Debug.LogError("[AVProMovieCapture] Failed to select a suitable audio codec"); + } + } + return _selectedAudioCodec; + } + + public Device SelectAudioInputDevice() + { + _selectedAudioInputDevice = null; + if (_audioCaptureSource == AudioCaptureSource.Microphone) + { + // Audio input device selection requires a video codec to be selected first + if (_selectedVideoCodec != null) + { + if (_forceAudioInputDeviceIndex >= 0 && _forceAudioInputDeviceIndex < DeviceManager.AudioInputDevices.Count) + { + _selectedAudioInputDevice = DeviceManager.AudioInputDevices.Devices[_forceAudioInputDeviceIndex]; + } + + // If the found codec doesn't match the required MediaApi, set it to null + if (_selectedAudioInputDevice != null && _selectedAudioInputDevice.MediaApi != _selectedVideoCodec.MediaApi) + { + _selectedAudioInputDevice = null; + } + + // Fallback to the first device + if (_selectedAudioInputDevice == null) + { + if (DeviceManager.AudioInputDevices.Count > 0) + { + _selectedAudioInputDevice = DeviceManager.AudioInputDevices.GetFirstWithMediaApi(_selectedVideoCodec.MediaApi); + } + } + } + } + return _selectedAudioInputDevice; + } + + public static Vector2 GetRecordingResolution(int width, int height, DownScale downscale, Vector2 maxVideoSize) + { + int targetWidth = width; + int targetHeight = height; + if (downscale != DownScale.Custom) + { + targetWidth /= (int)downscale; + targetHeight /= (int)downscale; + } + else + { + if (maxVideoSize.x >= 1.0f && maxVideoSize.y >= 1.0f) + { + targetWidth = Mathf.FloorToInt(maxVideoSize.x); + targetHeight = Mathf.FloorToInt(maxVideoSize.y); + } + } + + // Some codecs like Lagarith in YUY2 mode need size to be multiple of 4 + targetWidth = NextMultipleOf4(targetWidth); + targetHeight = NextMultipleOf4(targetHeight); + + return new Vector2(targetWidth, targetHeight); + } + + public void SelectRecordingResolution(int width, int height) + { + _sourceWidth = width; + _sourceHeight = height; + _targetWidth = width; + _targetHeight = height; + if (_downScale != DownScale.Custom) + { + _targetWidth /= (int)_downScale; + _targetHeight /= (int)_downScale; + } + else + { + if (_maxVideoSize.x >= 1.0f && _maxVideoSize.y >= 1.0f) + { + _targetWidth = Mathf.FloorToInt(_maxVideoSize.x); + _targetHeight = Mathf.FloorToInt(_maxVideoSize.y); + } + } + + // Some codecs like Lagarith in YUY2 mode need size to be multiple of 4 + _targetWidth = NextMultipleOf4(_targetWidth); + _targetHeight = NextMultipleOf4(_targetHeight); + } + + public virtual void OnDestroy() + { + _waitForEndOfFrame = null; + StopCapture(true, true); + FreePendingFileWrites(); + + // Make sure there are no other capture instances running and then deinitialise the plugin + if (_isApplicationQuiting && _isInitialised) + { + // TODO: would it be faster to just look for _pendingFileWrites? + bool anyCapturesRunning = false; +#if UNITY_EDITOR + // In editor we have to search hidden objects as well, as the editor window components are created hidden + CaptureBase[] captures = (CaptureBase[])Resources.FindObjectsOfTypeAll(typeof(CaptureBase)); +#else + CaptureBase[] captures = (CaptureBase[])Component.FindObjectsOfType(typeof(CaptureBase)); +#endif + foreach (CaptureBase capture in captures) + { + if (capture != null && capture.IsCapturing()) + { + anyCapturesRunning = true; + break; + } + } + if (!anyCapturesRunning) + { + NativePlugin.Deinit(); + _isInitialised = false; + } + } + } + + private void FreePendingFileWrites() + { + foreach (FileWritingHandler handler in _pendingFileWrites) + { + handler.Dispose(); + } + _pendingFileWrites.Clear(); + + } + + private void OnApplicationQuit() + { + _isApplicationQuiting = true; + } + + private void OnApplicationPause(bool paused) + { +#if UNITY_IOS && !UNITY_EDITOR + if (paused && IsCapturing()) + { + Debug.LogWarning("Application is being paused, stopping capture..."); + StopCapture(); + } +#endif + } + + protected void EncodeTexture(Texture2D texture) + { + Color32[] bytes = texture.GetPixels32(); + GCHandle _frameHandle = GCHandle.Alloc(bytes, GCHandleType.Pinned); + + EncodePointer(_frameHandle.AddrOfPinnedObject()); + + if (_frameHandle.IsAllocated) + { + _frameHandle.Free(); + } + } + + protected bool IsUsingUnityAudioComponent() + { + if (_outputTarget == OutputTarget.VideoFile && _unityAudioCapture != null) + { + if (_audioCaptureSource == AudioCaptureSource.Unity + #if !AVPRO_MOVIECAPTURE_OFFLINE_AUDIOCAPTURE + && _isRealTime + #endif + ) + { + return true; + } + #if AVPRO_MOVIECAPTURE_WWISE_SUPPORT + else if (_audioCaptureSource == AudioCaptureSource.Wwise && !_isRealTime) + { + return true; + } + #endif + } + return false; + } + + protected bool IsUsingMotionBlur() + { + return (_useMotionBlur && !_isRealTime && _motionBlur != null); + } + + public virtual void EncodePointer(System.IntPtr ptr) + { + if (!IsUsingUnityAudioComponent()) + { + NativePlugin.EncodeFrame(_handle, ptr); + } + else + { + int audioDataLength = 0; + System.IntPtr audioDataPtr = _unityAudioCapture.ReadData(out audioDataLength); + if (audioDataLength > 0) + { + NativePlugin.EncodeFrameWithAudio(_handle, ptr, audioDataPtr, (uint)audioDataLength); + } + else + { + NativePlugin.EncodeFrame(_handle, ptr); + } + } + } + + public bool IsPrepared() + { + return (_handle >= 0); + } + + public bool IsCapturing() + { + return _capturing; + } + + public bool IsPaused() + { + return _paused; + } + + public int GetRecordingWidth() + { + return _targetWidth; + } + + public int GetRecordingHeight() + { + return _targetHeight; + } + + protected virtual string GenerateTimestampedFilename(string filenamePrefix, string filenameExtension) + { + // TimeSpan span = (DateTime.Now - DateTime.Now.Date); + // string filename = string.Format("{0}-{1}-{2}-{3}-{4}s-{5}x{6}", filenamePrefix, DateTime.Now.Year, DateTime.Now.Month.ToString("D2"), DateTime.Now.Day.ToString("D2"), ((int)(span.TotalSeconds)).ToString(), _targetWidth, _targetHeight); + // [MOZ] Use actual time in place of seconds + string dateTime = DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss"); + string filename = string.Format("{0}_{1}_{2}x{3}", filenamePrefix, dateTime, _targetWidth, _targetHeight); + // [MOZ] File extension is now optional + if (!string.IsNullOrEmpty(filenameExtension)) + { + filename = filename + "." + filenameExtension; + } + return filename; + } + +#if UNITY_ANDROID && !UNITY_EDITOR + private static string GetAndroidExternalDCIMStoragePath() + { + if( Application.platform != RuntimePlatform.Android ) + { + return Application.persistentDataPath; + } + + var jClass = new AndroidJavaClass("android.os.Environment"); + var dcimPath = jClass.CallStatic("getExternalStoragePublicDirectory", jClass.GetStatic("DIRECTORY_DCIM")).Call("getAbsolutePath"); + return dcimPath; + } +#endif + + private static string GetFolder(OutputPath outputPathType, string path) + { + string folder = string.Empty; + +#if UNITY_IOS && !UNITY_EDITOR + // iOS only supports a very limited subset of OutputPath so fix up and warn the user + switch (outputPathType) + { + case OutputPath.RelativeToPeristentData: + case OutputPath.PhotoLibrary: + // These are fine + break; + case OutputPath.RelativeToProject: + case OutputPath.Absolute: + case OutputPath.RelativeToDesktop: + case OutputPath.RelativeToVideos: + case OutputPath.RelativeToPictures: + case OutputPath.RelativeToTemporaryCachePath: + // These are unsupported + default: + Debug.LogWarning(string.Format("[AVProMovieCapture] 'OutputPath.{0}' is not supported on iOS, defaulting to 'OutputPath.RelativeToPeristentData'", outputPathType)); + outputPathType = OutputPath.RelativeToPeristentData; + break; + } +#endif + +#if UNITY_ANDROID && !UNITY_EDITOR + // Android only supports a very limited subset of OutputPath so fix up and warn the user + switch (outputPathType) + { + case OutputPath.RelativeToPeristentData: + case OutputPath.RelativeToVideos: + case OutputPath.Absolute: + case OutputPath.RelativeToTemporaryCachePath: + // These are fine + break; + case OutputPath.RelativeToProject: + case OutputPath.RelativeToDesktop: + case OutputPath.RelativeToPictures: + case OutputPath.PhotoLibrary: + // These are unsupported + default: + Debug.LogWarning(string.Format("[AVProMovieCapture] 'OutputPath.{0}' is not supported on Android, defaulting to 'OutputPath.RelativeToPeristentData'", outputPathType)); + outputPathType = OutputPath.RelativeToPeristentData; + break; + } +#endif +#if UNITY_EDITOR + // Photo Library is unavailable in the editor + if (outputPathType == OutputPath.PhotoLibrary) + { + Debug.LogWarning("[AVProMovieCapture] 'OutputPath.PhotoLibrary' is not available in the Unity Editor, defaulting to 'OutputPath.RelativeToProject'"); + outputPathType = OutputPath.RelativeToProject; + } +#endif + + switch (outputPathType) + { + case OutputPath.RelativeToProject: + #if UNITY_STANDALONE_OSX + // For standalone macOS builds this puts the path at the same level as the application bundle + folder = System.IO.Path.GetFullPath(System.IO.Path.Combine(Application.dataPath, "../..")); + #else + folder = System.IO.Path.GetFullPath(System.IO.Path.Combine(Application.dataPath, "..")); + #endif + break; + case OutputPath.RelativeToPeristentData: + folder = System.IO.Path.GetFullPath(Application.persistentDataPath); + break; + case OutputPath.Absolute: + break; + case OutputPath.RelativeToDesktop: + folder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.DesktopDirectory); + break; + case OutputPath.RelativeToPictures: + folder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyPictures); + break; + case OutputPath.RelativeToVideos: + #if UNITY_ANDROID && !UNITY_EDITOR + folder = GetAndroidExternalDCIMStoragePath(); + #else + #if NET_4_6 + folder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyVideos); + #else + folder = System.Environment.GetFolderPath((System.Environment.SpecialFolder)14); // Older Mono doesn't have MyVideos defined - but still works! + #endif + #endif + break; + case OutputPath.PhotoLibrary: + // use avpmc-photolibrary as the scheme + folder = "avpmc-photolibrary:///"; // Three slashes are good as we don't need the host component + break; + case OutputPath.RelativeToTemporaryCachePath: + folder = System.IO.Path.GetFullPath(Application.temporaryCachePath); + break; + } + + return System.IO.Path.Combine(folder, path); + } + + private static string GenerateFilePath(OutputPath outputPathType, string path, string filename) + { + // Resolve folder + string fileFolder = GetFolder(outputPathType, path); + + // Combine path and filename + return System.IO.Path.Combine(fileFolder, filename); + } + + protected static bool HasExtension(string path, string extension) + { + return path.ToLower().EndsWith(extension, StringComparison.OrdinalIgnoreCase); + } + + protected void GenerateFilename() + { + string filename = string.Empty; + if (_outputTarget == OutputTarget.VideoFile) + { + if (!_allowManualFileExtension) + { + if (_selectedVideoCodec == null) + { + SelectVideoCodec(); + SelectAudioCodec(); + } + int videoCodec = (_selectedVideoCodec != null) ? _selectedVideoCodec.Index : -1; + int audioCodec = (_selectedAudioCodec != null) ? _selectedAudioCodec.Index : -1; + string[] extensions = NativePlugin.GetContainerFileExtensions(videoCodec, audioCodec); + if (extensions != null && extensions.Length > 0) + { + _filenameExtension = extensions[0]; + } + } + if (_appendFilenameTimestamp) + { + filename = GenerateTimestampedFilename(_filenamePrefix, _filenameExtension); + } + else + { + filename = _filenamePrefix + "." + _filenameExtension; + } + } + else if (_outputTarget == OutputTarget.ImageSequence) + { + // [MOZ] Made the enclosing folder uniquely named, easier for extraction on iOS and simplifies scripts for processing the frames + string fileExtension = Utils.GetImageFileExtension(NativeImageSequenceFormat); + filename = GenerateTimestampedFilename(_filenamePrefix, null) + "/frame" + string.Format("-%0{0}d.{1}", _imageSequenceZeroDigits, fileExtension); + } + else if (_outputTarget == OutputTarget.NamedPipe) + { + _filePath = _namedPipePath; + } + + if (_outputTarget == OutputTarget.VideoFile || + _outputTarget == OutputTarget.ImageSequence) + { + OutputPath outputFolderType = _outputFolderType; + string outputFolderPath = _outputFolderPath; + _finalFilePath = null; + +#if UNITY_ANDROID && !UNITY_EDITOR + if( _outputFolderType != OutputPath.RelativeToPeristentData ) + { + // Where do we want to write the final file to? + _finalFilePath = GenerateFilePath(_outputFolderType, _outputFolderPath, filename); + + // Capture to path relative to the project + outputFolderType = OutputPath.RelativeToPeristentData; + outputFolderPath = "Captures"; + + // Create target final directory if it doesn't exist + String finalDirectory = Path.GetDirectoryName(_finalFilePath); + Debug.Log("[AVProMovieCapture]: finalDirectory = " + finalDirectory); + if (!string.IsNullOrEmpty(finalDirectory) && !Directory.Exists(finalDirectory)) + { + Directory.CreateDirectory(finalDirectory); + } + } +#endif + _filePath = GenerateFilePath(outputFolderType, outputFolderPath, filename); + + // Check to see if this filename is already in use + if (ActiveFilePaths.Contains(_filePath)) + { + // It is, strip the extension + string extension = Path.GetExtension(_filePath); + string name = Path.GetFileNameWithoutExtension(_filePath); + string path = Path.GetDirectoryName(_filePath); + string newPath = null; + int i = 2; + do + { + const string fmt = "{0} {1}"; + string newName = String.Format(fmt, name, i++); + newPath = Path.Combine(path, newName); + newPath = Path.ChangeExtension(newPath, extension); + } + while (ActiveFilePaths.Contains(newPath)); + _filePath = newPath; + } + + ActiveFilePaths.Add(_filePath); + +#if !UNITY_EDITOR && (UNITY_STANDALONE_OSX || UNITY_IOS) + if (_outputFolderType != OutputPath.PhotoLibrary) +#endif + { + // Create target directory if it doesn't exist + String directory = Path.GetDirectoryName(_filePath); + if (!string.IsNullOrEmpty(directory) && !Directory.Exists(directory)) + { + Directory.CreateDirectory(directory); + } + } + } + } + + public UnityAudioCapture FindOrCreateUnityAudioCapture(bool logWarnings) + { + UnityAudioCapture result = null; + + if (_audioCaptureSource == AudioCaptureSource.Unity) + { + Type audioCaptureType = null; + if (_isRealTime) + { + audioCaptureType = typeof(CaptureAudioFromAudioListener); + } + else + { + #if AVPRO_MOVIECAPTURE_OFFLINE_AUDIOCAPTURE + audioCaptureType = typeof(CaptureAudioFromAudioRenderer); + #endif + } + + if (audioCaptureType != null) + { + // Try to find an existing matching component locally + result = (UnityAudioCapture)this.GetComponent(audioCaptureType); + if (result == null) + { + // Try to find an existing matching component globally + result = (UnityAudioCapture)GameObject.FindObjectOfType(audioCaptureType); + } + + // No existing component was found, so create one + if (result == null) + { + // Find a suitable gameobject to add the component to + GameObject parentGameObject = null; + if (_isRealTime) + { + // Find an AudioListener to attach the UnityAudioCapture component to + AudioListener audioListener = this.GetComponent(); + if (audioListener == null) + { + audioListener = GameObject.FindObjectOfType(); + } + parentGameObject = audioListener.gameObject; + } + else + { + parentGameObject = this.gameObject; + } + + // Create the component + if (_isRealTime) + { + if (parentGameObject != null) + { + result = (UnityAudioCapture)parentGameObject.AddComponent(audioCaptureType); + if (logWarnings) + { + Debug.LogWarning("[AVProMovieCapture] Capturing audio from Unity without an UnityAudioCapture assigned so we had to create one manually (very slow). Consider adding a UnityAudioCapture component to your scene and assigned it to this MovieCapture component."); + } + } + else + { + if (logWarnings) + { + Debug.LogWarning("[AVProMovieCapture] No AudioListener found in scene. Unable to capture audio from Unity."); + } + } + } + else + { + #if AVPRO_MOVIECAPTURE_OFFLINE_AUDIOCAPTURE + result = (UnityAudioCapture)parentGameObject.AddComponent(audioCaptureType); + ((CaptureAudioFromAudioRenderer)result).Capture = this; + if (logWarnings) + { + Debug.LogWarning("[AVProMovieCapture] Capturing audio from Unity without an UnityAudioCapture assigned so we had to create one manually (very slow). Consider adding a UnityAudioCapture component to your scene and assigned it to this MovieCapture component."); + } + #endif + } + } + else + { + if (logWarnings) + { + Debug.LogWarning("[AVProMovieCapture] Capturing audio from Unity without an UnityAudioCapture assigned so we had to search for one manually (very slow)"); + } + } + } + } +#if AVPRO_MOVIECAPTURE_WWISE_SUPPORT + else if (_audioCaptureSource == AudioCaptureSource.Wwise) + { + Type audioCaptureType = null; + if (!_isRealTime) + { + audioCaptureType = typeof(CaptureAudioFromWwise); + } + if (audioCaptureType != null) + { + // Try to find an existing matching component locally + result = (UnityAudioCapture)this.GetComponent(audioCaptureType); + if (result == null) + { + // Try to find an existing matching component globally + result = (UnityAudioCapture)GameObject.FindObjectOfType(audioCaptureType); + } + + // No existing component was found, so create one + if (result == null) + { + result = (UnityAudioCapture)this.gameObject.AddComponent(audioCaptureType); + } + + if (result) + { + ((CaptureAudioFromWwise)result).Capture = this; + } + } + } +#endif // AVPRO_MOVIECAPTURE_WWISE_SUPPORT + + return result; + } + + private bool ValidateEditionFeatures() + { + bool canContinueCapture = true; + if (NativePlugin.IsBasicEdition()) + { + string issues = string.Empty; + + // Abortable issues + if (SystemInfo.graphicsDeviceType == UnityEngine.Rendering.GraphicsDeviceType.Direct3D12) + { + issues += "• D3D12 is not supported, please switch to D3D11. Aborting capture.\n"; + canContinueCapture = false; + } + if (this is CaptureFromCamera || this is CaptureFromTexture || this is CaptureFromCamera360 || this is CaptureFromCamera360ODS) + { + issues += "• Only CaptureFromScreen component is supported. Aborting capture.\n"; + canContinueCapture = false; + } + + // Continuable issues + if (canContinueCapture) + { + if (SelectedVideoCodec != null && SelectedVideoCodec.Name.IndexOf("H264") < 0) + { + issues += "• Only H264 video codec supported. Switching to H264\n"; + NativeForceVideoCodecIndex = 0; + SelectVideoCodec(false); + } + if (SelectedAudioCodec != null && SelectedAudioCodec.Name.IndexOf("AAC") < 0) + { + issues += "• Only AAC audio codec supported. Switching to AAC\n"; + NativeForceAudioCodecIndex = 0; + SelectAudioCodec(); + } + if (!IsRealTime) + { + issues += "• Non-realtime captures are not supported. Switching to realtime capture mode.\n"; + IsRealTime = true; + } + if (OutputTarget != OutputTarget.VideoFile) + { + issues += "• Only output to video file is supported. Switching to video file output.\n"; + OutputTarget = OutputTarget.VideoFile; + FilenameExtension = "mp4"; + GenerateFilename(); + } + if (AudioCaptureSource != AudioCaptureSource.None && AudioCaptureSource != AudioCaptureSource.Unity) + { + issues += "• Audio source '" + AudioCaptureSource + "' not supported. Disabling audio capture.\n"; + AudioCaptureSource = AudioCaptureSource.None; + } + if (FrameRate != 30f) + { + issues += "• Frame rate '" + FrameRate + "' not supported. Switching to 30 FPS.\n"; + FrameRate = 30f; + } + if (GetEncoderHints().videoHints.supportTransparency) + { + issues += "• Transparent capture not supported. Disabling transparent capture\n"; + GetEncoderHints().videoHints.supportTransparency = false; + } + } + + // Log/Display issues + if (!string.IsNullOrEmpty(issues)) + { + string message = "Limitations of Basic Edition reached:\n" + issues + "Please upgrade to use these feature, or visit '" + DocEditionsURL + "' for more information."; + if (canContinueCapture) + { + Debug.LogWarning("[AVProMovieCapture] " + message); + } + else + { + Debug.LogError("[AVProMovieCapture] " + message); + } + + #if UNITY_EDITOR + message = "Limitations of Basic Edition reached:\n\n" + issues + "\nPlease upgrade to use these feature. View documention for more information."; + if (!UnityEditor.EditorUtility.DisplayDialog("AVPro Movie Capture", message, "Ok", "More Info")) + { + Application.OpenURL(DocEditionsURL); + } + #endif + } + } + return canContinueCapture; + } + + public virtual bool PrepareCapture() + { + if (!ValidateEditionFeatures()) + { + return false; + } + + // Delete file if it already exists + if (_outputTarget == OutputTarget.VideoFile && File.Exists(_filePath)) + { + File.Delete(_filePath); + } + + _stats = new CaptureStats(); + +#if UNITY_EDITOR_WIN || (!UNITY_EDITOR && UNITY_STANDALONE_WIN) + if (_minimumDiskSpaceMB > 0 && _outputTarget == OutputTarget.VideoFile) + { + ulong freespace = 0; + if (Utils.DriveFreeBytes(System.IO.Path.GetPathRoot(_filePath), out freespace)) + { + _freeDiskSpaceMB = (long)(freespace / (1024 * 1024)); + } + + if (!IsEnoughDiskSpace()) + { + Debug.LogError("[AVProMovieCapture] Not enough free space to start capture. Stopping capture."); + return false; + } + } +#endif + + if (_isRealTime) + { + /*if (_allowFrameRateChange) + { + _oldTargetFrameRate = Application.targetFrameRate; + Application.targetFrameRate = (int)_frameRate; + }*/ + } + else + { + // Disable vsync + #if !UNITY_EDITOR && (UNITY_IOS || UNITY_ANDROID) + if (_allowVSyncDisable) + { + // iOS and Android do not support disabling vsync so use _oldVsyncCount to store the current target framerate. + _oldVSyncCount = Application.targetFrameRate; + // We want to runs as fast as possible. + Application.targetFrameRate = 300; + } + #else + if (_allowVSyncDisable && !Screen.fullScreen && QualitySettings.vSyncCount > 0) + { + _oldVSyncCount = QualitySettings.vSyncCount; + QualitySettings.vSyncCount = 0; + } + #endif + + if (_useMotionBlur && _motionBlurSamples > 1) + { + #if AVPRO_MOVIECAPTURE_CAPTUREDELTA_SUPPORT + Time.captureDeltaTime = 1f / (_motionBlurSamples * _frameRate); + #else + Time.captureFramerate = (int)(_motionBlurSamples * _frameRate); + #endif + + // FromTexture and FromCamera360 captures don't require a camera for rendering, so set up the motion blur component differently + if (this is CaptureFromTexture || this is CaptureFromCamera360 || this is CaptureFromCamera360ODS) + { + if (_motionBlur == null) + { + _motionBlur = this.GetComponent(); + } + if (_motionBlur == null) + { + _motionBlur = this.gameObject.AddComponent(); + } + if (_motionBlur != null) + { + _motionBlur.NumSamples = _motionBlurSamples; + _motionBlur.SetTargetSize(_targetWidth, _targetHeight); + _motionBlur.enabled = false; + } + } + // FromCamera and FromScreen use this path + else if (_motionBlurCameras.Length > 0) + { + // Setup the motion blur filters where cameras are used + foreach (Camera camera in _motionBlurCameras) + { + MotionBlur mb = camera.GetComponent(); + if (mb == null) + { + mb = camera.gameObject.AddComponent(); + } + if (mb != null) + { + mb.NumSamples = _motionBlurSamples; + mb.enabled = true; + _motionBlur = mb; + } + } + } + } + else + { + #if AVPRO_MOVIECAPTURE_CAPTUREDELTA_SUPPORT + Time.captureDeltaTime = 1f / _frameRate; + #else + Time.captureFramerate = (int)_frameRate; + #endif + } + + // Change physics update speed + _oldFixedDeltaTime = Time.fixedDeltaTime; + #if AVPRO_MOVIECAPTURE_CAPTUREDELTA_SUPPORT + Time.fixedDeltaTime = Time.captureDeltaTime; + #else + Time.fixedDeltaTime = 1.0f / Time.captureFramerate; + #endif + } + + // Resolve desired audio source + _stats.AudioCaptureSource = AudioCaptureSource.None; + if (_audioCaptureSource != AudioCaptureSource.None && _outputTarget == OutputTarget.VideoFile) + { + if (_audioCaptureSource == AudioCaptureSource.Microphone && _isRealTime) + { + if (_selectedAudioInputDevice != null) + { + _stats.AudioCaptureSource = AudioCaptureSource.Microphone; + } + else + { + Debug.LogWarning("[AVProMovieCapture] No microphone found"); + } + } + else if (_audioCaptureSource == AudioCaptureSource.Unity || _audioCaptureSource == AudioCaptureSource.Wwise) + { + // If there is already a capture component, make sure it's the right one otherwise remove it + if (_unityAudioCapture != null) + { + bool removeComponent = false; + if (_audioCaptureSource == AudioCaptureSource.Unity) + { + if (_isRealTime) + { + removeComponent = !(_unityAudioCapture is CaptureAudioFromAudioListener); + } + else + { + removeComponent = (_unityAudioCapture is CaptureAudioFromAudioListener); + } + } + else if (_audioCaptureSource == AudioCaptureSource.Wwise) + { + #if !AVPRO_MOVIECAPTURE_WWISE_SUPPORT + removeComponent = true; + #else + if (_isRealTime) + { + removeComponent = true; + } + else + { + removeComponent = !(_unityAudioCapture is CaptureAudioFromWwise); + } + #endif + } + if (removeComponent) + { + Destroy(_unityAudioCapture); + _unityAudioCapture = null; + } + } + + // We if try to capture audio from Unity but there isn't an UnityAudioCapture component set + if (_unityAudioCapture == null) + { + _unityAudioCapture = FindOrCreateUnityAudioCapture(true); + } + if (_unityAudioCapture != null) + { + _unityAudioCapture.PrepareCapture(); + _stats.UnityAudioSampleRate = _unityAudioCapture.SampleRate; + _stats.UnityAudioChannelCount = _unityAudioCapture.ChannelCount; + _stats.AudioCaptureSource = _audioCaptureSource; + } + else + { + Debug.LogWarning("[AVProMovieCapture] Unable to create AudioCapture component in mode " + _audioCaptureSource.ToString()); + } + } + else if (_audioCaptureSource == AudioCaptureSource.UnityAudioMixer) + { + _stats.UnityAudioSampleRate = AudioSettings.outputSampleRate; + _stats.UnityAudioChannelCount = UnityAudioCapture.GetUnityAudioChannelCount(); + _stats.AudioCaptureSource = _audioCaptureSource; + } + else if (_audioCaptureSource == AudioCaptureSource.Manual) + { + _stats.UnityAudioSampleRate = _manualAudioSampleRate; + _stats.UnityAudioChannelCount = _manualAudioChannelCount; + _stats.AudioCaptureSource = AudioCaptureSource.Manual; + } + } + + if (_selectedVideoCodec == null) return false; + + string info = string.Empty; + if (_logCaptureStartStop) + { + info = string.Format("{0}x{1} @ {2}fps [{3}]", _targetWidth, _targetHeight, _frameRate.ToString("F2"), _pixelFormat.ToString()); + if (_outputTarget == OutputTarget.VideoFile) + { + info += string.Format(" vcodec:'{0}'", _selectedVideoCodec.Name); + if (_stats.AudioCaptureSource != AudioCaptureSource.None) + { + if (_audioCaptureSource == AudioCaptureSource.Microphone && _selectedAudioInputDevice != null) + { + info += string.Format(" audio source:'{0}'", _selectedAudioInputDevice.Name); + } + else if (_audioCaptureSource == AudioCaptureSource.Unity && _unityAudioCapture != null) + { + info += string.Format(" audio source:'Unity' {0}hz {1} channels", _stats.UnityAudioSampleRate, _stats.UnityAudioChannelCount); + } + else if (_audioCaptureSource == AudioCaptureSource.UnityAudioMixer) + { + info += string.Format(" audio source:'AudioMixer' {0}hz {1} channels", _stats.UnityAudioSampleRate, _stats.UnityAudioChannelCount); + } + else if (_audioCaptureSource == AudioCaptureSource.Manual) + { + info += string.Format(" audio source:'Manual' {0}hz {1} channels", _stats.UnityAudioSampleRate, _stats.UnityAudioChannelCount); + } + else if (_audioCaptureSource == AudioCaptureSource.Wwise && _unityAudioCapture != null) + { + info += string.Format(" audio source:'Wwise' {0}hz {1} channels", _stats.UnityAudioSampleRate, _stats.UnityAudioChannelCount); + } + if (_selectedAudioCodec != null) + { + info += string.Format(" acodec:'{0}'", _selectedAudioCodec.Name); + } + } + + info += string.Format(" to file: '{0}'", _filePath); + } + else if (_outputTarget == OutputTarget.ImageSequence) + { + info += string.Format(" to file: '{0}'", _filePath); + } + else if (_outputTarget == OutputTarget.NamedPipe) + { + info += string.Format(" to pipe: '{0}'", _filePath); + } + } + + // If the user has overriden the vertical flip + if (_flipVertically) + { + _isTopDown = !_isTopDown; + } + + if (_outputTarget == OutputTarget.VideoFile) + { + if (_logCaptureStartStop) + { + Debug.Log("[AVProMovieCapture] Start File Capture: " + info); + } + bool useRealtimeClock = (_isRealTime && _timelapseScale <= 1); + AudioCaptureSource audioCaptureSource = _stats.AudioCaptureSource; + if (audioCaptureSource == AudioCaptureSource.Wwise) { audioCaptureSource = AudioCaptureSource.Unity; } // This is a mild hack until we rebuild the plugins + + VideoEncoderHints hints = GetEncoderHints().videoHints; + hints.colourSpace = (VideoEncoderHints.ColourSpace)QualitySettings.activeColorSpace; + hints.sourceWidth = _sourceWidth; + hints.sourceHeight = _sourceHeight; + + // Android only + hints.androidNoCaptureRotation = _androidNoCaptureRotation; + + _handle = NativePlugin.CreateRecorderVideo( + _filePath, + (uint)_targetWidth, + (uint)_targetHeight, + _frameRate, + (int)_pixelFormat, + useRealtimeClock, + _isTopDown, + _selectedVideoCodec.Index, + audioCaptureSource, + _stats.UnityAudioSampleRate, + _stats.UnityAudioChannelCount, + (_selectedAudioInputDevice != null) ? _selectedAudioInputDevice.Index : -1, + (_selectedAudioCodec != null) ? _selectedAudioCodec.Index : -1, + _forceGpuFlush, + hints); + } + else if (_outputTarget == OutputTarget.ImageSequence) + { + if (_logCaptureStartStop) + { + Debug.Log("[AVProMovieCapture] Start Images Capture: " + info); + } + bool useRealtimeClock = (_isRealTime && _timelapseScale <= 1); + + ImageEncoderHints hints = GetEncoderHints().imageHints; + hints.colourSpace = (ImageEncoderHints.ColourSpace)QualitySettings.activeColorSpace; + hints.sourceWidth = _sourceWidth; + hints.sourceHeight = _sourceHeight; + + _handle = NativePlugin.CreateRecorderImages( + _filePath, + (uint)_targetWidth, + (uint)_targetHeight, + _frameRate, + (int)_pixelFormat, + useRealtimeClock, + _isTopDown, + (int)NativeImageSequenceFormat, + _forceGpuFlush, + _imageSequenceStartFrame, + hints); + } + else if (_outputTarget == OutputTarget.NamedPipe) + { + if (_logCaptureStartStop) + { + Debug.Log("[AVProMovieCapture] Start Pipe Capture: " + info); + } + _handle = NativePlugin.CreateRecorderPipe(_filePath, (uint)_targetWidth, (uint)_targetHeight, _frameRate, + (int)_pixelFormat, _isTopDown, GetEncoderHints().videoHints.supportTransparency, _forceGpuFlush); + } + + if (_handle >= 0) + { + RenderThreadEvent(NativePlugin.PluginEvent.Setup); + } + else + { + Debug.LogError("[AVProMovieCapture] Failed to create recorder"); + + // Try to give a reason why it failed +#if UNITY_EDITOR_WIN || (!UNITY_EDITOR && UNITY_STANDALONE_WIN) + if (_selectedVideoCodec.MediaApi == MediaApi.MediaFoundation) + { + if (!HasExtension(_filePath, ".mp4")) + { + Debug.LogError("[AVProMovieCapture] When using a MediaFoundation codec the MP4 extension must be used"); + } + + // MF H.264 encoder has a limit of Level 5.2 which is 9,437,184 luma pixels + // but we've seen it fail slightly below this limit, so we test against 9360000 + // to offer a useful potential error message + if (((_targetWidth * _targetHeight) >= 9360000) && _selectedVideoCodec.Name.Contains("H264")) + { + Debug.LogError("[AVProMovieCapture] Resolution is possibly too high for the MF H.264 codec"); + } + } + else if (_selectedVideoCodec.MediaApi == MediaApi.DirectShow) + { + if (HasExtension(_filePath, ".mp4") && _selectedVideoCodec.Name.Contains("Uncompressed")) + { + Debug.LogError("[AVProMovieCapture] Uncompressed video codec not supported with MP4 extension, use AVI instead for uncompressed"); + } + } +#endif + + StopCapture(); + } + +// (mac|i)OS only for now +#if UNITY_EDITOR_OSX || (!UNITY_EDITOR && (UNITY_STANDALONE_OSX || UNITY_IOS)) + SetupErrorHandler(); +#endif + return (_handle >= 0); + } + +#if UNITY_EDITOR_OSX || (!UNITY_EDITOR && (UNITY_STANDALONE_OSX || UNITY_IOS)) + + static Dictionary _HandleToCaptureMap = new Dictionary(); + + private void SetupErrorHandler() + { + NativePlugin.ErrorHandlerDelegate errorHandlerDelegate = new NativePlugin.ErrorHandlerDelegate(ErrorHandler); + System.IntPtr func = Marshal.GetFunctionPointerForDelegate(errorHandlerDelegate); + NativePlugin.SetErrorHandler(_handle, func); + _HandleToCaptureMap.Add(_handle, this); + } + + private void CleanupErrorHandler() + { + _HandleToCaptureMap.Remove(_handle); + } + +#if ENABLE_IL2CPP + [MonoPInvokeCallback(typeof(NativePlugin.ErrorHandlerDelegate))] +#endif + private static void ErrorHandler(int handle, int domain, int code, string message) + { + CaptureBase capture; + if (_HandleToCaptureMap.TryGetValue(handle, out capture)) + { + capture.ActualErrorHandler(domain, code, message); + } + } + + private void ActualErrorHandler(int domain, int code, string message) { + if (_capturing) + { + CancelCapture(); + Debug.LogError("Capture cancelled"); + } + Debug.LogErrorFormat("Error: domain: {0}, code: {1}, message: {2}", domain, code, message); + } +#endif + + public void QueueStartCapture() + { + _queuedStartCapture = true; + _stats = new CaptureStats(); + } + + public bool IsStartCaptureQueued() + { + return _queuedStartCapture; + } + + protected void UpdateInjectionOptions(StereoPacking stereoPacking, SphericalVideoLayout sphericalVideoLayout) + { + VideoEncoderHints videoHints = GetEncoderHints().videoHints; + if (videoHints.injectStereoPacking == NoneAutoCustom.Auto) { videoHints.stereoPacking = stereoPacking; } + if (videoHints.injectSphericalVideoLayout == NoneAutoCustom.Auto) { videoHints.sphericalVideoLayout = sphericalVideoLayout; } + } + + public bool StartCapture() + { + if (_capturing) + { + return false; + } + + if (_waitForEndOfFrame == null) + { + // Start() hasn't happened yet, so queue the StartCapture + QueueStartCapture(); + return false; + } + + if (_handle < 0) + { + if (!PrepareCapture()) + { + return false; + } + } + + if (_handle >= 0) + { + if (IsUsingUnityAudioComponent()) + { + _unityAudioCapture.StartCapture(); + } + + // Set limit to number of frames encoded (or 0 for unlimited) + { + uint frameLimit = 0; + if (_stopMode == StopMode.FramesEncoded) + { + frameLimit = (uint)_stopFrames; + } + else if (_stopMode == StopMode.SecondsEncoded && !_isRealTime) + { + frameLimit = (uint)Mathf.FloorToInt(_stopSeconds * _frameRate); + } + NativePlugin.SetEncodedFrameLimit(_handle, frameLimit); + } + + if (!NativePlugin.Start(_handle)) + { + StopCapture(true); + Debug.LogError("[AVProMovieCapture] Failed to start recorder"); + return false; + } + ResetFPS(); + _captureStartTime = Time.realtimeSinceStartup; + _capturePrePauseTotalTime = 0f; + + // NOTE: We set this to the elapsed time so that the first frame is captured immediately + _timeSinceLastFrame = GetSecondsPerCaptureFrame(); + + #if AVPRO_MOVIECAPTURE_PLAYABLES_SUPPORT + if (!_isRealTime && _timelineController != null) + { + _timelineController.StartCapture(); + } + #endif + #if AVPRO_MOVIECAPTURE_VIDEOPLAYER_SUPPORT + if (!_isRealTime && _videoPlayerController != null) + { + _videoPlayerController.StartCapture(); + } + #endif + + _capturing = true; + _paused = false; + + if (_startDelay != StartDelayMode.None) + { + _startDelayTimer = 0f; + _startPaused = true; + PauseCapture(); + } + + #if UNITY_EDITOR + if (UnityEditor.EditorApplication.isPaused) + { + PauseCapture(); + } + #endif + } + + return _capturing; + } + + public void PauseCapture() + { + if (_capturing && !_paused) + { + if (IsUsingUnityAudioComponent()) + { + _unityAudioCapture.enabled = false; + } + NativePlugin.Pause(_handle); + + if (!_isRealTime) + { + // TODO: should be store the timeScale value and restore it instead of assuming timeScale == 1.0? + Time.timeScale = 0f; + } + + _paused = true; + ResetFPS(); + } + } + + public void ResumeCapture() + { + if (_capturing && _paused) + { + if (IsUsingUnityAudioComponent()) + { + _unityAudioCapture.FlushBuffer(); + _unityAudioCapture.enabled = true; + } + + NativePlugin.Start(_handle); + + if (!_isRealTime) + { + Time.timeScale = 1f; + } + + _paused = false; + if (_startPaused) + { + _captureStartTime = Time.realtimeSinceStartup; + _capturePrePauseTotalTime = 0f; + _startPaused = false; + } + } + } + + public void CancelCapture() + { + StopCapture(true, false, true); + } + + public static void DeleteCapture(OutputTarget outputTarget, string path) + { + try + { + if (outputTarget == OutputTarget.VideoFile && File.Exists(path)) + { + File.Delete(path); + } + else if (outputTarget == OutputTarget.ImageSequence) + { + string directory = Path.GetDirectoryName(path); + if (Directory.Exists(directory)) + { + Directory.Delete(directory, true); + } + } + } + catch (Exception ex) + { + Debug.LogWarning("[AVProMovieCapture] Failed to delete capture - " + ex.Message); + } + } + + public virtual void UnprepareCapture() + { +#if UNITY_EDITOR_OSX || (!UNITY_EDITOR && (UNITY_STANDALONE_OSX || UNITY_IOS)) + CleanupErrorHandler(); +#endif + } + + public static string LastFileSaved + { + get + { +#if UNITY_EDITOR + return UnityEditor.EditorPrefs.GetString("AVProMovieCapture-LastSavedFile", string.Empty); +#else + return PlayerPrefs.GetString("AVProMovieCapture-LastSavedFile", string.Empty); +#endif + } + set + { + PlayerPrefs.SetString("AVProMovieCapture-LastSavedFile", value); +#if UNITY_EDITOR + UnityEditor.EditorPrefs.SetString("AVProMovieCapture-LastSavedFile", value); +#endif + } + } + + protected void RenderThreadEvent(NativePlugin.PluginEvent renderEvent) + { + NativePlugin.RenderThreadEvent(renderEvent, _handle); + } + + public virtual void StopCapture(bool skipPendingFrames = false, bool ignorePendingFileWrites = false, bool deleteCapture = false) + { + UnprepareCapture(); + + if (_capturing) + { + if (_logCaptureStartStop) + { + if (!deleteCapture) + { + Debug.Log("[AVProMovieCapture] Stopping capture " + _handle); + } + else + { + Debug.Log("[AVProMovieCapture] Canceling capture " + _handle); + } + } + _capturing = false; + } + + bool applyPostOperations = false; + FileWritingHandler fileWritingHandler = null; + if (_handle >= 0) + { + NativePlugin.Stop(_handle, skipPendingFrames); + + if (_outputTarget == OutputTarget.VideoFile) + { + applyPostOperations = true; + } + + bool updateMediaGallery = (_outputFolderType == OutputPath.RelativeToPictures || _outputFolderType == OutputPath.RelativeToVideos || _outputFolderType == OutputPath.PhotoLibrary); + fileWritingHandler = new FileWritingHandler(_outputTarget, _filePath, _handle, deleteCapture, _finalFilePath, updateMediaGallery); + if (_completedFileWritingAction != null) + { + fileWritingHandler.CompletedFileWritingAction = _completedFileWritingAction; + } + + // Free the recorder, or if the file is still being written, store the action to be invoked where it is complete + bool canFreeRecorder = (ignorePendingFileWrites || NativePlugin.IsFileWritingComplete(_handle)); + + if (canFreeRecorder) + { + // If there is an external action set up, then notify it that writing has begun + if (_beginFinalFileWritingAction != null) + { + _beginFinalFileWritingAction.Invoke(fileWritingHandler); + } + + // Complete writing immediately + fileWritingHandler.Dispose(); + fileWritingHandler = null; + } + else + { + // If no external action has been set up for the checking when the file writing begins and end, + // add it to an internal list so we can make sure it completes + if (_beginFinalFileWritingAction == null) + { + _pendingFileWrites.Add(fileWritingHandler); + } + + if (!deleteCapture) + { + VideoEncoderHints hints = GetEncoderHints().videoHints; + if (applyPostOperations && CanApplyPostOperations(_filePath, hints, _finalFilePath)) + { + MP4FileProcessing.Options options = CreatePostOperationsOptions(hints, _finalFilePath); + fileWritingHandler.SetFilePostProcess(options); + } + } + applyPostOperations = false; + } + + // If there is an external action set up, then notify it that writing has begun + if (_beginFinalFileWritingAction != null && fileWritingHandler != null) + { + _beginFinalFileWritingAction.Invoke(fileWritingHandler); + } + + _handle = -1; + + // Save the last captured path + if (!deleteCapture) + { + if (!string.IsNullOrEmpty(_filePath)) + { + if (_outputTarget == OutputTarget.VideoFile) + { + LastFileSaved = _filePath; + } + else if (_outputTarget == OutputTarget.ImageSequence) + { + LastFileSaved = System.IO.Path.GetDirectoryName(_filePath); + } + } + } + #if AVPRO_MOVIECAPTURE_VIDEOPLAYER_SUPPORT + if (_videoPlayerController != null) + { + _videoPlayerController.StopCapture(); + } + #endif + #if AVPRO_MOVIECAPTURE_PLAYABLES_SUPPORT + if (_timelineController != null) + { + _timelineController.StopCapture(); + } + #endif + } + + _fileInfo = null; + + if (_unityAudioCapture) + { + _unityAudioCapture.StopCapture(); + } + if (_motionBlur) + { + _motionBlur.enabled = false; + } + + // Restore Unity timing + Time.captureFramerate = 0; + //Application.targetFrameRate = _oldTargetFrameRate; + //_oldTargetFrameRate = -1; + + if (_oldFixedDeltaTime > 0f) + { + Time.fixedDeltaTime = _oldFixedDeltaTime; + } + _oldFixedDeltaTime = 0f; + + #if !UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_ANDROID) + // Android and iOS do not support disabling vsync so _oldVsyncCount is actually the target framerate before we started capturing. + if (_oldVSyncCount != 0) + { + Application.targetFrameRate = _oldVSyncCount; + _oldVSyncCount = 0; + } + #else + if (_oldVSyncCount > 0) + { + QualitySettings.vSyncCount = _oldVSyncCount; + _oldVSyncCount = 0; + } + #endif + + _motionBlur = null; + + if (_texture != null) + { + Destroy(_texture); + _texture = null; + } + + if (applyPostOperations) + { + ApplyPostOperations(_filePath, GetEncoderHints().videoHints, _finalFilePath); + } + } + + private static MP4FileProcessing.Options CreatePostOperationsOptions(VideoEncoderHints hints, string finalFilePath) + { + MP4FileProcessing.Options options = new MP4FileProcessing.Options(); + #if UNITY_EDITOR_WIN || (!UNITY_EDITOR && (UNITY_STANDALONE_WIN || UNITY_ANDROID)) + // macOS and iOS don't require fast start postprocess as it is handled internally + options.applyFastStart = hints.allowFastStartStreamingPostProcess; + #endif + + options.applyStereoMode = (hints.injectStereoPacking != NoneAutoCustom.None) && (hints.stereoPacking != StereoPacking.None); + if (options.applyStereoMode) + { + options.stereoMode = hints.stereoPacking; + } + + options.applySphericalVideoLayout = (hints.injectSphericalVideoLayout != NoneAutoCustom.None) && (hints.sphericalVideoLayout != SphericalVideoLayout.None); + if (options.applySphericalVideoLayout) + { + options.sphericalVideoLayout = hints.sphericalVideoLayout; + } + + options.applyMoveCaptureFile = (finalFilePath != null); + if(options.applyMoveCaptureFile) + { + options.finalCaptureFilePath = finalFilePath; + } + + return options; + } + + private static bool CanApplyPostOperations(string filePath, VideoEncoderHints hints, string finalFilePath) + { + bool result = false; + if (HasExtension(filePath, ".mp4") || HasExtension(filePath, ".mov") && File.Exists(filePath)) + { + result = CreatePostOperationsOptions(hints, finalFilePath).HasOptions(); + } + return result; + } + + protected void ApplyPostOperations(string filePath, VideoEncoderHints hints, string finalFilePath) + { + if (CanApplyPostOperations(filePath, hints, finalFilePath)) + { + try + { + MP4FileProcessing.Options options = CreatePostOperationsOptions(hints, finalFilePath); + if (!MP4FileProcessing.ProcessFile(filePath, false, options)) + { + Debug.LogWarning("[AVProMovieCapture] failed to postprocess file: " + filePath); + } + } + catch (System.Exception e) + { + Debug.LogException(e); + } + } + } + + private void ToggleCapture() + { + if (_capturing) + { + //_queuedStopCapture = true; + //_queuedStartCapture = false; + StopCapture(); + } + else + { + //_queuedStartCapture = true; + //_queuedStopCapture = false; + StartCapture(); + } + } + + private bool IsEnoughDiskSpace() + { + bool result = true; +#if UNITY_EDITOR_WIN || (!UNITY_EDITOR && UNITY_STANDALONE_WIN) + long fileSizeMB = GetCaptureFileSize() / (1024 * 1024); + + if ((_freeDiskSpaceMB - fileSizeMB) < _minimumDiskSpaceMB) + { + result = false; + } +#endif + return result; + } + + protected bool CanContinue() + { + bool result = true; + #if AVPRO_MOVIECAPTURE_VIDEOPLAYER_SUPPORT + if (IsCapturing() && !IsPaused() && !_isRealTime && _videoPlayerController != null) + { + result = _videoPlayerController.CanContinue(); + } + #endif + return result; + } + + private void Update() + { + if (_queuedStopCapture) + { + _queuedStopCapture = _queuedStartCapture = false; + StopCapture(false, false); + } + if (_queuedStartCapture) + { + _queuedStopCapture = _queuedStartCapture = false; + StartCapture(); + } + } + + private void LateUpdate() + { + if (_handle >= 0 && !_paused) + { + CheckFreeDiskSpace(); + } + + if (_captureKey != KeyCode.None) + { + #if (!ENABLE_INPUT_SYSTEM || ENABLE_LEGACY_INPUT_MANAGER) + if (Input.GetKeyDown(_captureKey)) + { + ToggleCapture(); + } + #endif + } + + RemoveCompletedFileWrites(); + + if (_frameUpdateMode == FrameUpdateMode.Automatic) + { + // Resume capture if a start delay has been specified + if (IsCapturing() && IsPaused() && _stats.NumEncodedFrames == 0) + { + float delta = 0f; + if (_startDelay == StartDelayMode.GameSeconds) + { + if (!_isRealTime) + { + // In offline render mode Time.deltaTime is always zero due Time.timeScale being set to zero, + // so just use the real world time + delta = Time.unscaledDeltaTime; + } + else + { + delta = Time.deltaTime; + } + } + else if (_startDelay == StartDelayMode.RealSeconds) + { + delta = Time.unscaledDeltaTime; + } + if (delta > 0f) + { + _startDelayTimer += delta; + if (IsStartDelayComplete()) + { + ResumeCapture(); + } + } + } + + PreUpdateFrame(); + UpdateFrame(); + } + } + + private void RemoveCompletedFileWrites() + { + for (int i = _pendingFileWrites.Count - 1; i >= 0; i--) + { + FileWritingHandler handler = _pendingFileWrites[i]; + if (handler.IsFileReady()) + { + _pendingFileWrites.RemoveAt(i); + } + } + } + + private void CheckFreeDiskSpace() + { + if (_minimumDiskSpaceMB > 0) + { + if (!IsEnoughDiskSpace()) + { + Debug.LogWarning("[AVProMovieCapture] Free disk space getting too low. Stopping capture."); + StopCapture(true); + } + } + } + + protected bool IsStartDelayComplete() + { + bool result = false; + if (_startDelay == StartDelayMode.None) + { + result = true; + } + else if (_startDelay == StartDelayMode.GameSeconds || + _startDelay == StartDelayMode.RealSeconds) + { + result = (_startDelayTimer >= _startDelaySeconds); + } + return result; + } + + protected bool IsStopTimeReached() + { + bool result = false; + if (_stopMode != StopMode.None) + { + switch (_stopMode) + { + case StopMode.FramesEncoded: + result = (_stats.NumEncodedFrames >= _stopFrames); + break; + case StopMode.SecondsEncoded: + if (!_isRealTime) + { + // In non-realtime mode this is a more accurate way to determine encoded time + result = (_stats.NumEncodedFrames >= _stopSeconds * _frameRate); + } + else + { + result = (_stats.TotalEncodedSeconds >= _stopSeconds); + } + break; + case StopMode.SecondsElapsed: + if (!_startPaused && !_paused) + { + float timeSinceLastEditorPause = (Time.realtimeSinceStartup - _captureStartTime); + result = (timeSinceLastEditorPause + _capturePrePauseTotalTime) >= _stopSeconds; + } + break; + } + } + return result; + } + + public float GetProgress() + { + float result = 0f; + if (_stopMode != StopMode.None) + { + switch (_stopMode) + { + case StopMode.FramesEncoded: + result = (_stats.NumEncodedFrames / (float)_stopFrames); + break; + case StopMode.SecondsEncoded: + result = ((_stats.NumEncodedFrames / _frameRate) / _stopSeconds); + break; + case StopMode.SecondsElapsed: + if (!_startPaused && !_paused) + { + float timeSinceLastEditorPause = (Time.realtimeSinceStartup - _captureStartTime); + result = (timeSinceLastEditorPause + _capturePrePauseTotalTime) / _stopSeconds; + } + break; + } + } + return result; + } + + protected float GetSecondsPerCaptureFrame() + { + float timelapseScale = (float)_timelapseScale; + if (!_isRealTime) + { + timelapseScale = 1f; + } + float captureFrameRate = _frameRate / timelapseScale; + float secondsPerFrame = 1f / captureFrameRate; + return secondsPerFrame; + } + + protected bool CanOutputFrame() + { + bool result = false; + if (_handle >= 0) + { + if (_isRealTime) + { + if (NativePlugin.IsNewFrameDue(_handle)) + { + result = (_timeSinceLastFrame >= GetSecondsPerCaptureFrame()); + //result = true; + } + } + else + { + const int WatchDogLimit = 1000; + int watchdog = 0; + if (_outputTarget != OutputTarget.NamedPipe) + { + // Wait for the encoder to have an available buffer + // The watchdog prevents an infinite while loop + while (_handle >= 0 && !NativePlugin.IsNewFrameDue(_handle) && watchdog < WatchDogLimit) + { + System.Threading.Thread.Sleep(1); + watchdog++; + } + } + + // Return handle status as it may have closed elsewhere + result = (_handle >= 0) && (watchdog < WatchDogLimit); + } + } + return result; + } + + protected void TickFrameTimer() + { + _timeSinceLastFrame += Time.deltaTime;//unscaledDeltaTime; + } + + protected void RenormTimer() + { + float secondsPerFrame = GetSecondsPerCaptureFrame(); + if (_timeSinceLastFrame >= secondsPerFrame) + { + _timeSinceLastFrame -= secondsPerFrame; + } + } + + public virtual Texture GetPreviewTexture() + { + return null; + } + + protected void EncodeUnityAudio() + { + if (IsUsingUnityAudioComponent()) + { + int audioDataLength = 0; + System.IntPtr audioDataPtr = _unityAudioCapture.ReadData(out audioDataLength); + if (audioDataLength > 0) + { + NativePlugin.EncodeAudio(_handle, audioDataPtr, (uint)audioDataLength); + } + } + } + + public void EncodeAudio(NativeArray audioData) + { + if (audioData.Length > 0) + { +#if UNITY_NATIVEARRAY_UNSAFE_SUPPORT + unsafe + { + System.IntPtr pointer = (System.IntPtr)Unity.Collections.LowLevel.Unsafe.NativeArrayUnsafeUtility.GetUnsafeReadOnlyPtr(audioData); + NativePlugin.EncodeAudio(_handle, pointer, (uint)audioData.Length); + } +#else + EncodeAudio(audioData.ToArray()); +#endif + } + } + + public void EncodeAudio(float[] audioData) + { + if (audioData.Length > 0) + { + int byteCount = Marshal.SizeOf(audioData[0]) * audioData.Length; + + // Copy the array to unmanaged memory. + System.IntPtr pointer = Marshal.AllocHGlobal(byteCount); + Marshal.Copy(audioData, 0, pointer, audioData.Length); + + // Encode + NativePlugin.EncodeAudio(_handle, pointer, (uint)audioData.Length); + + // Free the unmanaged memory. + Marshal.FreeHGlobal(pointer); + } + } + + public virtual void PreUpdateFrame() + { + #if AVPRO_MOVIECAPTURE_PLAYABLES_SUPPORT + if (IsCapturing() && !IsPaused() && !_isRealTime && _timelineController != null) + { + _timelineController.UpdateFrame(); + } + #endif + #if AVPRO_MOVIECAPTURE_VIDEOPLAYER_SUPPORT + if (IsCapturing() && !IsPaused() && !_isRealTime && _videoPlayerController != null) + { + _videoPlayerController.UpdateFrame(); + } + #endif + } + + public virtual void UpdateFrame() + { + // NOTE: Unlike other CaptureFrom components, CaptureFromScreen uses a coroutine, so when it calls base.UpdateFrame() is could still process the frame afterwards + if (_handle >= 0 && !_paused) + { + _stats.NumDroppedFrames = NativePlugin.GetNumDroppedFrames(_handle); + _stats.NumDroppedEncoderFrames = NativePlugin.GetNumDroppedEncoderFrames(_handle); + _stats.NumEncodedFrames = NativePlugin.GetNumEncodedFrames(_handle); + _stats.TotalEncodedSeconds = NativePlugin.GetEncodedSeconds(_handle); + + if (IsStopTimeReached()) + { + _queuedStopCapture = true; + } + } + } + + protected void ResetFPS() + { + _stats.ResetFPS(); + } + + public void UpdateFPS() + { + _stats.UpdateFPS(); + } + + protected int GetCameraAntiAliasingLevel(Camera camera) + { + int aaLevel = QualitySettings.antiAliasing; + if (aaLevel == 0) + { + aaLevel = 1; + } + + if (_renderAntiAliasing > 0) + { + aaLevel = _renderAntiAliasing; + } + + if (aaLevel != 1 && aaLevel != 2 && aaLevel != 4 && aaLevel != 8) + { + Debug.LogWarning("[AVProMovieCapture] Invalid antialiasing value, must be 1, 2, 4 or 8. Defaulting to 1. >> " + aaLevel); + aaLevel = 1; + } + + if (aaLevel != 1) + { + if (camera.actualRenderingPath == RenderingPath.DeferredLighting || camera.actualRenderingPath == RenderingPath.DeferredShading) + { + Debug.LogWarning("[AVProMovieCapture] Not using antialiasing because MSAA is not supported by camera render path " + camera.actualRenderingPath); + aaLevel = 1; + } + } + return aaLevel; + } + + public long GetCaptureFileSize() + { + long result = 0; +#if UNITY_EDITOR_OSX || (!UNITY_EDITOR && (UNITY_STANDALONE_OSX || UNITY_IOS || UNITY_ANDROID)) + result = NativePlugin.GetFileSize(_handle); +#elif !UNITY_WEBPLAYER + if (_handle >= 0 && _outputTarget == OutputTarget.VideoFile) + { + if (_fileInfo == null && File.Exists(_filePath)) + { + _fileInfo = new System.IO.FileInfo(_filePath); + } + if (_fileInfo != null) + { + _fileInfo.Refresh(); + result = _fileInfo.Length; + } + } +#endif + return result; + } + + public static void GetResolution(Resolution res, ref int width, ref int height) + { + switch (res) + { + case Resolution.POW2_8192x8192: + width = 8192; height = 8192; + break; + case Resolution.POW2_8192x4096: + width = 8192; height = 4096; + break; + case Resolution.POW2_4096x4096: + width = 4096; height = 4096; + break; + case Resolution.POW2_4096x2048: + width = 4096; height = 2048; + break; + case Resolution.POW2_2048x4096: + width = 2048; height = 4096; + break; + case Resolution.UHD_3840x2160: + width = 3840; height = 2160; + break; + case Resolution.UHD_3840x2048: + width = 3840; height = 2048; + break; + case Resolution.UHD_3840x1920: + width = 3840; height = 1920; + break; + case Resolution.UHD_2560x1440: + width = 2560; height = 1440; + break; + case Resolution.POW2_2048x2048: + width = 2048; height = 2048; + break; + case Resolution.POW2_2048x1024: + width = 2048; height = 1024; + break; + case Resolution.HD_1920x1080: + width = 1920; height = 1080; + break; + case Resolution.HD_1280x720: + width = 1280; height = 720; + break; + case Resolution.SD_1024x768: + width = 1024; height = 768; + break; + case Resolution.SD_800x600: + width = 800; height = 600; + break; + case Resolution.SD_800x450: + width = 800; height = 450; + break; + case Resolution.SD_640x480: + width = 640; height = 480; + break; + case Resolution.SD_640x360: + width = 640; height = 360; + break; + case Resolution.SD_320x240: + width = 320; height = 240; + break; + } + } + + // Returns the next multiple of 4 or the same value if it's already a multiple of 4 + protected static int NextMultipleOf4(int value) + { + return (value + 3) & ~0x03; + } + + // Audio capture support + + /// + /// Authorisation for audio capture. + /// + public enum AudioCaptureDeviceAuthorisationStatus + { + /// Audio capture is unavailable. + Unavailable = -1, + /// Authorisation is still to be requested. + NotDetermined, + /// Authorisation has been denied. + Denied, + /// Authorisation has been granted. + Authorised + }; + + /// + /// Check to see if authorisation has been given to capture audio. + /// + private static bool _waitingForAudioCaptureDeviceAuthorisation = true; + private static bool _hasCheckedAudioCaptureDeviceAuthorisationStatus = false; + private static AudioCaptureDeviceAuthorisationStatus _audioCaptureDeviceAuthorisationStatus = AudioCaptureDeviceAuthorisationStatus.NotDetermined; + + public static AudioCaptureDeviceAuthorisationStatus HasUserAuthorisationToCaptureAudio() + { + if (!_hasCheckedAudioCaptureDeviceAuthorisationStatus || _audioCaptureDeviceAuthorisationStatus == AudioCaptureDeviceAuthorisationStatus.NotDetermined) + { + _hasCheckedAudioCaptureDeviceAuthorisationStatus = true; +#if !UNITY_EDITOR_OSX && (UNITY_STANDALONE_OSX || (UNITY_IOS && !UNITY_EDITOR)) + _audioCaptureDeviceAuthorisationStatus = (AudioCaptureDeviceAuthorisationStatus)NativePlugin.AudioCaptureDeviceAuthorisationStatus(); +#elif UNITY_ANDROID && !UNITY_EDITOR + _audioCaptureDeviceAuthorisationStatus = Permission.HasUserAuthorizedPermission(Permission.Microphone) ? AudioCaptureDeviceAuthorisationStatus.Authorised + : AudioCaptureDeviceAuthorisationStatus.NotDetermined; +#else + _audioCaptureDeviceAuthorisationStatus = AudioCaptureDeviceAuthorisationStatus.Unavailable; +#endif + } + return _audioCaptureDeviceAuthorisationStatus; + } + +#if ENABLE_IL2CPP && (UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || (UNITY_IOS && !UNITY_EDITOR)) + [MonoPInvokeCallback(typeof(NativePlugin.RequestAudioCaptureDeviceAuthorisationDelegate))] +#endif + private static void RequestUserAuthorisationToCaptureAudioCallback(int authorisation) + { + _audioCaptureDeviceAuthorisationStatus = (AudioCaptureDeviceAuthorisationStatus)authorisation; + _hasCheckedAudioCaptureDeviceAuthorisationStatus = true; + _waitingForAudioCaptureDeviceAuthorisation = false; + } + + private class WaitForAudioCaptureDeviceAuthorisation : CustomYieldInstruction + { + public override bool keepWaiting { get { return CaptureBase._waitingForAudioCaptureDeviceAuthorisation; } } + } + + /// + /// Request authorisation to capture audio. + /// + public static CustomYieldInstruction RequestAudioCaptureDeviceUserAuthorisation() + { +#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || (UNITY_IOS && !UNITY_EDITOR) + NativePlugin.RequestAudioCaptureDeviceAuthorisationDelegate callback = new NativePlugin.RequestAudioCaptureDeviceAuthorisationDelegate(RequestUserAuthorisationToCaptureAudioCallback); + System.IntPtr ptr = Marshal.GetFunctionPointerForDelegate(callback); + NativePlugin.RequestAudioCaptureDeviceAuthorisation(ptr); + return new WaitForAudioCaptureDeviceAuthorisation(); + +#elif UNITY_ANDROID && !UNITY_EDITOR + Permission.RequestUserPermission(Permission.Microphone); + RequestUserAuthorisationToCaptureAudioCallback((int)HasUserAuthorisationToCaptureAudio()); + return new WaitForAudioCaptureDeviceAuthorisation(); +#else + return null; +#endif + } + + // Photo library support + + /// + /// Level of access for the photos library. + /// + public enum PhotoLibraryAccessLevel + { + /// Can only add photos to the photo library, cannot create albums or read back images. + AddOnly, + /// Full access, can add photos, create albums and read back images. + ReadWrite + }; + + /// + /// Authorisation for access to the photos library. + /// + public enum PhotoLibraryAuthorisationStatus + { + /// The photo library is unavailable. + Unavailable = -1, + /// Authorisation to the photo library is still to be requested. + NotDetermined, + /// Access to the photo library has been denied. + Denied, + /// Access to the photo library has been granted. + Authorised + }; + + /// + /// Check to see if authorisation has been given to access the photo library. + /// + private static bool _waitingForAuthorisationToAccessPhotos = true; + private static bool _hasCheckedPhotoLibraryAuthorisationStatus = false; + private static PhotoLibraryAuthorisationStatus _photoLibraryAuthorisation = PhotoLibraryAuthorisationStatus.NotDetermined; + + public static PhotoLibraryAuthorisationStatus HasUserAuthorisationToAccessPhotos(PhotoLibraryAccessLevel accessLevel) + { + if (!_hasCheckedPhotoLibraryAuthorisationStatus || _photoLibraryAuthorisation == PhotoLibraryAuthorisationStatus.NotDetermined) + { + _hasCheckedPhotoLibraryAuthorisationStatus = true; +#if !UNITY_EDITOR_OSX && (UNITY_STANDALONE_OSX || (UNITY_IOS && !UNITY_EDITOR)) + _photoLibraryAuthorisation = (PhotoLibraryAuthorisationStatus)NativePlugin.PhotoLibraryAuthorisationStatus((int)accessLevel); +#else + _photoLibraryAuthorisation = PhotoLibraryAuthorisationStatus.Unavailable; +#endif + } + return _photoLibraryAuthorisation; + } + + +#if ENABLE_IL2CPP && (UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || (UNITY_IOS && !UNITY_EDITOR)) + [MonoPInvokeCallback(typeof(NativePlugin.RequestPhotoLibraryAuthorisationDelegate))] +#endif + private static void RequestUserAuthorisationToAccessPhotosCallback(int authorisation) + { + _photoLibraryAuthorisation = (PhotoLibraryAuthorisationStatus)authorisation; + _hasCheckedPhotoLibraryAuthorisationStatus = true; + _waitingForAuthorisationToAccessPhotos = false; + } + + private class WaitForAuthorisationToAccessPhotos: CustomYieldInstruction + { + public override bool keepWaiting { get { return CaptureBase._waitingForAuthorisationToAccessPhotos; } } + } + + /// + /// Request authorisation to access the photo library. + /// + public static CustomYieldInstruction RequestUserAuthorisationToAccessPhotos(PhotoLibraryAccessLevel accessLevel) + { +#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || (UNITY_IOS && !UNITY_EDITOR) + NativePlugin.RequestPhotoLibraryAuthorisationDelegate callback = new NativePlugin.RequestPhotoLibraryAuthorisationDelegate(RequestUserAuthorisationToAccessPhotosCallback); + System.IntPtr ptr = Marshal.GetFunctionPointerForDelegate(callback); + NativePlugin.RequestPhotoLibraryAuthorisation((int)accessLevel, ptr); + return new WaitForAuthorisationToAccessPhotos(); +#else + return null; +#endif + } + } +} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CaptureBase.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CaptureBase.cs.meta new file mode 100644 index 0000000..2183de8 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CaptureBase.cs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ece619c377e730240b4ff893f48deabe +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 50 + icon: {instanceID: 0} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CaptureBaser_EditorPlayPause.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CaptureBaser_EditorPlayPause.cs new file mode 100644 index 0000000..ecf97d3 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CaptureBaser_EditorPlayPause.cs @@ -0,0 +1,75 @@ +using UnityEngine; + +#if UNITY_EDITOR + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + public partial class CaptureBase : MonoBehaviour + { +#region Play/Pause Support for Unity Editor + // This code handles the pause/play buttons in the editor + private static void SetupEditorPlayPauseSupport() + { + #if UNITY_2017_2_OR_NEWER + UnityEditor.EditorApplication.pauseStateChanged -= OnUnityPauseModeChanged; + UnityEditor.EditorApplication.pauseStateChanged += OnUnityPauseModeChanged; + #else + UnityEditor.EditorApplication.playmodeStateChanged -= OnUnityPlayModeChanged; + UnityEditor.EditorApplication.playmodeStateChanged += OnUnityPlayModeChanged; + #endif + } + + #if UNITY_2017_2_OR_NEWER + private static void OnUnityPauseModeChanged(UnityEditor.PauseState state) + { + OnUnityPlayModeChanged(); + } + #endif + + private static void OnUnityPlayModeChanged() + { + if (UnityEditor.EditorApplication.isPlaying) + { + bool isPaused = UnityEditor.EditorApplication.isPaused; + CaptureBase[] captures = Resources.FindObjectsOfTypeAll(); + foreach (CaptureBase capture in captures) + { + if (isPaused) + { + capture.EditorPause(); + } + else + { + capture.EditorUnpause(); + } + } + } + } + + private void EditorPause() + { + if (this.isActiveAndEnabled) + { + _capturePrePauseTotalTime += (Time.realtimeSinceStartup - _captureStartTime); + PauseCapture(); + } + } + + private void EditorUnpause() + { + if (this.isActiveAndEnabled) + { + ResumeCapture(); + + _captureStartTime = Time.realtimeSinceStartup; + } + } +#endregion // Play/Pause Support for Unity Editor + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CaptureBaser_EditorPlayPause.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CaptureBaser_EditorPlayPause.cs.meta new file mode 100644 index 0000000..7341eac --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CaptureBaser_EditorPlayPause.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b2a3834a9c4ed8d4798cddde17347b30 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CodecManager.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CodecManager.cs new file mode 100644 index 0000000..d027b7e --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CodecManager.cs @@ -0,0 +1,185 @@ +using System.Collections; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + public enum MediaApi + { + Unknown = -1, + AVFoundation = 0, + MediaFoundation = 1, + DirectShow = 2, + MediaCodec = 3, // Android + } + + public enum CodecType + { + Video, + Audio, + } + + public class Codec : IMediaApiItem + { + private CodecType _codecType; + private int _index; + private string _name; + private bool _hasConfigWindow; + private MediaApi _api; + + public CodecType CodecType { get { return _codecType; } } + public int Index { get { return _index; } } + public string Name { get { return _name; } } + public MediaApi MediaApi { get { return _api; } } + public bool HasConfigwindow { get { return _hasConfigWindow; } } + + public void ShowConfigWindow() + { + if (_hasConfigWindow) + { + if (_codecType == CodecType.Video) + { + NativePlugin.ConfigureVideoCodec(_index); + } + else if (_codecType == CodecType.Audio) + { + NativePlugin.ConfigureAudioCodec(_index); + } + } + } + + internal Codec(CodecType codecType, int index, string name, MediaApi api, bool hasConfigWindow = false) + { + _codecType = codecType; + _index = index; + _name = name; + _api = api; + _hasConfigWindow = hasConfigWindow; + } + } + + public class CodecList : IEnumerable + { + internal CodecList(Codec[] codecs) + { + _codecs = codecs; + } + + public Codec FindCodec(string name, MediaApi mediaApi = MediaApi.Unknown) + { + Codec result = null; + foreach (Codec codec in _codecs) + { + if (codec.Name == name) + { + if (mediaApi == MediaApi.Unknown || mediaApi == codec.MediaApi) + { + result = codec; + break; + } + } + } + return result; + } + + public Codec GetFirstWithMediaApi(MediaApi api) + { + Codec result = null; + foreach (Codec codec in _codecs) + { + if (codec.MediaApi == api) + { + result = codec; + break; + } + } + return result; + } + + public IEnumerator GetEnumerator() + { + return _codecs.GetEnumerator(); + } + + public Codec[] Codecs { get { return _codecs; } } + public int Count { get{ return _codecs.Length; } } + + private Codec[] _codecs = new Codec[0]; + } + + public static class CodecManager + { + public static Codec FindCodec(CodecType codecType, string name) + { + CheckInit(); + Codec result = null; + CodecList codecs = GetCodecs(codecType); + result = codecs.FindCodec(name); + return result; + } + + public static int GetCodecCount(CodecType codecType) + { + CheckInit(); + return GetCodecs(codecType).Count; + } + + private static void CheckInit() + { + if (!_isEnumerated) + { + if (NativePlugin.Init()) + { + EnumerateCodecs(); + } + } + } + + private static CodecList GetCodecs(CodecType codecType) + { + CodecList result = null; + switch (codecType) + { + case CodecType.Video: + result = _videoCodecs; + break; + case CodecType.Audio: + result = _audioCodecs; + break; + } + return result; + } + + private static void EnumerateCodecs() + { + { + Codec[] videoCodecs = new Codec[NativePlugin.GetVideoCodecCount()]; + for (int i = 0; i < videoCodecs.Length; i++) + { + videoCodecs[i] = new Codec(CodecType.Video, i, NativePlugin.GetVideoCodecName(i), NativePlugin.GetVideoCodecMediaApi(i), NativePlugin.IsConfigureVideoCodecSupported(i)); + } + _videoCodecs = new CodecList(videoCodecs); + } + { + Codec[] audioCodecs = new Codec[NativePlugin.GetAudioCodecCount()]; + for (int i = 0; i < audioCodecs.Length; i++) + { + audioCodecs[i] = new Codec(CodecType.Audio, i, NativePlugin.GetAudioCodecName(i), NativePlugin.GetAudioCodecMediaApi(i), NativePlugin.IsConfigureAudioCodecSupported(i)); + } + _audioCodecs = new CodecList(audioCodecs); + } + + _isEnumerated = true; + } + + public static CodecList VideoCodecs { get { CheckInit(); return _videoCodecs; } } + public static CodecList AudioCodecs { get { CheckInit(); return _audioCodecs; } } + + private static bool _isEnumerated = false; + + private static CodecList _videoCodecs = new CodecList(new Codec[0]); + private static CodecList _audioCodecs = new CodecList(new Codec[0]); + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CodecManager.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CodecManager.cs.meta new file mode 100644 index 0000000..38a7b70 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/CodecManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7c95c2a8ce1786d40b2c5c3c9fe9dfe9 +timeCreated: 1586269082 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/DeviceManager.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/DeviceManager.cs new file mode 100644 index 0000000..d9c128f --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/DeviceManager.cs @@ -0,0 +1,151 @@ +using System.Collections; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + public enum DeviceType + { + AudioInput, + } + + public interface IMediaApiItem + { + int Index { get; } + string Name { get; } + MediaApi MediaApi { get; } + } + + public class Device : IMediaApiItem + { + private DeviceType _deviceType; + private int _index; + private string _name; + private MediaApi _api; + + public DeviceType DeviceType { get { return _deviceType; } } + public int Index { get { return _index; } } + public string Name { get { return _name; } } + public MediaApi MediaApi { get { return _api; } } + + internal Device(DeviceType deviceType, int index, string name, MediaApi api) + { + _deviceType = deviceType; + _index = index; + _name = name; + _api = api; + } + } + + public class DeviceList : IEnumerable + { + internal DeviceList(Device[] devices) + { + _devices = devices; + } + + public Device FindDevice(string name, MediaApi mediaApi = MediaApi.Unknown) + { + Device result = null; + foreach (Device device in _devices) + { + if (device.Name == name) + { + if (mediaApi == MediaApi.Unknown || mediaApi == device.MediaApi) + { + result = device; + break; + } + } + } + return result; + } + + public Device GetFirstWithMediaApi(MediaApi api) + { + Device result = null; + foreach (Device device in _devices) + { + if (device.MediaApi == api) + { + result = device; + break; + } + } + return result; + } + + public IEnumerator GetEnumerator() + { + return _devices.GetEnumerator(); + } + + public Device[] Devices { get { return _devices; } } + public int Count { get{ return _devices.Length; } } + + private Device[] _devices = new Device[0]; + } + + public static class DeviceManager + { + public static Device FindDevice(DeviceType deviceType, string name) + { + CheckInit(); + Device result = null; + DeviceList devices = GetDevices(deviceType); + result = devices.FindDevice(name); + return result; + } + + public static int GetDeviceCount(DeviceType deviceType) + { + CheckInit(); + return GetDevices(deviceType).Count; + } + + private static void CheckInit() + { + if (!_isEnumerated) + { + if (NativePlugin.Init()) + { + EnumerateDevices(); + } + } + } + + private static DeviceList GetDevices(DeviceType deviceType) + { + DeviceList result = null; + switch (deviceType) + { + case DeviceType.AudioInput: + result = _audioInputDevices; + break; + } + return result; + } + + private static void EnumerateDevices() + { + { + Device[] audioInputDevices = new Device[NativePlugin.GetAudioInputDeviceCount()]; + for (int i = 0; i < audioInputDevices.Length; i++) + { + audioInputDevices[i] = new Device(DeviceType.AudioInput, i, NativePlugin.GetAudioInputDeviceName(i), NativePlugin.GetAudioInputDeviceMediaApi(i)); + } + _audioInputDevices = new DeviceList(audioInputDevices); + } + + _isEnumerated = true; + } + + public static DeviceList AudioInputDevices { get { CheckInit(); return _audioInputDevices; } } + + private static bool _isEnumerated = false; + + private static DeviceList _audioInputDevices = new DeviceList(new Device[0]); + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/DeviceManager.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/DeviceManager.cs.meta new file mode 100644 index 0000000..8adadab --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/DeviceManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1fdd417611b5c1f41b7aa82dec1a6711 +timeCreated: 1586269082 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/EditorCoroutine.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/EditorCoroutine.cs new file mode 100644 index 0000000..357f3ce --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/EditorCoroutine.cs @@ -0,0 +1,18 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture.Editor +{ + public class EditorCoroutine : MonoBehaviour + { + public void RunCoroutine(IEnumerator routine) + { + StartCoroutine(routine); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/EditorCoroutine.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/EditorCoroutine.cs.meta new file mode 100644 index 0000000..78d8263 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/EditorCoroutine.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a485a39c332859e49b714e26aee832d1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/FileWritingHandler.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/FileWritingHandler.cs new file mode 100644 index 0000000..8dafe53 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/FileWritingHandler.cs @@ -0,0 +1,155 @@ +using System.Collections.Generic; +using System.Threading; +using UnityEngine; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /// Allows the user to monitor a capture instance where the capture has completed,but the file is still being written to asynchronously + public class FileWritingHandler : System.IDisposable + { + private string _path; + private int _handle; + private bool _deleteFile; + private OutputTarget _outputTarget; + private MP4FileProcessing.Options _postOptions; + private ManualResetEvent _postProcessEvent; + private CompletionStatus _completionStatus; + private string _finalFilePath; + private bool _updateMediaGallery; + + public enum CompletionStatus + { + BusyFileWriting, + BusyPostProcessing, + CompletedDeleted, + Completed, + } + + public CompletionStatus Status + { + get { return _completionStatus; } + } + + public string Path + { + get { return _path; } + } + + // Register for notification of when the final file writing completes + internal System.Action CompletedFileWritingAction { get; set; } + + internal FileWritingHandler(OutputTarget outputTarget, string path, int handle, bool deleteFile, string finalFilePath, bool updateMediaGallery) + { + _outputTarget = outputTarget; + _path = path; + _handle = handle; + _deleteFile = deleteFile; + _completionStatus = CompletionStatus.BusyFileWriting; + _finalFilePath = finalFilePath; + _updateMediaGallery = updateMediaGallery; + } + + internal void SetFilePostProcess(MP4FileProcessing.Options postOptions) + { + _postOptions = postOptions; + } + + private bool StartPostProcess() + { + UnityEngine.Debug.Assert(_postProcessEvent == null); + _completionStatus = CompletionStatus.BusyPostProcessing; + _postProcessEvent = MP4FileProcessing.ProcessFileAsync(_path, false, _postOptions); + if (_postProcessEvent == null) + { + UnityEngine.Debug.LogWarning("[AVProMovieCapture] failed to post-process file " + _path); + } + return true; + } + + public bool IsFileReady() + { + bool result = true; + if (_handle >= 0) + { + result = NativePlugin.IsFileWritingComplete(_handle); + if (result) + { + if (_postOptions.HasOptions()) + { + result = StartPostProcess(); + _postOptions.ResetOptions(); + } + if (_postProcessEvent != null) + { + result = _postProcessEvent.WaitOne(1); + } + if (result) + { + Dispose(); + } + } + } + return result; + } + + public void Dispose() + { + _postProcessEvent = null; + + if (_handle >= 0) + { + NativePlugin.FreeRecorder(_handle); + _handle = -1; + + // Issue the free resources plugin event + NativePlugin.RenderThreadEvent(NativePlugin.PluginEvent.FreeResources, -1); + + if (_deleteFile) + { + _completionStatus = CompletionStatus.CompletedDeleted; + CaptureBase.DeleteCapture(_outputTarget, _path); + } + else + { + _completionStatus = CompletionStatus.Completed; + } + } + + if (CompletedFileWritingAction != null) + { + CompletedFileWritingAction.Invoke(this); + CompletedFileWritingAction = null; + } + + if( _updateMediaGallery ) + { + // Update video gallery on Android + CaptureBase.UpdateMediaGallery( _finalFilePath ); + } + + CaptureBase.ActiveFilePaths.Remove(_path); + } + + // Helper method for cleaning up a list + // TODO: add an optional System.Action callback for each time the file writer completes + public static bool Cleanup(List list) + { + bool anyRemoved = false; + // NOTE: We iterate in reverse order as we're removing elements from the list + for (int i = list.Count - 1; i >= 0; i--) + { + FileWritingHandler handler = list[i]; + if (handler.IsFileReady()) + { + list.RemoveAt(i); + anyRemoved = true; + } + } + return anyRemoved; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/FileWritingHandler.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/FileWritingHandler.cs.meta new file mode 100644 index 0000000..4e3ea11 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/FileWritingHandler.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0d5f15cd9b287744c88060ec81589b77 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Mp4FileProcessing.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Mp4FileProcessing.cs new file mode 100644 index 0000000..da3bd14 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Mp4FileProcessing.cs @@ -0,0 +1,1164 @@ +#define SUPPORT_SPHERICAL_VIDEO +#define SUPPORT_STEREO_VIDEO +//#define SUPPORT_DEBUGLOG +using System.Collections; +using System.Collections.Generic; +using System.Threading; +using UnityEngine; +using System.IO; +using System; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + /* + NOTE: For best flexibility this should be written using classes, but for now since we're only doing specific operations, + we're just reading chunks on demand, writing them out in order making modifications as we go, keeping track of any + increase chunk size increase and patching those chunks. Most chunks are simply byte copied. + + This was mainly written this way because we assume either the moov atom is moved before mdat atom, or the moov atom size + changes due to injection and it's before mdat, both cases cannot be done in-place and require writing to a second file. + This method doesn't work well for the case where the moov atom is after mdat, as this could be done in-place. In the future + a hierarchy of chunk classes should be used for processing the moov chunk to make the code more flexible and readable. + + NOTE: Using the term Chunks to mean atoms/boxes + + Order of operations: + 1) The root chunks are read in + 2) Determined whether moov and mdat chunk positions need swapping, update mdatOffset (only if moov < mdat) + 3) Process the moov chunk is, writing out recursively + 4) For each moov/trak chunk: + a) For each moov/trak/mdia/minf/stbl/stsd/(avc1|hev1|hvc1) + i) inject visual sample descriptor extension atoms if needed + ii) patch parent chunk sizes + iii) update mdatOffset (only if moov < mdat) + b) For each moov/trak/mdia/minf/stbl/co64 (only if mdatOffset > 0) + i) write stub, add chunk to list to patch in step 5 + b) For each moov/trak/mdia/minf/stbl/stco (only if mdatOffset > 0) + i) if adjusting largest offset with mdatOffset <= 0xffffffff: + 1) write out stub co64, add chunk to list to patch in step 5 + 2) patch parent chunk sizes + ii) if adjusting largest offset with mdatOffset < 0xffffffff: + 1) write stub, add chunk to list to patch in step 5 + (NOTE: We only adjust offsets later because there can be multiple tracks, so mdatOffset can still be changing, and also the audio track could come before the vidoe track which would mean moov size grown from visual injection wouldn't need to affect audio offsets) + 5) Go back over any saved stco/co64 chunks + a) adjust offsets by mdatOffset (if needed) + + NOTE: It is SLIGHTLY possible that some files using 32-bit offsets (stco atom) can grow and require changing to 64-bit offsets (co64 atom), so we account for this. + NOTE: Because we only have a single video track, after the visual sample descriptor atoms have been injected we're ready to determine whether stco's need to change to co64's, otherwise it would be more complicated + NOTE: It's HIGHLY unlikely that any chunks within moov will get close to > 32bit, so we will ignore the edge case of the atom injection needing to adjust the atom size + TODO: test with file just less than 4GB file, which grows to 4GB so can test the logic for 64-bit atom size values + */ + /// + /// This class is used to rearrange the chunks in an MP4 file to allow 'fast start', + /// and also to inject various chunks related to stereo video mode and 360 video layout. + /// + // Reference: https://wiki.multimedia.cx/index.php/QuickTime_container + // Reference: https://github.com/danielgtaylor/qtfaststart/blob/master/qtfaststart/processor.py + // Reference: https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFPreface/qtffPreface.html + // Reference: https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md + // Reference: https://xhelmboyx.tripod.com/formats/mp4-layout.txt + public class MP4FileProcessing + { + public struct Options + { + public bool applyFastStart; + + #if SUPPORT_STEREO_VIDEO + public bool applyStereoMode; + public StereoPacking stereoMode; + #endif + + #if SUPPORT_SPHERICAL_VIDEO + public bool applySphericalVideoLayout; + public SphericalVideoLayout sphericalVideoLayout; + #endif + + public bool applyMoveCaptureFile; + public string finalCaptureFilePath; + + public bool HasOptions() + { + return (RequiresProcessing() || applyFastStart); + } + + public bool RequiresProcessing() + { + return (applyFastStart || applyStereoMode || applySphericalVideoLayout); + } + + public void ResetOptions() + { + applyFastStart = false; + applyStereoMode = false; + applySphericalVideoLayout = false; + + applyMoveCaptureFile = false; + finalCaptureFilePath = null; + } + } + + private const int ChunkHeaderSize = 8; + private const int ExtendedChunkHeaderSize = 16; + + private const int CopyBufferSize = 4096 * 16; + + //private readonly static uint Atom_ftyp = ChunkId("ftyp"); // file type + private readonly static uint Atom_moov = ChunkId("moov"); // movie header + private readonly static uint Atom_mdat = ChunkId("mdat"); // movie data + private readonly static uint Atom_cmov = ChunkId("cmov"); // compressed movie data + + private readonly static uint Atom_trak = ChunkId("trak"); // track header + private readonly static uint Atom_mdia = ChunkId("mdia"); // media + private readonly static uint Atom_hdlr = ChunkId("hdlr"); // handler reference + private readonly static uint Atom_minf = ChunkId("minf"); // media information + private readonly static uint Atom_stbl = ChunkId("stbl"); // sample table + private readonly static uint Atom_stco = ChunkId("stco"); // sample table chunk offsets (32-bit) + private readonly static uint Atom_co64 = ChunkId("co64"); // sample table chunk offsets (64-bit) + + #if SUPPORT_STEREO_VIDEO || SUPPORT_SPHERICAL_VIDEO + private readonly static uint Atom_stsd = ChunkId("stsd"); // sample table sample description + private readonly static uint Atom_avc1 = ChunkId("avc1"); // video sample entry for H.264 + private readonly static uint Atom_hev1 = ChunkId("hev1"); // video sample entry for H.265/HEVC + private readonly static uint Atom_hvc1 = ChunkId("hvc1"); // video sample entry for H.265/HEVC + #endif + + #if SUPPORT_STEREO_VIDEO + private readonly static uint Atom_st3d = ChunkId("st3d"); // stereoscopic 3D video + #endif + + #if SUPPORT_SPHERICAL_VIDEO + private readonly static uint Atom_uuid = ChunkId("uuid"); // unique id + private readonly static uint Atom_sv3d = ChunkId("sv3d"); // spherical video + private readonly static uint Atom_svhd = ChunkId("svhd"); // spherical video header + private readonly static uint Atom_proj = ChunkId("proj"); // projection + private readonly static uint Atom_prhd = ChunkId("prhd"); // projection header + private readonly static uint Atom_equi = ChunkId("equi"); // equirectangular projection + #endif + + private class Chunk + { + public uint id; + public long size; // includes the size of the chunk header, so next chunk is at size+offset + public long offset; // offset to the start of the chunk header in the source file + public long headerSize; // Size of the header (either 8 or 12) + public long writeOffset; // offset to the start of the chunk header in the dest file (currently only used for replacing stco with co64) + }; + + private BinaryReader _reader; + private Stream _writeFile; + private Options _options; + private bool _requires64BitOffsets; + private List _offsetChunks = new List(); // stco / co64 chunks + private List _offsetUpgradeChunks = new List(); // Chunks that were stco that changed to co64 + + public static ManualResetEvent ProcessFileAsync(string filePath, bool keepBackup, Options options) + { + if (!File.Exists(filePath)) + { + Debug.LogError("File not found: " + filePath); + return null; + } + + ManualResetEvent syncEvent = new ManualResetEvent(false); + + Thread thread = new Thread( + () => + { + try + { + ProcessFile(filePath, keepBackup, options); + } + catch (System.Exception e) + { + Debug.LogException(e); + } + syncEvent.Set(); + } + ); + thread.Start(); + + return syncEvent; + } + + public static bool ProcessFile(string filePath, bool keepBackup, Options options) + { + if (!File.Exists(filePath)) + { + Debug.LogError("File not found: " + filePath); + return false; + } + + bool result = true; + + if(options.RequiresProcessing()) + { + string tempPath = filePath + "-" + System.Guid.NewGuid() + ".temp"; + + result = ProcessFile(filePath, tempPath, options); + if (result) + { + string backupPath = filePath + "-" + System.Guid.NewGuid() + ".backup"; + File.Move(filePath, backupPath); + File.Move(tempPath, filePath); + if (!keepBackup) + { + File.Delete(backupPath); + } + } + + if (File.Exists(tempPath)) + { + File.Delete(tempPath); + } + } + + if(result) + { + // Move the captured video somewhere else? + if(options.applyMoveCaptureFile && options.finalCaptureFilePath != null) + { + File.Move(filePath, options.finalCaptureFilePath); + } + } + + return result; + } + + public static bool ProcessFile(string srcPath, string dstPath, Options options) + { + if (!File.Exists(srcPath)) + { + Debug.LogError("File not found: " + srcPath); + return false; + } + + using (Stream srcStream = new FileStream(srcPath, FileMode.Open, FileAccess.Read, FileShare.Read)) + { + using (Stream dstStream = new FileStream(dstPath, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None)) + { + MP4FileProcessing mp4 = new MP4FileProcessing(options); + bool result = mp4.Process(srcStream, dstStream); + mp4.Close(); + return result; + } + } + } + + public MP4FileProcessing(Options options) + { + _options = options; + } + + public bool Process(Stream srcStream, Stream dstStream) + { + Close(); + + _reader = new BinaryReader(srcStream); + + List rootChunks = ReadChildChunks(null); + + Chunk chunk_moov = GetFirstChunkOfType(Atom_moov, rootChunks); + Chunk chunk_mdat = GetFirstChunkOfType(Atom_mdat, rootChunks); + + if (chunk_moov == null || chunk_mdat == null) + { + Debug.LogError("can't find moov or mdat chunks"); + Close(); + return false; + } + + if (ChunkContainsChildChunkWithId(chunk_moov, Atom_cmov)) + { + Debug.LogError("moov chunk is compressed - unsupported"); + Close(); + return false; + } + + uint mdatOffset = 0; + + if (_options.applyFastStart && chunk_moov.offset > chunk_mdat.offset) + { + // Swap moov and mdat order + int index_moov = rootChunks.IndexOf(chunk_moov); + int index_mdat = rootChunks.IndexOf(chunk_mdat); + + rootChunks[index_mdat] = chunk_moov; + rootChunks[index_moov] = chunk_mdat; + + mdatOffset = (uint)chunk_moov.size; + } + + bool is_moov_before_mdat = (rootChunks.IndexOf(chunk_moov) < rootChunks.IndexOf(chunk_mdat)); + + _writeFile = dstStream; + + // Make an approximate worst case calculation of whether 64-bit offsets are required do to + // possible moov size growth. In this case all stco chunks are rewritten as co64 chunks. + // Our injected chunks are tiny, so just add 1024 as a safe approximation. + _requires64BitOffsets = ((srcStream.Length + 1024) > 0xffffffff); + + // Copy and inject chunks + foreach (Chunk chunk in rootChunks) + { + if (chunk != chunk_moov) + { + WriteChunk(chunk); + } + else + { + uint sizeIncrease = WriteChunkRecursive_moov(chunk_moov); + if (is_moov_before_mdat) + { + // Only if moov is before mdat does moov size increase affect offsets + mdatOffset += sizeIncrease; + } + } + } + + DebugLog("total offset: " + mdatOffset); + + // Write and adjust offsets + { + foreach (Chunk chunk in _offsetChunks) + { + _writeFile.Position = chunk.writeOffset; + if (chunk.id == Atom_stco) + { + WriteChunk_stco(chunk, mdatOffset); + } + else if (chunk.id == Atom_co64) + { + WriteChunk_co64(chunk, mdatOffset); + } + } + foreach (Chunk chunk in _offsetUpgradeChunks) + { + _writeFile.Position = chunk.writeOffset; + DebugLog("write offset: " + chunk.writeOffset); + WriteChunk_co64_from_stco(chunk, mdatOffset); + } + } + + Close(); + + Debug.Log("[AVProMovieCapture] File processing complete"); + + return true; + } + + public void Close() + { + _offsetChunks = new List(); + _offsetUpgradeChunks = new List(); + _writeFile = null; + if (_reader != null) + { + _reader.Close(); + _reader = null; + } + } + + private static Chunk GetFirstChunkOfType(uint id, List chunks) + { + Chunk result = null; + foreach (Chunk chunk in chunks) + { + if (chunk.id == id) + { + result = chunk; + break; + } + } + return result; + } + + private List ReadChildChunks(Chunk parentChunk) + { + // Offset to start of parent chunk + { + long fileOffset = 0; + if (parentChunk != null) + { + fileOffset = parentChunk.offset + parentChunk.headerSize; + } + _reader.BaseStream.Seek(fileOffset, SeekOrigin.Begin); + } + + long chunkEnd = _reader.BaseStream.Length; + if (parentChunk != null) + { + chunkEnd = parentChunk.offset + parentChunk.size; + } + + return ReadChildChunks(chunkEnd); + } + + private List ReadChildChunks(long chunkEndPosition) + { + List result = new List(); + if (_reader.BaseStream.Position < chunkEndPosition) + { + Chunk chunk = ReadChunkHeader(); + while (chunk != null && _reader.BaseStream.Position < chunkEndPosition) + { + result.Add(chunk); + _reader.BaseStream.Seek(chunk.offset + chunk.size, SeekOrigin.Begin); + chunk = ReadChunkHeader(); + } + } + return result; + } + + private Chunk ReadChunkHeader() + { + Chunk chunk = null; + + // Make sure the minimum amount of data is available + if ((_reader.BaseStream.Length - _reader.BaseStream.Position) >= ChunkHeaderSize) + { + chunk = new Chunk(); + chunk.offset = _reader.BaseStream.Position; + chunk.headerSize = ChunkHeaderSize; + chunk.size = ReadUInt32(); + chunk.id = _reader.ReadUInt32(); + + if (chunk.size == 1) + { + // NOTE: '1' indicates we need to read the extended 64-bit size + chunk.size = (long)ReadUInt64(); + chunk.headerSize = ExtendedChunkHeaderSize; + } + if (chunk.size == 0) + { + // NOTE: '0' indicates that this is the last chunk, so the size is the remainder of the file + chunk.size = _reader.BaseStream.Length - chunk.offset; + } + } + + return chunk; + } + + private bool ChunkContainsChildChunkWithId(Chunk chunk, uint id) + { + bool result = false; + long endChunkPos = chunk.size + chunk.offset; + _reader.BaseStream.Seek(chunk.offset, SeekOrigin.Begin); + Chunk childChunk = ReadChunkHeader(); + while (childChunk != null && _reader.BaseStream.Position < endChunkPos) + { + if (childChunk.id == id) + { + result = true; + break; + } + + _reader.BaseStream.Seek(childChunk.offset + childChunk.size, SeekOrigin.Begin); + childChunk = ReadChunkHeader(); + } + return result; + } + + private static string ChunkDesc(Chunk chunk) + { + string size = chunk.size + ((chunk.size > UInt32.MaxValue) ? "^" : ""); + string offset = chunk.offset + ((chunk.offset > UInt32.MaxValue) ? "^" : ""); + string end = chunk.size + chunk.offset + (((chunk.size + chunk.offset) > UInt32.MaxValue) ? "^" : ""); + string woffset = chunk.writeOffset + ((chunk.writeOffset > UInt32.MaxValue) ? "^" : ""); + return "" + ChunkIdToString(chunk.id) + " size:" + size + " offset:" + offset + " end:" + end + " write:" + woffset; + } + + private void WriteChunk(Chunk chunk) + { + DebugLog("WriteChunk " + ChunkDesc(chunk)); + //if (chunk.id == Atom_mdat) return; + _reader.BaseStream.Seek(chunk.offset, SeekOrigin.Begin); + CopyBytes(chunk.size); + } + + private void CopyChunkHeader(Chunk chunk) + { + DebugLog("CopyChunkHeader " + ChunkDesc(chunk)); + _reader.BaseStream.Seek(chunk.offset, SeekOrigin.Begin); + CopyBytes(chunk.headerSize); + } + + private void InjectChunkHeader(Chunk chunk) + { + DebugLog("InjectChunkHeader " + ChunkDesc(chunk)); + if (chunk.size < UInt32.MaxValue) + { + WriteUInt32((uint)chunk.size); + } + else + { + WriteUInt32(1); + } + WriteChunkId(chunk.id); + if (chunk.size >= UInt32.MaxValue) + { + WriteUInt64((ulong)chunk.size); + } + } + + private void CopyBytes(long numBytes) + { + DebugLog(string.Format("Copying {0} bytes from {1} to {2}", numBytes, _reader.BaseStream.Position, _writeFile.Position)); + byte[] buffer = new byte[CopyBufferSize]; + long remaining = numBytes; + Stream readStream = _reader.BaseStream; + while (remaining > 0) + { + int byteCount = buffer.Length; + if (remaining < buffer.Length) + { + byteCount = (int)remaining; + } + readStream.Read(buffer, 0, byteCount); + _writeFile.Write(buffer, 0, byteCount); + remaining -= byteCount; + } + } + + private void WriteZeros(long numBytes) + { + DebugLog(string.Format("Writing zero {0} bytes to {1}", numBytes, _writeFile.Position)); + + byte[] buffer = new byte[CopyBufferSize]; + long remaining = numBytes; + while (remaining > 0) + { + int byteCount = buffer.Length; + if (remaining < buffer.Length) + { + byteCount = (int)remaining; + } + _writeFile.Write(buffer, 0, byteCount); + remaining -= byteCount; + } + } + + private uint WriteChunkRecursive_moov(Chunk parentChunk) + { + uint childChunkSizeIncrease = 0; + long chunkWritePosition = _writeFile.Position; + CopyChunkHeader(parentChunk); + DebugLog("write chunk " + ChunkIdToString(parentChunk.id) + " " + parentChunk.size); + + List children = ReadChildChunks(parentChunk); + + _reader.BaseStream.Seek(parentChunk.offset + parentChunk.headerSize, SeekOrigin.Begin); + + foreach (Chunk chunk in children) + { + if (chunk.id == Atom_stco) + { + DebugLog("stco " + ChunkDesc(chunk)); + // Just write a placeholder as it's updated later + // May also convert the stco into a co64 + chunk.writeOffset = _writeFile.Position; + if (!_requires64BitOffsets) + { + WriteZeros(chunk.size); + _offsetChunks.Add(chunk); + } + else + { + childChunkSizeIncrease += InjectChunkStub_co64_from_stco(chunk); + DebugLog("Increase InjectChunkStub_co64_from_stco " + childChunkSizeIncrease); + _offsetUpgradeChunks.Add(chunk); + } + } + else if (chunk.id == Atom_co64) + { + // Just write a placeholder as it's updated later + chunk.writeOffset = _writeFile.Position; + WriteZeros(chunk.size); + _offsetChunks.Add(chunk); + } + #if SUPPORT_STEREO_VIDEO || SUPPORT_SPHERICAL_VIDEO + else if (chunk.id == Atom_stsd) + { + childChunkSizeIncrease += WriteChunk_stsd(chunk); + DebugLog("Increase WriteChunk_stsd " + childChunkSizeIncrease); + } + #endif + // Hierarchy of atoms we're interested in: + // [moov > trak > mdia > minf > stbl] >> [stco | co64] + // [moov > trak > mdia > minf > stbl >> stsd] >> [avc1 | hev1 | hvc1] + else if (chunk.id == Atom_trak || + chunk.id == Atom_mdia || + chunk.id == Atom_minf || + chunk.id == Atom_stbl) + { + // Recurse these chunks searching for interesting chunks + childChunkSizeIncrease += WriteChunkRecursive_moov(chunk); + DebugLog("Increase WriteChunkRecursive_moov " + childChunkSizeIncrease); + + } + else + { + // We don't care about this chunk so just copy it + WriteChunk(chunk); + } + } + + if (parentChunk.id == Atom_trak && _options.applySphericalVideoLayout && _options.sphericalVideoLayout == SphericalVideoLayout.Equirectangular360) + { + if (IsVideoTrack(parentChunk)) + { + childChunkSizeIncrease += InjectChunk_uuid_GoogleSphericalVideoV1(); + DebugLog("Increase InjectChunk_uuid_GoogleSphericalVideoV1 " + childChunkSizeIncrease); + } + } + + if (childChunkSizeIncrease > 0) + { + DebugLog("> " + childChunkSizeIncrease); + parentChunk.size += childChunkSizeIncrease; + OverwriteChunkSize(parentChunk, chunkWritePosition); + } + + return childChunkSizeIncrease; + } + + private bool IsVideoTrack(Chunk trackChunk) + { + bool result = false; + + List chunks = ReadChildChunks(trackChunk); + Chunk chunk_mdia = GetFirstChunkOfType(Atom_mdia, chunks); + if (chunk_mdia != null) + { + chunks = ReadChildChunks(chunk_mdia); + Chunk chunk_hdlr = GetFirstChunkOfType(Atom_hdlr, chunks); + if (chunk_hdlr != null) + { + _reader.BaseStream.Position = chunk_hdlr.offset + chunk_hdlr.headerSize + 8; + + uint componentSubtype = ReadUInt32(); + result = (0x76696465 == componentSubtype); + } + } + + return result; + } + + private void WriteChunk_stco(Chunk chunk, uint mdatByteOffset) + { + DebugLog("WriteChunk_stco"); + CopyChunkHeader(chunk); + + // Version & Flags + CopyBytes(4); + + uint chunkOffsetCount = ReadUInt32(); + WriteUInt32(chunkOffsetCount); + + // Apply offsets + for (int i = 0; i < chunkOffsetCount; i++) + { + long offset = ReadUInt32(); + offset += mdatByteOffset; + WriteUInt32((uint)offset); + } + } + + private void WriteChunk_co64_from_stco(Chunk chunk, uint mdatByteOffset) + { + DebugLog("WriteChunk_co64_from_stco " + mdatByteOffset); + InjectChunkHeader(chunk); + _reader.BaseStream.Position = chunk.offset + chunk.headerSize; + + // Version & Flags + CopyBytes(4); + + uint chunkOffsetCount = ReadUInt32(); + DebugLog("offsets: " + chunkOffsetCount); + WriteUInt32(chunkOffsetCount); + + // Apply offsets + for (int i = 0; i < chunkOffsetCount; i++) + { + ulong offset = ReadUInt32(); + offset += mdatByteOffset; + WriteUInt64(offset); + } + } + + private void WriteChunk_co64(Chunk chunk, uint mdatByteOffset) + { + DebugLog("WriteChunk_co64"); + CopyChunkHeader(chunk); + + // Version & Flags + CopyBytes(4); + + uint chunkOffsetCount = ReadUInt32(); + WriteUInt32(chunkOffsetCount); + + // Apply offsets + for (int i = 0; i < chunkOffsetCount; i++) + { + ulong offset = ReadUInt64(); + offset += mdatByteOffset; + WriteUInt64(offset); + } + } + + private uint InjectChunkStub_co64_from_stco(Chunk chunk) + { + chunk.id = Atom_co64; + chunk.writeOffset = _writeFile.Position; + CopyChunkHeader(chunk); + + // Version & Flags + CopyBytes(4); + + // Stub count + uint chunkOffsetCount = ReadUInt32(); + WriteUInt32(chunkOffsetCount); + + // Stub offsets + long offsetsSize = chunkOffsetCount * sizeof(UInt64); + WriteZeros(offsetsSize); + + long sizeIncrease = (offsetsSize / 2); + + // Calculate new size + chunk.size += sizeIncrease; + + OverwriteChunkSize(chunk, chunk.writeOffset); + + return (uint)(sizeIncrease); + } + +#if SUPPORT_STEREO_VIDEO || SUPPORT_SPHERICAL_VIDEO + private uint WriteChunk_stsd(Chunk chunk) + { + uint chunkSizeIncrease = 0; + long chunkWritePosition = _writeFile.Position; + + CopyChunkHeader(chunk); + + // Version & Flags + CopyBytes(4); + + uint sampleDescCount = ReadUInt32(); + WriteUInt32(sampleDescCount); + + for (int i = 0; i < sampleDescCount; i++) + { + Chunk sampleDescriptor = ReadChunkHeader(); + DebugLog("header: " + ChunkIdToString(sampleDescriptor.id) + " " + sampleDescriptor.size); + if (sampleDescriptor.id == Atom_avc1 || + sampleDescriptor.id == Atom_hev1 || + sampleDescriptor.id == Atom_hvc1) + { +#if true + _reader.BaseStream.Seek(4 + 6 + 2, SeekOrigin.Current); + ushort version = ReadUInt16(); + DebugLog("version: " + version); + if (version == 0) + { + uint sampleDescriptorSizeIncrease = 0; + long sampleDescriptorWritePosition = _writeFile.Position; + CopyChunkHeader(sampleDescriptor); + + CopyBytes(78); + + long chunkEndPosition = sampleDescriptor.offset + sampleDescriptor.size; + + List sampleDescriptorExtensions = ReadChildChunks(chunkEndPosition); + DebugLog("sampleDescriptorExtensions: " + sampleDescriptorExtensions.Count); + + bool hasWrittenST3D = false; + bool hasWrittenSV3D = false; + for (int j = 0; j < sampleDescriptorExtensions.Count; j++) + { + DebugLog("sampleDescriptorExtensions: " + ChunkIdToString(sampleDescriptorExtensions[j].id) + " > " + sampleDescriptorExtensions[j].size); + if (sampleDescriptorExtensions[i].id == Atom_st3d) + { + /* + // Modify existing chunk + if (_options.applyStereoMode) + { + InjectChunk_st3d(Convert(_options.stereoMode)); + }*/ + Debug.LogWarning("st3d atom already exists"); + hasWrittenST3D = true; + } + else if (sampleDescriptorExtensions[i].id == Atom_sv3d) + { + Debug.LogWarning("sv3d atom already exists"); + hasWrittenSV3D = true; + } + else + { + WriteChunk(sampleDescriptorExtensions[j]); + } + } + + #if SUPPORT_STEREO_VIDEO + if (!hasWrittenST3D && _options.applyStereoMode) + { + sampleDescriptorSizeIncrease += InjectChunk_st3d(Convert(_options.stereoMode)); + + hasWrittenST3D = true; + } + #endif + #if SUPPORT_SPHERICAL_VIDEO + if (!hasWrittenSV3D && _options.applySphericalVideoLayout) + { + sampleDescriptorSizeIncrease += InjectChunk_sv3d(_options.sphericalVideoLayout); + hasWrittenSV3D = true; + } + #endif + + if (sampleDescriptorSizeIncrease > 0) + { + sampleDescriptor.size += sampleDescriptorSizeIncrease; + OverwriteChunkSize(sampleDescriptor, sampleDescriptorWritePosition); + + chunkSizeIncrease += sampleDescriptorSizeIncrease; + DebugLog("Increasing size by " + sampleDescriptorSizeIncrease); + } + + } + else +#endif + { + WriteChunk(sampleDescriptor); + } + } + else + { + // We don't care about this chunk so just copy it + WriteChunk(sampleDescriptor); + } + } + DebugLog(chunk.offset + chunk.size + " left " + _reader.BaseStream.Position); + + if (chunkSizeIncrease > 0) + { + chunk.size += chunkSizeIncrease; + OverwriteChunkSize(chunk, chunkWritePosition); + } + + return chunkSizeIncrease; + } +#endif + +#if SUPPORT_STEREO_VIDEO + internal enum StereoMode_st3d + { + Monoscopic = 0, + Stereoscopic_TopBottom = 1, + Stereoscopic_LeftRight = 2, + Stereoscopic_Custom = 3, + Stereoscopic_RightLeft = 4, + } + + private static StereoMode_st3d Convert(StereoPacking mode) + { + StereoMode_st3d result = StereoMode_st3d.Monoscopic; + switch (mode) + { + case StereoPacking.None: + break; + case StereoPacking.LeftRight: + result = StereoMode_st3d.Stereoscopic_LeftRight; + break; + case StereoPacking.TopBottom: + result = StereoMode_st3d.Stereoscopic_TopBottom; + break; + } + return result; + } + + private uint InjectChunk_st3d(StereoMode_st3d stereoMode) + { + DebugLog("InjectChunk_st3d"); + uint chunkSize = ChunkHeaderSize + 4 + sizeof(byte); + WriteUInt32(chunkSize); + WriteChunkId(Atom_st3d); + + // Version & Flags + WriteUInt32(0); + + _writeFile.WriteByte((byte)stereoMode); + return chunkSize; + } +#endif + +#if SUPPORT_SPHERICAL_VIDEO + // sv3d/svhd + // sv3d/proj/prhd + // sv3d/proj/equi + private uint InjectChunk_sv3d(SphericalVideoLayout layout) + { + Chunk chunk = new Chunk(); + chunk.offset = _writeFile.Position; + chunk.id = Atom_sv3d; + chunk.size = ChunkHeaderSize; + InjectChunkHeader(chunk); + + chunk.size += InjectChunk_svhd("AVProMovieCapture"); + chunk.size += InjectChunk_proj(layout); + + OverwriteChunkSize(chunk, chunk.offset); + + return (uint)chunk.size; + } + + private uint InjectChunk_uuid_GoogleSphericalVideoV1() + { + Chunk chunk = new Chunk(); + chunk.offset = _writeFile.Position; + chunk.id = Atom_uuid; + chunk.size = ChunkHeaderSize; + InjectChunkHeader(chunk); + + WriteUInt32(0xffcc8263); + WriteUInt32(0xf8554a93); + WriteUInt32(0x8814587a); + WriteUInt32(0x02521fdd); + + chunk.size += 4 * sizeof(UInt32); + + string xml = " true true equirectangular AVPro Movie Capture {StereoMode}"; + + if (_options.applyStereoMode) + { + switch (_options.stereoMode) + { + case StereoPacking.None: + xml = xml.Replace("{StereoMode}", "mono"); + break; + case StereoPacking.LeftRight: + xml = xml.Replace("{StereoMode}", "left-right"); + break; + case StereoPacking.TopBottom: + xml = xml.Replace("{StereoMode}", "top-bottom"); + break; + } + } + else + { + xml = xml.Replace("{StereoMode}", "mono"); + } + + byte[] bytes = System.Text.Encoding.UTF8.GetBytes(xml); + _writeFile.Write(bytes, 0, bytes.Length); + + chunk.size += bytes.Length; + + OverwriteChunkSize(chunk, chunk.offset); + + return (uint)chunk.size; + } + + private uint InjectChunk_svhd(string toolname) + { + Chunk chunk = new Chunk(); + chunk.offset = _writeFile.Position; + chunk.id = Atom_svhd; + chunk.size = ChunkHeaderSize; + InjectChunkHeader(chunk); + + // Version & Flags + WriteUInt32(0); + chunk.size += 4; + + foreach (char c in toolname) + { + _writeFile.WriteByte((byte)c); + } + _writeFile.WriteByte(0); // Null terminate + chunk.size += (sizeof(byte) * (toolname.Length + 1)); + + OverwriteChunkSize(chunk, chunk.offset); + + return (uint)chunk.size; + } + + private uint InjectChunk_proj(SphericalVideoLayout layout) + { + Chunk chunk = new Chunk(); + chunk.offset = _writeFile.Position; + chunk.id = Atom_proj; + chunk.size = ChunkHeaderSize; + InjectChunkHeader(chunk); + + chunk.size += InjectChunk_prhd(); + if (layout == SphericalVideoLayout.Equirectangular360) + { + chunk.size += InjectChunk_equi(); + } + // TODO: add cubemap32 support here + + OverwriteChunkSize(chunk, chunk.offset); + + return (uint)chunk.size; + } + + private uint InjectChunk_prhd() + { + Chunk chunk = new Chunk(); + chunk.offset = _writeFile.Position; + chunk.id = Atom_prhd; + chunk.size = ChunkHeaderSize; + InjectChunkHeader(chunk); + + WriteUInt32(0); // Version & Flags + + WriteUInt32(0); // Yaw + WriteUInt32(0); // Pitch + WriteUInt32(0); // Roll + + chunk.size += sizeof(UInt32) * 4; + + OverwriteChunkSize(chunk, chunk.offset); + + return (uint)chunk.size; + } + + private uint InjectChunk_equi() + { + Chunk chunk = new Chunk(); + chunk.offset = _writeFile.Position; + chunk.id = Atom_equi; + chunk.size = ChunkHeaderSize; + InjectChunkHeader(chunk); + + WriteUInt32(0); // Version & Flags + + WriteUInt32(0); // Bounds top + WriteUInt32(0); // Bounds bottom + WriteUInt32(0); // Bounds left + WriteUInt32(0); // Bounds right + + chunk.size += sizeof(UInt32) * 5; + + OverwriteChunkSize(chunk, chunk.offset); + + return (uint)chunk.size; + } +#endif + private void OverwriteChunkSize(Chunk chunk, long writePosition) + { + long restoreWritePosition = _writeFile.Position; + + _writeFile.Position = writePosition; + DebugLog("patch size " + ChunkIdToString(chunk.id) + " " + chunk.size + "@ " + _writeFile.Position); + // TODO: Fix bug here if original size was < 32bit but the new size is more + // This is HIGHLY unlikely though, as moov chunks should be nowhere near that large + // and we aren't adjusting the size of mdat chunks + WriteUInt32((uint)chunk.size); + + _writeFile.Seek(restoreWritePosition, SeekOrigin.Begin); + } + + private UInt16 ReadUInt16() + { + byte[] data = _reader.ReadBytes(2); + Array.Reverse(data); + return BitConverter.ToUInt16(data, 0); + } + + private UInt32 ReadUInt32() + { + byte[] data = _reader.ReadBytes(4); + Array.Reverse(data); + return BitConverter.ToUInt32(data, 0); + } + + private UInt64 ReadUInt64() + { + byte[] data = _reader.ReadBytes(8); + Array.Reverse(data); + return BitConverter.ToUInt64(data, 0); + } + + private void WriteUInt16(UInt16 value) + { + byte[] data = BitConverter.GetBytes(value); + Array.Reverse(data); + _writeFile.Write(data, 0, data.Length); + } + + private void WriteChunkId(uint id) + { + WriteUInt32(id, false); + } + + private void WriteUInt32(UInt32 value, bool isBigEndian = true) + { + byte[] data = BitConverter.GetBytes(value); + if (isBigEndian) + { + Array.Reverse(data); + } + _writeFile.Write(data, 0, data.Length); + } + + private void WriteUInt64(UInt64 value) + { + byte[] data = BitConverter.GetBytes(value); + Array.Reverse(data); + _writeFile.Write(data, 0, data.Length); + } + + private static string ChunkIdToString(UInt32 id) + { + char a = (char)((id >> 0) & 255); + char b = (char)((id >> 8) & 255); + char c = (char)((id >> 16) & 255); + char d = (char)((id >> 24) & 255); + return string.Format("{0}{1}{2}{3}", a, b, c, d); + } + + private static uint ChunkId(string id) + { + uint a = id[3]; + uint b = id[2]; + uint c = id[1]; + uint d = id[0]; + return (a << 24) | (b << 16) | (c << 8) | d; + } + + [System.Diagnostics.Conditional("SUPPORT_DEBUGLOG")] + private static void DebugLog(string message) + { + Debug.Log(message); + } + +#if false && UNITY_EDITOR + [UnityEditor.MenuItem("RenderHeads/Test MP4 Processing")] + static void Test_Mp4Processing() + { + string path = "d:/video/video.mov"; + DateTime time = DateTime.Now; + Options options = new Options(); + options.applyFastStart = true; + options.applyStereoMode = true; + options.stereoMode = StereoPacking.TopBottom; + options.applySphericalVideoLayout = true; + options.sphericalVideoLayout = SphericalVideoLayout.Equirectangular360; + if (MP4FileProcessing.ProcessFile(path, true, options)) + { + DateTime time2 = DateTime.Now; + Debug.Log("success!"); + Debug.Log("Took: " + (time2 - time).TotalMilliseconds + "ms"); + } + else + { + Debug.LogWarning("Did not modify file"); + } + } +#endif + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Mp4FileProcessing.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Mp4FileProcessing.cs.meta new file mode 100644 index 0000000..ee701c5 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Mp4FileProcessing.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 00fa7f5596fa2df4b91ebf8d4bcc4e26 +timeCreated: 1527866813 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/NativePlugin.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/NativePlugin.cs new file mode 100644 index 0000000..929f4fe --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/NativePlugin.cs @@ -0,0 +1,597 @@ +using UnityEngine; +using System; +using System.Text; +using System.Runtime.InteropServices; +#if UNITY_IOS || UNITY_TVOS || ENABLE_IL2CPP +using AOT; +#endif + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + public partial class NativePlugin + { + public const string ScriptVersion = "5.0.4"; +#if UNITY_EDITOR_OSX || (!UNITY_EDITOR && (UNITY_STANDALONE_OSX || UNITY_IOS)) + public const string ExpectedPluginVersion = "5.0.3"; +#elif UNITY_ANDROID && !UNITY_EDITOR + public const string ExpectedPluginVersion = "5.0.4"; +#else + public const string ExpectedPluginVersion = "5.0.0"; +#endif + } + + public enum NoneAutoCustom + { + None, + Auto, + Custom, + } + + public enum AudioCaptureSource + { + None = 0, + Unity = 1, + Microphone = 2, + Manual = 3, + Wwise = 4, + UnityAudioMixer = 5, + } + + public enum StereoPacking + { + None, + TopBottom, + LeftRight, + } + + public enum SphericalVideoLayout + { + None, + Equirectangular360, + Equirectangular180, + //TODO: Cubemap32 + } + + public enum StopMode + { + None, + FramesEncoded, + SecondsEncoded, + SecondsElapsed, + } + + public enum StartTriggerMode + { + Manual, + OnStart, + } + + public enum StartDelayMode + { + None, + RealSeconds, + GameSeconds, + Manual, + } + + public enum ImageSequenceFormat + { + PNG, + JPEG, // Apple and Android platforms only + TIFF, // Apple platforms only + HEIF, // Apple platforms only + } + + public enum OutputTarget + { + VideoFile, + ImageSequence, + NamedPipe, + } + + public partial class NativePlugin + { +#if UNITY_IOS && !UNITY_EDITOR + const string PluginName = "__Internal"; +#elif UNITY_ANDROID && !UNITY_EDITOR + const string PluginName = "AVProMovieCaptureNative"; +#else + const string PluginName = "AVProMovieCapture"; +#endif + + public enum Platform + { + Unknown = -2, + Current = -1, + First = 0, + + Windows = 0, + macOS = 1, + iOS = 2, + Android = 3, + + Count = 4, + } + + public static string[] PlatformNames = { "Windows", "macOS", "iOS", "Android" }; + + // The Apple platforms have a fixed set of known codecs + public static readonly string[] VideoCodecNamesMacOS = { "H264", "HEVC", "MJPEG", "ProRes 4:2:2", "ProRes 4:4:4:4" }; + public static readonly string[] AudioCodecNamesMacOS = { "AAC", "FLAC", "Apple Lossless", "Linear PCM", "Uncompresssed" }; + public static readonly string[] VideoCodecNamesIOS = { "H264", "HEVC", "MJPEG" }; + public static readonly string[] AudioCodecNamesIOS = { "AAC", "FLAC", "Apple Lossless", "Linear PCM", "Uncompresssed" }; + public static readonly string[] VideoCodecNamesAndroid = { "H264", "HEVC"/*, "VP8", "VP9"*/ }; + public static readonly string[] AudioCodecNamesAndroid = { "AAC"/*, "OPUS", "FLAC"*/ }; + + public enum PixelFormat + { + RGBA32, + BGRA32, // Note: This is the native format for Unity textures with red and blue swapped. + YCbCr422_YUY2, + YCbCr422_UYVY, + YCbCr422_HDYC, + } + + public const int MaxRenderWidth = 16384; + public const int MaxRenderHeight = 16384; + +#region RenderEventFunctions + // Used by GL.IssuePluginEvent + private const int PluginID = 0xFA30000; + + public enum PluginEvent + { + CaptureFrameBuffer = 0, + FreeResources = 1, + Setup = 2, + } + + private static System.IntPtr _renderEventFunction = System.IntPtr.Zero; + private static System.IntPtr _freeEventFunction = System.IntPtr.Zero; + + public static void RenderThreadEvent(PluginEvent renderEvent, int handle) + { + switch (renderEvent) + { + case PluginEvent.CaptureFrameBuffer: + GL.IssuePluginEvent(RenderCaptureEventFunction, PluginID | (int)renderEvent | handle); + break; + case PluginEvent.FreeResources: + GL.IssuePluginEvent(RenderFreeEventFunction, PluginID | (int)renderEvent); + break; + case PluginEvent.Setup: + #if UNITY_ANDROID && !UNITY_EDITOR + if (RenderSetupEventFunction != System.IntPtr.Zero) + { + GL.IssuePluginEvent(RenderSetupEventFunction, PluginID | (int)renderEvent | handle); + } + #endif + break; + } + } + + private static System.IntPtr RenderCaptureEventFunction + { + get + { + if (_renderEventFunction == System.IntPtr.Zero) + { + _renderEventFunction = GetRenderEventFunc(); + } + Debug.Assert(_renderEventFunction != System.IntPtr.Zero); + return _renderEventFunction; + } + } + + private static System.IntPtr RenderFreeEventFunction + { + get + { + if (_freeEventFunction == System.IntPtr.Zero) + { + _freeEventFunction = GetFreeResourcesEventFunc(); + } + Debug.Assert(_freeEventFunction != System.IntPtr.Zero); + return _freeEventFunction; + } + } + + [DllImport(PluginName, EntryPoint="AVPMC_GetRenderEventFunc")] + private static extern System.IntPtr GetRenderEventFunc(); + + [DllImport(PluginName, EntryPoint="AVPMC_GetFreeResourcesEventFunc")] + private static extern System.IntPtr GetFreeResourcesEventFunc(); + +#if UNITY_ANDROID && !UNITY_EDITOR + private static System.IntPtr _setupEventFunction = System.IntPtr.Zero; + + private static System.IntPtr RenderSetupEventFunction + { + get + { + if (_setupEventFunction == System.IntPtr.Zero) + { + _setupEventFunction = GetSetupEventFunc(); + } + return _setupEventFunction; + } + } + + [DllImport(PluginName, EntryPoint="AVPMC_GetSetupEventFunc")] + private static extern System.IntPtr GetSetupEventFunc(); +#endif + +#endregion + +#if UNITY_EDITOR_OSX || (!UNITY_EDITOR && (UNITY_STANDALONE_OSX || UNITY_IOS)) + internal class Logger + { + private enum LogFlag : int { + Error = 1 << 0, + Warning = 1 << 1, + Info = 1 << 2, + Debug = 1 << 3, + Verbose = 1 << 4, + }; + + private enum LogLevel : int + { + Off = 0, + Error = LogFlag.Error, + Warning = Error | LogFlag.Warning, + Info = Warning | LogFlag.Info, + Debug = Info | LogFlag.Debug, + Verbose = Debug | LogFlag.Verbose, + All = -1, + }; + +#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] +#endif + private delegate void DebugLogCallbackDelegate(LogLevel level, [In, MarshalAs(UnmanagedType.LPWStr)] string str); + +#if UNITY_IOS || UNITY_TVOS || ENABLE_IL2CPP + [MonoPInvokeCallback(typeof(DebugLogCallbackDelegate))] +#endif + private static void DebugLogCallback(LogLevel level, string str) + { + if (level == LogLevel.Error) + { + Debug.LogError(str); + } + else if (level == LogLevel.Warning) + { + Debug.LogWarning(str); + } + else + { + Debug.Log(str); + } + } + + private DebugLogCallbackDelegate _callbackDelegate = new DebugLogCallbackDelegate(DebugLogCallback); + + internal Logger() + { + IntPtr func = Marshal.GetFunctionPointerForDelegate(_callbackDelegate); + NativePlugin.SetLogFunction(func); + } + + ~Logger() + { + NativePlugin.SetLogFunction(IntPtr.Zero); + } + } + + internal static Logger _logger; + + private static void SetupDebugLogCallback() + { + _logger = new Logger(); + } + +#if !UNITY_EDITOR_OSX && UNITY_IOS + [DllImport(PluginName, EntryPoint="AVPMC_PluginBootstrap")] + public static extern void MCPluginBootstrap(); +#endif + + static NativePlugin() + { + #if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX + SetupDebugLogCallback(); + #endif + #if !UNITY_EDITOR_OSX && UNITY_IOS + NativePlugin.MCPluginBootstrap(); + #endif + } +#endif + + ////////////////////////////////////////////////////////////////////////// + // Global Init/Deinit + + [DllImport(PluginName, EntryPoint="AVPMC_Init")] + [return: MarshalAs(UnmanagedType.U1)] + public static extern bool Init(); + + [DllImport(PluginName, EntryPoint="AVPMC_Deinit")] + public static extern void Deinit(); + + [Flags] + public enum MicrophoneRecordingOptions: int + { + None = 0, + MixWithOthers = 1, + DefaultToSpeaker = 2, + } + + [DllImport(PluginName, EntryPoint="AVPMC_SetMicrophoneRecordingHint")] + public static extern void SetMicrophoneRecordingHint([MarshalAs(UnmanagedType.U1)] bool enabled, MicrophoneRecordingOptions options = MicrophoneRecordingOptions.None); + + public static string GetPluginVersionString() + { + return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(GetPluginVersion()); + } + + [DllImport(PluginName, EntryPoint="AVPMC_IsTrialVersion")] + [return: MarshalAs(UnmanagedType.U1)] + public static extern bool IsTrialVersion(); + + public static bool IsBasicEdition() + { + string version = NativePlugin.GetPluginVersionString(); + return version.IndexOf("basic", StringComparison.OrdinalIgnoreCase) >= 0; + } + + ////////////////////////////////////////////////////////////////////////// + // Video Codecs + + [DllImport(PluginName, EntryPoint="AVPMC_GetVideoCodecCount")] + public static extern int GetVideoCodecCount(); + + [DllImport(PluginName, EntryPoint="AVPMC_IsConfigureVideoCodecSupported")] + [return: MarshalAs(UnmanagedType.U1)] + public static extern bool IsConfigureVideoCodecSupported(int codecIndex); + + [DllImport(PluginName, EntryPoint="AVPMC_GetVideoCodecMediaApi")] + public static extern MediaApi GetVideoCodecMediaApi(int codecIndex); + + [DllImport(PluginName, EntryPoint="AVPMC_ConfigureVideoCodec")] + public static extern void ConfigureVideoCodec(int codecIndex); + + public static string GetVideoCodecName(int codecIndex) + { + string result = "Invalid"; + StringBuilder nameBuffer = new StringBuilder(256); + if (GetVideoCodecName(codecIndex, nameBuffer, nameBuffer.Capacity)) + { + result = nameBuffer.ToString(); + } + return result; + } + + ////////////////////////////////////////////////////////////////////////// + // Audio Codecs + + [DllImport(PluginName, EntryPoint="AVPMC_GetAudioCodecCount")] + public static extern int GetAudioCodecCount(); + + [DllImport(PluginName, EntryPoint="AVPMC_IsConfigureAudioCodecSupported")] + [return: MarshalAs(UnmanagedType.U1)] + public static extern bool IsConfigureAudioCodecSupported(int codecIndex); + + [DllImport(PluginName, EntryPoint="AVPMC_GetAudioCodecMediaApi")] + public static extern MediaApi GetAudioCodecMediaApi(int codecIndex); + + [DllImport(PluginName, EntryPoint="AVPMC_ConfigureAudioCodec")] + public static extern void ConfigureAudioCodec(int codecIndex); + + public static string GetAudioCodecName(int codecIndex) + { + string result = "Invalid"; + StringBuilder nameBuffer = new StringBuilder(256); + if (GetAudioCodecName(codecIndex, nameBuffer, nameBuffer.Capacity)) + { + result = nameBuffer.ToString(); + } + return result; + } + + ////////////////////////////////////////////////////////////////////////// + // Audio Devices + + [DllImport(PluginName, EntryPoint="AVPMC_GetAudioInputDeviceCount")] + public static extern int GetAudioInputDeviceCount(); + + public static string GetAudioInputDeviceName(int index) + { + string result = "Invalid"; + StringBuilder nameBuffer = new StringBuilder(256); + if (GetAudioInputDeviceName(index, nameBuffer, nameBuffer.Capacity)) + { + result = nameBuffer.ToString(); + } + return result; + } + +#if UNITY_EDITOR_WIN || (!UNITY_EDITOR && UNITY_STANDALONE_WIN) + [DllImport(PluginName, EntryPoint="AVPMC_GetAudioInputDeviceMediaApi")] + public static extern MediaApi GetAudioInputDeviceMediaApi(int index); +#else + public static MediaApi GetAudioInputDeviceMediaApi(int index) + { +#if UNITY_EDITOR_OSX || (!UNITY_EDITOR && (UNITY_STANDALONE_OSX || UNITY_IOS)) + return MediaApi.AVFoundation; +#elif UNITY_ANDROID && !UNITY_EDITOR + return MediaApi.MediaCodec; +#else + return MediaApi.Unknown; +#endif + } +#endif + + ////////////////////////////////////////////////////////////////////////// + // Container Files + + public static string[] GetContainerFileExtensions(int videoCodecIndex, int audioCodecIndex = -1) + { + string[] result = new string[0]; + StringBuilder extensionsBuffer = new StringBuilder(256); + if (GetContainerFileExtensions(videoCodecIndex, audioCodecIndex, extensionsBuffer, extensionsBuffer.Capacity)) + { + result = extensionsBuffer.ToString().Split(new char[] {','}); + } + return result; + } + + ////////////////////////////////////////////////////////////////////////// + // Create the Recorder + [DllImport(PluginName, EntryPoint="AVPMC_CreateRecorderVideo")] + public static extern int CreateRecorderVideo([MarshalAs(UnmanagedType.LPWStr)] string filename, uint width, uint height, float frameRate, int format, + [MarshalAs(UnmanagedType.U1)] bool isRealTime, [MarshalAs(UnmanagedType.U1)] bool isTopDown, int videoCodecIndex, + AudioCaptureSource audioSource, int audioSampleRate, int audioChannelCount, int audioInputDeviceIndex, int audioCodecIndex, + [MarshalAs(UnmanagedType.U1)] bool forceGpuFlush, VideoEncoderHints hints); + [DllImport(PluginName, EntryPoint="AVPMC_CreateRecorderImages")] + public static extern int CreateRecorderImages([MarshalAs(UnmanagedType.LPWStr)] string filename, uint width, uint height, float frameRate, int format, + [MarshalAs(UnmanagedType.U1)] bool isRealTime, [MarshalAs(UnmanagedType.U1)] bool isTopDown, int imageFormatType, [MarshalAs(UnmanagedType.U1)] bool forceGpuFlush, int startFrame, ImageEncoderHints hints); + + [DllImport(PluginName, EntryPoint="AVPMC_CreateRecorderPipe")] + public static extern int CreateRecorderPipe([MarshalAs(UnmanagedType.LPWStr)] string filename, uint width, uint height, float frameRate, int format, + [MarshalAs(UnmanagedType.U1)] bool isTopDown, [MarshalAs(UnmanagedType.U1)] bool supportAlpha, [MarshalAs(UnmanagedType.U1)] bool forceGpuFlush); + + ////////////////////////////////////////////////////////////////////////// + // Update recorder + + [DllImport(PluginName, EntryPoint="AVPMC_Start")] + [return: MarshalAs(UnmanagedType.U1)] + public static extern bool Start(int handle); + + [DllImport(PluginName, EntryPoint="AVPMC_IsNewFrameDue")] + [return: MarshalAs(UnmanagedType.U1)] + public static extern bool IsNewFrameDue(int handle); + + [DllImport(PluginName, EntryPoint="AVPMC_SetEncodedFrameLimit")] + public static extern int SetEncodedFrameLimit(int handle, uint encodedFrameLimit); + + [DllImport(PluginName, EntryPoint="AVPMC_EncodeFrame")] + public static extern void EncodeFrame(int handle, System.IntPtr data); + + [DllImport(PluginName, EntryPoint="AVPMC_EncodeAudio")] + public static extern void EncodeAudio(int handle, System.IntPtr data, uint length); + + [DllImport(PluginName, EntryPoint="AVPMC_EncodeFrameWithAudio")] + public static extern void EncodeFrameWithAudio(int handle, System.IntPtr videoData, System.IntPtr audioData, uint audioLength); + + [DllImport(PluginName, EntryPoint="AVPMC_Pause")] + public static extern void Pause(int handle); + + [DllImport(PluginName, EntryPoint="AVPMC_Stop")] + public static extern void Stop(int handle, [MarshalAs(UnmanagedType.U1)] bool skipPendingFrames); + + [DllImport(PluginName, EntryPoint="AVPMC_IsFileWritingComplete")] + [return: MarshalAs(UnmanagedType.U1)] + public static extern bool IsFileWritingComplete(int handle); + + [DllImport(PluginName, EntryPoint="AVPMC_SetTexturePointer")] + public static extern void SetTexturePointer(int handle, System.IntPtr texture); + +#if false + + [DllImport(PluginName, EntryPoint="AVPMC_SetColourBuffer")] + public static extern void SetColourBuffer(int handle, System.IntPtr buffer); + +#endif + + ////////////////////////////////////////////////////////////////////////// + // Destroy recorder + + [DllImport(PluginName, EntryPoint="AVPMC_FreeRecorder")] + public static extern void FreeRecorder(int handle); + + ////////////////////////////////////////////////////////////////////////// + // Debugging + + [DllImport(PluginName, EntryPoint="AVPMC_GetNumDroppedFrames")] + public static extern uint GetNumDroppedFrames(int handle); + + [DllImport(PluginName, EntryPoint="AVPMC_GetNumDroppedEncoderFrames")] + public static extern uint GetNumDroppedEncoderFrames(int handle); + + [DllImport(PluginName, EntryPoint="AVPMC_GetNumEncodedFrames")] + public static extern uint GetNumEncodedFrames(int handle); + + [DllImport(PluginName, EntryPoint="AVPMC_GetEncodedSeconds")] + public static extern uint GetEncodedSeconds(int handle); + + [DllImport(PluginName, EntryPoint="AVPMC_GetFileSize")] + public static extern uint GetFileSize(int handle); + + ////////////////////////////////////////////////////////////////////////// + // Private internal functions + + [DllImport(PluginName, EntryPoint="AVPMC_GetPluginVersion")] + private static extern System.IntPtr GetPluginVersion(); + + [DllImport(PluginName, EntryPoint="AVPMC_GetVideoCodecName")] + [return: MarshalAs(UnmanagedType.U1)] + private static extern bool GetVideoCodecName(int index, [MarshalAs(UnmanagedType.LPWStr)] StringBuilder name, int nameBufferLength); + + [DllImport(PluginName, EntryPoint="AVPMC_GetAudioCodecName")] + [return: MarshalAs(UnmanagedType.U1)] + private static extern bool GetAudioCodecName(int index, [MarshalAs(UnmanagedType.LPWStr)] StringBuilder name, int nameBufferLength); + + [DllImport(PluginName, EntryPoint="AVPMC_GetAudioInputDeviceName")] + [return: MarshalAs(UnmanagedType.U1)] + private static extern bool GetAudioInputDeviceName(int index, [MarshalAs(UnmanagedType.LPWStr)] StringBuilder name, int nameBufferLength); + + [DllImport(PluginName, EntryPoint="AVPMC_GetContainerFileExtensions")] + [return: MarshalAs(UnmanagedType.U1)] + private static extern bool GetContainerFileExtensions(int videoCodecIndex, int audioCodecIndex, [MarshalAs(UnmanagedType.LPWStr)] StringBuilder extensions, int extensionsBufferLength); + + ////////////////////////////////////////////////////////////////////////// + // Logging + + [DllImport(PluginName, EntryPoint="AVPMC_SetLogFunction")] + public static extern void SetLogFunction(System.IntPtr fn); + + ////////////////////////////////////////////////////////////////////////// + // Error reporting + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate void ErrorHandlerDelegate(int handle, int domain, int code, [In, MarshalAs(UnmanagedType.LPWStr)] string message); + + [DllImport(PluginName, EntryPoint="AVPMC_SetErrorHandler")] + public static extern void SetErrorHandler(int handle, System.IntPtr handler); + +#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || (UNITY_IOS && !UNITY_EDITOR) + + ////////////////////////////////////////////////////////////////////////// + // Audio capture authorisation + + [DllImport(PluginName, EntryPoint = "AVPMC_AudioCaptureDeviceAuthorisationStatus")] + public static extern int AudioCaptureDeviceAuthorisationStatus(); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate void RequestAudioCaptureDeviceAuthorisationDelegate(int authorisation); + + [DllImport(PluginName, EntryPoint = "AVPMC_RequestAudioCaptureDeviceAuthorisation")] + public static extern void RequestAudioCaptureDeviceAuthorisation(System.IntPtr callback); + + ////////////////////////////////////////////////////////////////////////// + // Photo library authorisation + + [DllImport(PluginName, EntryPoint="AVPMC_PhotoLibraryAuthorisationStatus")] + public static extern int PhotoLibraryAuthorisationStatus(int level); + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate void RequestPhotoLibraryAuthorisationDelegate(int authorisation); + + [DllImport(PluginName, EntryPoint = "AVPMC_RequestPhotoLibraryAuthorisation")] + public static extern void RequestPhotoLibraryAuthorisation(int level, System.IntPtr callback); + +#endif + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/NativePlugin.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/NativePlugin.cs.meta new file mode 100644 index 0000000..1a56e81 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/NativePlugin.cs.meta @@ -0,0 +1,15 @@ +fileFormatVersion: 1 +guid: c5965e183120558449c685d71b5a41b9 +labels: +- capture +- avi +- video +- grab +- record +- renderheads +- recording +- screen +- movie +- fraps +- camstudio +- recorder diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Utils.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Utils.cs new file mode 100644 index 0000000..bc7f867 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Utils.cs @@ -0,0 +1,442 @@ +using UnityEngine; +using System.IO; +using System.Diagnostics; +using System.Runtime.InteropServices; + +//----------------------------------------------------------------------------- +// Copyright 2012-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + public class Utils + { + public static string[] WindowsImageSequenceFormatNames = new string[] { "PNG (uncompressed)" }; + public static string[] MacOSImageSequenceFormatNames = new string[] { "PNG", "JPEG", "TIFF", "HEIF" }; + public static string[] IOSImageSequenceFormatNames = new string[] { "PNG", "JPEG", "TIFF", "HEIF" }; + public static string[] AndroidImageSequenceFormatNames = new string[] { "PNG", "JPEG" }; + + public static string[] GetNativeImageSequenceFormatNames() + { + string[] result = null; + #if UNITY_EDITOR + #if UNITY_EDITOR_WIN + result = WindowsImageSequenceFormatNames; + #elif UNITY_EDITOR_OSX + result = MacOSImageSequenceFormatNames; + #endif + #else + #if UNITY_STANDALONE_WIN + result = WindowsImageSequenceFormatNames; + #elif UNITY_STANDALONE_OSX + result = MacOSImageSequenceFormatNames; + #elif UNITY_IOS + result = IOSImageSequenceFormatNames; + #elif UNITY_ANDROID + result = AndroidImageSequenceFormatNames; + #endif + #endif + if (result == null) + { + result = new string[0]; + } + return result; + } + + public static bool HasAlphaChannel(RenderTextureFormat format) + { + bool result = false; + switch (format) + { + case RenderTextureFormat.ARGB32: + case RenderTextureFormat.BGRA32: + case RenderTextureFormat.ARGB4444: + case RenderTextureFormat.ARGB1555: + case RenderTextureFormat.ARGB2101010: + case RenderTextureFormat.ARGB64: + case RenderTextureFormat.RGBAUShort: + case RenderTextureFormat.ARGBInt: + case RenderTextureFormat.ARGBFloat: + case RenderTextureFormat.ARGBHalf: + #if UNITY_2017_2_OR_NEWER + case RenderTextureFormat.BGRA10101010_XR: + #endif + result = true; + break; + } + return result; + } + + public static RenderTextureFormat GetBestRenderTextureFormat(bool supportHDR, bool supportTransparency, bool favourSpeedOverQuality) + { + RenderTextureFormat result = RenderTextureFormat.Default; + if (supportTransparency) + { + if (supportHDR) + { + // HDR Transparent + result = RenderTextureFormat.DefaultHDR; + if (favourSpeedOverQuality) + { + #if UNITY_2017_2_OR_NEWER + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.BGRA10101010_XR)) return RenderTextureFormat.BGRA10101010_XR; + #endif + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBHalf)) return RenderTextureFormat.ARGBHalf; + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBFloat)) return RenderTextureFormat.ARGBFloat; + } + else + { + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBFloat)) return RenderTextureFormat.ARGBFloat; + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBHalf)) return RenderTextureFormat.ARGBHalf; + #if UNITY_2017_2_OR_NEWER + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.BGRA10101010_XR)) return RenderTextureFormat.BGRA10101010_XR; + #endif + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGB64)) return RenderTextureFormat.ARGB64; + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGB2101010)) return RenderTextureFormat.ARGB2101010; + } + } + else + { + // SDR Transparent + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGB32)) return RenderTextureFormat.ARGB32; + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.BGRA32)) return RenderTextureFormat.BGRA32; + } + } + else + { + if (supportHDR) + { + // HDR non-transparent + result = RenderTextureFormat.DefaultHDR; + /*if (favourSpeedOverQuality) + { + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.RGB111110Float)) return RenderTextureFormat.RGB111110Float; + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGB2101010)) return RenderTextureFormat.ARGB2101010; + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBHalf)) return RenderTextureFormat.ARGBHalf; + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBFloat)) return RenderTextureFormat.ARGBFloat; + } + else + { + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBFloat)) return RenderTextureFormat.ARGBFloat; + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBHalf)) return RenderTextureFormat.ARGBHalf; + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGB2101010)) return RenderTextureFormat.ARGB2101010; + if (SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.RGB111110Float)) return RenderTextureFormat.RGB111110Float; + }*/ + } + } + + if (!SystemInfo.SupportsRenderTextureFormat(result)) + { + UnityEngine.Debug.LogError("[AVProMovieCapture] Couldn't find suitable texture format " + result + " for " + supportHDR + " " + supportTransparency + " " + favourSpeedOverQuality); + } + + return result; + } + + /// + /// The "main" camera isn't necessarily the one the gets rendered last to screen, + /// so we sort all cameras by depth and find the one with no render target + /// + public static Camera GetUltimateRenderCamera() + { + Camera result = Camera.main; + + { + // Iterate all enabled cameras + float highestDepth = float.MinValue; + Camera[] enabledCameras = Camera.allCameras; + for (int cameraIndex = 0; cameraIndex < enabledCameras.Length; cameraIndex++) + { + Camera camera = enabledCameras[cameraIndex]; + // Ignore null cameras + if (camera != null) + { + // Ignore cameras that are hidden or have a targetTexture + bool isHidden = (camera.hideFlags & HideFlags.HideInHierarchy) == HideFlags.HideInHierarchy; + if (!isHidden && camera.targetTexture == null) + { + // Ignore cameras that render nothing + if (camera.pixelRect.width > 0f && camera.pixelHeight > 0f) + { + // Keep the one with highest depth + // TODO: handle the case where camera depths are equal - which one is first then? + if (camera.depth >= highestDepth) + { + highestDepth = camera.depth; + result = camera; + } + } + } + } + } + } + + return result; + } + + public static bool HasContributingCameras(Camera parentCamera) + { + bool result = true; + + // If the camera doesn't clear the target completely then it may have other contributing cameras + if (parentCamera.rect == new Rect(0f, 0f, 1f, 1f)) + { + if (parentCamera.clearFlags == CameraClearFlags.Skybox || + parentCamera.clearFlags == CameraClearFlags.Color) + { + result = false; + } + } + + return result; + } + + /// + /// Returns a list of cameras sorted in render order from first to last that contribute to the rendering to parentCamera + /// + public static Camera[] FindContributingCameras(Camera parentCamera) + { + System.Collections.Generic.List validCameras = new System.Collections.Generic.List(8); + { + // Iterate all enabled/disabled cameras (they may become enabled later on) + Camera[] allCameras = (Camera[])Resources.FindObjectsOfTypeAll(typeof(Camera)); + for (int cameraIndex = 0; cameraIndex < allCameras.Length; cameraIndex++) + { + Camera camera = allCameras[cameraIndex]; + // Ignore null cameras and camera that is the parent + if (camera != null && camera != parentCamera) + { + // Only allow cameras with depth less or equal to parent camera + if (camera.depth <= parentCamera.depth) + { + // Ignore cameras that are hidden or have a targetTexture that doesn't match the parent + bool isHidden = (camera.hideFlags & HideFlags.HideInHierarchy) == HideFlags.HideInHierarchy; + if (!isHidden && camera.targetTexture == parentCamera.targetTexture) + { + // Ignore cameras that render nothing + if (camera.pixelRect.width > 0 && camera.pixelHeight > 0) + { + validCameras.Add(camera); + } + } + } + } + } + } + + if (validCameras.Count > 1) + { + // Sort by depth (render order) + // TODO: handle the case where camera depths are equal - which one is first then? + validCameras.Sort(delegate (Camera a, Camera b) + { + if (a != b) // Pre .Net 4.6.2 Sort() can compare an elements with itself + { + if (a.depth < b.depth) + { + return -1; + } + else if (a.depth > b.depth) + { + return 1; + } + else if (a.depth == b.depth) + { + UnityEngine.Debug.LogWarning("[AVProMovieCapture] Cameras '" + a.name + "' and '" + b.name + "' have the same depth value - unable to determine render order: " + a.depth); + } + } + return 0; + }); + + // Starting from the last camera to render, find the first one that clears the screen completely + for (int i = (validCameras.Count - 1); i >= 0; i--) + { + if (validCameras[i].rect == new Rect(0f, 0f, 1f, 1f)) + { + if (validCameras[i].clearFlags == CameraClearFlags.Skybox || + validCameras[i].clearFlags == CameraClearFlags.Color) + { + // Remove all cameras before this + validCameras.RemoveRange(0, i); + break; + } + } + } + } + + return validCameras.ToArray(); + } + +#if UNITY_EDITOR_OSX || (UNITY_STANDALONE_OSX && !UNITY_EDITOR) + private static string PhotosScheme { get { return "photos://"; } } + private static string FileScheme { get { return "file://"; } } +#elif UNITY_IOS && !UNITY_EDITOR + private static string PhotosScheme { get { return "photos-redirect://"; } } + private static string FileScheme { get { return "shareddocuments://"; } } +#endif + + private static string URLEscapePathByPercentEncoding(string path) + { + return path.Replace("%", "%25") // Escape percents first so escaped character's percents aren't themselves escaped + .Replace(" ", "%20") + .Replace("\"", "%22") + .Replace("#", "%23") + .Replace(";", "%3B") + .Replace("<", "%3C") + .Replace(">", "%3E") + .Replace("?", "%3F") + .Replace("[", "%5B") + .Replace("\\", "%5C") + .Replace("]", "%5D") + .Replace("^", "%5E") + .Replace("`", "%60") + .Replace("{", "%7B") + .Replace("|", "%7C") + .Replace("}", "%7D"); + } + + public static bool ShowInExplorer(string itemPath) + { + bool result = false; +#if UNITY_EDITOR_OSX || (!UNITY_EDITOR && (UNITY_STANDALONE_OSX || UNITY_IOS)) + string url; + if (itemPath.StartsWith("avpmc-photolibrary://")) + { + // TODO: Find out how to open photos to a specific album/item + url = PhotosScheme; + } + else + { + url = FileScheme + URLEscapePathByPercentEncoding(Directory.GetParent(itemPath).FullName); + } + UnityEngine.Debug.LogFormat("ShowInExplorer - opening URL: {0}", url); + UnityEngine.Application.OpenURL(url); + result = true; +#else +#if !UNITY_WEBPLAYER + itemPath = Path.GetFullPath(itemPath.Replace(@"/", @"\")); // explorer doesn't like front slashes + if (File.Exists(itemPath)) + { +#if UNITY_EDITOR_WIN || (!UNITY_EDITOR && UNITY_STANDALONE_WIN) + Process.Start("explorer.exe", "/select," + itemPath); +#else + +#endif + result = true; + } + else if (Directory.Exists(itemPath)) + { + // NOTE: We use OpenURL() instead of the explorer process so that it opens explorer inside the folder + UnityEngine.Application.OpenURL(itemPath); + result = true; + } + +#endif +#endif // UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX + + return result; + } + + public static bool OpenInDefaultApp(string itemPath) + { + bool result = false; +#if UNITY_EDITOR_OSX || (!UNITY_EDITOR && (UNITY_STANDALONE_OSX || UNITY_IOS)) + string url; + if (itemPath.StartsWith("avpmc-photolibrary://")) + { + // TODO: Find out how to open photos to a specific album/item + url = PhotosScheme; + } + else + { + url = FileScheme + URLEscapePathByPercentEncoding(itemPath); + } + UnityEngine.Debug.LogFormat("OpenInDefaultApp - opening URL: {0}", url); + UnityEngine.Application.OpenURL(url); + result = true; +#else + itemPath = Path.GetFullPath(itemPath.Replace(@"/", @"\")); + if (File.Exists(itemPath)) + { + UnityEngine.Application.OpenURL(itemPath); + result = true; + } + else if (Directory.Exists(itemPath)) + { + UnityEngine.Application.OpenURL(itemPath); + result = true; + } +#endif + return result; + } + + public static long GetFileSize(string filename) + { +#if UNITY_WEBPLAYER + return 0; +#else + System.IO.FileInfo fi = new System.IO.FileInfo(filename); + return fi.Length; +#endif + } + + +#if UNITY_EDITOR_WIN || (!UNITY_EDITOR && UNITY_STANDALONE_WIN) + + [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)] + [return: MarshalAs(UnmanagedType.Bool)] + private static extern bool GetDiskFreeSpaceEx(string lpDirectoryName, + out ulong lpFreeBytesAvailable, + out ulong lpTotalNumberOfBytes, + out ulong lpTotalNumberOfFreeBytes); + + public static bool DriveFreeBytes(string folderName, out ulong freespace) + { + freespace = 0; + if (string.IsNullOrEmpty(folderName)) + { + throw new System.ArgumentNullException("folderName"); + } + + if (!folderName.EndsWith("\\")) + { + folderName += '\\'; + } + + ulong free = 0, dummy1 = 0, dummy2 = 0; + + if (GetDiskFreeSpaceEx(folderName, out free, out dummy1, out dummy2)) + { + freespace = free; + return true; + } + else + { + return false; + } + } +#endif + + public static string GetImageFileExtension(ImageSequenceFormat format) + { + string result = string.Empty; + switch (format) + { + case ImageSequenceFormat.PNG: + result = "png"; + break; + case ImageSequenceFormat.JPEG: + result = "jpg"; + break; + case ImageSequenceFormat.TIFF: + result = "tiff"; + break; + case ImageSequenceFormat.HEIF: + result = "heif"; + break; + } + return result; + } + } + +} diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Utils.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Utils.cs.meta new file mode 100644 index 0000000..d6be704 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Utils.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fa6cfd6d458dbcd4ba3fb2bf2f1a86e8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/WavWriter.cs b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/WavWriter.cs new file mode 100644 index 0000000..afcced7 --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/WavWriter.cs @@ -0,0 +1,163 @@ +using System.IO; + +//----------------------------------------------------------------------------- +// Copyright 2014-2022 RenderHeads Ltd. All rights reserved. +//----------------------------------------------------------------------------- + +namespace RenderHeads.Media.AVProMovieCapture +{ + public class WavWriter : System.IDisposable + { + private static byte[] RIFF_HEADER = new byte[] { 0x52, 0x49, 0x46, 0x46 }; + private static byte[] FORMAT_WAVE = new byte[] { 0x57, 0x41, 0x56, 0x45 }; + private static byte[] FORMAT_TAG = new byte[] { 0x66, 0x6d, 0x74, 0x20 }; + private static byte[] AUDIO_FORMAT_PCM = new byte[] { 0x01, 0x00 }; + private static byte[] AUDIO_FORMAT_FLOAT = new byte[] { 0x03, 0x00 }; + private static byte[] SUBCHUNK_ID = new byte[] { 0x64, 0x61, 0x74, 0x61 }; + private static byte[] FACTCHUNK_ID = new byte[] { 0x66, 0x61, 0x63, 0x74 }; + + private const int BufferDuration = 4; + + public enum SampleFormat + { + PCM16 = 2, + Float32 = 4, + } + + private FileStream _stream; + private byte[] _outBytes; + private int _byteCount; + private int _byteCountTotal; + private int _channelCount; + private int _sampleRate; + private SampleFormat _sampleFormat; + private int _headerSize; + + public WavWriter(string path, int channelCount, int sampleRate, SampleFormat sampleFormat = SampleFormat.Float32) + { + int bytesPerSample = (int)sampleFormat; + _outBytes = new byte[sampleRate * bytesPerSample * channelCount * BufferDuration]; + + _channelCount = channelCount; + _sampleRate = sampleRate; + _sampleFormat = sampleFormat; + + _stream = new FileStream(path, System.IO.FileMode.Create); + WriteHeader(0); + } + + public void Dispose() + { + _stream.Seek(0, SeekOrigin.Begin); + WriteHeader(_byteCountTotal); + _stream.Close(); + _stream.Dispose(); + _stream = null; + } + + public void WriteInterleaved(float[] data, int dataLength = -1) + { + if (dataLength < 0) + { + dataLength = data.Length; + } + if (_sampleFormat == SampleFormat.PCM16) + { + // Convert to s16le + _byteCount = 0; + for (int i = 0; i < dataLength; i++) + { + short shortVal = System.Convert.ToInt16(data[i] * 32767f); + _outBytes[_byteCount + 0] = (byte)(shortVal & 0xff); + _outBytes[_byteCount + 1] = (byte)((shortVal >> 8) & 0xff); + _byteCount += 2; + } + } + else + { + _byteCount = dataLength * sizeof(float); + System.Buffer.BlockCopy(data, 0, _outBytes, 0, _byteCount); + } + + // Write to stream + if (_byteCount > 0) + { + _stream.Write(_outBytes, 0, _byteCount); + _byteCountTotal += _byteCount; + _byteCount = 0; + } + } + + public void WriteHeader(int byteStreamSize) + { + int bytesPerSample = (int)_sampleFormat; + int byteRate = _sampleRate * _channelCount * bytesPerSample; + int blockAlign = _channelCount * bytesPerSample; + + _stream.Write(RIFF_HEADER, 0, RIFF_HEADER.Length); + _stream.Write(PackageInt(byteStreamSize + _headerSize, 4), 0, 4); + + _stream.Write(FORMAT_WAVE, 0, FORMAT_WAVE.Length); + + // 'fmt' chunk + { + _stream.Write(FORMAT_TAG, 0, FORMAT_TAG.Length); + + if (_sampleFormat == SampleFormat.PCM16) + { + _stream.Write(PackageInt(16, 4), 0, 4); + _stream.Write(AUDIO_FORMAT_PCM, 0, AUDIO_FORMAT_PCM.Length); + } + else + { + _stream.Write(PackageInt(18, 4), 0, 4); + _stream.Write(AUDIO_FORMAT_FLOAT, 0, AUDIO_FORMAT_FLOAT.Length); + } + _stream.Write(PackageInt(_channelCount, 2), 0, 2); + _stream.Write(PackageInt(_sampleRate, 4), 0, 4); + _stream.Write(PackageInt(byteRate, 4), 0, 4); + _stream.Write(PackageInt(blockAlign, 2), 0, 2); + _stream.Write(PackageInt(bytesPerSample * 8), 0, 2); + if (_sampleFormat == SampleFormat.Float32) + { + _stream.Write(PackageInt(0, 2), 0, 2); // Extension size + } + } + + if (_sampleFormat == SampleFormat.Float32) + { + // 'fact' chunk + { + _stream.Write(FACTCHUNK_ID, 0, FACTCHUNK_ID.Length); + _stream.Write(PackageInt(4, 4), 0, 4); + int samplesPerChannel = (byteStreamSize / bytesPerSample); + _stream.Write(PackageInt(samplesPerChannel, 4), 0, 4); + } + } + + // 'data' chunk + { + _stream.Write(SUBCHUNK_ID, 0, SUBCHUNK_ID.Length); + _stream.Write(PackageInt(byteStreamSize, 4), 0, 4); + } + + _headerSize = (int)_stream.Position - 8; + //UnityEngine.Debug.Log("Header size: " + _headerSize); + } + + private static byte[] PackageInt(int source, int length = 2) + { + if((length!=2)&&(length!=4)) + throw new System.ArgumentException("length must be either 2 or 4", "length"); + var retVal = new byte[length]; + retVal[0] = (byte)(source & 0xFF); + retVal[1] = (byte)((source >> 8) & 0xFF); + if (length == 4) + { + retVal[2] = (byte) ((source >> 0x10) & 0xFF); + retVal[3] = (byte) ((source >> 0x18) & 0xFF); + } + return retVal; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/WavWriter.cs.meta b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/WavWriter.cs.meta new file mode 100644 index 0000000..1daa7eb --- /dev/null +++ b/Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/WavWriter.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6faf69e117c29a844aed924794d1c42e +timeCreated: 1599233216 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Readme.asset b/Assets/Readme.asset new file mode 100644 index 0000000..77c2f83 --- /dev/null +++ b/Assets/Readme.asset @@ -0,0 +1,34 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fcf7219bab7fe46a1ad266029b2fee19, type: 3} + m_Name: Readme + m_EditorClassIdentifier: + icon: {fileID: 2800000, guid: 727a75301c3d24613a3ebcec4a24c2c8, type: 3} + title: URP Empty Template + sections: + - heading: Welcome to the Universal Render Pipeline + text: This template includes the settings and assets you need to start creating with the Universal Render Pipeline. + linkText: + url: + - heading: URP Documentation + text: + linkText: Read more about URP + url: https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest + - heading: Forums + text: + linkText: Get answers and support + url: https://forum.unity.com/forums/universal-render-pipeline.383/ + - heading: Report bugs + text: + linkText: Submit a report + url: https://unity3d.com/unity/qa/bug-reporting + loadedLayout: 1 diff --git a/Assets/Readme.asset.meta b/Assets/Readme.asset.meta new file mode 100644 index 0000000..ab3ad45 --- /dev/null +++ b/Assets/Readme.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8105016687592461f977c054a80ce2f2 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources.meta b/Assets/Resources.meta new file mode 100644 index 0000000..e8dd18b --- /dev/null +++ b/Assets/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 18d16746585e314499f6885b8ec3caa1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData.meta b/Assets/Resources/ExcelData.meta new file mode 100644 index 0000000..0512e39 --- /dev/null +++ b/Assets/Resources/ExcelData.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eba2a20a99f793149a7ecc0244b53e58 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/CSharpPath.meta b/Assets/Resources/ExcelData/CSharpPath.meta new file mode 100644 index 0000000..a665b13 --- /dev/null +++ b/Assets/Resources/ExcelData/CSharpPath.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 51e50d9afe4a7544a9a5540239c89876 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/CSharpPath/LanguageData.cs b/Assets/Resources/ExcelData/CSharpPath/LanguageData.cs new file mode 100644 index 0000000..4a29408 --- /dev/null +++ b/Assets/Resources/ExcelData/CSharpPath/LanguageData.cs @@ -0,0 +1,18 @@ + +namespace ZXKFramework +{ + public class LanguageData + { + //UID + public int id; + //中文 + public string Chinese; + //英文 + public string English; + //日语 + public string Japanese; + //法语 + public string French; + + } +} diff --git a/Assets/Resources/ExcelData/CSharpPath/LanguageData.cs.meta b/Assets/Resources/ExcelData/CSharpPath/LanguageData.cs.meta new file mode 100644 index 0000000..55daa0c --- /dev/null +++ b/Assets/Resources/ExcelData/CSharpPath/LanguageData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e653915df61ae194bb1a8d90104cd2dd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/CSharpPath/LiaoNingJiaoZhuanData.cs b/Assets/Resources/ExcelData/CSharpPath/LiaoNingJiaoZhuanData.cs new file mode 100644 index 0000000..2bfe184 --- /dev/null +++ b/Assets/Resources/ExcelData/CSharpPath/LiaoNingJiaoZhuanData.cs @@ -0,0 +1,45 @@ +public class LiaoNingJiaoZhuanData +{ + + public int id;//UID; + + public string ModuleName;//模块; + + public string SubModuleName;//模块内容; + + public string ModelSpriteName;//模式图片路径; + + public string Operation;//操作; + + public string TipSoundText;//提示语音文本; + + public string SpriteName;//图片路径(名字); + + public string ToolName;//工具库Or材料库; + + public string TaskText;//文字提示; + + public string SoundText;//配音; + + public string SoundPath;//配音路径; + + public string StartClipPath;//播放动画前提示语音; + + public string ClipPath;//TimeLine动画路径; + + public string ModelPath;//模型展示路径; + + public string IsConfirm;//结束后确认提示; + + public int MapGroup;//图组; + + public string isHaveInteraction;//点击按钮以后是否需要交互; + + public string InputGameName;//点击按钮以后需要点击的物体; + + public int ModuleID;//当前是第几个模块; + + public string IsHaveTwoInteraction;//点击模型之后是否还需要点击第二个模型; + + public string InputTwoGameName;//点击模型之后需要点击的模型; +} diff --git a/Assets/Resources/ExcelData/CSharpPath/LiaoNingJiaoZhuanData.cs.meta b/Assets/Resources/ExcelData/CSharpPath/LiaoNingJiaoZhuanData.cs.meta new file mode 100644 index 0000000..8213c0b --- /dev/null +++ b/Assets/Resources/ExcelData/CSharpPath/LiaoNingJiaoZhuanData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e9f7265e3ec9d34459bbc814ba54db56 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/CSharpPath/ModuleIDData.cs b/Assets/Resources/ExcelData/CSharpPath/ModuleIDData.cs new file mode 100644 index 0000000..20d0360 --- /dev/null +++ b/Assets/Resources/ExcelData/CSharpPath/ModuleIDData.cs @@ -0,0 +1,11 @@ +public class ModuleIDData +{ + + public int id;//UID; + + public string LiuLan;//浏览模式; + + public string ShiXun;//实训模式; + + public string KaoHe;//考核模式; +} diff --git a/Assets/Resources/ExcelData/CSharpPath/ModuleIDData.cs.meta b/Assets/Resources/ExcelData/CSharpPath/ModuleIDData.cs.meta new file mode 100644 index 0000000..3973580 --- /dev/null +++ b/Assets/Resources/ExcelData/CSharpPath/ModuleIDData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 85ff0ee8d45f36f4bb89894499bf6e1d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/CSharpPath/OrderDragData.cs b/Assets/Resources/ExcelData/CSharpPath/OrderDragData.cs new file mode 100644 index 0000000..ad6f32f --- /dev/null +++ b/Assets/Resources/ExcelData/CSharpPath/OrderDragData.cs @@ -0,0 +1,14 @@ + +namespace ZXKFramework +{ + public class OrderDragData + { + //UID + public int id; + //顺序 + public int orderID; + //名称 + public string dragGameName; + + } +} diff --git a/Assets/Resources/ExcelData/CSharpPath/OrderDragData.cs.meta b/Assets/Resources/ExcelData/CSharpPath/OrderDragData.cs.meta new file mode 100644 index 0000000..00891da --- /dev/null +++ b/Assets/Resources/ExcelData/CSharpPath/OrderDragData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5c73364aa6be6b04e9d5f08e872a9839 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/CSharpPath/Question.cs b/Assets/Resources/ExcelData/CSharpPath/Question.cs new file mode 100644 index 0000000..a1fe3ae --- /dev/null +++ b/Assets/Resources/ExcelData/CSharpPath/Question.cs @@ -0,0 +1,19 @@ +public class Question +{ + + public int id;//UID; + + public string question;//问题; + + public string optionsA;//; + + public string optionsB;//; + + public string optionsC;//; + + public string optionsD;//; + + public string answer;//; + + public int score;//; +} diff --git a/Assets/Resources/ExcelData/CSharpPath/Question.cs.meta b/Assets/Resources/ExcelData/CSharpPath/Question.cs.meta new file mode 100644 index 0000000..53868bc --- /dev/null +++ b/Assets/Resources/ExcelData/CSharpPath/Question.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4307111fb50690d40811023190fee560 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/CSharpPath/ShowJieGou.cs b/Assets/Resources/ExcelData/CSharpPath/ShowJieGou.cs new file mode 100644 index 0000000..0b3181f --- /dev/null +++ b/Assets/Resources/ExcelData/CSharpPath/ShowJieGou.cs @@ -0,0 +1,14 @@ + +namespace ZXKFramework +{ + public class ShowJieGou + { + //UID + public int id; + //名称 + public string Name; + //说明 + public string Show; + + } +} diff --git a/Assets/Resources/ExcelData/CSharpPath/ShowJieGou.cs.meta b/Assets/Resources/ExcelData/CSharpPath/ShowJieGou.cs.meta new file mode 100644 index 0000000..1cae89a --- /dev/null +++ b/Assets/Resources/ExcelData/CSharpPath/ShowJieGou.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: adf0e4c7d5ea7c245802750d61dd506e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/Excel.meta b/Assets/Resources/ExcelData/Excel.meta new file mode 100644 index 0000000..557de6e --- /dev/null +++ b/Assets/Resources/ExcelData/Excel.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 021760b2234795a41bd0d24effa96bdf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/Excel/LanguageData.xlsx b/Assets/Resources/ExcelData/Excel/LanguageData.xlsx new file mode 100644 index 0000000..cd0e3f9 Binary files /dev/null and b/Assets/Resources/ExcelData/Excel/LanguageData.xlsx differ diff --git a/Assets/Resources/ExcelData/Excel/LanguageData.xlsx.meta b/Assets/Resources/ExcelData/Excel/LanguageData.xlsx.meta new file mode 100644 index 0000000..34cf23a --- /dev/null +++ b/Assets/Resources/ExcelData/Excel/LanguageData.xlsx.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a553d045d419ebb44a2b0c1d0db67685 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/Excel/OrderDragData.xlsx b/Assets/Resources/ExcelData/Excel/OrderDragData.xlsx new file mode 100644 index 0000000..498bcdc Binary files /dev/null and b/Assets/Resources/ExcelData/Excel/OrderDragData.xlsx differ diff --git a/Assets/Resources/ExcelData/Excel/OrderDragData.xlsx.meta b/Assets/Resources/ExcelData/Excel/OrderDragData.xlsx.meta new file mode 100644 index 0000000..4c480b6 --- /dev/null +++ b/Assets/Resources/ExcelData/Excel/OrderDragData.xlsx.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 320a5b8b8ffa0eb44a23ea7da355ecd3 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/Excel/ShowJieGou.xlsx b/Assets/Resources/ExcelData/Excel/ShowJieGou.xlsx new file mode 100644 index 0000000..125efa0 Binary files /dev/null and b/Assets/Resources/ExcelData/Excel/ShowJieGou.xlsx differ diff --git a/Assets/Resources/ExcelData/Excel/ShowJieGou.xlsx.meta b/Assets/Resources/ExcelData/Excel/ShowJieGou.xlsx.meta new file mode 100644 index 0000000..85358b2 --- /dev/null +++ b/Assets/Resources/ExcelData/Excel/ShowJieGou.xlsx.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f7115fcfd155ae048b3acafd97a91a69 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/ExcelToJson.meta b/Assets/Resources/ExcelData/ExcelToJson.meta new file mode 100644 index 0000000..4bfe498 --- /dev/null +++ b/Assets/Resources/ExcelData/ExcelToJson.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f3c4c56ccaf87d94181dadc0e137f9d4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/ExcelToJson/LanguageData.json b/Assets/Resources/ExcelData/ExcelToJson/LanguageData.json new file mode 100644 index 0000000..77c81db --- /dev/null +++ b/Assets/Resources/ExcelData/ExcelToJson/LanguageData.json @@ -0,0 +1 @@ +[{"id":1,"Chinese":"隧道洞口段管棚超前支护施工虚拟仿真实训","English":"","Japanese":"","French":""},{"id":2,"Chinese":"时长:","English":"","Japanese":"","French":""},{"id":3,"Chinese":"进度:","English":"","Japanese":"","French":""},{"id":4,"Chinese":"成绩:","English":"","Japanese":"","French":""},{"id":5,"Chinese":"进入实训","English":"","Japanese":"","French":""},{"id":6,"Chinese":"进入","English":"","Japanese":"","French":""},{"id":7,"Chinese":"退出","English":"","Japanese":"","French":""}] diff --git a/Assets/Resources/ExcelData/ExcelToJson/LanguageData.json.meta b/Assets/Resources/ExcelData/ExcelToJson/LanguageData.json.meta new file mode 100644 index 0000000..2fb57b1 --- /dev/null +++ b/Assets/Resources/ExcelData/ExcelToJson/LanguageData.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e278c2d2c571c704095c32f1b23b5b1b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/ExcelToJson/LiaoNingJiaoZhuanData.json b/Assets/Resources/ExcelData/ExcelToJson/LiaoNingJiaoZhuanData.json new file mode 100644 index 0000000..aac16ec --- /dev/null +++ b/Assets/Resources/ExcelData/ExcelToJson/LiaoNingJiaoZhuanData.json @@ -0,0 +1 @@ +[{"id":1,"ModuleName":"套拱施工","SubModuleName":"","ModelSpriteName":"Sprites/TGSG","Operation":"","TipSoundText":"","SpriteName":"","ToolName":"","TaskText":"“欢迎进入套拱施工实训任务”","SoundText":"","SoundPath":"","StartClipPath":"","ClipPath":"TimeLine1","ModelPath":"","IsConfirm":"Y","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":2,"ModuleName":"套拱施工","SubModuleName":"测量放样","ModelSpriteName":"","Operation":"","TipSoundText":"","SpriteName":"","ToolName":"","TaskText":"","SoundText":"","SoundPath":"Clip_1","StartClipPath":"","ClipPath":"TimeLine1_1_1","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":3,"ModuleName":"套拱施工","SubModuleName":"测量放样","ModelSpriteName":"","Operation":"佩戴安全帽","TipSoundText":"获取“安全帽”,完成佩戴安全帽任务","SpriteName":"Sprites/anquanmao","ToolName":"安全帽","TaskText":"进入施工现场必须佩戴安全帽。","SoundText":"进入施工现场必须佩戴安全帽。","SoundPath":"Clip_2","StartClipPath":"","ClipPath":"TimeLine1_1_2","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game3","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":4,"ModuleName":"套拱施工","SubModuleName":"测量放样","ModelSpriteName":"","Operation":"全站仪安装","TipSoundText":"获取“全站仪”,完成全站仪安装任务。","SpriteName":"Sprites/quanzhanyi","ToolName":"全站仪","TaskText":"套拱施工前,先进行测量放样,采用全站仪测量,定出隧道开挖面上的轮廓线。","SoundText":"套拱施工前,先进行测量放样,采用全站仪测量,定出隧道开挖面上的轮廓线。","SoundPath":"Clip_3","StartClipPath":"","ClipPath":"TimeLine1_1_3","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":5,"ModuleName":"套拱施工","SubModuleName":"测量放样","ModelSpriteName":"","Operation":"测量放样","TipSoundText":"获取“全站仪”,完成测量开挖轮廓线任务","SpriteName":"Sprites/quanzhanyi","ToolName":"全站仪","TaskText":"1.测量放样\n用红色喷漆,标记测量放样点位,并画出开挖轮廓线。","SoundText":"用红色喷漆,标记测量放样点位,并画出开挖轮廓线。","SoundPath":"Clip_4","StartClipPath":"","ClipPath":"TimeLine1_1_4","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game5","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":6,"ModuleName":"套拱施工","SubModuleName":"钢拱架制作与拼装","ModelSpriteName":"","Operation":"弯曲机安装","TipSoundText":"获取“型钢弯曲机”,完成型钢弯曲机安装任务","SpriteName":"Sprites/xinggangwanquji","ToolName":"型钢弯曲机","TaskText":"2.钢拱架制作与试拼\n钢拱架是套拱的支撑台架,采用型钢弯曲机弯制成型。","SoundText":"钢拱架是套拱的支撑台架,采用型钢弯曲机弯制成型。","SoundPath":"Clip_5","StartClipPath":"","ClipPath":"TimeLine1_2_1","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":7,"ModuleName":"套拱施工","SubModuleName":"钢拱架制作与拼装","ModelSpriteName":"","Operation":"钢拱架加工平台安装","TipSoundText":"获取“钢拱架加工平台”,完成钢拱架加工平台安装任务","SpriteName":"Sprites/ganggongjiajiagongpingtai","ToolName":"钢拱架加工平台","TaskText":"2.钢拱架制作与试拼\n钢拱架,在加工平台上加工制作。","SoundText":"钢拱架,在加工平台上加工制作。","SoundPath":"Clip_6","StartClipPath":"","ClipPath":"TimeLine1_2_2","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":8,"ModuleName":"套拱施工","SubModuleName":"钢拱架制作与拼装","ModelSpriteName":"","Operation":"工字钢弯制","TipSoundText":"获取“工字钢”,完成型钢弯制任务","SpriteName":"Sprites/gongzigang","ToolName":"工字钢","TaskText":"钢拱架采用型钢材料分节制作。","SoundText":"钢拱架采用型钢材料分节制作。","SoundPath":"Clip_7","StartClipPath":"","ClipPath":"TimeLine1_2_3","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game8","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":9,"ModuleName":"套拱施工","SubModuleName":"钢拱架制作与拼装","ModelSpriteName":"","Operation":"型钢移位","TipSoundText":"获取“钢拱架加工平台”,完成型钢转移存放任务","SpriteName":"Sprites/ganggongjiajiagongpingtai","ToolName":"钢拱架加工平台","TaskText":"2.钢拱架制作与试拼\n型钢按照设计弧度弯制成型后,备用。","SoundText":"型钢按照设计弧度弯制成型后,备用。","SoundPath":"Clip_8","StartClipPath":"","ClipPath":"TimeLine1_2_4","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game9","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":10,"ModuleName":"套拱施工","SubModuleName":"钢拱架制作与拼装","ModelSpriteName":"","Operation":"带防护面罩","TipSoundText":"获取“防护面罩”,完成佩戴防护面罩任务","SpriteName":"Sprites/fanghumianzhao","ToolName":"防护面罩","TaskText":"2.钢拱架制作与试拼\n焊工作业时,必须使用带有滤光镜的头罩,或手持防护面罩,戴耐火的防护手套,穿焊接防护服,和绝缘、阻燃、抗热防护鞋。","SoundText":"焊工作业时,必须使用带有滤光镜的头罩,或手持防护面罩,戴耐火的防护手套,穿焊接防护服,和绝缘、阻燃、抗热防护鞋。","SoundPath":"Clip_9","StartClipPath":"","ClipPath":"TimeLine1_2_5","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":11,"ModuleName":"套拱施工","SubModuleName":"钢拱架制作与拼装","ModelSpriteName":"","Operation":"焊接钢板","TipSoundText":"获取“焊枪”,完成钢拱架接头钢板焊接固定任务","SpriteName":"Sprites/hanqiang","ToolName":"焊枪","TaskText":"2.钢拱架制作与试拼\n钢拱架接头钢板与钢拱架焊接固定,焊接操作者必须经专业培训,持证上岗。","SoundText":"钢拱架接头钢板与钢拱架焊接固定,焊接操作者必须经专业培训,持证上岗。","SoundPath":"Clip_10","StartClipPath":"","ClipPath":"TimeLine1_2_6","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game11","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":12,"ModuleName":"套拱施工","SubModuleName":"钢拱架制作与拼装","ModelSpriteName":"","Operation":"试拼","TipSoundText":"获取“钢拱架”,完成钢拱架试拼装任务","SpriteName":"Sprites/ganggongjia","ToolName":"钢拱架","TaskText":"2.钢拱架制作与试拼\n钢拱架应进行试拼装,检查拼装效果。","SoundText":"钢拱架应进行试拼装,检查拼装效果。","SoundPath":"Clip_11","StartClipPath":"","ClipPath":"TimeLine1_2_7","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game12","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":13,"ModuleName":"套拱施工","SubModuleName":"钢拱架制作与拼装","ModelSpriteName":"","Operation":"试拼效果展示","TipSoundText":"获取“试拼拱架”,完成试拼拱架拼装效果检查任务","SpriteName":"Sprites/shipingongjia","ToolName":"试拼拱架","TaskText":"2.钢拱架制作与试拼\n钢拱架经验收合格后,方可使用。","SoundText":"","SoundPath":"Clip_12","StartClipPath":"","ClipPath":"TimeLine1_2_8","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":14,"ModuleName":"套拱施工","SubModuleName":"钢拱架安装","ModelSpriteName":"","Operation":"高程复核","TipSoundText":"获取“水准仪”,完成套拱基础高程测量复核任务","SpriteName":"Sprites/shuizhunyi","ToolName":"水准仪","TaskText":"3.钢拱架安装\n套拱基础开挖后,钢拱架安装前,进行高程复核。在平面位置及高程复核,确保无误后,即可安装钢拱架。","SoundText":"套拱基础开挖后,钢拱架安装前,进行高程复核。在平面位置及高程复核,确保无误后,即可安装钢拱架。","SoundPath":"Clip_13","StartClipPath":"","ClipPath":"TimeLine1_3_1","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game14","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":15,"ModuleName":"套拱施工","SubModuleName":"钢拱架安装","ModelSpriteName":"","Operation":"安装拱架1","TipSoundText":"获取“成品拱架”,完成先靠近岩面一榀型钢拱架安装任务","SpriteName":"Sprites/chengpingongjia","ToolName":"成品拱架","TaskText":"3.钢拱架安装\n钢拱架安装时,底脚应落在坚实的地基上,严禁钢架置于虚渣上。先安装靠近开挖岩面的拱架,由内向外逐榀安装。","SoundText":"钢拱架安装时,底脚应落在坚实的地基上,严禁钢架置于虚渣上。先安装靠近开挖岩面的拱架,由内向外逐榀安装。","SoundPath":"Clip_14","StartClipPath":"","ClipPath":"TimeLine1_3_2","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game15","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":16,"ModuleName":"套拱施工","SubModuleName":"钢拱架安装","ModelSpriteName":"","Operation":"安装拱架2","TipSoundText":"获取“成品拱架”,完成剩余型钢拱架安装任务","SpriteName":"Sprites/chengpingongjia","ToolName":"成品拱架","TaskText":"3.钢拱架安装\n混凝土套拱内,埋设3榀工字钢型钢拱架。","SoundText":"混凝土套拱内,埋设3榀工字钢型钢拱架。","SoundPath":"Clip_15","StartClipPath":"","ClipPath":"TimeLine1_3_3","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":17,"ModuleName":"套拱施工","SubModuleName":"钢拱架安装","ModelSpriteName":"","Operation":"安装连接钢筋","TipSoundText":"获取“连接钢筋”,完成钢拱架纵向固定连接任务","SpriteName":"Sprites/lianjiegangjin","ToolName":"连接钢筋","TaskText":"3.钢拱架安装\n各榀钢拱架间,双面焊接环向间距,为1m的连接钢筋。","SoundText":"各榀钢拱架间,双面焊接环向间距,为1m的连接钢筋。","SoundPath":"Clip_16","StartClipPath":"","ClipPath":"TimeLine1_3_4","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game17","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":18,"ModuleName":"套拱施工","SubModuleName":"导向管安装","ModelSpriteName":"","Operation":"","TipSoundText":"获取“导向管”,完成导向管认知及安装任务","SpriteName":"Sprites/daoxiangguan","ToolName":"导向管","TaskText":"“导向管一般是施工管棚时用的,仰角是导向管方向跟隧道纵向的夹角。因为管棚一般长度较长,钻孔施工时钻头由于重力作用会下垂而侵入隧道限界,为了避免这一问题,施工导向管时就会向隧道轮廓外有个角度,而不是完全顺着隧道纵向施工,以抵消最终因为隧道钻头下垂而引起的侵限问题。”","SoundText":"“导向管一般是施工管棚时用的,仰角是导向管方向跟隧道纵向的夹角。因为管棚一般长度较长,钻孔施工时,钻头由于重力作用会下垂,而侵入隧道限界,为了避免这一问题,施工导向管时,就会向隧道轮廓外有个角度,而不是完全顺着隧道纵向施工,以抵消最终因为隧道钻头下垂,而引起的侵限问题。”","SoundPath":"Clip_17","StartClipPath":"","ClipPath":"TimeLine1_4_1","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":19,"ModuleName":"套拱施工","SubModuleName":"导向管安装","ModelSpriteName":"","Operation":"导向管安装","TipSoundText":"叉掉文字框触发动画和配音","SpriteName":"","ToolName":"","TaskText":"4.导向管安装\n导向管主要是为钻孔起导向作用,外插角与管棚设计参数一致,一般管棚轴线与衬砌外缘线夹角设计值为1°~3°。管棚环向间距设计值,一般为50cm。","SoundText":"导向管主要是为钻孔起导向作用,外插角与管棚设计参数一致,管棚轴线与衬砌外缘线夹角设计值,一般为1到3度。管棚环向间距设计值,一般为50厘米。","SoundPath":"Clip_18","StartClipPath":"","ClipPath":"TimeLine1_4_2","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game19","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":20,"ModuleName":"套拱施工","SubModuleName":"导向管安装","ModelSpriteName":"","Operation":"固定钢筋卡安装","TipSoundText":"获取“固定钢筋卡”,完成导向管固定任务","SpriteName":"Sprites/gudinggangjinqia","ToolName":"固定钢筋卡","TaskText":"4.导向管安装\n型钢与钢管焊成整体,固定钢筋与导向管采用双面焊接,焊接长度大于5倍钢筋直径,防止浇筑混凝土时产生位移。","SoundText":"型钢与钢管焊成整体,固定钢筋与导向管采用双面焊接,焊接长度大于5倍钢筋直径,防止浇筑混凝土时产生位移。","SoundPath":"Clip_19","StartClipPath":"","ClipPath":"TimeLine1_4_3","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game20","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":21,"ModuleName":"套拱施工","SubModuleName":"立模及混凝土浇注","ModelSpriteName":"","Operation":"穿戴工作服","TipSoundText":"获取“蓝色工作服”,完成工作服穿戴任务","SpriteName":"Sprites/lansegongzuofu","ToolName":"蓝色工作服","TaskText":"5.立模及混凝土浇注\n进入施工现场,必须佩戴安全帽、穿工作服。","SoundText":"进入施工现场,必须佩戴安全帽、穿工作服。","SoundPath":"Clip_20","StartClipPath":"","ClipPath":"TimeLine1_5_1","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game21","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":22,"ModuleName":"套拱施工","SubModuleName":"立模及混凝土浇注","ModelSpriteName":"","Operation":"拱架支撑安装","TipSoundText":"获取“拱架支撑”,完成拱架支撑安装任务","SpriteName":"Sprites/gongjiazhicheng","ToolName":"拱架支撑","TaskText":"5.立模及混凝土浇注\n套拱沿洞口开挖轮廓以外立模,采用钢拱架支撑,木模板拼装。","SoundText":"套拱沿洞口开挖轮廓以外立模,采用钢拱架支撑,木模板拼装。","SoundPath":"Clip_21","StartClipPath":"","ClipPath":"TimeLine1_5_2","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game22","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":23,"ModuleName":"套拱施工","SubModuleName":"立模及混凝土浇注","ModelSpriteName":"","Operation":"箍筋安装","TipSoundText":"获取“箍筋”,完成箍筋安装任务","SpriteName":"Sprites/gujin","ToolName":"箍筋","TaskText":"5.立模及混凝土浇注","SoundText":"采用箍筋加固模板,模板之间夹缝应严实,不漏浆,留活动模板便于振捣。","SoundPath":"Clip_22","StartClipPath":"","ClipPath":"TimeLine1_5_3","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":24,"ModuleName":"套拱施工","SubModuleName":"立模及混凝土浇注","ModelSpriteName":"","Operation":"混凝土浇注","TipSoundText":"获取“泵车”,完成混凝土浇筑任务","SpriteName":"Sprites/bengche","ToolName":"泵车","TaskText":"5.立模及混凝土浇注","SoundText":"模板装好后进行混凝土浇注,按设计要求的混凝土强度,左右两边对称浇注混凝土。","SoundPath":"Clip_23","StartClipPath":"","ClipPath":"TimeLine1_5_4","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game24","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":25,"ModuleName":"套拱施工","SubModuleName":"立模及混凝土浇注","ModelSpriteName":"","Operation":"混凝土捣棒","TipSoundText":"获取“振捣棒”,完成混凝土振捣任务","SpriteName":"Sprites/zhendaobang","ToolName":"振捣棒","TaskText":"5.立模及混凝土浇注\n振捣时,振捣棒抽插速度不宜过快,当混凝土无明显下沉,不再冒气泡,表面呈现平坦、泛浆时,则表示该处混凝土已振捣密实。","SoundText":"振捣时,振捣棒抽插速度不宜过快,当混凝土无明显下沉,不再冒气泡,表面呈现平坦、泛浆时,则表示该处混凝土已振捣密实。","SoundPath":"Clip_24","StartClipPath":"","ClipPath":"TimeLine1_5_5","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game25","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":26,"ModuleName":"套拱施工","SubModuleName":"立模及混凝土浇注","ModelSpriteName":"","Operation":"落架","TipSoundText":"获取“扳手”,完成拱架拆除任务","SpriteName":"Sprites/banshou","ToolName":"扳手","TaskText":"5.立模及混凝土浇注\n套拱混凝土强度满足要求后拆除模板支架。","SoundText":"套拱混凝土强度满足要求后,拆除模板支架。","SoundPath":"Clip_25","StartClipPath":"","ClipPath":"TimeLine1_5_6","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":27,"ModuleName":"套拱施工","SubModuleName":"立模及混凝土浇注","ModelSpriteName":"","Operation":"洒水养护","TipSoundText":"获取“水管”,完成套拱洒水养护任务","SpriteName":"Sprites/shuiguan","ToolName":"水管","TaskText":"5.立模及混凝土浇注\n套拱混凝土浇注完毕后,定期洒水养生。","SoundText":"套拱混凝土浇注完毕后,定期洒水养生。","SoundPath":"Clip_26","StartClipPath":"","ClipPath":"TimeLine1_5_7","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":1,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":28,"ModuleName":"管棚安装施工","SubModuleName":"","ModelSpriteName":"Sprites/GPAZSG","Operation":"","TipSoundText":"","SpriteName":"","ToolName":"","TaskText":"“欢迎进入管棚安装施工实训任务”","SoundText":"","SoundPath":"","StartClipPath":"","ClipPath":"TimeLine2","ModelPath":"","IsConfirm":"Y","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":2,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":29,"ModuleName":"管棚安装施工","SubModuleName":"施工准备","ModelSpriteName":"","Operation":"","TipSoundText":"","SpriteName":"","ToolName":"","TaskText":"管棚安装施工,是拟开挖的地下隧道,或结构工程的衬砌拱圈,隐埋弧线上,预先钻孔,并安设惯性力矩较大的厚壁钢管,起临时超前支护作用,防止土层坍塌和地表下沉,以保证掘进与后续支护工艺安全运作。","SoundText":"管棚安装施工,是拟开挖的地下隧道,或结构工程的衬砌拱圈,隐埋弧线上,预先钻孔,并安设惯性力矩较大的厚壁钢管,起临时超前支护作用,防止土层坍塌和地表下沉,以保证掘进与后续支护工艺安全运作。","SoundPath":"Clip_27","StartClipPath":"","ClipPath":"TimeLine2_1_1","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":2,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":30,"ModuleName":"管棚安装施工","SubModuleName":"施工准备","ModelSpriteName":"","Operation":"佩戴安全帽","TipSoundText":"获取“安全帽”,完成佩戴安全帽任务","SpriteName":"Sprites/anquanmao","ToolName":"安全帽","TaskText":"1.施工准备\n进入施工现场必须佩戴安全帽。","SoundText":"进入施工现场必须佩戴安全帽。","SoundPath":"Clip_2","StartClipPath":"","ClipPath":"TimeLine2_1_2","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game30","ModuleID":2,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":31,"ModuleName":"管棚安装施工","SubModuleName":"施工准备","ModelSpriteName":"","Operation":"钻机展示","TipSoundText":"获取“潜孔钻机”,完成钻机认知任务","SpriteName":"Sprites/qiankongzuanji","ToolName":"潜孔钻机","TaskText":"1.施工准备\n钻孔施工一般采用履带式潜孔钻机,或螺旋钻机。","SoundText":"钻孔施工,一般采用履带式潜孔钻机,或螺旋钻机。","SoundPath":"Clip_29","StartClipPath":"","ClipPath":"TimeLine2_1_3","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":2,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":32,"ModuleName":"管棚安装施工","SubModuleName":"施工准备","ModelSpriteName":"","Operation":"管棚钢管展示","TipSoundText":"获取“管棚钢管”,完成管棚认知任务","SpriteName":"Sprites/guanpenggangguan","ToolName":"管棚钢管","TaskText":"1.施工准备\n超前管棚支护的钢管,外径宜为Φ70~Φ127毫米。本隧道超前大管棚采用热轧无缝钢管Φ108mm制作","SoundText":"超前管棚支护的钢管,外径宜为70到127毫米。本隧道的超前大管棚,采用直径108毫米,热轧无缝花钢管制作。","SoundPath":"Clip_30","StartClipPath":"","ClipPath":"TimeLine2_1_4","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":2,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":33,"ModuleName":"管棚安装施工","SubModuleName":"施工准备","ModelSpriteName":"","Operation":"空压机展示","TipSoundText":"获取“空压机”,完成空压机认知任务","SpriteName":"Sprites/kongyaji","ToolName":"空压机","TaskText":"","SoundText":"","SoundPath":"Clip_31","StartClipPath":"","ClipPath":"TimeLine2_1_5","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":2,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":34,"ModuleName":"管棚安装施工","SubModuleName":"施工准备","ModelSpriteName":"","Operation":"全站仪安装","TipSoundText":"获取“全站仪”,完成全站仪安装任务。","SpriteName":"Sprites/quanzhanyi","ToolName":"全站仪","TaskText":"1.施工准备\n钻孔前,测量复核钻孔位置,及开挖断面轮廓线。","SoundText":"钻孔前,测量复核钻孔位置,及开挖断面轮廓线。","SoundPath":"Clip_32","StartClipPath":"","ClipPath":"TimeLine2_1_6","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":2,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":35,"ModuleName":"管棚安装施工","SubModuleName":"施工准备","ModelSpriteName":"","Operation":"测量复核","TipSoundText":"获取“全站仪”,完成复测开挖轮廓线任务","SpriteName":"Sprites/quanzhanyi","ToolName":"全站仪","TaskText":"1.施工准备\n用红色喷漆,标记测量放样点位,并画出开挖轮廓线。","SoundText":"用红色喷漆,标记测量放样点位,并画出开挖轮廓线。","SoundPath":"Clip_4","StartClipPath":"","ClipPath":"TimeLine2_1_7","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game35","ModuleID":2,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":36,"ModuleName":"管棚安装施工","SubModuleName":"钻机就位","ModelSpriteName":"","Operation":"钻机就位","TipSoundText":"获取“潜孔钻机”,完成潜孔钻机安装任务","SpriteName":"Sprites/qiankongzuanji","ToolName":"潜孔钻机","TaskText":"2.钻机就位\n围岩破碎、钻进难以成孔时,可采用跟管钻孔工艺施工,钻孔直径大于钢管直径20-30mm。","SoundText":"围岩破碎、钻进难以成孔时,可采用跟管钻孔工艺施工,钻孔直径大于钢管直径20到30毫米。","SoundPath":"Clip_34","StartClipPath":"","ClipPath":"TimeLine2_2_1","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game36","ModuleID":2,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":37,"ModuleName":"管棚安装施工","SubModuleName":"钻孔","ModelSpriteName":"","Operation":"钻孔顺序","TipSoundText":"获取“潜孔钻机”,完成钻孔顺序认知任务","SpriteName":"Sprites/qiankongzuanji","ToolName":"潜孔钻机","TaskText":"3.钻孔\n钻孔由高孔位向低孔位进行,跳孔施工。","SoundText":"钻孔由高孔位向低孔位进行,跳孔施工。","SoundPath":"Clip_35","StartClipPath":"","ClipPath":"TimeLine2_3_1","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":2,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":38,"ModuleName":"管棚安装施工","SubModuleName":"钻孔","ModelSpriteName":"","Operation":"钻孔","TipSoundText":"获取“潜孔钻机”,完成成孔任务","SpriteName":"Sprites/qiankongzuanji","ToolName":"潜孔钻机","TaskText":"3.钻孔\n开孔时钻速要慢,压力要小,根据地层及钻进情况,随时调整钻压及钻速,以保证成孔精度。","SoundText":"开孔时钻速要慢,压力要小,根据地层及钻进情况,随时调整钻压及钻速,以保证成孔精度。","SoundPath":"Clip_36","StartClipPath":"","ClipPath":"TimeLine2_3_2","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game38","ModuleID":2,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":39,"ModuleName":"管棚安装施工","SubModuleName":"钻孔","ModelSpriteName":"","Operation":"清孔","TipSoundText":"获取“空压机”,完成清孔任务","SpriteName":"Sprites/kongyaji","ToolName":"空压机","TaskText":"3.钻孔\n清孔验孔时,用地质岩芯钻杆配合钻头进行反复扫孔,清除浮渣,确保孔径、孔深符合要求,防止堵孔。\n用高压风,从孔底向孔口清理钻渣。","SoundText":"清孔验孔时,用地质岩芯钻杆配合钻头进行反复扫孔,清除浮渣,确保孔径、孔深符合要求,防止堵孔。\n用高压风,从孔底向孔口清理钻渣。","SoundPath":"Clip_37","StartClipPath":"","ClipPath":"TimeLine2_3_3","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game39","ModuleID":2,"IsHaveTwoInteraction":"Y","InputTwoGameName":"Game39_1"},{"id":40,"ModuleName":"管棚安装施工","SubModuleName":"安装钢管","ModelSpriteName":"","Operation":"管棚钢管安装1","TipSoundText":"获取“管棚钢管”,完成首节管棚钢管安装任务","SpriteName":"Sprites/guanpenggangguan","ToolName":"管棚钢管","TaskText":"4.安装钢管\n为防止塌孔,每钻完一孔便顶进一根管棚钢管,管棚钢管宜分节连接顶入钻孔。可采用人工顶入,或者机械辅助顶入,本隧道管棚钢管,设计节长包括,4m和6m两种。","SoundText":"为防止塌孔,每钻完一孔便顶进一根管棚钢管,管棚钢管宜分节连接顶入钻孔。可采用人工顶入,或者机械辅助顶入,本隧道管棚钢管,设计节长包括,4m和6m两种。","SoundPath":"Clip_38","StartClipPath":"","ClipPath":"TimeLine2_4_1","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":2,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":41,"ModuleName":"管棚安装施工","SubModuleName":"安装钢管","ModelSpriteName":"","Operation":"管棚钢管安装2","TipSoundText":"获取“管棚钢管”,完成管棚钢管连接及安装任务","SpriteName":"Sprites/guanpenggangguan","ToolName":"管棚钢管","TaskText":"4.安装钢管\n各节段间应采用丝扣连接或套管焊接连接,本隧道管棚接头采用丝扣连接,丝扣长度15cm,管棚应至少5cm外露于套拱。","SoundText":"各节段间应采用丝扣连接或套管焊接连接,本隧道管棚接头采用丝扣连接,丝扣长度15cm,管棚应至少5cm外露于套拱。","SoundPath":"Clip_39","StartClipPath":"","ClipPath":"TimeLine2_4_2","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":2,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":42,"ModuleName":"管棚安装施工","SubModuleName":"安装钢管","ModelSpriteName":"","Operation":"管棚钢管安装3","TipSoundText":"获取“管棚钢管”,完成其余管棚钢管安装任务","SpriteName":"Sprites/guanpenggangguan","ToolName":"管棚钢管","TaskText":"4.安装钢管\n管棚钻孔应跳孔实施。","SoundText":"管棚钻孔应跳孔实施","SoundPath":"Clip_40","StartClipPath":"","ClipPath":"TimeLine2_4_3","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":2,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":43,"ModuleName":"管棚安装施工","SubModuleName":"安装钢管","ModelSpriteName":"","Operation":"管棚钢管安装4","TipSoundText":"获取“管棚钢管”,完成管棚接头认知任务","SpriteName":"Sprites/guanpenggangguan","ToolName":"管棚钢管","TaskText":"4.安装钢管\n同一断面接头不得超过50%。","SoundText":"同一断面接头不得超过50%,","SoundPath":"Clip_41","StartClipPath":"","ClipPath":"TimeLine2_4_4","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":2,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":44,"ModuleName":"管棚安装施工","SubModuleName":"安装钢管","ModelSpriteName":"","Operation":"安装钢筋笼","TipSoundText":"获取“钢筋笼”,完成钢筋笼安装任务","SpriteName":"Sprites/gangjinlong","ToolName":"钢筋笼","TaskText":"4.安装钢管\n管棚钢管就位后,应插入钢筋笼,钢筋笼采用焊接连接。","SoundText":"管棚钢管就位后,应插入钢筋笼,钢筋笼采用焊接连接。","SoundPath":"Clip_42","StartClipPath":"","ClipPath":"TimeLine2_4_5","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":2,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":45,"ModuleName":"管棚注浆施工","SubModuleName":"","ModelSpriteName":"Sprites/GPZJSG","Operation":"","TipSoundText":"","SpriteName":"","ToolName":"","TaskText":"“欢迎进入管棚注浆施工实训任务”","SoundText":"","SoundPath":"","StartClipPath":"","ClipPath":"TimeLine3","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":3,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":46,"ModuleName":"管棚注浆施工","SubModuleName":"高压风清管","ModelSpriteName":"","Operation":"清孔","TipSoundText":"获取“高压风机”,完成高压风清管任务","SpriteName":"Sprites/gaoyafengji","ToolName":"高压风机","TaskText":"1.高压风清管\n钢管顶进完成后,用高压风进行清管,确保注浆管路畅通。","SoundText":"钢管顶进完成后,用高压风进行清管,确保注浆管路畅通。","SoundPath":"Clip_43","StartClipPath":"","ClipPath":"TimeLine3_1_1","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game46","ModuleID":3,"IsHaveTwoInteraction":"N","InputTwoGameName":"Game46_1"},{"id":47,"ModuleName":"管棚注浆施工","SubModuleName":"焊接注浆导管","ModelSpriteName":"","Operation":"安装止浆塞","TipSoundText":"获取“止浆塞”,完成砂浆止浆塞施工任务","SpriteName":"Sprites/zhijiangsai","ToolName":"止浆塞","TaskText":"2.焊接注浆导管\n管棚和孔口空隙进行砂浆封闭,排气管采用阀门启闭。","SoundText":"管棚和孔口空隙进行砂浆封闭,排气管采用阀门启闭。","SoundPath":"Clip_44","StartClipPath":"","ClipPath":"TimeLine3_2_1","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game47","ModuleID":3,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":48,"ModuleName":"管棚注浆施工","SubModuleName":"焊接注浆导管","ModelSpriteName":"","Operation":"焊接","TipSoundText":"获取“钢板”,完成大管棚堵口钢板安装焊接任务","SpriteName":"Sprites/gangban","ToolName":"钢板","TaskText":"2.焊接注浆导管\n钢管的管口采用钢板封堵,并焊接注浆导管。","SoundText":"钢管的管口,采用钢板封堵,并焊接牢固。","SoundPath":"Clip_45","StartClipPath":"","ClipPath":"TimeLine3_2_2","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game48","ModuleID":3,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":49,"ModuleName":"管棚注浆施工","SubModuleName":"焊接注浆导管","ModelSpriteName":"","Operation":"安装注浆导管","TipSoundText":"获取“注浆导管”,完成注浆导管阀门安装焊接任务","SpriteName":"Sprites/zhujiangdaoguan","ToolName":"注浆导管","TaskText":"2.焊接注浆导管\n注浆导管采用阀门启闭。","SoundText":"注浆导管采用阀门启闭。","SoundPath":"Clip_46","StartClipPath":"","ClipPath":"TimeLine3_2_3","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game49","ModuleID":3,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":50,"ModuleName":"管棚注浆施工","SubModuleName":"注浆","ModelSpriteName":"","Operation":"安装注浆机","TipSoundText":"获取“注浆机”,完成注浆机认知任务","SpriteName":"Sprites/zhujiangji","ToolName":"注浆机","TaskText":"","SoundText":"","SoundPath":"Clip_47","StartClipPath":"","ClipPath":"TimeLine3_3_1","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":3,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":51,"ModuleName":"管棚注浆施工","SubModuleName":"注浆","ModelSpriteName":"","Operation":"安装注浆管道","TipSoundText":"获取“注浆管道”,完成注浆管道安装任务","SpriteName":"Sprites/zhujiangguandao","ToolName":"注浆管道","TaskText":"3.注浆\n请连接注浆管道。","SoundText":"","SoundPath":"Clip_48","StartClipPath":"","ClipPath":"TimeLine3_3_2","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game51","ModuleID":3,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":52,"ModuleName":"管棚注浆施工","SubModuleName":"注浆","ModelSpriteName":"","Operation":"浆液制备","TipSoundText":"获取“注浆机”,完成注浆浆液拌制任务","SpriteName":"Sprites/zhujiangji","ToolName":"注浆机","TaskText":"3.注浆\n本隧道注浆设计采用水泥浆,水灰比为0.5:1,可添加早强剂,浆液拌制要均匀具有一定的流动性和粘稠度。","SoundText":"本隧道注浆设计采用水泥浆,水灰比为0.5:1,可添加早强剂,浆液拌制要均匀具有一定的流动性和粘稠度。","SoundPath":"Clip_49","StartClipPath":"","ClipPath":"TimeLine3_3_3","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game52","ModuleID":3,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":53,"ModuleName":"管棚注浆施工","SubModuleName":"注浆","ModelSpriteName":"","Operation":"注浆1","TipSoundText":"获取“注浆机”,完成大管棚注浆任务","SpriteName":"Sprites/zhujiangji","ToolName":"注浆机","TaskText":"3.注浆\n注浆顺序可由两端开始,向顶部推进,也可以间隔注浆,先注单号孔,再注双号孔,每根钢管应一次连续注满砂浆。","SoundText":"注浆顺序可由两端开始,向顶部推进,也可以间隔注浆,先注单号孔,再注双号孔,每根钢管应一次连续注满砂浆。","SoundPath":"Clip_50","StartClipPath":"","ClipPath":"TimeLine3_3_4","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":3,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":54,"ModuleName":"管棚注浆施工","SubModuleName":"注浆","ModelSpriteName":"","Operation":"注浆2","TipSoundText":"获取“压力表”,完成注浆压力控制任务","SpriteName":"Sprites/yalibiao","ToolName":"压力表","TaskText":"3.注浆\n注浆压力:0.5~1MPa,施工中根据现场情况,确实必要时,可加大至2MPa。","SoundText":"注浆压力:0.5~1MPa,施工中根据现场情况,确实必要时,可加大至2MPa。","SoundPath":"Clip_51","StartClipPath":"","ClipPath":"TimeLine3_3_5","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game54","ModuleID":3,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":55,"ModuleName":"管棚注浆施工","SubModuleName":"注浆","ModelSpriteName":"","Operation":"拆除注浆设备","TipSoundText":"获取“气割枪”,完成大管棚封堵钢板拆除任务","SpriteName":"Sprites/qigeqiang","ToolName":"气割枪","TaskText":"3.注浆\n注浆后,排除管内的胶凝浆液,用泥砂浆紧密充填,增加钢管的刚度和强度。","SoundText":"注浆后,排除管内的胶凝浆液,用泥沙浆紧密充填,增加钢管的刚度和强度。","SoundPath":"Clip_52","StartClipPath":"","ClipPath":"TimeLine3_3_6","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"Y","InputGameName":"Game55","ModuleID":3,"IsHaveTwoInteraction":"N","InputTwoGameName":""},{"id":56,"ModuleName":"管棚注浆施工","SubModuleName":"注浆效果检查","ModelSpriteName":"","Operation":"质检","TipSoundText":"获取“注浆检查”,完成注浆效果检查任务","SpriteName":"Sprites/zhujiangjianchabiao","ToolName":"注浆检查","TaskText":"4.注浆效果检查\n注浆完成后,对注浆效果进行检验,检查合格后,当浆体强度达到70%时,可进行下道工序施工","SoundText":"注浆完成后,对注浆效果进行检验,检查合格后,当浆体强度达到70%时,可进行下道工序施工","SoundPath":"Clip_53","StartClipPath":"","ClipPath":"TimeLine3_4_1","ModelPath":"","IsConfirm":"N","MapGroup":0,"isHaveInteraction":"N","InputGameName":"","ModuleID":3,"IsHaveTwoInteraction":"N","InputTwoGameName":""}] diff --git a/Assets/Resources/ExcelData/ExcelToJson/LiaoNingJiaoZhuanData.json.meta b/Assets/Resources/ExcelData/ExcelToJson/LiaoNingJiaoZhuanData.json.meta new file mode 100644 index 0000000..cc8d1db --- /dev/null +++ b/Assets/Resources/ExcelData/ExcelToJson/LiaoNingJiaoZhuanData.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 914a8f0978cdcd546af997837acea74a +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/ExcelToJson/ModuleIDData.json b/Assets/Resources/ExcelData/ExcelToJson/ModuleIDData.json new file mode 100644 index 0000000..5b54695 --- /dev/null +++ b/Assets/Resources/ExcelData/ExcelToJson/ModuleIDData.json @@ -0,0 +1 @@ +[{"id":1,"LiuLan":"浏览模式","ShiXun":"实训模式","KaoHe":"考核模式"},{"id":2,"LiuLan":"浏览模式","ShiXun":"实训模式","KaoHe":"考核模式"},{"id":3,"LiuLan":"浏览模式","ShiXun":"实训模式","KaoHe":"考核模式"}] diff --git a/Assets/Resources/ExcelData/ExcelToJson/ModuleIDData.json.meta b/Assets/Resources/ExcelData/ExcelToJson/ModuleIDData.json.meta new file mode 100644 index 0000000..2223eb7 --- /dev/null +++ b/Assets/Resources/ExcelData/ExcelToJson/ModuleIDData.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 64d21b9451df9d849af45d34a099ba8a +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/ExcelToJson/OrderDragData.json b/Assets/Resources/ExcelData/ExcelToJson/OrderDragData.json new file mode 100644 index 0000000..9e383e7 --- /dev/null +++ b/Assets/Resources/ExcelData/ExcelToJson/OrderDragData.json @@ -0,0 +1 @@ +[{"id":1,"orderID":0,"dragGameName":"椅足|椅足1"},{"id":2,"orderID":1,"dragGameName":"轴钉"},{"id":3,"orderID":2,"dragGameName":"踏床|踏床1|踏床2|踏床3"},{"id":4,"orderID":3,"dragGameName":"软屉|软屉1|软屉2"},{"id":5,"orderID":4,"dragGameName":"角牙"},{"id":6,"orderID":5,"dragGameName":"靠背板"},{"id":7,"orderID":6,"dragGameName":"椅圈|椅圈1|椅圈2|椅圈3|椅圈4|椅圈5|椅圈6"}] diff --git a/Assets/Resources/ExcelData/ExcelToJson/OrderDragData.json.meta b/Assets/Resources/ExcelData/ExcelToJson/OrderDragData.json.meta new file mode 100644 index 0000000..1fbe0a5 --- /dev/null +++ b/Assets/Resources/ExcelData/ExcelToJson/OrderDragData.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6c489e91e850aab4f9510f5faac758b9 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/ExcelToJson/Question.json b/Assets/Resources/ExcelData/ExcelToJson/Question.json new file mode 100644 index 0000000..a018faa --- /dev/null +++ b/Assets/Resources/ExcelData/ExcelToJson/Question.json @@ -0,0 +1 @@ +[{"id":1,"question":"请问一加一等于几","optionsA":"1","optionsB":"2","optionsC":"3","optionsD":"4","answer":"B","score":20},{"id":2,"question":"2+2=","optionsA":"2","optionsB":"3","optionsC":"4","optionsD":"5","answer":"C","score":20},{"id":3,"question":"3+3=","optionsA":"3","optionsB":"4","optionsC":"5","optionsD":"6","answer":"D","score":20}] diff --git a/Assets/Resources/ExcelData/ExcelToJson/Question.json.meta b/Assets/Resources/ExcelData/ExcelToJson/Question.json.meta new file mode 100644 index 0000000..481bae8 --- /dev/null +++ b/Assets/Resources/ExcelData/ExcelToJson/Question.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ab06a78a0b3289f49b4c51c6ecf98b60 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ExcelData/ExcelToJson/ShowJieGou.json b/Assets/Resources/ExcelData/ExcelToJson/ShowJieGou.json new file mode 100644 index 0000000..d081648 --- /dev/null +++ b/Assets/Resources/ExcelData/ExcelToJson/ShowJieGou.json @@ -0,0 +1 @@ +[{"id":0,"Name":"椅足","Show":"“椅足”,交椅的腿足,可两两相交且可折叠。"},{"id":1,"Name":"椅足1","Show":""},{"id":2,"Name":"轴钉","Show":"轴钉是圈背交椅拼装中非常关键的小部件。它通常是一种金属圆柱体,一般由不锈钢或铜等材质制成。其直径根据交椅的具体设计和承载要求而定,长度也会因连接部件的厚度而有所不同。"},{"id":3,"Name":"踏床","Show":"“踏床”,又称“脚踏”,是由设在正面两椅足之间的面板以及面板下的牙子构成。踏床面板上常有铜饰件装饰。面板两端有探出的圆轴,可插入足端的卯眼中,这样踏床就可以被折起。"},{"id":4,"Name":"踏床1","Show":""},{"id":5,"Name":"踏床2","Show":""},{"id":6,"Name":"踏床3","Show":""},{"id":7,"Name":"软屉","Show":"“椅面”,交椅椅面的构造与交杌的杌面相同,一般由横材与藤芯软屉构成。"},{"id":8,"Name":"软屉1","Show":""},{"id":9,"Name":"软屉2","Show":""},{"id":10,"Name":"角牙","Show":"“角牙”,又称“托角牙子”,是指家具在横材与竖材的连接处,为了起到加固和装饰的作用,常在交角部位安装各种各样的角花板、短木条、短木片等,形成三角形或带转角的部件。"},{"id":11,"Name":"靠背板","Show":"“靠背板”,如图所示,呈微“S”形,能与人体后背贴合,以供靠背休息,故称“靠背板”。“椅圈”、“靠背板”的存在,充分体现了古代工匠在制作家具之时,早已有人体工程力学的思想智慧,并运用到家具的造型设计上,只是当时没有系统化的记载。"},{"id":12,"Name":"椅圈","Show":"“椅圈”,又称“月牙扶手”,搭脑两侧向前下方延伸顺势与扶手融合成独具特色的圆弧形,一般是三接或五接而成。靠着圆弧形的椅圈,双手自然搭在扶手上,可让背部与手同时得到放松,因此,椅圈的设计不仅具有美观的作用,而且具有非常强的使用功能。"},{"id":13,"Name":"椅圈1","Show":""},{"id":14,"Name":"椅圈2","Show":""},{"id":15,"Name":"椅圈3","Show":""},{"id":16,"Name":"椅圈4","Show":""},{"id":17,"Name":"椅圈5","Show":""},{"id":18,"Name":"椅圈6","Show":""}] diff --git a/Assets/Resources/ExcelData/ExcelToJson/ShowJieGou.json.meta b/Assets/Resources/ExcelData/ExcelToJson/ShowJieGou.json.meta new file mode 100644 index 0000000..2899dca --- /dev/null +++ b/Assets/Resources/ExcelData/ExcelToJson/ShowJieGou.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a7c134da1c773d94b8f9d303f81a4d4f +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Prefabs.meta b/Assets/Resources/Prefabs.meta new file mode 100644 index 0000000..2c9b935 --- /dev/null +++ b/Assets/Resources/Prefabs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 21f07ae4ca54f17409754a7f96e814f8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Prefabs/Model.meta b/Assets/Resources/Prefabs/Model.meta new file mode 100644 index 0000000..eab05bb --- /dev/null +++ b/Assets/Resources/Prefabs/Model.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 19a98ac5251e4964da535833a7fa1db2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Prefabs/Model/jiegouBT.prefab b/Assets/Resources/Prefabs/Model/jiegouBT.prefab new file mode 100644 index 0000000..6180465 --- /dev/null +++ b/Assets/Resources/Prefabs/Model/jiegouBT.prefab @@ -0,0 +1,219 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3937620159520884394 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4154114186214435476} + - component: {fileID: 6262236949395340979} + - component: {fileID: 3360409065351029047} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4154114186214435476 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3937620159520884394} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1607187636406290499} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0.0000038147} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6262236949395340979 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3937620159520884394} + m_CullTransparentMesh: 1 +--- !u!114 &3360409065351029047 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3937620159520884394} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 21265469b279cb84194f7931d3e91a85, type: 3} + m_FontSize: 18 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: "\u7AD6\u5411\u9F99\u9AA8\r" +--- !u!1 &7783774542781961396 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1607187636406290499} + - component: {fileID: 1985417550614754191} + - component: {fileID: 4757565590709140257} + - component: {fileID: 4817157577181152020} + - component: {fileID: 291006323258143189} + m_Layer: 5 + m_Name: jiegouBT + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1607187636406290499 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7783774542781961396} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4154114186214435476} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 150, y: 60} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1985417550614754191 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7783774542781961396} + m_CullTransparentMesh: 1 +--- !u!114 &4757565590709140257 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7783774542781961396} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 5ef58ae8b5ff799439199a17391ae280, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &4817157577181152020 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7783774542781961396} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 4757565590709140257} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &291006323258143189 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7783774542781961396} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59acf856d63f9a84d90f4cf018c4fb2a, type: 3} + m_Name: + m_EditorClassIdentifier: + pos: {fileID: 0} + cam: {fileID: 0} diff --git a/Assets/Resources/Prefabs/Model/jiegouBT.prefab.meta b/Assets/Resources/Prefabs/Model/jiegouBT.prefab.meta new file mode 100644 index 0000000..732b2d3 --- /dev/null +++ b/Assets/Resources/Prefabs/Model/jiegouBT.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 38769bae43b0ec34484bd461331d930e +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI.meta b/Assets/Resources/UI.meta new file mode 100644 index 0000000..8e700aa --- /dev/null +++ b/Assets/Resources/UI.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 383d8186754ad14468b77dd0e2ddea9c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI/True.png b/Assets/Resources/UI/True.png new file mode 100644 index 0000000..dd3f9af Binary files /dev/null and b/Assets/Resources/UI/True.png differ diff --git a/Assets/Resources/UI/True.png.meta b/Assets/Resources/UI/True.png.meta new file mode 100644 index 0000000..fff262b --- /dev/null +++ b/Assets/Resources/UI/True.png.meta @@ -0,0 +1,146 @@ +fileFormatVersion: 2 +guid: 64f65c6f9a6f95e43838069b57888795 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI/false.png b/Assets/Resources/UI/false.png new file mode 100644 index 0000000..1c8d991 Binary files /dev/null and b/Assets/Resources/UI/false.png differ diff --git a/Assets/Resources/UI/false.png.meta b/Assets/Resources/UI/false.png.meta new file mode 100644 index 0000000..8485236 --- /dev/null +++ b/Assets/Resources/UI/false.png.meta @@ -0,0 +1,146 @@ +fileFormatVersion: 2 +guid: 796703dfdf18ffc44a2b055d7f335b37 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI/椅圈.png b/Assets/Resources/UI/椅圈.png new file mode 100644 index 0000000..f9b7ad8 Binary files /dev/null and b/Assets/Resources/UI/椅圈.png differ diff --git a/Assets/Resources/UI/椅圈.png.meta b/Assets/Resources/UI/椅圈.png.meta new file mode 100644 index 0000000..9fc4cb3 --- /dev/null +++ b/Assets/Resources/UI/椅圈.png.meta @@ -0,0 +1,146 @@ +fileFormatVersion: 2 +guid: 24d8bd0f99117a14daea19549691766d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI/椅足.png b/Assets/Resources/UI/椅足.png new file mode 100644 index 0000000..9c27992 Binary files /dev/null and b/Assets/Resources/UI/椅足.png differ diff --git a/Assets/Resources/UI/椅足.png.meta b/Assets/Resources/UI/椅足.png.meta new file mode 100644 index 0000000..7a3aa3a --- /dev/null +++ b/Assets/Resources/UI/椅足.png.meta @@ -0,0 +1,146 @@ +fileFormatVersion: 2 +guid: 33afddde00e02c54499a751e49b53a05 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI/角牙.png b/Assets/Resources/UI/角牙.png new file mode 100644 index 0000000..b3cdbad Binary files /dev/null and b/Assets/Resources/UI/角牙.png differ diff --git a/Assets/Resources/UI/角牙.png.meta b/Assets/Resources/UI/角牙.png.meta new file mode 100644 index 0000000..36d6f01 --- /dev/null +++ b/Assets/Resources/UI/角牙.png.meta @@ -0,0 +1,146 @@ +fileFormatVersion: 2 +guid: fde51ef65ceba7545ba3eb511d696571 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI/踏床.png b/Assets/Resources/UI/踏床.png new file mode 100644 index 0000000..6d9c703 Binary files /dev/null and b/Assets/Resources/UI/踏床.png differ diff --git a/Assets/Resources/UI/踏床.png.meta b/Assets/Resources/UI/踏床.png.meta new file mode 100644 index 0000000..67ecae2 --- /dev/null +++ b/Assets/Resources/UI/踏床.png.meta @@ -0,0 +1,146 @@ +fileFormatVersion: 2 +guid: b3eaedd1809c70e43bf923e9e67b8640 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI/软屉.png b/Assets/Resources/UI/软屉.png new file mode 100644 index 0000000..f82c8f3 Binary files /dev/null and b/Assets/Resources/UI/软屉.png differ diff --git a/Assets/Resources/UI/软屉.png.meta b/Assets/Resources/UI/软屉.png.meta new file mode 100644 index 0000000..1339369 --- /dev/null +++ b/Assets/Resources/UI/软屉.png.meta @@ -0,0 +1,146 @@ +fileFormatVersion: 2 +guid: f333fe5b45afddf40b1cc9d361120de7 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI/轴钉.png b/Assets/Resources/UI/轴钉.png new file mode 100644 index 0000000..98c543d Binary files /dev/null and b/Assets/Resources/UI/轴钉.png differ diff --git a/Assets/Resources/UI/轴钉.png.meta b/Assets/Resources/UI/轴钉.png.meta new file mode 100644 index 0000000..a4f4e6e --- /dev/null +++ b/Assets/Resources/UI/轴钉.png.meta @@ -0,0 +1,146 @@ +fileFormatVersion: 2 +guid: 5d029cad8ca01d346957cb06a38d2529 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI/靠背板.png b/Assets/Resources/UI/靠背板.png new file mode 100644 index 0000000..d8be88a Binary files /dev/null and b/Assets/Resources/UI/靠背板.png differ diff --git a/Assets/Resources/UI/靠背板.png.meta b/Assets/Resources/UI/靠背板.png.meta new file mode 100644 index 0000000..c2f62e0 --- /dev/null +++ b/Assets/Resources/UI/靠背板.png.meta @@ -0,0 +1,146 @@ +fileFormatVersion: 2 +guid: 6ffd4a5b025510e499743170b3b516cf +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Settings.meta b/Assets/Settings.meta new file mode 100644 index 0000000..39b94dd --- /dev/null +++ b/Assets/Settings.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 709f11a7f3c4041caa4ef136ea32d874 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Settings/SampleSceneProfile.asset b/Assets/Settings/SampleSceneProfile.asset new file mode 100644 index 0000000..37e401d --- /dev/null +++ b/Assets/Settings/SampleSceneProfile.asset @@ -0,0 +1,123 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-7893295128165547882 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0b2db86121404754db890f4c8dfe81b2, type: 3} + m_Name: Bloom + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + threshold: + m_OverrideState: 1 + m_Value: 1 + min: 0 + intensity: + m_OverrideState: 1 + m_Value: 1 + min: 0 + scatter: + m_OverrideState: 0 + m_Value: 0.7 + min: 0 + max: 1 + clamp: + m_OverrideState: 0 + m_Value: 65472 + min: 0 + tint: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + hdr: 0 + showAlpha: 0 + showEyeDropper: 1 + highQualityFiltering: + m_OverrideState: 0 + m_Value: 0 + skipIterations: + m_OverrideState: 0 + m_Value: 1 + min: 0 + max: 16 + dirtTexture: + m_OverrideState: 0 + m_Value: {fileID: 0} + dirtIntensity: + m_OverrideState: 0 + m_Value: 0 + min: 0 +--- !u!114 &-7011558710299706105 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 899c54efeace73346a0a16faa3afe726, type: 3} + m_Name: Vignette + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + color: + m_OverrideState: 0 + m_Value: {r: 0, g: 0, b: 0, a: 1} + hdr: 0 + showAlpha: 0 + showEyeDropper: 1 + center: + m_OverrideState: 0 + m_Value: {x: 0.5, y: 0.5} + intensity: + m_OverrideState: 1 + m_Value: 0.25 + min: 0 + max: 1 + smoothness: + m_OverrideState: 1 + m_Value: 0.4 + min: 0.01 + max: 1 + rounded: + m_OverrideState: 0 + m_Value: 0 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} + m_Name: SampleSceneProfile + m_EditorClassIdentifier: + components: + - {fileID: 849379129802519247} + - {fileID: -7893295128165547882} + - {fileID: -7011558710299706105} +--- !u!114 &849379129802519247 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97c23e3b12dc18c42a140437e53d3951, type: 3} + m_Name: Tonemapping + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + mode: + m_OverrideState: 1 + m_Value: 1 diff --git a/Assets/Settings/SampleSceneProfile.asset.meta b/Assets/Settings/SampleSceneProfile.asset.meta new file mode 100644 index 0000000..f8cce64 --- /dev/null +++ b/Assets/Settings/SampleSceneProfile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a6560a915ef98420e9faacc1c7438823 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Settings/URP-Balanced-Renderer.asset b/Assets/Settings/URP-Balanced-Renderer.asset new file mode 100644 index 0000000..e946432 --- /dev/null +++ b/Assets/Settings/URP-Balanced-Renderer.asset @@ -0,0 +1,81 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-1878332245247344467 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f62c9c65cf3354c93be831c8bc075510, type: 3} + m_Name: SSAO + m_EditorClassIdentifier: + m_Active: 1 + m_Shader: {fileID: 4800000, guid: 0849e84e3d62649e8882e9d6f056a017, type: 3} + m_Settings: + Downsample: 1 + AfterOpaque: 0 + Source: 0 + NormalSamples: 0 + Intensity: 0.5 + DirectLightingStrength: 0.25 + Radius: 0.25 + SampleCount: 4 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} + m_Name: URP-Balanced-Renderer + m_EditorClassIdentifier: + debugShaders: + debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, + type: 3} + m_RendererFeatures: + - {fileID: -1878332245247344467} + m_RendererFeatureMap: adc0de57c6d2eee5 + m_UseNativeRenderPass: 0 + postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} + shaders: + blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} + copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} + screenSpaceShadowPS: {fileID: 0} + samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} + stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} + fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} + materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} + coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3} + coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, + type: 3} + cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, + type: 3} + objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, + type: 3} + m_AssetVersion: 1 + m_OpaqueLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_TransparentLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_DefaultStencilState: + overrideStencilState: 0 + stencilReference: 0 + stencilCompareFunction: 8 + passOperation: 2 + failOperation: 0 + zFailOperation: 0 + m_ShadowTransparentReceive: 1 + m_RenderingMode: 0 + m_DepthPrimingMode: 1 + m_AccurateGbufferNormals: 0 + m_ClusteredRendering: 0 + m_TileSize: 32 + m_IntermediateTextureMode: 0 diff --git a/Assets/Settings/URP-Balanced-Renderer.asset.meta b/Assets/Settings/URP-Balanced-Renderer.asset.meta new file mode 100644 index 0000000..8fa7f17 --- /dev/null +++ b/Assets/Settings/URP-Balanced-Renderer.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e634585d5c4544dd297acaee93dc2beb +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Settings/URP-Balanced.asset b/Assets/Settings/URP-Balanced.asset new file mode 100644 index 0000000..a4c84ef --- /dev/null +++ b/Assets/Settings/URP-Balanced.asset @@ -0,0 +1,74 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} + m_Name: URP-Balanced + m_EditorClassIdentifier: + k_AssetVersion: 9 + k_AssetPreviousVersion: 9 + m_RendererType: 1 + m_RendererData: {fileID: 0} + m_RendererDataList: + - {fileID: 11400000, guid: e634585d5c4544dd297acaee93dc2beb, type: 2} + m_DefaultRendererIndex: 0 + m_RequireDepthTexture: 0 + m_RequireOpaqueTexture: 0 + m_OpaqueDownsampling: 1 + m_SupportsTerrainHoles: 1 + m_StoreActionsOptimization: 0 + m_SupportsHDR: 1 + m_MSAA: 1 + m_RenderScale: 1 + m_UpscalingFilter: 0 + m_FsrOverrideSharpness: 0 + m_FsrSharpness: 0.92 + m_MainLightRenderingMode: 1 + m_MainLightShadowsSupported: 1 + m_MainLightShadowmapResolution: 1024 + m_AdditionalLightsRenderingMode: 1 + m_AdditionalLightsPerObjectLimit: 2 + m_AdditionalLightShadowsSupported: 0 + m_AdditionalLightsShadowmapResolution: 512 + m_AdditionalLightsShadowResolutionTierLow: 128 + m_AdditionalLightsShadowResolutionTierMedium: 256 + m_AdditionalLightsShadowResolutionTierHigh: 512 + m_ReflectionProbeBlending: 0 + m_ReflectionProbeBoxProjection: 1 + m_ShadowDistance: 50 + m_ShadowCascadeCount: 1 + m_Cascade2Split: 0.25 + m_Cascade3Split: {x: 0.1, y: 0.3} + m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} + m_CascadeBorder: 0.1 + m_ShadowDepthBias: 1 + m_ShadowNormalBias: 1 + m_SoftShadowsSupported: 1 + m_ConservativeEnclosingSphere: 0 + m_NumIterationsEnclosingSphere: 64 + m_AdditionalLightsCookieResolution: 512 + m_AdditionalLightsCookieFormat: 1 + m_UseSRPBatcher: 1 + m_SupportsDynamicBatching: 0 + m_MixedLightingSupported: 1 + m_SupportsLightLayers: 0 + m_DebugLevel: 0 + m_UseAdaptivePerformance: 1 + m_ColorGradingMode: 0 + m_ColorGradingLutSize: 32 + m_UseFastSRGBLinearConversion: 0 + m_ShadowType: 1 + m_LocalShadowsSupported: 0 + m_LocalShadowsAtlasResolution: 256 + m_MaxPixelLights: 0 + m_ShadowAtlasResolution: 256 + m_ShaderVariantLogLevel: 0 + m_VolumeFrameworkUpdateMode: 0 + m_ShadowCascades: 0 diff --git a/Assets/Settings/URP-Balanced.asset.meta b/Assets/Settings/URP-Balanced.asset.meta new file mode 100644 index 0000000..f524db0 --- /dev/null +++ b/Assets/Settings/URP-Balanced.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e1260c1148f6143b28bae5ace5e9c5d1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Settings/URP-HighFidelity-Renderer.asset b/Assets/Settings/URP-HighFidelity-Renderer.asset new file mode 100644 index 0000000..473ab14 --- /dev/null +++ b/Assets/Settings/URP-HighFidelity-Renderer.asset @@ -0,0 +1,82 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-1878332245247344467 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f62c9c65cf3354c93be831c8bc075510, type: 3} + m_Name: SSAO + m_EditorClassIdentifier: + m_Active: 1 + m_Shader: {fileID: 4800000, guid: 0849e84e3d62649e8882e9d6f056a017, type: 3} + m_Settings: + Downsample: 0 + AfterOpaque: 0 + Source: 1 + NormalSamples: 1 + Intensity: 0.5 + DirectLightingStrength: 0.25 + Radius: 0.25 + SampleCount: 12 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} + m_Name: URP-HighFidelity-Renderer + m_EditorClassIdentifier: + debugShaders: + debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, + type: 3} + m_RendererFeatures: + - {fileID: -1878332245247344467} + m_RendererFeatureMap: adc0de57c6d2eee5 + m_UseNativeRenderPass: 0 + postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} + xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} + shaders: + blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} + copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} + screenSpaceShadowPS: {fileID: 0} + samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} + stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} + fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} + materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} + coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3} + coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, + type: 3} + cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, + type: 3} + objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, + type: 3} + m_AssetVersion: 1 + m_OpaqueLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_TransparentLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_DefaultStencilState: + overrideStencilState: 0 + stencilReference: 0 + stencilCompareFunction: 8 + passOperation: 2 + failOperation: 0 + zFailOperation: 0 + m_ShadowTransparentReceive: 1 + m_RenderingMode: 0 + m_DepthPrimingMode: 1 + m_AccurateGbufferNormals: 0 + m_ClusteredRendering: 0 + m_TileSize: 32 + m_IntermediateTextureMode: 0 diff --git a/Assets/Settings/URP-HighFidelity-Renderer.asset.meta b/Assets/Settings/URP-HighFidelity-Renderer.asset.meta new file mode 100644 index 0000000..bcdff02 --- /dev/null +++ b/Assets/Settings/URP-HighFidelity-Renderer.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c40be3174f62c4acf8c1216858c64956 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Settings/URP-HighFidelity.asset b/Assets/Settings/URP-HighFidelity.asset new file mode 100644 index 0000000..6248100 --- /dev/null +++ b/Assets/Settings/URP-HighFidelity.asset @@ -0,0 +1,69 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} + m_Name: URP-HighFidelity + m_EditorClassIdentifier: + k_AssetVersion: 9 + k_AssetPreviousVersion: 9 + m_RendererType: 1 + m_RendererData: {fileID: 0} + m_RendererDataList: + - {fileID: 11400000, guid: c40be3174f62c4acf8c1216858c64956, type: 2} + m_DefaultRendererIndex: 0 + m_RequireDepthTexture: 0 + m_RequireOpaqueTexture: 0 + m_OpaqueDownsampling: 1 + m_SupportsTerrainHoles: 1 + m_StoreActionsOptimization: 0 + m_SupportsHDR: 1 + m_MSAA: 4 + m_RenderScale: 1 + m_MainLightRenderingMode: 1 + m_MainLightShadowsSupported: 1 + m_MainLightShadowmapResolution: 4096 + m_AdditionalLightsRenderingMode: 1 + m_AdditionalLightsPerObjectLimit: 8 + m_AdditionalLightShadowsSupported: 1 + m_AdditionalLightsShadowmapResolution: 4096 + m_AdditionalLightsShadowResolutionTierLow: 128 + m_AdditionalLightsShadowResolutionTierMedium: 256 + m_AdditionalLightsShadowResolutionTierHigh: 512 + m_ReflectionProbeBlending: 1 + m_ReflectionProbeBoxProjection: 1 + m_ShadowDistance: 150 + m_ShadowCascadeCount: 4 + m_Cascade2Split: 0.25 + m_Cascade3Split: {x: 0.1, y: 0.3} + m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} + m_CascadeBorder: 0.1 + m_ShadowDepthBias: 1 + m_ShadowNormalBias: 1 + m_SoftShadowsSupported: 1 + m_AdditionalLightsCookieResolution: 4096 + m_AdditionalLightsCookieFormat: 4 + m_UseSRPBatcher: 1 + m_SupportsDynamicBatching: 0 + m_MixedLightingSupported: 1 + m_SupportsLightLayers: 0 + m_DebugLevel: 0 + m_UseAdaptivePerformance: 1 + m_ColorGradingMode: 0 + m_ColorGradingLutSize: 32 + m_UseFastSRGBLinearConversion: 0 + m_ShadowType: 1 + m_LocalShadowsSupported: 0 + m_LocalShadowsAtlasResolution: 256 + m_MaxPixelLights: 0 + m_ShadowAtlasResolution: 256 + m_ShaderVariantLogLevel: 0 + m_VolumeFrameworkUpdateMode: 0 + m_ShadowCascades: 1 diff --git a/Assets/Settings/URP-HighFidelity.asset.meta b/Assets/Settings/URP-HighFidelity.asset.meta new file mode 100644 index 0000000..7416e17 --- /dev/null +++ b/Assets/Settings/URP-HighFidelity.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7b7fd9122c28c4d15b667c7040e3b3fd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Settings/URP-Performant-Renderer.asset b/Assets/Settings/URP-Performant-Renderer.asset new file mode 100644 index 0000000..7cda107 --- /dev/null +++ b/Assets/Settings/URP-Performant-Renderer.asset @@ -0,0 +1,57 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} + m_Name: URP-Performant-Renderer + m_EditorClassIdentifier: + debugShaders: + debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, + type: 3} + m_RendererFeatures: [] + m_RendererFeatureMap: + m_UseNativeRenderPass: 0 + postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} + shaders: + blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} + copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} + screenSpaceShadowPS: {fileID: 0} + samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} + stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} + fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} + materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} + coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3} + coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, + type: 3} + cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, + type: 3} + objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, + type: 3} + m_AssetVersion: 1 + m_OpaqueLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_TransparentLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_DefaultStencilState: + overrideStencilState: 0 + stencilReference: 0 + stencilCompareFunction: 8 + passOperation: 2 + failOperation: 0 + zFailOperation: 0 + m_ShadowTransparentReceive: 1 + m_RenderingMode: 0 + m_DepthPrimingMode: 1 + m_AccurateGbufferNormals: 0 + m_ClusteredRendering: 0 + m_TileSize: 32 + m_IntermediateTextureMode: 0 diff --git a/Assets/Settings/URP-Performant-Renderer.asset.meta b/Assets/Settings/URP-Performant-Renderer.asset.meta new file mode 100644 index 0000000..912ff60 --- /dev/null +++ b/Assets/Settings/URP-Performant-Renderer.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 707360a9c581a4bd7aa53bfeb1429f71 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Settings/URP-Performant.asset b/Assets/Settings/URP-Performant.asset new file mode 100644 index 0000000..5e53341 --- /dev/null +++ b/Assets/Settings/URP-Performant.asset @@ -0,0 +1,69 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} + m_Name: URP-Performant + m_EditorClassIdentifier: + k_AssetVersion: 9 + k_AssetPreviousVersion: 9 + m_RendererType: 1 + m_RendererData: {fileID: 0} + m_RendererDataList: + - {fileID: 11400000, guid: 707360a9c581a4bd7aa53bfeb1429f71, type: 2} + m_DefaultRendererIndex: 0 + m_RequireDepthTexture: 0 + m_RequireOpaqueTexture: 0 + m_OpaqueDownsampling: 1 + m_SupportsTerrainHoles: 1 + m_StoreActionsOptimization: 0 + m_SupportsHDR: 0 + m_MSAA: 1 + m_RenderScale: 1 + m_MainLightRenderingMode: 1 + m_MainLightShadowsSupported: 0 + m_MainLightShadowmapResolution: 1024 + m_AdditionalLightsRenderingMode: 0 + m_AdditionalLightsPerObjectLimit: 4 + m_AdditionalLightShadowsSupported: 0 + m_AdditionalLightsShadowmapResolution: 512 + m_AdditionalLightsShadowResolutionTierLow: 128 + m_AdditionalLightsShadowResolutionTierMedium: 256 + m_AdditionalLightsShadowResolutionTierHigh: 512 + m_ReflectionProbeBlending: 0 + m_ReflectionProbeBoxProjection: 0 + m_ShadowDistance: 50 + m_ShadowCascadeCount: 1 + m_Cascade2Split: 0.25 + m_Cascade3Split: {x: 0.1, y: 0.3} + m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} + m_CascadeBorder: 0.1 + m_ShadowDepthBias: 1 + m_ShadowNormalBias: 1 + m_SoftShadowsSupported: 0 + m_AdditionalLightsCookieResolution: 2048 + m_AdditionalLightsCookieFormat: 3 + m_UseSRPBatcher: 1 + m_SupportsDynamicBatching: 0 + m_MixedLightingSupported: 1 + m_SupportsLightLayers: 0 + m_DebugLevel: 0 + m_UseAdaptivePerformance: 1 + m_ColorGradingMode: 0 + m_ColorGradingLutSize: 16 + m_UseFastSRGBLinearConversion: 0 + m_ShadowType: 1 + m_LocalShadowsSupported: 0 + m_LocalShadowsAtlasResolution: 256 + m_MaxPixelLights: 0 + m_ShadowAtlasResolution: 256 + m_ShaderVariantLogLevel: 0 + m_VolumeFrameworkUpdateMode: 0 + m_ShadowCascades: 0 diff --git a/Assets/Settings/URP-Performant.asset.meta b/Assets/Settings/URP-Performant.asset.meta new file mode 100644 index 0000000..264c9c5 --- /dev/null +++ b/Assets/Settings/URP-Performant.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d0e2fc18fe036412f8223b3b3d9ad574 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third.meta b/Assets/Third.meta new file mode 100644 index 0000000..521d1f5 --- /dev/null +++ b/Assets/Third.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4875fd7ab9cd79146869cb5e3edd16ad +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween.meta b/Assets/Third/DOTween.meta new file mode 100644 index 0000000..08d911c --- /dev/null +++ b/Assets/Third/DOTween.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4e718c28797be34419dcaee6050ede51 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/DOTween.XML b/Assets/Third/DOTween/DOTween.XML new file mode 100644 index 0000000..33c9717 --- /dev/null +++ b/Assets/Third/DOTween/DOTween.XML @@ -0,0 +1,2438 @@ + + + + DOTween + + + + + Types of autoPlay behaviours + + + + No tween is automatically played + + + Only Sequences are automatically played + + + Only Tweeners are automatically played + + + All tweens are automatically played + + + + What axis to constrain in case of Vector tweens + + + + Called the first time the tween is set in a playing state, after any eventual delay + + + + Used in place of System.Func, which is not available in mscorlib. + + + + + Used in place of System.Action. + + + + + Public so it can be used by lose scripts related to DOTween (like DOTweenAnimation) + + + + + Used to separate DOTween class from the MonoBehaviour instance (in order to use static constructors on DOTween). + Contains all instance-based methods + + + + Used internally inside Unity Editor, as a trick to update DOTween's inspector at every frame + + + + Directly sets the current max capacity of Tweeners and Sequences + (meaning how many Tweeners and Sequences can be running at the same time), + so that DOTween doesn't need to automatically increase them in case the max is reached + (which might lead to hiccups when that happens). + Sequences capacity must be less or equal to Tweeners capacity + (if you pass a low Tweener capacity it will be automatically increased to match the Sequence's). + Beware: use this method only when there are no tweens running. + + Max Tweeners capacity. + Default: 200 + Max Sequences capacity. + Default: 50 + + + + This class contains a C# port of the easing equations created by Robert Penner (http://robertpenner.com/easing). + + + + + Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in: accelerating from zero velocity. + + + Current time (in frames or seconds). + + + Expected easing duration (in frames or seconds). + + Unused: here to keep same delegate for all ease types. + Unused: here to keep same delegate for all ease types. + + The eased value. + + + + + Easing equation function for a bounce (exponentially decaying parabolic bounce) easing out: decelerating from zero velocity. + + + Current time (in frames or seconds). + + + Expected easing duration (in frames or seconds). + + Unused: here to keep same delegate for all ease types. + Unused: here to keep same delegate for all ease types. + + The eased value. + + + + + Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in/out: acceleration until halfway, then deceleration. + + + Current time (in frames or seconds). + + + Expected easing duration (in frames or seconds). + + Unused: here to keep same delegate for all ease types. + Unused: here to keep same delegate for all ease types. + + The eased value. + + + + + Returns a value between 0 and 1 (inclusive) based on the elapsed time and ease selected + + + + + Returns a value between 0 and 1 (inclusive) based on the elapsed time and ease selected + + + + + Used to interpret AnimationCurves as eases. + Public so it can be used by external ease factories + + + + + Additional notices passed to plugins when updating. + Public so it can be used by custom plugins. Internally, only PathPlugin uses it + + + + + None + + + + + Lets the plugin know that we restarted or rewinded + + + + + Public only so custom shortcuts can access some of these methods + + + + + Returns a Vector3 with z = 0 + + + + + Returns the 2D angle between two vectors + + + + + Struct that stores two colors (used for LineRenderer tweens) + + + + + Used for tween callbacks + + + + + Used for tween callbacks + + + + + Used for custom and animationCurve-based ease functions. Must return a value between 0 and 1. + + + + + Straight Quaternion plugin. Instead of using Vector3 values accepts Quaternion values directly. + Beware: doesn't work with LoopType.Incremental (neither directly nor if inside a LoopType.Incremental Sequence). + To use it, call DOTween.To with the plugin parameter overload, passing it PureQuaternionPlugin.Plug() as first parameter + (do not use any of the other public PureQuaternionPlugin methods): + DOTween.To(PureQuaternionPlugin.Plug(), ()=> myQuaternionProperty, x=> myQuaternionProperty = x, myQuaternionEndValue, duration); + + + + + Plug this plugin inside a DOTween.To call. + Example: + DOTween.To(PureQuaternionPlugin.Plug(), ()=> myQuaternionProperty, x=> myQuaternionProperty = x, myQuaternionEndValue, duration); + + + + INTERNAL: do not use + + + INTERNAL: do not use + + + INTERNAL: do not use + + + INTERNAL: do not use + + + INTERNAL: do not use + + + INTERNAL: do not use + + + INTERNAL: do not use + + + + Main DOTween class. Contains static methods to create and control tweens in a generic way + + + + DOTween's version + + + If TRUE (default) makes tweens slightly slower but safer, automatically taking care of a series of things + (like targets becoming null while a tween is playing). + Default: TRUE + + + If TRUE you will get a DOTween report when exiting play mode (only in the Editor). + Useful to know how many max Tweeners and Sequences you reached and optimize your final project accordingly. + Beware, this will slightly slow down your tweens while inside Unity Editor. + Default: FALSE + + + Global DOTween timeScale. + Default: 1 + + + If TRUE, DOTween will use Time.smoothDeltaTime instead of Time.deltaTime for UpdateType.Normal and UpdateType.Late tweens + (unless they're set as timeScaleIndependent, in which case this setting will be ignored). + Setting this to TRUE will lead to smoother animations. + Default: FALSE + + + DOTween's log behaviour. + Default: LogBehaviour.ErrorsOnly + + + If TRUE draws path gizmos in Unity Editor (if the gizmos button is active). + Deactivate this if you want to avoid gizmos overhead while in Unity Editor + + + Default updateType for new tweens. + Default: UpdateType.Normal + + + Sets whether Unity's timeScale should be taken into account by default or not. + Default: false + + + Default autoPlay behaviour for new tweens. + Default: AutoPlay.All + + + Default autoKillOnComplete behaviour for new tweens. + Default: TRUE + + + Default loopType applied to all new tweens. + Default: LoopType.Restart + + + If TRUE all newly created tweens are set as recyclable, otherwise not. + Default: FALSE + + + Default ease applied to all new Tweeners (not to Sequences which always have Ease.Linear as default). + Default: Ease.InOutQuad + + + Default overshoot/amplitude used for eases + Default: 1.70158f + + + Default period used for eases + Default: 0 + + + + Must be called once, before the first ever DOTween call/reference, + otherwise it will be called automatically and will use default options. + Calling it a second time won't have any effect. + You can chain SetCapacity to this method, to directly set the max starting size of Tweeners and Sequences: + DOTween.Init(false, false, LogBehaviour.Default).SetCapacity(100, 20); + + If TRUE all new tweens will be set for recycling, meaning that when killed, + instead of being destroyed, they will be put in a pool and reused instead of creating new tweens. This option allows you to avoid + GC allocations by reusing tweens, but you will have to take care of tween references, since they might result active + even if they were killed (since they might have been respawned and are now being used for other tweens). + If you want to automatically set your tween references to NULL when a tween is killed + you can use the OnKill callback like this: + .OnKill(()=> myTweenReference = null) + You can change this setting at any time by changing the static property, + or you can set the recycling behaviour for each tween separately, using: + SetRecyclable(bool recyclable) + Default: FALSE + If TRUE makes tweens slightly slower but safer, automatically taking care of a series of things + (like targets becoming null while a tween is playing). + You can change this setting at any time by changing the static property. + Default: FALSE + Type of logging to use. + You can change this setting at any time by changing the static property. + Default: ErrorsOnly + + + + Directly sets the current max capacity of Tweeners and Sequences + (meaning how many Tweeners and Sequences can be running at the same time), + so that DOTween doesn't need to automatically increase them in case the max is reached + (which might lead to hiccups when that happens). + Sequences capacity must be less or equal to Tweeners capacity + (if you pass a low Tweener capacity it will be automatically increased to match the Sequence's). + Beware: use this method only when there are no tweens running. + + Max Tweeners capacity. + Default: 200 + Max Sequences capacity. + Default: 50 + + + + Kills all tweens, clears all cached tween pools and plugins and resets the max Tweeners/Sequences capacities to the default values. + + If TRUE also destroys DOTween's gameObject and resets its initializiation, default settings and everything else + (so that next time you use it it will need to be re-initialized) + + + + Clears all cached tween pools. + + + + + Checks all active tweens to find and remove eventually invalid ones (usually because their targets became NULL) + and returns the total number of invalid tweens found and removed. + Automatically called when loading a new scene if is TRUE. + BEWARE: this is a slightly expensive operation so use it with care + + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a property or field to the given value using a custom plugin + The plugin to use. Each custom plugin implements a static Get() method + you'll need to call to assign the correct plugin in the correct way, like this: + CustomPlugin.Get() + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens only one axis of a Vector3 to the given value using default plugins. + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + The axis to tween + + + Tweens only the alpha of a Color to the given value using default plugins + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end value to reachThe tween's duration + + + Tweens a virtual property from the given start to the given end value + and implements a setter that allows to use that value with an external method or a lambda + Example: + To(MyMethod, 0, 12, 0.5f); + Where MyMethod is a function that accepts a float parameter (which will be the result of the virtual tween) + The action to perform with the tweened value + The value to start from + The end value to reach + The duration of the virtual tween + + + + Punches a Vector3 towards the given direction and then back to the starting one + as if it was connected to the starting position via an elastic. + This tween type generates some GC allocations at startup + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The direction and strength of the punch + The duration of the tween + Indicates how much will the punch vibrate + Represents how much (0 to 1) the vector will go beyond the starting position when bouncing backwards. + 1 creates a full oscillation between the direction and the opposite decaying direction, + while 0 oscillates only between the starting position and the decaying direction + + + Shakes a Vector3 with the given values. + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction and behave like a random punch. + If TRUE only shakes on the X Y axis (looks better with things like cameras). + + + Shakes a Vector3 with the given values. + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction and behave like a random punch. + + + Tweens a property or field to the given values using default plugins. + Ease is applied between each segment and not as a whole. + This tween type generates some GC allocations at startup + A getter for the field or property to tween. + Example usage with lambda:()=> myProperty + A setter for the field or property to tween + Example usage with lambda:x=> myProperty = x + The end values to reach for each segment. This array must have the same length as durations + The duration of each segment. This array must have the same length as endValues + + + + Returns a new to be used for tween groups + + + + Completes all tweens and returns the number of actual tweens completed + (meaning tweens that don't have infinite loops and were not already complete) + For Sequences only: if TRUE also internal Sequence callbacks will be fired, + otherwise they will be ignored + + + Completes all tweens with the given ID or target and returns the number of actual tweens completed + (meaning the tweens that don't have infinite loops and were not already complete) + For Sequences only: if TRUE internal Sequence callbacks will be fired, + otherwise they will be ignored + + + Flips all tweens (changing their direction to forward if it was backwards and viceversa), + then returns the number of actual tweens flipped + + + Flips the tweens with the given ID or target (changing their direction to forward if it was backwards and viceversa), + then returns the number of actual tweens flipped + + + Sends all tweens to the given position (calculating also eventual loop cycles) and returns the actual tweens involved + + + Sends all tweens with the given ID or target to the given position (calculating also eventual loop cycles) + and returns the actual tweens involved + + + Kills all tweens and returns the number of actual tweens killed + If TRUE completes the tweens before killing them + + + Kills all tweens and returns the number of actual tweens killed + If TRUE completes the tweens before killing them + Eventual IDs or targets to exclude from the killing + + + Kills all tweens with the given ID or target and returns the number of actual tweens killed + If TRUE completes the tweens before killing them + + + Pauses all tweens and returns the number of actual tweens paused + + + Pauses all tweens with the given ID or target and returns the number of actual tweens paused + (meaning the tweens that were actually playing and have been paused) + + + Plays all tweens and returns the number of actual tweens played + (meaning tweens that were not already playing or complete) + + + Plays all tweens with the given ID or target and returns the number of actual tweens played + (meaning the tweens that were not already playing or complete) + + + Plays all tweens with the given target and the given ID, and returns the number of actual tweens played + (meaning the tweens that were not already playing or complete) + + + Plays backwards all tweens and returns the number of actual tweens played + (meaning tweens that were not already started, playing backwards or rewinded) + + + Plays backwards all tweens with the given ID or target and returns the number of actual tweens played + (meaning the tweens that were not already started, playing backwards or rewinded) + + + Plays forward all tweens and returns the number of actual tweens played + (meaning tweens that were not already playing forward or complete) + + + Plays forward all tweens with the given ID or target and returns the number of actual tweens played + (meaning the tweens that were not already playing forward or complete) + + + Restarts all tweens, then returns the number of actual tweens restarted + + + Restarts all tweens with the given ID or target, then returns the number of actual tweens restarted + + + Restarts all tweens with the given target and the given ID, and returns the number of actual tweens played + (meaning the tweens that were not already playing or complete) + + + Rewinds and pauses all tweens, then returns the number of actual tweens rewinded + (meaning tweens that were not already rewinded) + + + Rewinds and pauses all tweens with the given ID or target, then returns the number of actual tweens rewinded + (meaning the tweens that were not already rewinded) + + + Smoothly rewinds all tweens (delays excluded), then returns the number of actual tweens rewinding/rewinded + (meaning tweens that were not already rewinded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + Note that a tween that was smoothly rewinded will have its play direction flipped + + + Smoothly rewinds all tweens (delays excluded) with the given ID or target, then returns the number of actual tweens rewinding/rewinded + (meaning the tweens that were not already rewinded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + Note that a tween that was smoothly rewinded will have its play direction flipped + + + Toggles the play state of all tweens and returns the number of actual tweens toggled + (meaning tweens that could be played or paused, depending on the toggle state) + + + Toggles the play state of all tweens with the given ID or target and returns the number of actual tweens toggled + (meaning the tweens that could be played or paused, depending on the toggle state) + + + + Returns TRUE if a tween with the given ID or target is active (regardless if it's playing or not). + You can also use this to know if a shortcut tween is active for a given target. + Example: + transform.DOMoveX(45, 1); // transform is automatically added as the tween target + DOTween.IsTweening(transform); // Returns true + + + + + Returns the total number of active and playing tweens. + A tween is considered as playing even if its delay is actually playing + + + + + Returns a list of all active tweens in a playing state. + Returns NULL if there are no active playing tweens. + Beware: each time you call this method a new list is generated, so use it for debug only + + + + + Returns a list of all active tweens in a paused state. + Returns NULL if there are no active paused tweens. + Beware: each time you call this method a new list is generated, so use it for debug only + + + + + Returns a list of all active tweens with the given id. + Returns NULL if there are no active tweens with the given id. + Beware: each time you call this method a new list is generated + If TRUE returns only the tweens with the given ID that are currently playing + + + + + Returns a list of all active tweens with the given target. + Returns NULL if there are no active tweens with the given target. + Beware: each time you call this method a new list is generated + If TRUE returns only the tweens with the given target that are currently playing + + + + + Creates virtual tweens that can be used to change other elements via their OnUpdate calls + + + + + Tweens a virtual float. + You can add regular settings to the generated tween, + but do not use SetUpdate or you will overwrite the onVirtualUpdate parameter + + The value to start from + The value to tween to + The duration of the tween + A callback which must accept a parameter of type float, called at each update + + + + Returns a value based on the given ease and lifetime percentage (0 to 1) + The value to start from when lifetimePercentage is 0 + The value to reach when lifetimePercentage is 1 + The time percentage (0 to 1) at which the value should be taken + The type of ease + + + Returns a value based on the given ease and lifetime percentage (0 to 1) + The value to start from when lifetimePercentage is 0 + The value to reach when lifetimePercentage is 1 + The time percentage (0 to 1) at which the value should be taken + The type of ease + Eventual overshoot to use with Back ease + + + Returns a value based on the given ease and lifetime percentage (0 to 1) + The value to start from when lifetimePercentage is 0 + The value to reach when lifetimePercentage is 1 + The time percentage (0 to 1) at which the value should be taken + The type of ease + Eventual amplitude to use with Elastic easeType + Eventual period to use with Elastic easeType + + + Returns a value based on the given ease and lifetime percentage (0 to 1) + The value to start from when lifetimePercentage is 0 + The value to reach when lifetimePercentage is 1 + The time percentage (0 to 1) at which the value should be taken + The AnimationCurve to use for ease + + + Fires the given callback after the given time. + Callback delay + Callback to fire when the delay has expired + If TRUE (default) ignores Unity's timeScale + + + + Don't assign this! It's assigned automatically when creating 0 duration tweens + + + + + Don't assign this! It's assigned automatically when setting the ease to an AnimationCurve or to a custom ease function + + + + + Allows to wrap ease method in special ways, adding extra features + + + + + Converts the given ease so that it also creates a stop-motion effect, by playing the tween at the given FPS + + FPS at which the tween should be played + Ease type + + + + Converts the given ease so that it also creates a stop-motion effect, by playing the tween at the given FPS + + FPS at which the tween should be played + AnimationCurve to use for the ease + + + + Converts the given ease so that it also creates a stop-motion effect, by playing the tween at the given FPS + + FPS at which the tween should be played + Custom ease function to use + + + + Used to allow method chaining with DOTween.Init + + + + + Directly sets the current max capacity of Tweeners and Sequences + (meaning how many Tweeners and Sequences can be running at the same time), + so that DOTween doesn't need to automatically increase them in case the max is reached + (which might lead to hiccups when that happens). + Sequences capacity must be less or equal to Tweeners capacity + (if you pass a low Tweener capacity it will be automatically increased to match the Sequence's). + Beware: use this method only when there are no tweens running. + + Max Tweeners capacity. + Default: 200 + Max Sequences capacity. + Default: 50 + + + + Path mode (used to determine correct LookAt orientation) + + + + Ignores the path mode (and thus LookAt behaviour) + + + Regular 3D path + + + 2D top-down path + + + 2D side-scroller path + + + + Type of path to use with DOPath tweens + + + + Linear, composed of straight segments between each waypoint + + + Curved path (which uses Catmull-Rom curves) + + + + Path control point + + + + + Gets the point on the path at the given percentage (0 to 1) + + The percentage (0 to 1) at which to get the point + If TRUE constant speed is taken into account, otherwise not + + + + This plugin generates some GC allocations at startup + + + + + Path plugin works exclusively with Transforms + + + + + Rotation mode used with DORotate methods + + + + + Fastest way that never rotates beyond 360° + + + + + Fastest way that rotates beyond 360° + + + + + Adds the given rotation to the transform using world axis and an advanced precision mode + (like when using transform.Rotate(Space.World)). + In this mode the end value is is always considered relative + + + + + Adds the given rotation to the transform's local axis + (like when rotating an object with the "local" switch enabled in Unity's editor or using transform.Rotate(Space.Self)). + In this mode the end value is is always considered relative + + + + + Type of scramble to apply to string tweens + + + + + No scrambling of characters + + + + + A-Z + a-z + 0-9 characters + + + + + A-Z characters + + + + + a-z characters + + + + + 0-9 characters + + + + + Custom characters + + + + + Methods that extend Tween objects and allow to control or get data from them + + + + Completes the tween + + + Completes the tween + For Sequences only: if TRUE also internal Sequence callbacks will be fired, + otherwise they will be ignored + + + Flips the direction of this tween (backwards if it was going forward or viceversa) + + + Forces the tween to initialize its settings immediately + + + Send the tween to the given position in time + Time position to reach + (if higher than the whole tween duration the tween will simply reach its end) + If TRUE will play the tween after reaching the given position, otherwise it will pause it + + + Kills the tween + If TRUE completes the tween before killing it + + + Pauses the tween + + + Plays the tween + + + Sets the tween in a backwards direction and plays it + + + Sets the tween in a forward direction and plays it + + + Restarts the tween from the beginning + If TRUE includes the eventual tween delay, otherwise skips it + + + Rewinds and pauses the tween + If TRUE includes the eventual tween delay, otherwise skips it + + + Smoothly rewinds the tween (delays excluded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + If called on a tween who is still waiting for its delay to happen, it will simply set the delay to 0 and pause the tween. + Note that a tween that was smoothly rewinded will have its play direction flipped + + + Plays the tween if it was paused, pauses it if it was playing + + + Send a path tween to the given waypoint. + Has no effect if this is not a path tween. + BEWARE, this is a special utility method: + it works only with Linear eases. Also, the lookAt direction might be wrong after calling this and might need to be set manually + (because it relies on a smooth path movement and doesn't work well with jumps that encompass dramatic direction changes) + Waypoint index to reach + (if higher than the max waypoint index the tween will simply go to the last one) + If TRUE will play the tween after reaching the given waypoint, otherwise it will pause it + + + + Creates a yield instruction that waits until the tween is killed or complete. + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForCompletion(); + + + + + Creates a yield instruction that waits until the tween is killed or rewinded. + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForRewind(); + + + + + Creates a yield instruction that waits until the tween is killed. + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForKill(); + + + + + Creates a yield instruction that waits until the tween is killed or has gone through the given amount of loops. + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForElapsedLoops(2); + + Elapsed loops to wait for + + + + Creates a yield instruction that waits until the tween is killed or has reached the given position (loops included, delays excluded). + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForPosition(2.5f); + + Position (loops included, delays excluded) to wait for + + + + Creates a yield instruction that waits until the tween is killed or started + (meaning when the tween is set in a playing state the first time, after any eventual delay). + It can be used inside a coroutine as a yield. + Example usage:yield return myTween.WaitForStart(); + + + + Returns the total number of loops completed by this tween + + + Returns the eventual delay set for this tween + + + Returns the duration of this tween (delays excluded). + NOTE: when using settings like SpeedBased, the duration will be recalculated when the tween starts + If TRUE returns the full duration loops included, + otherwise the duration of a single loop cycle + + + Returns the elapsed time for this tween (delays exluded) + If TRUE returns the elapsed time since startup loops included, + otherwise the elapsed time within the current loop cycle + + + Returns the elapsed percentage (0 to 1) of this tween (delays exluded) + If TRUE returns the elapsed percentage since startup loops included, + otherwise the elapsed percentage within the current loop cycle + + + Returns the elapsed percentage (0 to 1) of this tween (delays exluded), + based on a single loop, and calculating eventual backwards Yoyo loops as 1 to 0 instead of 0 to 1 + + + Returns FALSE if this tween has been killed. + BEWARE: if this tween is recyclable it might have been spawned again for another use and thus return TRUE anyway. + When working with recyclable tweens you should take care to know when a tween has been killed and manually set your references to NULL. + If you want to be sure your references are set to NULL when a tween is killed you can use the OnKill callback like this: + .OnKill(()=> myTweenReference = null) + + + Returns TRUE if this tween was reversed and is set to go backwards + + + Returns TRUE if the tween is complete + (silently fails and returns FALSE if the tween has been killed) + + + Returns TRUE if this tween has been initialized + + + Returns TRUE if this tween is playing + + + Returns the total number of loops set for this tween + (returns -1 if the loops are infinite) + + + + Returns a point on a path based on the given path percentage. + Returns Vector3.zero if this is not a path tween, if the tween is invalid, or if the path is not yet initialized. + A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature). + You can force a path to be initialized by calling myTween.ForceInit(). + + Percentage of the path (0 to 1) on which to get the point + + + + Returns an array of points that can be used to draw the path. + Note that this method generates allocations, because it creates a new array. + Returns NULL if this is not a path tween, if the tween is invalid, or if the path is not yet initialized. + A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature). + You can force a path to be initialized by calling myTween.ForceInit(). + + How many points to create for each path segment (waypoint to waypoint). + Only used in case of non-Linear paths + + + + Returns the length of a path. + Returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized. + A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature). + You can force a path to be initialized by calling myTween.ForceInit(). + + + + + Types of loop + + + + Each loop cycle restarts from the beginning + + + The tween moves forward and backwards at alternate cycles + + + Continuously increments the tween at the end of each loop cycle (A to B, B to B+(A-B), and so on), thus always moving "onward". + In case of String tweens works only if the tween is set as relative + + + + Controls other tweens as a group + + + + + Methods that extend known Unity objects and allow to directly create and control tweens from their instances + + + + Tweens an AudioSource's volume to the given value. + Also stores the AudioSource as the tween's target so it can be used for filtered operations + The end value to reach (0 to 1)The duration of the tween + + + Tweens an AudioSource's pitch to the given value. + Also stores the AudioSource as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's aspect to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's backgroundColor to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's farClipPlane to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's fieldOfView to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's nearClipPlane to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's orthographicSize to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's pixelRect to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Camera's rect to the given value. + Also stores the camera as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Shakes a Camera's localPosition along its relative X Y axes with the given values. + Also stores the camera as the tween's target so it can be used for filtered operations + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + + + Shakes a Camera's localPosition along its relative X Y axes with the given values. + Also stores the camera as the tween's target so it can be used for filtered operations + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + + + Shakes a Camera's localRotation. + Also stores the camera as the tween's target so it can be used for filtered operations + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + + + Shakes a Camera's localRotation. + Also stores the camera as the tween's target so it can be used for filtered operations + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + + + Tweens a Light's color to the given value. + Also stores the light as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Light's intensity to the given value. + Also stores the light as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Light's shadowStrength to the given value. + Also stores the light as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a LineRenderer's color to the given value. + Also stores the LineRenderer as the tween's target so it can be used for filtered operations. + Note that this method requires to also insert the start colors for the tween, + since LineRenderers have no way to get them. + The start value to tween from + The end value to reachThe duration of the tween + + + Tweens a Material's color to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Material's named color property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween (like _Tint or _SpecColor) + The duration of the tween + + + Tweens a Material's alpha color to the given value + (will have no effect unless your material supports transparency). + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Material's alpha color to the given value + (will have no effect unless your material supports transparency). + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween (like _Tint or _SpecColor) + The duration of the tween + + + Tweens a Material's named float property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + + + Tweens a Material's texture offset to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The duration of the tween + + + Tweens a Material's named texture offset property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + + + Tweens a Material's texture scale to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The duration of the tween + + + Tweens a Material's named texture scale property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + + + Tweens a Material's named Vector property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + + + Tweens a Rigidbody's position to the given value. + Also stores the rigidbody as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Rigidbody's X position to the given value. + Also stores the rigidbody as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Rigidbody's Y position to the given value. + Also stores the rigidbody as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Rigidbody's Z position to the given value. + Also stores the rigidbody as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Rigidbody's rotation to the given value. + Also stores the rigidbody as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + Rotation mode + + + Tweens a Rigidbody's rotation so that it will look towards the given position. + Also stores the rigidbody as the tween's target so it can be used for filtered operations + The position to look atThe duration of the tween + Eventual axis constraint for the rotation + The vector that defines in which direction up is (default: Vector3.up) + + + Tweens a Rigidbody's position to the given value, while also applying a jump effect along the Y axis. + Returns a Sequence instead of a Tweener. + Also stores the Rigidbody as the tween's target so it can be used for filtered operations + The end value to reach + Power of the jump (the max height of the jump is represented by this plus the final Y offset) + Total number of jumps + The duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a TrailRenderer's startWidth/endWidth to the given value. + Also stores the TrailRenderer as the tween's target so it can be used for filtered operations + The end startWidth to reachThe end endWidth to reach + The duration of the tween + + + Tweens a TrailRenderer's time to the given value. + Also stores the TrailRenderer as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's position to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's X position to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's Y position to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's Z position to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's localPosition to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's X localPosition to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's Y localPosition to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's Z localPosition to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's rotation to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + Rotation mode + + + Tweens a Transform's rotation to the given value using pure quaternion values. + Also stores the transform as the tween's target so it can be used for filtered operations. + PLEASE NOTE: DORotate, which takes Vector3 values, is the preferred rotation method. + This method was implemented for very special cases, and doesn't support LoopType.Incremental loops + (neither for itself nor if placed inside a LoopType.Incremental Sequence) + + The end value to reachThe duration of the tween + + + Tweens a Transform's localRotation to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + Rotation mode + + + Tweens a Transform's rotation to the given value using pure quaternion values. + Also stores the transform as the tween's target so it can be used for filtered operations. + PLEASE NOTE: DOLocalRotate, which takes Vector3 values, is the preferred rotation method. + This method was implemented for very special cases, and doesn't support LoopType.Incremental loops + (neither for itself nor if placed inside a LoopType.Incremental Sequence) + + The end value to reachThe duration of the tween + + + Tweens a Transform's localScale to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's localScale uniformly to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's X localScale to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's Y localScale to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's Z localScale to the given value. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Transform's rotation so that it will look towards the given position. + Also stores the transform as the tween's target so it can be used for filtered operations + The position to look atThe duration of the tween + Eventual axis constraint for the rotation + The vector that defines in which direction up is (default: Vector3.up) + + + Punches a Transform's localPosition towards the given direction and then back to the starting one + as if it was connected to the starting position via an elastic. + The direction and strength of the punch (added to the Transform's current position) + The duration of the tween + Indicates how much will the punch vibrate + Represents how much (0 to 1) the vector will go beyond the starting position when bouncing backwards. + 1 creates a full oscillation between the punch direction and the opposite direction, + while 0 oscillates only between the punch and the start position + If TRUE the tween will smoothly snap all values to integers + + + Punches a Transform's localScale towards the given size and then back to the starting one + as if it was connected to the starting scale via an elastic. + The punch strength (added to the Transform's current scale) + The duration of the tween + Indicates how much will the punch vibrate + Represents how much (0 to 1) the vector will go beyond the starting size when bouncing backwards. + 1 creates a full oscillation between the punch scale and the opposite scale, + while 0 oscillates only between the punch scale and the start scale + + + Punches a Transform's localRotation towards the given size and then back to the starting one + as if it was connected to the starting rotation via an elastic. + The punch strength (added to the Transform's current rotation) + The duration of the tween + Indicates how much will the punch vibrate + Represents how much (0 to 1) the vector will go beyond the starting rotation when bouncing backwards. + 1 creates a full oscillation between the punch rotation and the opposite rotation, + while 0 oscillates only between the punch and the start rotation + + + Shakes a Transform's localPosition with the given values. + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the tween will smoothly snap all values to integers + + + Shakes a Transform's localPosition with the given values. + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the tween will smoothly snap all values to integers + + + Shakes a Transform's localRotation. + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + + + Shakes a Transform's localRotation. + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + + + Shakes a Transform's localScale. + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + + + Shakes a Transform's localScale. + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + + + Tweens a Transform's position to the given value, while also applying a jump effect along the Y axis. + Returns a Sequence instead of a Tweener. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reach + Power of the jump (the max height of the jump is represented by this plus the final Y offset) + Total number of jumps + The duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's localPosition to the given value, while also applying a jump effect along the Y axis. + Returns a Sequence instead of a Tweener. + Also stores the transform as the tween's target so it can be used for filtered operations + The end value to reach + Power of the jump (the max height of the jump is represented by this plus the final Y offset) + Total number of jumps + The duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's position through the given path waypoints, using the chosen path algorithm. + Also stores the transform as the tween's target so it can be used for filtered operations + The waypoints to go through + The duration of the tween + The type of path: Linear (straight path) or CatmullRom (curved CatmullRom path) + The path mode: 3D, side-scroller 2D, top-down 2D + The resolution of the path (useless in case of Linear paths): higher resolutions make for more detailed curved paths but are more expensive. + Defaults to 10, but a value of 5 is usually enough if you don't have dramatic long curves between waypoints + The color of the path (shown when gizmos are active in the Play panel and the tween is running) + + + Tweens a Transform's localPosition through the given path waypoints, using the chosen path algorithm. + Also stores the transform as the tween's target so it can be used for filtered operations + The waypoint to go through + The duration of the tween + The type of path: Linear (straight path) or CatmullRom (curved CatmullRom path) + The path mode: 3D, side-scroller 2D, top-down 2D + The resolution of the path: higher resolutions make for more detailed curved paths but are more expensive. + Defaults to 10, but a value of 5 is usually enough if you don't have dramatic long curves between waypoints + The color of the path (shown when gizmos are active in the Play panel and the tween is running) + + + Tweens a Light's color to the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the Light as the tween's target so it can be used for filtered operations + The value to tween toThe duration of the tween + + + Tweens a Material's color to the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the Material as the tween's target so it can be used for filtered operations + The value to tween toThe duration of the tween + + + Tweens a Material's named color property to the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the Material as the tween's target so it can be used for filtered operations + The value to tween to + The name of the material property to tween (like _Tint or _SpecColor) + The duration of the tween + + + Tweens a Transform's position BY the given value (as if you chained a SetRelative), + in a way that allows other DOBlendableMove tweens to work together on the same target, + instead than fight each other as multiple DOMove would do. + Also stores the transform as the tween's target so it can be used for filtered operations + The value to tween byThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Transform's localPosition BY the given value (as if you chained a SetRelative), + in a way that allows other DOBlendableMove tweens to work together on the same target, + instead than fight each other as multiple DOMove would do. + Also stores the transform as the tween's target so it can be used for filtered operations + The value to tween byThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + EXPERIMENTAL METHOD - Tweens a Transform's rotation BY the given value (as if you chained a SetRelative), + in a way that allows other DOBlendableRotate tweens to work together on the same target, + instead than fight each other as multiple DORotate would do. + Also stores the transform as the tween's target so it can be used for filtered operations + The value to tween byThe duration of the tween + Rotation mode + + + EXPERIMENTAL METHOD - Tweens a Transform's lcoalRotation BY the given value (as if you chained a SetRelative), + in a way that allows other DOBlendableRotate tweens to work together on the same target, + instead than fight each other as multiple DORotate would do. + Also stores the transform as the tween's target so it can be used for filtered operations + The value to tween byThe duration of the tween + Rotation mode + + + Tweens a Transform's localScale BY the given value (as if you chained a SetRelative), + in a way that allows other DOBlendableScale tweens to work together on the same target, + instead than fight each other as multiple DOScale would do. + Also stores the transform as the tween's target so it can be used for filtered operations + The value to tween byThe duration of the tween + + + + Completes all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens completed + (meaning the tweens that don't have infinite loops and were not already complete) + + For Sequences only: if TRUE also internal Sequence callbacks will be fired, + otherwise they will be ignored + + + + Completes all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens completed + (meaning the tweens that don't have infinite loops and were not already complete) + + For Sequences only: if TRUE also internal Sequence callbacks will be fired, + otherwise they will be ignored + + + + Kills all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens killed. + + If TRUE completes the tween before killing it + + + + Kills all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens killed. + + If TRUE completes the tween before killing it + + + + Flips the direction (backwards if it was going forward or viceversa) of all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens flipped. + + + + + Flips the direction (backwards if it was going forward or viceversa) of all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens flipped. + + + + + Sends to the given position all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens involved. + + Time position to reach + (if higher than the whole tween duration the tween will simply reach its end) + If TRUE will play the tween after reaching the given position, otherwise it will pause it + + + + Sends to the given position all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens involved. + + Time position to reach + (if higher than the whole tween duration the tween will simply reach its end) + If TRUE will play the tween after reaching the given position, otherwise it will pause it + + + + Pauses all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens paused. + + + + + Pauses all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens paused. + + + + + Plays all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Plays all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Plays backwards all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Plays backwards all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Plays forward all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Plays forward all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Restarts all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens restarted. + + + + + Restarts all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens restarted. + + + + + Rewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + + + + Rewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + + + + Smoothly rewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + + + + Smoothly rewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + + + + Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens involved. + + + + + Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens involved. + + + + + This class serves only as a utility class to store tween settings to apply on multiple tweens. + It is in no way needed otherwise, since you can directly apply tween settings to a tween via chaining + + + + A variable you can eventually Clear and reuse when needed, + to avoid instantiating TweenParams objects + + + Creates a new TweenParams object, which you can use to store tween settings + to pass to multiple tweens via myTween.SetAs(myTweenParms) + + + Clears and resets this TweenParams instance using default values, + so it can be reused without instantiating another one + + + Sets the autoKill behaviour of the tween. + Has no effect if the tween has already started + If TRUE the tween will be automatically killed when complete + + + Sets an ID for the tween, which can then be used as a filter with DOTween's static methods. + The ID to assign to this tween. Can be an int, a string, an object or anything else. + + + Sets the target for the tween, which can then be used as a filter with DOTween's static methods. + IMPORTANT: use it with caution. If you just want to set an ID for the tween use SetId instead. + When using shorcuts the shortcut target is already assigned as the tween's target, + so using this method will overwrite it and prevent shortcut-operations like myTarget.DOPause from working correctly. + The target to assign to this tween. Can be an int, a string, an object or anything else. + + + Sets the looping options for the tween. + Has no effect if the tween has already started + Number of cycles to play (-1 for infinite - will be converted to 1 in case the tween is nested in a Sequence) + Loop behaviour type (default: LoopType.Restart) + + + Sets the ease of the tween. + If applied to Sequences eases the whole sequence animation + Eventual overshoot or amplitude to use with Back or Elastic easeType (default is 1.70158) + Eventual period to use with Elastic easeType (default is 0) + + + Sets the ease of the tween using an AnimationCurve. + If applied to Sequences eases the whole sequence animation + + + Sets the ease of the tween using a custom ease function. + If applied to Sequences eases the whole sequence animation + + + Sets the recycling behaviour for the tween. + If TRUE the tween will be recycled after being killed, otherwise it will be destroyed. + + + Sets the update type to the one defined in DOTween.defaultUpdateType (UpdateType.Normal unless changed) + and lets you choose if it should be independent from Unity's Time.timeScale + If TRUE the tween will ignore Unity's Time.timeScale + + + Sets the type of update (default or independent) for the tween + The type of update (default: UpdateType.Normal) + If TRUE the tween will ignore Unity's Time.timeScale + + + Sets the onStart callback for the tween. + Called the first time the tween is set in a playing state, after any eventual delay + + + Sets the onPlay callback for the tween. + Called when the tween is set in a playing state, after any eventual delay. + Also called each time the tween resumes playing from a paused state + + + Sets the onRewind callback for the tween. + Called when the tween is rewinded, + either by calling Rewind or by reaching the start position while playing backwards. + Rewinding a tween that is already rewinded will not fire this callback + + + Sets the onUpdate callback for the tween. + Called each time the tween updates + + + Sets the onStepComplete callback for the tween. + Called the moment the tween completes one loop cycle, even when going backwards + + + Sets the onComplete callback for the tween. + Called the moment the tween reaches its final forward position, loops included + + + Sets the onKill callback for the tween. + Called the moment the tween is killed + + + Sets the onWaypointChange callback for the tween. + Called when a path tween reaches a new waypoint + + + Sets a delayed startup for the tween. + Has no effect on Sequences or if the tween has already started + + + If isRelative is TRUE sets the tween as relative + (the endValue will be calculated as startValue + endValue instead than being used directly). + Has no effect on Sequences or if the tween has already started + + + If isSpeedBased is TRUE sets the tween as speed based + (the duration will represent the number of units the tween moves x second). + Has no effect on Sequences, nested tweens, or if the tween has already started + + + + Methods that extend Tween objects and allow to set their parameters + + + + Sets the autoKill behaviour of the tween. + Has no effect if the tween has already started + + + Sets the autoKill behaviour of the tween. + Has no effect if the tween has already started + If TRUE the tween will be automatically killed when complete + + + Sets an ID for the tween, which can then be used as a filter with DOTween's static methods. + The ID to assign to this tween. Can be an int, a string, an object or anything else. + + + Sets the target for the tween, which can then be used as a filter with DOTween's static methods. + IMPORTANT: use it with caution. If you just want to set an ID for the tween use SetId instead. + When using shorcuts the shortcut target is already assigned as the tween's target, + so using this method will overwrite it and prevent shortcut-operations like myTarget.DOPause from working correctly. + The target to assign to this tween. Can be an int, a string, an object or anything else. + + + Sets the looping options for the tween. + Has no effect if the tween has already started + Number of cycles to play (-1 for infinite - will be converted to 1 in case the tween is nested in a Sequence) + + + Sets the looping options for the tween. + Has no effect if the tween has already started + Number of cycles to play (-1 for infinite - will be converted to 1 in case the tween is nested in a Sequence) + Loop behaviour type (default: LoopType.Restart) + + + Sets the ease of the tween. + If applied to Sequences eases the whole sequence animation + + + Sets the ease of the tween. + If applied to Sequences eases the whole sequence animation + + Eventual overshoot to use with Back or Flash ease (default is 1.70158). + In case of Flash ease it sets the total number of flashes that will happen. + Using an even number will complete the tween on the starting value, while an odd one will complete it on the end value. + + + + Sets the ease of the tween. + If applied to Sequences eases the whole sequence animation + Eventual amplitude to use with Elastic easeType or overshoot to use with Flash easeType (default is 1.70158). + In case of Flash ease it sets the total number of flashes that will happen. + Using an even number will complete the tween on the starting value, while an odd one will complete it on the end value. + + Eventual period to use with Elastic or Flash easeType (default is 0). + In case of Flash ease it indicates the power in time of the ease, and must be between -1 and 1. + 0 is balanced, 1 weakens the ease with time, -1 starts the ease weakened and gives it power towards the end. + + + + Sets the ease of the tween using an AnimationCurve. + If applied to Sequences eases the whole sequence animation + + + Sets the ease of the tween using a custom ease function (which must return a value between 0 and 1). + If applied to Sequences eases the whole sequence animation + + + Allows the tween to be recycled after being killed. + + + Sets the recycling behaviour for the tween. + If TRUE the tween will be recycled after being killed, otherwise it will be destroyed. + + + Sets the update type to UpdateType.Normal and lets you choose if it should be independent from Unity's Time.timeScale + If TRUE the tween will ignore Unity's Time.timeScale + + + Sets the type of update for the tween + The type of update (defalt: UpdateType.Normal) + + + Sets the type of update for the tween and lets you choose if it should be independent from Unity's Time.timeScale + The type of update + If TRUE the tween will ignore Unity's Time.timeScale + + + Sets the onStart callback for the tween. + Called the first time the tween is set in a playing state, after any eventual delay + + + Sets the onPlay callback for the tween. + Called when the tween is set in a playing state, after any eventual delay. + Also called each time the tween resumes playing from a paused state + + + Sets the onPlay callback for the tween. + Called when the tween state changes from playing to paused. + If the tween has autoKill set to FALSE, this is called also when the tween reaches completion. + + + Sets the onRewind callback for the tween. + Called when the tween is rewinded, + either by calling Rewind or by reaching the start position while playing backwards. + Rewinding a tween that is already rewinded will not fire this callback + + + Sets the onUpdate callback for the tween. + Called each time the tween updates + + + Sets the onStepComplete callback for the tween. + Called the moment the tween completes one loop cycle, even when going backwards + + + Sets the onComplete callback for the tween. + Called the moment the tween reaches its final forward position, loops included + + + Sets the onKill callback for the tween. + Called the moment the tween is killed + + + Sets the onWaypointChange callback for the tween. + Called when a path tween's current waypoint changes + + + Sets the parameters of the tween (id, ease, loops, delay, timeScale, callbacks, etc) as the parameters of the given one. + Doesn't copy specific SetOptions settings: those will need to be applied manually each time. + Has no effect if the tween has already started. + NOTE: the tween's target will not be changed + Tween from which to copy the parameters + + + Sets the parameters of the tween (id, ease, loops, delay, timeScale, callbacks, etc) as the parameters of the given TweenParams. + Has no effect if the tween has already started. + TweenParams from which to copy the parameters + + + Adds the given tween to the end of the Sequence. + Has no effect if the Sequence has already started + The tween to append + + + Adds the given tween to the beginning of the Sequence, pushing forward the other nested content. + Has no effect if the Sequence has already started + The tween to prepend + + + Inserts the given tween at the same time position of the last tween, callback or intervale added to the Sequence. + Note that, in case of a Join after an interval, the insertion time will be the time where the interval starts, not where it finishes. + Has no effect if the Sequence has already started + + + Inserts the given tween at the given time position in the Sequence, + automatically adding an interval if needed. + Has no effect if the Sequence has already started + The time position where the tween will be placed + The tween to insert + + + Adds the given interval to the end of the Sequence. + Has no effect if the Sequence has already started + The interval duration + + + Adds the given interval to the beginning of the Sequence, pushing forward the other nested content. + Has no effect if the Sequence has already started + The interval duration + + + Adds the given callback to the end of the Sequence. + Has no effect if the Sequence has already started + The callback to append + + + Adds the given callback to the beginning of the Sequence, pushing forward the other nested content. + Has no effect if the Sequence has already started + The callback to prepend + + + Inserts the given callback at the given time position in the Sequence, + automatically adding an interval if needed. + Has no effect if the Sequence has already started + The time position where the callback will be placed + The callback to insert + + + Changes a TO tween into a FROM tween: sets the current target's position as the tween's endValue + then immediately sends the target to the previously set endValue. + + + Changes a TO tween into a FROM tween: sets the current target's position as the tween's endValue + then immediately sends the target to the previously set endValue. + If TRUE the FROM value will be calculated as relative to the current one + + + Sets a delayed startup for the tween. + Has no effect on Sequences or if the tween has already started + + + Sets the tween as relative + (the endValue will be calculated as startValue + endValue instead than being used directly). + Has no effect on Sequences or if the tween has already started + + + If isRelative is TRUE sets the tween as relative + (the endValue will be calculated as startValue + endValue instead than being used directly). + Has no effect on Sequences or if the tween has already started + + + If isSpeedBased is TRUE sets the tween as speed based + (the duration will represent the number of units the tween moves x second). + Has no effect on Sequences, nested tweens, or if the tween has already started + + + If isSpeedBased is TRUE sets the tween as speed based + (the duration will represent the number of units the tween moves x second). + Has no effect on Sequences, nested tweens, or if the tween has already started + + + Options for float tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector2 tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector2 tweens + Selecting an axis will tween the vector only on that axis, leaving the others untouched + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector3 tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector3 tweens + Selecting an axis will tween the vector only on that axis, leaving the others untouched + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector4 tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector4 tweens + Selecting an axis will tween the vector only on that axis, leaving the others untouched + If TRUE the tween will smoothly snap all values to integers + + + Options for Quaternion tweens + If TRUE (default) the rotation will take the shortest route, and will not rotate more than 360°. + If FALSE the rotation will be fully accounted. Is always FALSE if the tween is set as relative + + + Options for Color tweens + If TRUE only the alpha value of the color will be tweened + + + Options for Vector4 tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector4 tweens + If TRUE, rich text will be interpreted correctly while animated, + otherwise all tags will be considered as normal text + The type of scramble to use, if any + A string containing the characters to use for scrambling. + Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters. + Leave it to NULL to use default ones + + + Options for Vector3Array tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Vector3Array tweens + If TRUE the tween will smoothly snap all values to integers + + + Options for Path tweens (created via the DOPath shortcut) + The eventual movement axis to lock. You can input multiple axis if you separate them like this: + AxisConstrain.X | AxisConstraint.Y + The eventual rotation axis to lock. You can input multiple axis if you separate them like this: + AxisConstrain.X | AxisConstraint.Y + + + Options for Path tweens (created via the DOPath shortcut) + If TRUE the path will be automatically closed + The eventual movement axis to lock. You can input multiple axis if you separate them like this: + AxisConstrain.X | AxisConstraint.Y + The eventual rotation axis to lock. You can input multiple axis if you separate them like this: + AxisConstrain.X | AxisConstraint.Y + + + Additional LookAt options for Path tweens (created via the DOPath shortcut). + Orients the target towards the given position. + Must be chained directly to the tween creation method or to a SetOptions + The position to look at + The eventual direction to consider as "forward". + If left to NULL defaults to the regular forward side of the transform + The vector that defines in which direction up is (default: Vector3.up) + + + Additional LookAt options for Path tweens (created via the DOPath shortcut). + Orients the target towards another transform. + Must be chained directly to the tween creation method or to a SetOptions + The transform to look at + The eventual direction to consider as "forward". + If left to NULL defaults to the regular forward side of the transform + The vector that defines in which direction up is (default: Vector3.up) + + + Additional LookAt options for Path tweens (created via the DOPath shortcut). + Orients the target to the path, with the given lookAhead. + Must be chained directly to the tween creation method or to a SetOptions + The percentage of lookAhead to use (0 to 1) + The eventual direction to consider as "forward". + If left to NULL defaults to the regular forward side of the transform + The vector that defines in which direction up is (default: Vector3.up) + + + + Types of log behaviours + + + + Log only warnings and errors + + + Log warnings, errors and additional infos + + + Log only errors + + + + Indicates either a Tweener or a Sequence + + + + TimeScale for the tween + + + If TRUE the tween wil go backwards + + + Id (usable for filtering with DOTween static methods). Can be an int, a string, an object, or anything else + + + Tween target (usable for filtering with DOTween static methods). Automatically set by tween creation shorcuts + + + Called when the tween is set in a playing state, after any eventual delay. + Also called each time the tween resumes playing from a paused state + + + Called when the tween state changes from playing to paused. + If the tween has autoKill set to FALSE, this is called also when the tween reaches completion. + + + Called when the tween is rewinded, + either by calling Rewind or by reaching the start position while playing backwards. + Rewinding a tween that is already rewinded will not fire this callback + + + Called each time the tween updates + + + Called the moment the tween completes one loop cycle + + + Called the moment the tween reaches completion (loops included) + + + Called the moment the tween is killed + + + Called when a path tween's current waypoint changes + + + Gets and sets the time position (loops included, delays excluded) of the tween + + + + Animates a single value + + + + Changes the start value of a tween and rewinds it (without pausing it). + Has no effect with tweens that are inside Sequences + The new start value + If bigger than 0 applies it as the new tween duration + + + Changes the end value of a tween and rewinds it (without pausing it). + Has no effect with tweens that are inside Sequences + The new end value + If bigger than 0 applies it as the new tween duration + If TRUE the start value will become the current target's value, otherwise it will stay the same + + + Changes the end value of a tween and rewinds it (without pausing it). + Has no effect with tweens that are inside Sequences + The new end value + If TRUE the start value will become the current target's value, otherwise it will stay the same + + + Changes the start and end value of a tween and rewinds it (without pausing it). + Has no effect with tweens that are inside Sequences + The new start value + The new end value + If bigger than 0 applies it as the new tween duration + + + + Used internally + + + + + Update type + + + + Updates every frame during Update calls + + + Updates every frame during LateUpdate calls + + + Updates using FixedUpdate calls + + + diff --git a/Assets/Third/DOTween/DOTween.XML.meta b/Assets/Third/DOTween/DOTween.XML.meta new file mode 100644 index 0000000..671debf --- /dev/null +++ b/Assets/Third/DOTween/DOTween.XML.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cf3dd5efc3432364095957779d7b010e +timeCreated: 1427036864 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/DOTween.dll b/Assets/Third/DOTween/DOTween.dll new file mode 100644 index 0000000..9a44744 Binary files /dev/null and b/Assets/Third/DOTween/DOTween.dll differ diff --git a/Assets/Third/DOTween/DOTween.dll.meta b/Assets/Third/DOTween/DOTween.dll.meta new file mode 100644 index 0000000..ed4a957 --- /dev/null +++ b/Assets/Third/DOTween/DOTween.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 74e3be7c163d29b4eb13e42e3b093ebc +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/DOTween43.dll b/Assets/Third/DOTween/DOTween43.dll new file mode 100644 index 0000000..508fad4 Binary files /dev/null and b/Assets/Third/DOTween/DOTween43.dll differ diff --git a/Assets/Third/DOTween/DOTween43.dll.meta b/Assets/Third/DOTween/DOTween43.dll.meta new file mode 100644 index 0000000..4230b41 --- /dev/null +++ b/Assets/Third/DOTween/DOTween43.dll.meta @@ -0,0 +1,24 @@ +fileFormatVersion: 2 +guid: 96124212a8a434c4baaaff8cf6006657 +timeCreated: 1427036875 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 1 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/DOTween43.xml b/Assets/Third/DOTween/DOTween43.xml new file mode 100644 index 0000000..f0efe2b --- /dev/null +++ b/Assets/Third/DOTween/DOTween43.xml @@ -0,0 +1,85 @@ + + + + DOTween43 + + + + + Methods that extend known Unity objects and allow to directly create and control tweens from their instances. + These, as all DOTween43 methods, require Unity 4.3 or later. + + + + Tweens a Material's color using the given gradient + (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). + Also stores the image as the tween's target so it can be used for filtered operations + The gradient to useThe duration of the tween + + + Tweens a Material's named color property using the given gradient + (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). + Also stores the image as the tween's target so it can be used for filtered operations + The gradient to use + The name of the material property to tween (like _Tint or _SpecColor) + The duration of the tween + + + Tweens a SpriteRenderer's color to the given value. + Also stores the spriteRenderer as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Material's alpha color to the given value. + Also stores the spriteRenderer as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a SpriteRenderer's color using the given gradient + (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). + Also stores the image as the tween's target so it can be used for filtered operations + The gradient to useThe duration of the tween + + + Tweens a Rigidbody2D's position to the given value. + Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Rigidbody2D's X position to the given value. + Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Rigidbody2D's Y position to the given value. + Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Rigidbody2D's rotation to the given value. + Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Rigidbody2D's position to the given value, while also applying a jump effect along the Y axis. + Returns a Sequence instead of a Tweener. + Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations. + IMPORTANT: a rigidbody2D can't be animated in a jump arc using MovePosition, so the tween will directly set the position + The end value to reach + Power of the jump (the max height of the jump is represented by this plus the final Y offset) + Total number of jumps + The duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a SpriteRenderer's color to the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the SpriteRenderer as the tween's target so it can be used for filtered operations + The value to tween toThe duration of the tween + + + diff --git a/Assets/Third/DOTween/DOTween43.xml.meta b/Assets/Third/DOTween/DOTween43.xml.meta new file mode 100644 index 0000000..8d98b42 --- /dev/null +++ b/Assets/Third/DOTween/DOTween43.xml.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bee01d69fe6a7fe40b5abe7cf7256796 +timeCreated: 1427036876 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/DOTween46.dll b/Assets/Third/DOTween/DOTween46.dll new file mode 100644 index 0000000..9c38424 Binary files /dev/null and b/Assets/Third/DOTween/DOTween46.dll differ diff --git a/Assets/Third/DOTween/DOTween46.dll.meta b/Assets/Third/DOTween/DOTween46.dll.meta new file mode 100644 index 0000000..2bcabf3 --- /dev/null +++ b/Assets/Third/DOTween/DOTween46.dll.meta @@ -0,0 +1,24 @@ +fileFormatVersion: 2 +guid: e533a471b73bc124e9b533b673c8fcde +timeCreated: 1427036876 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 1 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/DOTween46.xml b/Assets/Third/DOTween/DOTween46.xml new file mode 100644 index 0000000..35ff34d --- /dev/null +++ b/Assets/Third/DOTween/DOTween46.xml @@ -0,0 +1,214 @@ + + + + DOTween46 + + + + + Various utils that require Unity 4.6 or later + + + + + Converts the anchoredPosition of the first RectTransform to the second RectTransform, + taking into consideration offset, anchors and pivot, and returns the new anchoredPosition + + + + + Methods that extend known Unity objects and allow to directly create and control tweens from their instances. + These, as all DOTween46 methods, require Unity 4.6 or later. + + + + Tweens a CanvasGroup's alpha color to the given value. + Also stores the canvasGroup as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens an Graphic's color to the given value. + Also stores the image as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens an Graphic's alpha color to the given value. + Also stores the image as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens an Image's color to the given value. + Also stores the image as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens an Image's alpha color to the given value. + Also stores the image as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens an Image's fillAmount to the given value. + Also stores the image as the tween's target so it can be used for filtered operations + The end value to reach (0 to 1)The duration of the tween + + + Tweens an Image's colors using the given gradient + (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). + Also stores the image as the tween's target so it can be used for filtered operations + The gradient to useThe duration of the tween + + + Tweens an LayoutElement's flexibleWidth/Height to the given value. + Also stores the LayoutElement as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens an LayoutElement's minWidth/Height to the given value. + Also stores the LayoutElement as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens an LayoutElement's preferredWidth/Height to the given value. + Also stores the LayoutElement as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Outline's effectColor to the given value. + Also stores the Outline as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Outline's effectColor alpha to the given value. + Also stores the Outline as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Outline's effectDistance to the given value. + Also stores the Outline as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a RectTransform's anchoredPosition to the given value. + Also stores the RectTransform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a RectTransform's anchoredPosition X to the given value. + Also stores the RectTransform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a RectTransform's anchoredPosition Y to the given value. + Also stores the RectTransform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a RectTransform's anchoredPosition3D to the given value. + Also stores the RectTransform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a RectTransform's sizeDelta to the given value. + Also stores the RectTransform as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Punches a RectTransform's anchoredPosition towards the given direction and then back to the starting one + as if it was connected to the starting position via an elastic. + Also stores the RectTransform as the tween's target so it can be used for filtered operations + The direction and strength of the punch (added to the RectTransform's current position) + The duration of the tween + Indicates how much will the punch vibrate + Represents how much (0 to 1) the vector will go beyond the starting position when bouncing backwards. + 1 creates a full oscillation between the punch direction and the opposite direction, + while 0 oscillates only between the punch and the start position + If TRUE the tween will smoothly snap all values to integers + + + Shakes a RectTransform's anchoredPosition with the given values. + Also stores the RectTransform as the tween's target so it can be used for filtered operations + The duration of the tween + The shake strength + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the tween will smoothly snap all values to integers + + + Shakes a RectTransform's anchoredPosition with the given values. + Also stores the RectTransform as the tween's target so it can be used for filtered operations + The duration of the tween + The shake strength on each axis + Indicates how much will the shake vibrate + Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). + Setting it to 0 will shake along a single direction. + If TRUE the tween will smoothly snap all values to integers + + + Tweens a RectTransform's anchoredPosition to the given value, while also applying a jump effect along the Y axis. + Returns a Sequence instead of a Tweener. + Also stores the RectTransform as the tween's target so it can be used for filtered operations + The end value to reach + Power of the jump (the max height of the jump is represented by this plus the final Y offset) + Total number of jumps + The duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Slider's value to the given value. + Also stores the Slider as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + If TRUE the tween will smoothly snap all values to integers + + + Tweens a Text's color to the given value. + Also stores the Text as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Text's alpha color to the given value. + Also stores the Text as the tween's target so it can be used for filtered operations + The end value to reachThe duration of the tween + + + Tweens a Text's text to the given value. + Also stores the Text as the tween's target so it can be used for filtered operations + The end string to tween toThe duration of the tween + If TRUE (default), rich text will be interpreted correctly while animated, + otherwise all tags will be considered as normal text + The type of scramble mode to use, if any + A string containing the characters to use for scrambling. + Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters. + Leave it to NULL (default) to use default ones + + + Tweens a Graphic's color to the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the Graphic as the tween's target so it can be used for filtered operations + The value to tween toThe duration of the tween + + + Tweens a Image's color to the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the Image as the tween's target so it can be used for filtered operations + The value to tween toThe duration of the tween + + + Tweens a Text's color BY the given value, + in a way that allows other DOBlendableColor tweens to work together on the same target, + instead than fight each other as multiple DOColor would do. + Also stores the Text as the tween's target so it can be used for filtered operations + The value to tween toThe duration of the tween + + + diff --git a/Assets/Third/DOTween/DOTween46.xml.meta b/Assets/Third/DOTween/DOTween46.xml.meta new file mode 100644 index 0000000..5599a23 --- /dev/null +++ b/Assets/Third/DOTween/DOTween46.xml.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 11b4db111ab0d92449c73aa232309358 +timeCreated: 1427036876 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/DOTween50.dll b/Assets/Third/DOTween/DOTween50.dll new file mode 100644 index 0000000..3353626 Binary files /dev/null and b/Assets/Third/DOTween/DOTween50.dll differ diff --git a/Assets/Third/DOTween/DOTween50.dll.meta b/Assets/Third/DOTween/DOTween50.dll.meta new file mode 100644 index 0000000..3ff8968 --- /dev/null +++ b/Assets/Third/DOTween/DOTween50.dll.meta @@ -0,0 +1,24 @@ +fileFormatVersion: 2 +guid: 244f321fc1b65154cb9485465856c92f +timeCreated: 1427036875 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 1 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/DOTween50.xml b/Assets/Third/DOTween/DOTween50.xml new file mode 100644 index 0000000..7952aa7 --- /dev/null +++ b/Assets/Third/DOTween/DOTween50.xml @@ -0,0 +1,112 @@ + + + + DOTween50 + + + + + Methods that extend known Unity objects and allow to directly create and control tweens from their instances. + These, as all DOTween50 methods, require Unity 5.0 or later. + + + + Tweens an AudioMixer's exposed float to the given value. + Also stores the AudioMixer as the tween's target so it can be used for filtered operations. + Note that you need to manually expose a float in an AudioMixerGroup in order to be able to tween it from an AudioMixer. + Name given to the exposed float to set + The end value to reachThe duration of the tween + + + + Completes all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens completed + (meaning the tweens that don't have infinite loops and were not already complete) + + For Sequences only: if TRUE also internal Sequence callbacks will be fired, + otherwise they will be ignored + + + + Kills all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens killed. + + If TRUE completes the tween before killing it + + + + Flips the direction (backwards if it was going forward or viceversa) of all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens flipped. + + + + + Sends to the given position all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens involved. + + Time position to reach + (if higher than the whole tween duration the tween will simply reach its end) + If TRUE will play the tween after reaching the given position, otherwise it will pause it + + + + Pauses all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens paused. + + + + + Plays all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Plays backwards all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Plays forward all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens played. + + + + + Restarts all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens restarted. + + + + + Rewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + + + + Smoothly rewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + + + + Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens involved. + + + + diff --git a/Assets/Third/DOTween/DOTween50.xml.meta b/Assets/Third/DOTween/DOTween50.xml.meta new file mode 100644 index 0000000..506fe3b --- /dev/null +++ b/Assets/Third/DOTween/DOTween50.xml.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 77cae47a46077594587f7b82623ca74c +timeCreated: 1427036876 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/Editor.meta b/Assets/Third/DOTween/Editor.meta new file mode 100644 index 0000000..a0e738b --- /dev/null +++ b/Assets/Third/DOTween/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3ca6bf15d9b90cd4990be7fb8e6ec9f3 +folderAsset: yes +timeCreated: 1427036860 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/Editor/DOTweenEditor.XML b/Assets/Third/DOTween/Editor/DOTweenEditor.XML new file mode 100644 index 0000000..6afe743 --- /dev/null +++ b/Assets/Third/DOTween/Editor/DOTweenEditor.XML @@ -0,0 +1,65 @@ + + + + DOTweenEditor + + + + + Checks that the given editor texture use the correct import settings, + and applies them if they're incorrect. + + + + + Returns TRUE if addons setup is required. + + + + + Returns TRUE if the file/directory at the given path exists. + + Path, relative to Unity's project folder + + + + + Converts the given project-relative path to a full path, + with backward (\) slashes). + + + + + Converts the given full path to a path usable with AssetDatabase methods + (relative to Unity's project folder, and with the correct Unity forward (/) slashes). + + + + + Connects to a asset. + If the asset already exists at the given path, loads it and returns it. + Otherwise, either returns NULL or automatically creates it before loading and returning it + (depending on the given parameters). + + Asset type + File path (relative to Unity's project folder) + If TRUE and the requested asset doesn't exist, forces its creation + + + + Full path for the given loaded assembly, assembly file included + + + + + Not used as menu item anymore, but as a utiity function + + + + + Setups DOTween + + If TRUE, no warning window appears in case there is no need for setup + + + diff --git a/Assets/Third/DOTween/Editor/DOTweenEditor.XML.meta b/Assets/Third/DOTween/Editor/DOTweenEditor.XML.meta new file mode 100644 index 0000000..bddf887 --- /dev/null +++ b/Assets/Third/DOTween/Editor/DOTweenEditor.XML.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 333ef51bd34e0c0438c797c940a9deca +timeCreated: 1427036864 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/Editor/DOTweenEditor.dll b/Assets/Third/DOTween/Editor/DOTweenEditor.dll new file mode 100644 index 0000000..261d278 Binary files /dev/null and b/Assets/Third/DOTween/Editor/DOTweenEditor.dll differ diff --git a/Assets/Third/DOTween/Editor/DOTweenEditor.dll.meta b/Assets/Third/DOTween/Editor/DOTweenEditor.dll.meta new file mode 100644 index 0000000..de0ba1a --- /dev/null +++ b/Assets/Third/DOTween/Editor/DOTweenEditor.dll.meta @@ -0,0 +1,24 @@ +fileFormatVersion: 2 +guid: 38810da415702fd4aab9977b3df97710 +timeCreated: 1427036861 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/Editor/Imgs.meta b/Assets/Third/DOTween/Editor/Imgs.meta new file mode 100644 index 0000000..86b1abd --- /dev/null +++ b/Assets/Third/DOTween/Editor/Imgs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1dfe61e24e680694980c3eee8118d7ec +folderAsset: yes +timeCreated: 1427036860 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/Editor/Imgs/DOTweenIcon.png b/Assets/Third/DOTween/Editor/Imgs/DOTweenIcon.png new file mode 100644 index 0000000..d06fc7c Binary files /dev/null and b/Assets/Third/DOTween/Editor/Imgs/DOTweenIcon.png differ diff --git a/Assets/Third/DOTween/Editor/Imgs/DOTweenIcon.png.meta b/Assets/Third/DOTween/Editor/Imgs/DOTweenIcon.png.meta new file mode 100644 index 0000000..86cdcd1 --- /dev/null +++ b/Assets/Third/DOTween/Editor/Imgs/DOTweenIcon.png.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: 4ed8201294efcdc418e9a28b8a7c718d +timeCreated: 1427036864 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/Editor/Imgs/Footer.png b/Assets/Third/DOTween/Editor/Imgs/Footer.png new file mode 100644 index 0000000..e29d02f Binary files /dev/null and b/Assets/Third/DOTween/Editor/Imgs/Footer.png differ diff --git a/Assets/Third/DOTween/Editor/Imgs/Footer.png.meta b/Assets/Third/DOTween/Editor/Imgs/Footer.png.meta new file mode 100644 index 0000000..bc0ae34 --- /dev/null +++ b/Assets/Third/DOTween/Editor/Imgs/Footer.png.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: bc517d9bee912274899c614a39b2aada +timeCreated: 1427036867 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/Editor/Imgs/Footer_dark.png b/Assets/Third/DOTween/Editor/Imgs/Footer_dark.png new file mode 100644 index 0000000..e48db5e Binary files /dev/null and b/Assets/Third/DOTween/Editor/Imgs/Footer_dark.png differ diff --git a/Assets/Third/DOTween/Editor/Imgs/Footer_dark.png.meta b/Assets/Third/DOTween/Editor/Imgs/Footer_dark.png.meta new file mode 100644 index 0000000..f833d7e --- /dev/null +++ b/Assets/Third/DOTween/Editor/Imgs/Footer_dark.png.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: 60fadf5ced9d98e4ba59c9215cc3523a +timeCreated: 1431101102 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/Editor/Imgs/Header.jpg b/Assets/Third/DOTween/Editor/Imgs/Header.jpg new file mode 100644 index 0000000..4d710d7 Binary files /dev/null and b/Assets/Third/DOTween/Editor/Imgs/Header.jpg differ diff --git a/Assets/Third/DOTween/Editor/Imgs/Header.jpg.meta b/Assets/Third/DOTween/Editor/Imgs/Header.jpg.meta new file mode 100644 index 0000000..8ed4807 --- /dev/null +++ b/Assets/Third/DOTween/Editor/Imgs/Header.jpg.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: ecb47b61c64c5f046ae933668cbe0d03 +timeCreated: 1427036867 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 512 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/Resources.meta b/Assets/Third/DOTween/Resources.meta new file mode 100644 index 0000000..ab861cd --- /dev/null +++ b/Assets/Third/DOTween/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c4b9626f797f87f48b11c81e69cd3023 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/Resources/DOTweenSettings.asset b/Assets/Third/DOTween/Resources/DOTweenSettings.asset new file mode 100644 index 0000000..5b3878b --- /dev/null +++ b/Assets/Third/DOTween/Resources/DOTweenSettings.asset @@ -0,0 +1,29 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 16995157, guid: 74e3be7c163d29b4eb13e42e3b093ebc, type: 3} + m_Name: DOTweenSettings + m_EditorClassIdentifier: + useSafeMode: 1 + timeScale: 1 + useSmoothDeltaTime: 0 + showUnityEditorReport: 0 + logBehaviour: 2 + drawGizmos: 1 + defaultRecyclable: 0 + defaultAutoPlay: 3 + defaultUpdateType: 0 + defaultTimeScaleIndependent: 0 + defaultEaseType: 6 + defaultEaseOvershootOrAmplitude: 1.70158 + defaultEasePeriod: 0 + defaultAutoKill: 1 + defaultLoopType: 0 + storeSettingsLocation: 0 diff --git a/Assets/Third/DOTween/Resources/DOTweenSettings.asset.meta b/Assets/Third/DOTween/Resources/DOTweenSettings.asset.meta new file mode 100644 index 0000000..c151fbd --- /dev/null +++ b/Assets/Third/DOTween/Resources/DOTweenSettings.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5969783af46b0bf4581024cea7c5c9c5 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/DOTween/readme.txt b/Assets/Third/DOTween/readme.txt new file mode 100644 index 0000000..1f7bd5a --- /dev/null +++ b/Assets/Third/DOTween/readme.txt @@ -0,0 +1,18 @@ +DOTween and DOTween Pro are copyright (c) 2014 Daniele Giardini - Demigiant + +// GET STARTED ////////////////////////////////////////////// + +- After importing a new DOTween update, select DOTween's Utility Panel from the Tools menu (if it doesn't open automatically) and press the "Setup DOTween..." button to set up additional features based on your Unity version. +- In your code, add "using DG.Tweening" to each class where you want to use DOTween. +- You're ready to tween. Check out the links below for full documentation and license info. + + +// LINKS /////////////////////////////////////////////////////// + +DOTween website (documentation, examples, etc): http://dotween.demigiant.com +DOTween license: http://dotween.demigiant.com/license.php +DOTween repository (Google Code): https://code.google.com/p/dotween/ + +// NOTES ////////////////////////////////////////////////////// + +- DOTween's Utility Panel can be found under "Tools > DOTween Utility Panel" and also contains other useful options, plus a tab to set DOTween's preferences \ No newline at end of file diff --git a/Assets/Third/DOTween/readme.txt.meta b/Assets/Third/DOTween/readme.txt.meta new file mode 100644 index 0000000..06f5c91 --- /dev/null +++ b/Assets/Third/DOTween/readme.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2200fef415aaf7c4fb2c6ed8a09c4986 +timeCreated: 1427036864 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole.meta b/Assets/Third/IngameDebugConsole.meta new file mode 100644 index 0000000..f165f7f --- /dev/null +++ b/Assets/Third/IngameDebugConsole.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c60185bea0478074c96326c4c90a8a06 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Android.meta b/Assets/Third/IngameDebugConsole/Android.meta new file mode 100644 index 0000000..f5687fd --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Android.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3d7d7a61a5341904eb3c65af025b1d86 +folderAsset: yes +timeCreated: 1510075633 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Android/DebugLogLogcatListener.cs b/Assets/Third/IngameDebugConsole/Android/DebugLogLogcatListener.cs new file mode 100644 index 0000000..95e8df7 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Android/DebugLogLogcatListener.cs @@ -0,0 +1,54 @@ +#if !UNITY_EDITOR && UNITY_ANDROID +using System.Collections.Generic; +using UnityEngine; + +// Credit: https://stackoverflow.com/a/41018028/2373034 +namespace IngameDebugConsole +{ + public class DebugLogLogcatListener : AndroidJavaProxy + { + private Queue queuedLogs; + private AndroidJavaObject nativeObject; + + public DebugLogLogcatListener() : base( "com.yasirkula.unity.DebugConsoleLogcatLogReceiver" ) + { + queuedLogs = new Queue( 16 ); + } + + ~DebugLogLogcatListener() + { + Stop(); + + if( nativeObject != null ) + nativeObject.Dispose(); + } + + public void Start( string arguments ) + { + if( nativeObject == null ) + nativeObject = new AndroidJavaObject( "com.yasirkula.unity.DebugConsoleLogcatLogger" ); + + nativeObject.Call( "Start", this, arguments ); + } + + public void Stop() + { + if( nativeObject != null ) + nativeObject.Call( "Stop" ); + } + + public void OnLogReceived( string log ) + { + queuedLogs.Enqueue( log ); + } + + public string GetLog() + { + if( queuedLogs.Count > 0 ) + return queuedLogs.Dequeue(); + + return null; + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Third/IngameDebugConsole/Android/DebugLogLogcatListener.cs.meta b/Assets/Third/IngameDebugConsole/Android/DebugLogLogcatListener.cs.meta new file mode 100644 index 0000000..8136218 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Android/DebugLogLogcatListener.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: dd3b7385882055d4a8c2b91deb6b2470 +timeCreated: 1510076185 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Android/IngameDebugConsole.aar b/Assets/Third/IngameDebugConsole/Android/IngameDebugConsole.aar new file mode 100644 index 0000000..759bab3 Binary files /dev/null and b/Assets/Third/IngameDebugConsole/Android/IngameDebugConsole.aar differ diff --git a/Assets/Third/IngameDebugConsole/Android/IngameDebugConsole.aar.meta b/Assets/Third/IngameDebugConsole/Android/IngameDebugConsole.aar.meta new file mode 100644 index 0000000..0a86136 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Android/IngameDebugConsole.aar.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: bf909fab1c14af446b0a854de42289b2 +timeCreated: 1510086220 +licenseType: Free +PluginImporter: + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + data: + first: + Android: Android + second: + enabled: 1 + settings: {} + data: + first: + Any: + second: + enabled: 0 + settings: {} + data: + first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Editor.meta b/Assets/Third/IngameDebugConsole/Editor.meta new file mode 100644 index 0000000..e0cbe6d --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 86f54622630720f4abe279acdbb8886f +folderAsset: yes +timeCreated: 1561217660 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Editor/DebugLogManagerEditor.cs b/Assets/Third/IngameDebugConsole/Editor/DebugLogManagerEditor.cs new file mode 100644 index 0000000..1ce60b3 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Editor/DebugLogManagerEditor.cs @@ -0,0 +1,106 @@ +using UnityEditor; + +namespace IngameDebugConsole +{ + [CustomEditor( typeof( DebugLogManager ) )] + public class DebugLogManagerEditor : Editor + { + private SerializedProperty singleton; + private SerializedProperty minimumHeight; + private SerializedProperty enableHorizontalResizing; + private SerializedProperty resizeFromRight; + private SerializedProperty minimumWidth; + private SerializedProperty enablePopup; + private SerializedProperty startInPopupMode; + private SerializedProperty startMinimized; + private SerializedProperty toggleWithKey; + private SerializedProperty toggleKey; + private SerializedProperty enableSearchbar; + private SerializedProperty topSearchbarMinWidth; + private SerializedProperty captureLogTimestamps; + private SerializedProperty alwaysDisplayTimestamps; + private SerializedProperty clearCommandAfterExecution; + private SerializedProperty commandHistorySize; + private SerializedProperty showCommandSuggestions; + private SerializedProperty receiveLogcatLogsInAndroid; + private SerializedProperty logcatArguments; + + private void OnEnable() + { + singleton = serializedObject.FindProperty( "singleton" ); + minimumHeight = serializedObject.FindProperty( "minimumHeight" ); + enableHorizontalResizing = serializedObject.FindProperty( "enableHorizontalResizing" ); + resizeFromRight = serializedObject.FindProperty( "resizeFromRight" ); + minimumWidth = serializedObject.FindProperty( "minimumWidth" ); + enablePopup = serializedObject.FindProperty( "enablePopup" ); + startInPopupMode = serializedObject.FindProperty( "startInPopupMode" ); + startMinimized = serializedObject.FindProperty( "startMinimized" ); + toggleWithKey = serializedObject.FindProperty( "toggleWithKey" ); +#if ENABLE_INPUT_SYSTEM && !ENABLE_LEGACY_INPUT_MANAGER + toggleKey = serializedObject.FindProperty( "toggleBinding" ); +#else + toggleKey = serializedObject.FindProperty( "toggleKey" ); +#endif + enableSearchbar = serializedObject.FindProperty( "enableSearchbar" ); + topSearchbarMinWidth = serializedObject.FindProperty( "topSearchbarMinWidth" ); + captureLogTimestamps = serializedObject.FindProperty( "captureLogTimestamps" ); + alwaysDisplayTimestamps = serializedObject.FindProperty( "alwaysDisplayTimestamps" ); + clearCommandAfterExecution = serializedObject.FindProperty( "clearCommandAfterExecution" ); + commandHistorySize = serializedObject.FindProperty( "commandHistorySize" ); + showCommandSuggestions = serializedObject.FindProperty( "showCommandSuggestions" ); + receiveLogcatLogsInAndroid = serializedObject.FindProperty( "receiveLogcatLogsInAndroid" ); + logcatArguments = serializedObject.FindProperty( "logcatArguments" ); + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + EditorGUILayout.PropertyField( singleton ); + EditorGUILayout.PropertyField( minimumHeight ); + + EditorGUILayout.PropertyField( enableHorizontalResizing ); + if( enableHorizontalResizing.boolValue ) + { + DrawSubProperty( resizeFromRight ); + DrawSubProperty( minimumWidth ); + } + + EditorGUILayout.PropertyField( enablePopup ); + if( enablePopup.boolValue ) + DrawSubProperty( startInPopupMode ); + else + DrawSubProperty( startMinimized ); + + EditorGUILayout.PropertyField( toggleWithKey ); + if( toggleWithKey.boolValue ) + DrawSubProperty( toggleKey ); + + EditorGUILayout.PropertyField( enableSearchbar ); + if( enableSearchbar.boolValue ) + DrawSubProperty( topSearchbarMinWidth ); + + EditorGUILayout.PropertyField( captureLogTimestamps ); + if( captureLogTimestamps.boolValue ) + DrawSubProperty( alwaysDisplayTimestamps ); + + EditorGUILayout.PropertyField( clearCommandAfterExecution ); + EditorGUILayout.PropertyField( commandHistorySize ); + EditorGUILayout.PropertyField( showCommandSuggestions ); + + EditorGUILayout.PropertyField( receiveLogcatLogsInAndroid ); + if( receiveLogcatLogsInAndroid.boolValue ) + DrawSubProperty( logcatArguments ); + + DrawPropertiesExcluding( serializedObject, "m_Script" ); + serializedObject.ApplyModifiedProperties(); + } + + private void DrawSubProperty( SerializedProperty property ) + { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField( property ); + EditorGUI.indentLevel--; + } + } +} \ No newline at end of file diff --git a/Assets/Third/IngameDebugConsole/Editor/DebugLogManagerEditor.cs.meta b/Assets/Third/IngameDebugConsole/Editor/DebugLogManagerEditor.cs.meta new file mode 100644 index 0000000..2d9d5e3 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Editor/DebugLogManagerEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4c23e5c521cb0c54b9a638b2a653d1d3 +timeCreated: 1561217671 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Editor/IngameDebugConsole.Editor.asmdef b/Assets/Third/IngameDebugConsole/Editor/IngameDebugConsole.Editor.asmdef new file mode 100644 index 0000000..c2ac006 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Editor/IngameDebugConsole.Editor.asmdef @@ -0,0 +1,17 @@ +{ + "name": "IngameDebugConsole.Editor", + "references": [ + "IngameDebugConsole.Runtime" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Third/IngameDebugConsole/Editor/IngameDebugConsole.Editor.asmdef.meta b/Assets/Third/IngameDebugConsole/Editor/IngameDebugConsole.Editor.asmdef.meta new file mode 100644 index 0000000..e2378b7 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Editor/IngameDebugConsole.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 466e67dabd1db22468246c39eddb6c3f +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/IngameDebugConsole.Runtime.asmdef b/Assets/Third/IngameDebugConsole/IngameDebugConsole.Runtime.asmdef new file mode 100644 index 0000000..9f4bfcf --- /dev/null +++ b/Assets/Third/IngameDebugConsole/IngameDebugConsole.Runtime.asmdef @@ -0,0 +1,3 @@ +{ + "name": "IngameDebugConsole.Runtime" +} diff --git a/Assets/Third/IngameDebugConsole/IngameDebugConsole.Runtime.asmdef.meta b/Assets/Third/IngameDebugConsole/IngameDebugConsole.Runtime.asmdef.meta new file mode 100644 index 0000000..7e13cb2 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/IngameDebugConsole.Runtime.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3de88c88fbbb8f944b9210d496af9762 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/IngameDebugConsole.prefab b/Assets/Third/IngameDebugConsole/IngameDebugConsole.prefab new file mode 100644 index 0000000..3719f02 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/IngameDebugConsole.prefab @@ -0,0 +1,4013 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &100406 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22478474} + - component: {fileID: 22292746} + - component: {fileID: 11476740} + m_Layer: 5 + m_Name: NewInfoCount + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &109254 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 437128} + - component: {fileID: 11418932} + - component: {fileID: 11492840} + - component: {fileID: 114575087663981696} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &110786 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22460680} + - component: {fileID: 22261918} + - component: {fileID: 11431488} + - component: {fileID: 114538072837526774} + m_Layer: 5 + m_Name: DebugLogWindowResize + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &118212 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22429100} + - component: {fileID: 22207004} + - component: {fileID: 11499344} + - component: {fileID: 11414302} + - component: {fileID: 11460786} + m_Layer: 5 + m_Name: Scrollbar Vertical + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &119972 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22485076} + - component: {fileID: 11471588} + m_Layer: 5 + m_Name: Viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &121708 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22456566} + - component: {fileID: 222466100300644746} + - component: {fileID: 114944715489184838} + - component: {fileID: 114777798721274074} + m_Layer: 5 + m_Name: Buttons + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &123548 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22466754} + - component: {fileID: 22288586} + - component: {fileID: 11495556} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &132536 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22457152} + - component: {fileID: 22331464} + - component: {fileID: 11440770} + - component: {fileID: 11490438} + - component: {fileID: 11452418} + m_Layer: 5 + m_Name: IngameDebugConsole + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &133140 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22428984} + - component: {fileID: 22231690} + - component: {fileID: 11400378} + - component: {fileID: 11466918} + m_Layer: 5 + m_Name: FilterLogButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &133612 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22468896} + - component: {fileID: 22255062} + - component: {fileID: 11448508} + - component: {fileID: 11477250} + m_Layer: 5 + m_Name: HideButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &135210 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22496878} + - component: {fileID: 22213036} + - component: {fileID: 11450122} + m_Layer: 5 + m_Name: ErrorCount + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &142160 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22488670} + - component: {fileID: 22236784} + - component: {fileID: 11491814} + - component: {fileID: 11437802} + m_Layer: 5 + m_Name: CollapseButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &145092 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22497984} + - component: {fileID: 22209426} + - component: {fileID: 11437286} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &148506 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22435388} + - component: {fileID: 22236120} + - component: {fileID: 11430762} + m_Layer: 5 + m_Name: WarningImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &160714 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22439026} + - component: {fileID: 22209194} + - component: {fileID: 11486984} + m_Layer: 5 + m_Name: InfoImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &161086 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22420992} + - component: {fileID: 22290652} + - component: {fileID: 11419610} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &163938 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22455554} + - component: {fileID: 22258478} + - component: {fileID: 11490350} + - component: {fileID: 11472314} + m_Layer: 5 + m_Name: FilterWarningButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &164562 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22485120} + - component: {fileID: 22261724} + - component: {fileID: 114435636144975300} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &165242 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22452256} + - component: {fileID: 22278414} + - component: {fileID: 11431640} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &166206 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22412306} + - component: {fileID: 22260676} + - component: {fileID: 11421290} + m_Layer: 5 + m_Name: ErrorImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &168792 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22431144} + - component: {fileID: 22240830} + - component: {fileID: 11411602} + m_Layer: 5 + m_Name: NewErrorCount + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &170186 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22495692} + - component: {fileID: 22248262} + - component: {fileID: 11406916} + - component: {fileID: 11420596} + m_Layer: 5 + m_Name: FilterErrorButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &171206 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22482970} + m_Layer: 5 + m_Name: Sliding Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &173314 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22436850} + - component: {fileID: 11405548} + - component: {fileID: 22273436} + - component: {fileID: 11410364} + - component: {fileID: 11414998} + m_Layer: 5 + m_Name: Debugs + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &176246 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22427174} + - component: {fileID: 22242412} + - component: {fileID: 11496004} + m_Layer: 5 + m_Name: WarningCount + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &176876 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22452314} + - component: {fileID: 22235120} + - component: {fileID: 11400274} + m_Layer: 5 + m_Name: LogCount + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &178532 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22414360} + - component: {fileID: 22223402} + - component: {fileID: 11410584} + - component: {fileID: 11491080} + - component: {fileID: 22505754} + m_Layer: 5 + m_Name: DebugLogPopup + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &183006 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22477946} + - component: {fileID: 22230524} + - component: {fileID: 11400672} + - component: {fileID: 22509978} + m_Layer: 5 + m_Name: DebugLogWindow + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &187566 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22400762} + - component: {fileID: 11453682} + m_Layer: 5 + m_Name: LogsContainer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &189604 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22426080} + - component: {fileID: 22270452} + - component: {fileID: 11419798} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &192924 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22436794} + - component: {fileID: 22260966} + - component: {fileID: 11414436} + m_Layer: 5 + m_Name: NewWarningCount + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &437128 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109254} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22457152} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &11400274 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 176876} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.83823526, g: 0.84439874, b: 0.84439874, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 2 + m_MaxSize: 16 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!114 &11400378 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 133140} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.31617647, g: 0.31617647, b: 0.31617647, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11400672 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 183006} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.21960784, g: 0.21960784, b: 0.21960784, a: 0.797} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11405548 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 173314} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1367256648, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Content: {fileID: 22400762} + m_Horizontal: 0 + m_Vertical: 1 + m_MovementType: 2 + m_Elasticity: 0.1 + m_Inertia: 1 + m_DecelerationRate: 0.01 + m_ScrollSensitivity: 25 + m_Viewport: {fileID: 22485076} + m_HorizontalScrollbar: {fileID: 0} + m_VerticalScrollbar: {fileID: 11414302} + m_HorizontalScrollbarVisibility: 2 + m_VerticalScrollbarVisibility: 0 + m_HorizontalScrollbarSpacing: -3 + m_VerticalScrollbarSpacing: -3 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11406916 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 170186} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.31617647, g: 0.31617647, b: 0.31617647, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11410364 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 173314} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11410584 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 178532} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.30588236, g: 0.30588236, b: 0.30588236, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: b3f0d976f6d6802479d6465d11b3aa68, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11411602 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 168792} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.83823526, g: 0.84439874, b: 0.84439874, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 2 + m_MaxSize: 16 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!114 &11414302 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 118212} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2061169968, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11419798} + m_HandleRect: {fileID: 22426080} + m_Direction: 2 + m_Value: 0 + m_Size: 1 + m_NumberOfSteps: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Scrollbar+ScrollEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11414436 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 192924} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.83823526, g: 0.84439874, b: 0.84439874, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 2 + m_MaxSize: 16 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!114 &11414998 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 173314} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cb564dcb180e586429c57456166a76b5, type: 3} + m_Name: + m_EditorClassIdentifier: + debugsScrollRect: {fileID: 11405548} + debugLogManager: {fileID: 11452418} +--- !u!114 &11418932 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 0 + m_DragThreshold: 5 +--- !u!114 &11419610 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 161086} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.9485294, g: 0.9485294, b: 0.9485294, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: a9fd8f6b461461f4a92eafc60921ee78, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11419798 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 189604} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.2509804, g: 0.2509804, b: 0.2509804, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11420596 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 170186} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11406916} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11421290 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 166206} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 66305a19e3614694f868c75a982e6b68, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11430762 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148506} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 05c7216c78d4dd34ebe2bac9c1e274d7, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11431488 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 110786} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.31617647, g: 0.31617647, b: 0.31617647, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11431640 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 165242} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 66305a19e3614694f868c75a982e6b68, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11437286 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 145092} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 5a97d5afa6254804f81b7ba956296996, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11437802 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 142160} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11491814} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11440770 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 132536} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 1 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!114 &11448508 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 133612} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.31617647, g: 0.31617647, b: 0.31617647, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11450122 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 135210} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.83823526, g: 0.84439874, b: 0.84439874, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 2 + m_MaxSize: 16 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!114 &11452418 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 132536} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6a4f16ed905adcd4ab0d7c8c11f0d72c, type: 3} + m_Name: + m_EditorClassIdentifier: + singleton: 1 + minimumHeight: 200 + enableHorizontalResizing: 0 + resizeFromRight: 1 + minimumWidth: 240 + enablePopup: 1 + startInPopupMode: 1 + startMinimized: 0 + toggleWithKey: 1 + toggleKey: 96 + enableSearchbar: 1 + topSearchbarMinWidth: 360 + clearCommandAfterExecution: 1 + commandHistorySize: 15 + showCommandSuggestions: 1 + receiveLogcatLogsInAndroid: 0 + logcatArguments: + avoidScreenCutout: 1 + maxLogLength: 10000 + autoFocusOnCommandInputField: 1 + logItemPrefab: {fileID: 11408050, guid: 391be5df5ef62f345bb76a1051c04da7, type: 2} + commandSuggestionPrefab: {fileID: 114169395487023046, guid: 5e66896448428cf46a1854dbdc014914, + type: 2} + infoLog: {fileID: 21300000, guid: 5a97d5afa6254804f81b7ba956296996, type: 3} + warningLog: {fileID: 21300000, guid: 05c7216c78d4dd34ebe2bac9c1e274d7, type: 3} + errorLog: {fileID: 21300000, guid: 66305a19e3614694f868c75a982e6b68, type: 3} + resizeIconAllDirections: {fileID: 21300000, guid: 7f0db3cf23c93fc4eac01cb3a52388ee, + type: 3} + resizeIconVerticalOnly: {fileID: 21300000, guid: a9fd8f6b461461f4a92eafc60921ee78, + type: 3} + collapseButtonNormalColor: {r: 0.31617647, g: 0.31617647, b: 0.31617647, a: 1} + collapseButtonSelectedColor: {r: 0.44117647, g: 0.4346886, b: 0.4346886, a: 1} + filterButtonsNormalColor: {r: 0.31617647, g: 0.31617647, b: 0.31617647, a: 1} + filterButtonsSelectedColor: {r: 0.44117647, g: 0.4346886, b: 0.4346886, a: 1} + commandSuggestionHighlightStart: + commandSuggestionHighlightEnd: + logWindowTR: {fileID: 22477946} + logItemsContainer: {fileID: 22400762} + commandSuggestionsContainer: {fileID: 224982529675224150} + commandInputField: {fileID: 114000010993257018} + hideButton: {fileID: 11477250} + clearButton: {fileID: 114466839828933532} + collapseButton: {fileID: 11491814} + filterInfoButton: {fileID: 11400378} + filterWarningButton: {fileID: 11490350} + filterErrorButton: {fileID: 11406916} + infoEntryCountText: {fileID: 11400274} + warningEntryCountText: {fileID: 11496004} + errorEntryCountText: {fileID: 11450122} + searchbar: {fileID: 224927884203097686} + searchbarSlotTop: {fileID: 224619367409363176} + searchbarSlotBottom: {fileID: 224755787573573022} + resizeButton: {fileID: 11419610} + snapToBottomButton: {fileID: 1486651836328188} + logWindowCanvasGroup: {fileID: 22509978} + popupManager: {fileID: 11491080} + logItemsScrollRect: {fileID: 11405548} + recycledListView: {fileID: 11453682} +--- !u!114 &11453682 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 187566} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce231987d32488f43b6fb798f7df43f6, type: 3} + m_Name: + m_EditorClassIdentifier: + transformComponent: {fileID: 22400762} + viewportTransform: {fileID: 22485076} + debugManager: {fileID: 11452418} + logItemNormalColor1: {r: 0.23529412, g: 0.23529412, b: 0.23529412, a: 0.697} + logItemNormalColor2: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.697} + logItemSelectedColor: {r: 0.32941177, g: 0.4862745, b: 0.7058824, a: 0.697} +--- !u!114 &11460786 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 118212} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1862395651, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Delegates: + - eventID: 13 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11414998} + m_MethodName: OnScrollbarDragStart + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.EventSystems.EventTrigger+TriggerEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + - eventID: 14 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11414998} + m_MethodName: OnScrollbarDragEnd + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.EventSystems.EventTrigger+TriggerEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + delegates: [] +--- !u!114 &11466918 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 133140} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11400378} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11471588 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 119972} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -146154839, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &11472314 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 163938} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11490350} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11476740 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100406} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.83823526, g: 0.84439874, b: 0.84439874, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 2 + m_MaxSize: 16 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!114 &11477250 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 133612} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11448508} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11486984 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 160714} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 5a97d5afa6254804f81b7ba956296996, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11490350 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 163938} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.31617647, g: 0.31617647, b: 0.31617647, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11490438 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 132536} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &11491080 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 178532} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 05cc4b1999716644c9308528e38e7081, type: 3} + m_Name: + m_EditorClassIdentifier: + debugManager: {fileID: 11452418} + newInfoCountText: {fileID: 11476740} + newWarningCountText: {fileID: 11414436} + newErrorCountText: {fileID: 11411602} + alertColorInfo: {r: 0.050980393, g: 0.32941177, b: 0.5647059, a: 1} + alertColorWarning: {r: 0.59607846, g: 0.45490196, b: 0, a: 1} + alertColorError: {r: 0.5647059, g: 0.050980393, b: 0.050980393, a: 1} +--- !u!114 &11491814 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 142160} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.31617647, g: 0.31617647, b: 0.31617647, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11492840 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &11495556 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 123548} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 05c7216c78d4dd34ebe2bac9c1e274d7, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11496004 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 176246} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.83823526, g: 0.84439874, b: 0.84439874, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 2 + m_MaxSize: 16 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!114 &11499344 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 118212} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &22207004 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 118212} +--- !u!222 &22209194 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 160714} +--- !u!222 &22209426 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 145092} +--- !u!222 &22213036 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 135210} +--- !u!222 &22223402 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 178532} +--- !u!222 &22230524 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 183006} +--- !u!222 &22231690 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 133140} +--- !u!222 &22235120 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 176876} +--- !u!222 &22236120 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148506} +--- !u!222 &22236784 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 142160} +--- !u!222 &22240830 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 168792} +--- !u!222 &22242412 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 176246} +--- !u!222 &22248262 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 170186} +--- !u!222 &22255062 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 133612} +--- !u!222 &22258478 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 163938} +--- !u!222 &22260676 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 166206} +--- !u!222 &22260966 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 192924} +--- !u!222 &22261724 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 164562} +--- !u!222 &22261918 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 110786} +--- !u!222 &22270452 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 189604} +--- !u!222 &22273436 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 173314} +--- !u!222 &22278414 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 165242} +--- !u!222 &22288586 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 123548} +--- !u!222 &22290652 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 161086} +--- !u!222 &22292746 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100406} +--- !u!223 &22331464 +Canvas: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 132536} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 25 + m_SortingLayerID: 0 + m_SortingOrder: 1001 + m_TargetDisplay: 0 +--- !u!224 &22400762 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 187566} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22485076} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0.00012207031} + m_SizeDelta: {x: 0, y: 50} + m_Pivot: {x: 0, y: 1} +--- !u!224 &22412306 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 166206} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22414360} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.025} + m_AnchorMax: {x: 0.45, y: 0.325} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -1, y: 0} + m_Pivot: {x: 1, y: 0.5} +--- !u!224 &22414360 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 178532} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22439026} + - {fileID: 22435388} + - {fileID: 22412306} + - {fileID: 22478474} + - {fileID: 22436794} + - {fileID: 22431144} + m_Father: {fileID: 22457152} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 1000, y: 0} + m_SizeDelta: {x: 72, y: 72} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22420992 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 161086} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22460680} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.15, y: 0.12} + m_AnchorMax: {x: 0.85, y: 0.88} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22426080 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 189604} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22482970} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22427174 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 176246} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22455554} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.55, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -2, y: -2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22428984 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 133140} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22497984} + - {fileID: 22452314} + m_Father: {fileID: 22456566} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22429100 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 118212} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22482970} + m_Father: {fileID: 22436850} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 28, y: 0} + m_Pivot: {x: 1, y: 1} +--- !u!224 &22431144 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 168792} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22414360} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.45, y: 0.025} + m_AnchorMax: {x: 1, y: 0.325} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: -2, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22435388 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148506} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22414360} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.35} + m_AnchorMax: {x: 0.45, y: 0.65} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -1, y: 0} + m_Pivot: {x: 1, y: 0.5} +--- !u!224 &22436794 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 192924} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22414360} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.45, y: 0.35} + m_AnchorMax: {x: 1, y: 0.65} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: -2, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22436850 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 173314} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22485076} + - {fileID: 22429100} + m_Father: {fileID: 22477946} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: -72} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22439026 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 160714} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22414360} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.675} + m_AnchorMax: {x: 0.45, y: 0.975} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -1, y: 0} + m_Pivot: {x: 1, y: 0.5} +--- !u!224 &22452256 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 165242} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22495692} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.55, y: 1} + m_AnchoredPosition: {x: 1, y: 0.5} + m_SizeDelta: {x: -2, y: -7} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22452314 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 176876} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22428984} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.55, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -2, y: -2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22455554 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 163938} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22466754} + - {fileID: 22427174} + m_Father: {fileID: 22456566} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22456566 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 121708} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224856348943071238} + - {fileID: 22488670} + - {fileID: 224619367409363176} + - {fileID: 22428984} + - {fileID: 22455554} + - {fileID: 22495692} + - {fileID: 22468896} + m_Father: {fileID: 22477946} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 36} + m_Pivot: {x: 1, y: 1} +--- !u!224 &22457152 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 132536} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 22477946} + - {fileID: 22414360} + - {fileID: 437128} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!224 &22460680 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 110786} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22420992} + m_Father: {fileID: 22477946} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 64, y: 36} + m_Pivot: {x: 1, y: 0} +--- !u!224 &22466754 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 123548} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22455554} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.55, y: 1} + m_AnchoredPosition: {x: 1, y: 0.5} + m_SizeDelta: {x: -2, y: -7} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22468896 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 133612} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22485120} + m_Father: {fileID: 22456566} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22477946 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 183006} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22456566} + - {fileID: 224755787573573022} + - {fileID: 22436850} + - {fileID: 224175272648112170} + - {fileID: 224000011255372986} + - {fileID: 22460680} + m_Father: {fileID: 22457152} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!224 &22478474 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100406} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22414360} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.45, y: 0.675} + m_AnchorMax: {x: 1, y: 0.975} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: -2, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22482970 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 171206} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22426080} + m_Father: {fileID: 22429100} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22485076 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 119972} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22400762} + - {fileID: 224170087475393432} + m_Father: {fileID: 22436850} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -29, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!224 &22485120 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 164562} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22468896} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.15, y: 0.12} + m_AnchorMax: {x: 0.85, y: 0.88} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22488670 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 142160} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224781297716539566} + m_Father: {fileID: 22456566} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22495692 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 170186} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22452256} + - {fileID: 22496878} + m_Father: {fileID: 22456566} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22496878 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 135210} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22495692} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.55, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -2, y: -2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22497984 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 145092} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22428984} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.55, y: 1} + m_AnchoredPosition: {x: 1, y: 0.5} + m_SizeDelta: {x: -2, y: -7} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!225 &22505754 +CanvasGroup: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 178532} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!225 &22509978 +CanvasGroup: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 183006} + m_Enabled: 1 + m_Alpha: 0 + m_Interactable: 0 + m_BlocksRaycasts: 0 + m_IgnoreParentGroups: 0 +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 132536} + m_IsPrefabParent: 1 +--- !u!1 &1000010562689872 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224000014081388310} + - component: {fileID: 222000011960742964} + - component: {fileID: 114000012764979206} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000013017939458 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224000014244241328} + - component: {fileID: 222000010368327546} + - component: {fileID: 114000013429243584} + m_Layer: 5 + m_Name: Placeholder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000013131456698 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224000011255372986} + - component: {fileID: 222000010912077860} + - component: {fileID: 114000013324539428} + - component: {fileID: 114000010993257018} + m_Layer: 5 + m_Name: CommandInputField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1023677686285356 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224755787573573022} + - component: {fileID: 222554695212194500} + - component: {fileID: 114565304207243400} + m_Layer: 5 + m_Name: SearchbarSlotBottom + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &1046123681008450 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224757625655964314} + - component: {fileID: 222859164510105872} + - component: {fileID: 114958054160062352} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1065080943999816 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224982529675224150} + - component: {fileID: 222691170673863110} + - component: {fileID: 114095641519247160} + - component: {fileID: 114749866180229960} + m_Layer: 5 + m_Name: CommandSuggestionsContainer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &1164238372139318 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224669170713768380} + - component: {fileID: 222006696964694420} + - component: {fileID: 114590115059802926} + m_Layer: 5 + m_Name: Placeholder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1197649202466618 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224927884203097686} + - component: {fileID: 222677458225366564} + - component: {fileID: 114677982133495580} + - component: {fileID: 114664465529608634} + m_Layer: 5 + m_Name: Searchbar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1316062289193744 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224781297716539566} + - component: {fileID: 222390805710412110} + - component: {fileID: 114375211676648468} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1419055185851692 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224175272648112170} + - component: {fileID: 114201206152803294} + m_Layer: 5 + m_Name: CommandSuggestions + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1486651836328188 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224170087475393432} + - component: {fileID: 222255240242372310} + - component: {fileID: 114590956026916120} + - component: {fileID: 114786672304321734} + m_Layer: 5 + m_Name: SnapToBottom + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &1608527955020594 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224619367409363176} + - component: {fileID: 222199124140025852} + - component: {fileID: 114533172895795940} + - component: {fileID: 114425215294804516} + m_Layer: 5 + m_Name: SearchbarSlotTop + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1797932393879816 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224479789572691966} + - component: {fileID: 222428315485768352} + - component: {fileID: 114704198421030094} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1828058091608518 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224856348943071238} + - component: {fileID: 222172057957339964} + - component: {fileID: 114501864645789684} + - component: {fileID: 114466839828933532} + m_Layer: 5 + m_Name: ClearButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1837270565088688 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224726770285678000} + - component: {fileID: 222974975071271426} + - component: {fileID: 114796147118253168} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1926020646996780 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224332069547574292} + - component: {fileID: 222821544406435052} + - component: {fileID: 114187932873892064} + m_Layer: 5 + m_Name: Icon + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &114000010993257018 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013131456698} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114000013324539428} + m_TextComponent: {fileID: 114000012764979206} + m_Placeholder: {fileID: 114000013429243584} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 2 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!114 &114000012764979206 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010562689872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.83823526, g: 0.84439874, b: 0.84439874, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 2 + m_MaxSize: 16 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!114 &114000013324539428 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013131456698} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.31617647, g: 0.31617647, b: 0.31617647, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114000013429243584 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013017939458} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.83823526, g: 0.84439874, b: 0.84439874, a: 0.653} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 16 + m_FontStyle: 2 + m_BestFit: 1 + m_MinSize: 2 + m_MaxSize: 16 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: (type help for list of commands) +--- !u!114 &114095641519247160 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1065080943999816} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.334, g: 0.3286984, b: 0.3286984, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114187932873892064 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1926020646996780} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.9485294, g: 0.9485294, b: 0.9485294, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: e04e6c970b950d946a782ea08e5f971d, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114201206152803294 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1419055185851692} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 6 + m_Spacing: 0 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &114375211676648468 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1316062289193744} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.9485294, g: 0.9485294, b: 0.9485294, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: d1546f8db185caf4dafcfa58efa3ba2c, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114425215294804516 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1608527955020594} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: 2 + m_FlexibleHeight: -1 +--- !u!114 &114435636144975300 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 164562} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: b3905a73a6672d9449647aaf036e23fc, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114466839828933532 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1828058091608518} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114501864645789684} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &114501864645789684 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1828058091608518} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.31617647, g: 0.31617647, b: 0.31617647, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114533172895795940 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1608527955020594} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.24264705, g: 0.24443123, b: 0.24443123, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114538072837526774 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 110786} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6565f2084f5aef44abe57c988745b9c3, type: 3} + m_Name: + m_EditorClassIdentifier: + debugManager: {fileID: 11452418} +--- !u!114 &114565304207243400 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1023677686285356} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.31617647, g: 0.31617647, b: 0.31617647, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114575087663981696 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1327945023, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &114590115059802926 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1164238372139318} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.83823526, g: 0.84439874, b: 0.84439874, a: 0.653} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 16 + m_FontStyle: 2 + m_BestFit: 1 + m_MinSize: 2 + m_MaxSize: 16 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Search... +--- !u!114 &114590956026916120 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1486651836328188} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.30980393, g: 0.30980393, b: 0.30980393, a: 0.6862745} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: b902f763d0e47364dae25207b7e47800, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114664465529608634 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1197649202466618} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114677982133495580} + m_TextComponent: {fileID: 114958054160062352} + m_Placeholder: {fileID: 114590115059802926} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!114 &114677982133495580 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1197649202466618} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114704198421030094 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1797932393879816} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.9485294, g: 0.9485294, b: 0.9485294, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 7a9e374666ad6cc47807bb001844f3d8, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114749866180229960 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1065080943999816} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 10 + m_Right: 10 + m_Top: 10 + m_Bottom: 10 + m_ChildAlignment: 6 + m_Spacing: 2 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &114777798721274074 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 121708} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &114786672304321734 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1486651836328188} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114590956026916120} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &114796147118253168 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1837270565088688} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.9485294, g: 0.9485294, b: 0.9485294, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066c0b04be98cd348abb79add91d42bf, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114944715489184838 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 121708} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114958054160062352 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1046123681008450} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8392157, g: 0.84313726, b: 0.84313726, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &222000010368327546 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013017939458} +--- !u!222 &222000010912077860 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013131456698} +--- !u!222 &222000011960742964 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010562689872} +--- !u!222 &222006696964694420 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1164238372139318} +--- !u!222 &222172057957339964 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1828058091608518} +--- !u!222 &222199124140025852 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1608527955020594} +--- !u!222 &222255240242372310 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1486651836328188} +--- !u!222 &222390805710412110 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1316062289193744} +--- !u!222 &222428315485768352 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1797932393879816} +--- !u!222 &222466100300644746 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 121708} +--- !u!222 &222554695212194500 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1023677686285356} +--- !u!222 &222677458225366564 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1197649202466618} +--- !u!222 &222691170673863110 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1065080943999816} +--- !u!222 &222821544406435052 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1926020646996780} +--- !u!222 &222859164510105872 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1046123681008450} +--- !u!222 &222974975071271426 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1837270565088688} +--- !u!224 &224000011255372986 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013131456698} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224000014244241328} + - {fileID: 224000014081388310} + m_Father: {fileID: 22477946} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: -32, y: 0} + m_SizeDelta: {x: -64, y: 36} + m_Pivot: {x: 0.5, y: 0} +--- !u!224 &224000014081388310 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010562689872} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224000011255372986} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: -16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224000014244241328 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013017939458} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224000011255372986} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: -16} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224170087475393432 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1486651836328188} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224726770285678000} + m_Father: {fileID: 22485076} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 8} + m_SizeDelta: {x: 42, y: 42} + m_Pivot: {x: 0.5, y: 0} +--- !u!224 &224175272648112170 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1419055185851692} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224982529675224150} + m_Father: {fileID: 22477946} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 36} + m_SizeDelta: {x: 0, y: 5000} + m_Pivot: {x: 0, y: 0} +--- !u!224 &224332069547574292 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1926020646996780} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224927884203097686} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 2, y: 0} + m_SizeDelta: {x: 25, y: -6} + m_Pivot: {x: 0, y: 0.5} +--- !u!224 &224479789572691966 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1797932393879816} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224856348943071238} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.15, y: 0.12} + m_AnchorMax: {x: 0.85, y: 0.88} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224619367409363176 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1608527955020594} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224927884203097686} + m_Father: {fileID: 22456566} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224669170713768380 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1164238372139318} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224927884203097686} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 15, y: -0.5} + m_SizeDelta: {x: -30, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224726770285678000 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1837270565088688} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224170087475393432} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.2, y: 0.2} + m_AnchorMax: {x: 0.8, y: 0.8} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224755787573573022 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1023677686285356} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22477946} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -36} + m_SizeDelta: {x: 0, y: 36} + m_Pivot: {x: 0.5, y: 1} +--- !u!224 &224757625655964314 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1046123681008450} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224927884203097686} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 15, y: -0.5} + m_SizeDelta: {x: -30, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224781297716539566 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1316062289193744} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22488670} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.15, y: 0.12} + m_AnchorMax: {x: 0.85, y: 0.88} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224856348943071238 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1828058091608518} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224479789572691966} + m_Father: {fileID: 22456566} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224927884203097686 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1197649202466618} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224332069547574292} + - {fileID: 224669170713768380} + - {fileID: 224757625655964314} + m_Father: {fileID: 224619367409363176} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224982529675224150 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1065080943999816} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224175272648112170} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: -0.00005340576} + m_SizeDelta: {x: 24, y: 24} + m_Pivot: {x: 0, y: 0} diff --git a/Assets/Third/IngameDebugConsole/IngameDebugConsole.prefab.meta b/Assets/Third/IngameDebugConsole/IngameDebugConsole.prefab.meta new file mode 100644 index 0000000..2befa60 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/IngameDebugConsole.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 67117722a812a2e46ab8cb8eafbf5f5e +timeCreated: 1466014755 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Prefabs.meta b/Assets/Third/IngameDebugConsole/Prefabs.meta new file mode 100644 index 0000000..2d1c52d --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Prefabs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7dbc36665bc0d684db9a4447e27a7a4b +folderAsset: yes +timeCreated: 1520417401 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Prefabs/CommandSuggestion.prefab b/Assets/Third/IngameDebugConsole/Prefabs/CommandSuggestion.prefab new file mode 100644 index 0000000..0f8cf14 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Prefabs/CommandSuggestion.prefab @@ -0,0 +1,87 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1386426139070838} + m_IsPrefabParent: 1 +--- !u!1 &1386426139070838 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224955737853170496} + - component: {fileID: 222541766812100524} + - component: {fileID: 114169395487023046} + m_Layer: 5 + m_Name: CommandSuggestion + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &114169395487023046 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1386426139070838} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.83823526, g: 0.84439874, b: 0.84439874, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: help +--- !u!222 &222541766812100524 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1386426139070838} +--- !u!224 &224955737853170496 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1386426139070838} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} diff --git a/Assets/Third/IngameDebugConsole/Prefabs/CommandSuggestion.prefab.meta b/Assets/Third/IngameDebugConsole/Prefabs/CommandSuggestion.prefab.meta new file mode 100644 index 0000000..fd865db --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Prefabs/CommandSuggestion.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5e66896448428cf46a1854dbdc014914 +timeCreated: 1601390136 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Prefabs/DebugLogItem.prefab b/Assets/Third/IngameDebugConsole/Prefabs/DebugLogItem.prefab new file mode 100644 index 0000000..c4af8f9 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Prefabs/DebugLogItem.prefab @@ -0,0 +1,640 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &104862 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22461494} + - component: {fileID: 22233942} + - component: {fileID: 11411806} + m_Layer: 5 + m_Name: LogCount + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &151462 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22420350} + - component: {fileID: 22200920} + - component: {fileID: 11432936} + m_Layer: 5 + m_Name: LogCountText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &152362 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22427300} + - component: {fileID: 22262284} + - component: {fileID: 11404142} + m_Layer: 5 + m_Name: LogType + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &166880 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 22479264} + - component: {fileID: 22288988} + - component: {fileID: 11459012} + - component: {fileID: 11408050} + - component: {fileID: 11456372} + - component: {fileID: 225819852034701160} + m_Layer: 5 + m_Name: DebugLogItem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11404142 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 152362} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 33b115bf5efdfa04d8e2e0b70a6643cd, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11408050 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 166880} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d2ea291be9de70a4abfec595203c96c1, type: 3} + m_Name: + m_EditorClassIdentifier: + transformComponent: {fileID: 22479264} + imageComponent: {fileID: 11459012} + canvasGroupComponent: {fileID: 225819852034701160} + logText: {fileID: 114694493629914950} + logTypeImage: {fileID: 11404142} + logCountParent: {fileID: 104862} + logCountText: {fileID: 11432936} + copyLogButton: {fileID: 224006190298411330} +--- !u!114 &11411806 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 104862} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.42647058, g: 0.42647058, b: 0.42647058, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: b3f0d976f6d6802479d6465d11b3aa68, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11432936 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151462} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.83823526, g: 0.84439874, b: 0.84439874, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 1 + m_MaxSize: 16 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 1 +--- !u!114 &11456372 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 166880} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11459012} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11459012 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 166880} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.23529412, g: 0.23529412, b: 0.23529412, a: 0.697} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 98e8e1cf8dc7dbf469617c2e40c8a944, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &22200920 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151462} +--- !u!222 &22233942 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 104862} +--- !u!222 &22262284 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 152362} +--- !u!222 &22288988 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 166880} +--- !u!224 &22420350 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151462} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22461494} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -2, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22427300 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 152362} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22479264} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 18, y: 0} + m_SizeDelta: {x: 25, y: 25} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22461494 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 104862} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22420350} + m_Father: {fileID: 22479264} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: -28, y: 0} + m_SizeDelta: {x: 38, y: 28} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22479264 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 166880} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22427300} + - {fileID: 224737693311518052} + - {fileID: 22461494} + - {fileID: 224006190298411330} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 35} + m_Pivot: {x: 0, y: 1} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 166880} + m_IsPrefabParent: 1 +--- !u!1 &1396836967994216 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224006190298411330} + - component: {fileID: 222870443111501910} + - component: {fileID: 114119781176956926} + - component: {fileID: 114694923173451186} + m_Layer: 5 + m_Name: CopyLogButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &1503640463151286 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224887990600088790} + - component: {fileID: 222313182602304162} + - component: {fileID: 114549765989288124} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1785910143472904 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 224737693311518052} + - component: {fileID: 222175805939703770} + - component: {fileID: 114694493629914950} + m_Layer: 5 + m_Name: LogText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &114119781176956926 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1396836967994216} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.42647058, g: 0.42647058, b: 0.42647058, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 066d3840badf4d24dba1d42b4c59b888, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114549765989288124 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1503640463151286} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.83823526, g: 0.84439874, b: 0.84439874, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Copy +--- !u!114 &114694493629914950 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1785910143472904} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.83823526, g: 0.84439874, b: 0.84439874, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 15 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Debug.Log summary +--- !u!114 &114694923173451186 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1396836967994216} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114119781176956926} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11408050} + m_MethodName: CopyLog + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!222 &222175805939703770 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1785910143472904} +--- !u!222 &222313182602304162 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1503640463151286} +--- !u!222 &222870443111501910 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1396836967994216} +--- !u!224 &224006190298411330 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1396836967994216} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224887990600088790} + m_Father: {fileID: 22479264} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 2} + m_SizeDelta: {x: -70, y: 36} + m_Pivot: {x: 0.5, y: 0} +--- !u!224 &224737693311518052 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1785910143472904} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22479264} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 15, y: 0} + m_SizeDelta: {x: -40, y: -2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224887990600088790 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1503640463151286} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224006190298411330} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!225 &225819852034701160 +CanvasGroup: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 166880} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 diff --git a/Assets/Third/IngameDebugConsole/Prefabs/DebugLogItem.prefab.meta b/Assets/Third/IngameDebugConsole/Prefabs/DebugLogItem.prefab.meta new file mode 100644 index 0000000..bf82abd --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Prefabs/DebugLogItem.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 391be5df5ef62f345bb76a1051c04da7 +timeCreated: 1465919887 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/README.txt b/Assets/Third/IngameDebugConsole/README.txt new file mode 100644 index 0000000..5f08cd6 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/README.txt @@ -0,0 +1,20 @@ += In-game Debug Console = + +Online documentation available at: https://github.com/yasirkula/UnityIngameDebugConsole +E-mail: yasirkula@gmail.com + +### ABOUT +This asset helps you see debug messages (logs, warnings, errors, exceptions) runtime in a build (also assertions in editor) and execute commands using its built-in console. + + +### HOW TO +You can simply place the IngameDebugConsole prefab to your scene. Hovering the cursor over its properties in the Inspector will reveal explanatory tooltips. + + +### NEW INPUT SYSTEM SUPPORT +This plugin supports Unity's new Input System but it requires some manual modifications (if both the legacy and the new input systems are active at the same time, no changes are needed): + +- the plugin mustn't be installed as a package, i.e. it must reside inside the Assets folder and not the Packages folder (it can reside inside a subfolder of Assets like Assets/Plugins) +- if Unity 2019.2.5 or earlier is used, add ENABLE_INPUT_SYSTEM compiler directive to "Player Settings/Scripting Define Symbols" (these symbols are platform specific, so if you change the active platform later, you'll have to add the compiler directive again) +- add "Unity.InputSystem" assembly to "IngameDebugConsole.Runtime" Assembly Definition File's "Assembly Definition References" list +- open IngameDebugConsole prefab, select EventSystem child object and replace StandaloneInputModule component with InputSystemUIInputModule component (or, if your scene(s) already have EventSystem objects, you can delete IngameDebugConsole prefab's EventSystem child object) \ No newline at end of file diff --git a/Assets/Third/IngameDebugConsole/README.txt.meta b/Assets/Third/IngameDebugConsole/README.txt.meta new file mode 100644 index 0000000..0716018 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/README.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: edf2ac73f7bc3064c96d53009106dc53 +timeCreated: 1563307881 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Scripts.meta b/Assets/Third/IngameDebugConsole/Scripts.meta new file mode 100644 index 0000000..5e8bb1f --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 860c08388401a6d4e858fe4910ea9337 +folderAsset: yes +timeCreated: 1465930645 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Scripts/CircularBuffer.cs b/Assets/Third/IngameDebugConsole/Scripts/CircularBuffer.cs new file mode 100644 index 0000000..86537b1 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/CircularBuffer.cs @@ -0,0 +1,116 @@ +// #define RESET_REMOVED_ELEMENTS + +namespace IngameDebugConsole +{ + public class CircularBuffer + { + private T[] arr; + private int startIndex; + + public int Count { get; private set; } + public T this[int index] { get { return arr[( startIndex + index ) % arr.Length]; } } + + public CircularBuffer( int capacity ) + { + arr = new T[capacity]; + } + + // Old elements are overwritten when capacity is reached + public void Add( T value ) + { + if( Count < arr.Length ) + arr[Count++] = value; + else + { + arr[startIndex] = value; + if( ++startIndex >= arr.Length ) + startIndex = 0; + } + } + } + + public class DynamicCircularBuffer + { + private T[] arr; + private int startIndex; + + public int Count { get; private set; } + public T this[int index] + { + get { return arr[( startIndex + index ) % arr.Length]; } + set { arr[( startIndex + index ) % arr.Length] = value; } + } + + public DynamicCircularBuffer( int initialCapacity = 2 ) + { + arr = new T[initialCapacity]; + } + + public void Add( T value ) + { + if( Count >= arr.Length ) + { + int prevSize = arr.Length; + int newSize = prevSize > 0 ? prevSize * 2 : 2; // Size must be doubled (at least), or the shift operation below must consider IndexOutOfRange situations + + System.Array.Resize( ref arr, newSize ); + + if( startIndex > 0 ) + { + if( startIndex <= ( prevSize - 1 ) / 2 ) + { + // Move elements [0,startIndex) to the end + for( int i = 0; i < startIndex; i++ ) + { + arr[i + prevSize] = arr[i]; +#if RESET_REMOVED_ELEMENTS + arr[i] = default( T ); +#endif + } + } + else + { + // Move elements [startIndex,prevSize) to the end + int delta = newSize - prevSize; + for( int i = prevSize - 1; i >= startIndex; i-- ) + { + arr[i + delta] = arr[i]; +#if RESET_REMOVED_ELEMENTS + arr[i] = default( T ); +#endif + } + + startIndex += delta; + } + } + } + + this[Count++] = value; + } + + public T RemoveFirst() + { + T element = arr[startIndex]; +#if RESET_REMOVED_ELEMENTS + arr[startIndex] = default( T ); +#endif + + if( ++startIndex >= arr.Length ) + startIndex = 0; + + Count--; + return element; + } + + public T RemoveLast() + { + T element = arr[Count - 1]; +#if RESET_REMOVED_ELEMENTS + arr[Count - 1] = default( T ); +#endif + + Count--; + return element; + } + } +} \ No newline at end of file diff --git a/Assets/Third/IngameDebugConsole/Scripts/CircularBuffer.cs.meta b/Assets/Third/IngameDebugConsole/Scripts/CircularBuffer.cs.meta new file mode 100644 index 0000000..16a7247 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/CircularBuffer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6136cb3c00eac0149901b8e7f2fecef8 +timeCreated: 1550943949 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Scripts/Commands.meta b/Assets/Third/IngameDebugConsole/Scripts/Commands.meta new file mode 100644 index 0000000..1d1ef40 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/Commands.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bb9b6e1ab379cec46bfae8f8abcc1f45 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Scripts/Commands/PlayerPrefsCommands.cs b/Assets/Third/IngameDebugConsole/Scripts/Commands/PlayerPrefsCommands.cs new file mode 100644 index 0000000..b4da4fc --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/Commands/PlayerPrefsCommands.cs @@ -0,0 +1,58 @@ +using UnityEngine; + +namespace IngameDebugConsole.Commands +{ + public class PlayerPrefsCommands + { + [ConsoleMethod( "prefs.int", "Returns the value of an Integer PlayerPrefs field" ), UnityEngine.Scripting.Preserve] + public static string PlayerPrefsGetInt( string key ) + { + if( !PlayerPrefs.HasKey( key ) ) return "Key Not Found"; + return PlayerPrefs.GetInt( key ).ToString(); + } + + [ConsoleMethod( "prefs.int", "Sets the value of an Integer PlayerPrefs field" ), UnityEngine.Scripting.Preserve] + public static void PlayerPrefsSetInt( string key, int value ) + { + PlayerPrefs.SetInt( key, value ); + } + + [ConsoleMethod( "prefs.float", "Returns the value of a Float PlayerPrefs field" ), UnityEngine.Scripting.Preserve] + public static string PlayerPrefsGetFloat( string key ) + { + if( !PlayerPrefs.HasKey( key ) ) return "Key Not Found"; + return PlayerPrefs.GetFloat( key ).ToString(); + } + + [ConsoleMethod( "prefs.float", "Sets the value of a Float PlayerPrefs field" ), UnityEngine.Scripting.Preserve] + public static void PlayerPrefsSetFloat( string key, float value ) + { + PlayerPrefs.SetFloat( key, value ); + } + + [ConsoleMethod( "prefs.string", "Returns the value of a String PlayerPrefs field" ), UnityEngine.Scripting.Preserve] + public static string PlayerPrefsGetString( string key ) + { + if( !PlayerPrefs.HasKey( key ) ) return "Key Not Found"; + return PlayerPrefs.GetString( key ); + } + + [ConsoleMethod( "prefs.string", "Sets the value of a String PlayerPrefs field" ), UnityEngine.Scripting.Preserve] + public static void PlayerPrefsSetString( string key, string value ) + { + PlayerPrefs.SetString( key, value ); + } + + [ConsoleMethod( "prefs.delete", "Deletes a PlayerPrefs field" ), UnityEngine.Scripting.Preserve] + public static void PlayerPrefsDelete( string key ) + { + PlayerPrefs.DeleteKey( key ); + } + + [ConsoleMethod( "prefs.clear", "Deletes all PlayerPrefs fields" ), UnityEngine.Scripting.Preserve] + public static void PlayerPrefsClear() + { + PlayerPrefs.DeleteAll(); + } + } +} \ No newline at end of file diff --git a/Assets/Third/IngameDebugConsole/Scripts/Commands/PlayerPrefsCommands.cs.meta b/Assets/Third/IngameDebugConsole/Scripts/Commands/PlayerPrefsCommands.cs.meta new file mode 100644 index 0000000..dfbaa4f --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/Commands/PlayerPrefsCommands.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 33fb3ee25c8764f4c905fa3ac7c4eb89 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Scripts/Commands/SceneCommands.cs b/Assets/Third/IngameDebugConsole/Scripts/Commands/SceneCommands.cs new file mode 100644 index 0000000..50167c1 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/Commands/SceneCommands.cs @@ -0,0 +1,58 @@ +using UnityEngine; +using UnityEngine.SceneManagement; + +namespace IngameDebugConsole.Commands +{ + public class SceneCommands + { + [ConsoleMethod( "scene.load", "Loads a scene" ), UnityEngine.Scripting.Preserve] + public static void LoadScene( string sceneName ) + { + LoadSceneInternal( sceneName, false, LoadSceneMode.Single ); + } + + [ConsoleMethod( "scene.load", "Loads a scene" ), UnityEngine.Scripting.Preserve] + public static void LoadScene( string sceneName, LoadSceneMode mode ) + { + LoadSceneInternal( sceneName, false, mode ); + } + + [ConsoleMethod( "scene.loadasync", "Loads a scene asynchronously" ), UnityEngine.Scripting.Preserve] + public static void LoadSceneAsync( string sceneName ) + { + LoadSceneInternal( sceneName, true, LoadSceneMode.Single ); + } + + [ConsoleMethod( "scene.loadasync", "Loads a scene asynchronously" ), UnityEngine.Scripting.Preserve] + public static void LoadSceneAsync( string sceneName, LoadSceneMode mode ) + { + LoadSceneInternal( sceneName, true, mode ); + } + + private static void LoadSceneInternal( string sceneName, bool isAsync, LoadSceneMode mode ) + { + if( SceneManager.GetSceneByName( sceneName ).IsValid() ) + { + Debug.Log( "Scene " + sceneName + " is already loaded" ); + return; + } + + if( isAsync ) + SceneManager.LoadSceneAsync( sceneName, mode ); + else + SceneManager.LoadScene( sceneName, mode ); + } + + [ConsoleMethod( "scene.unload", "Unloads a scene" ), UnityEngine.Scripting.Preserve] + public static void UnloadScene( string sceneName ) + { + SceneManager.UnloadSceneAsync( sceneName ); + } + + [ConsoleMethod( "scene.restart", "Restarts the active scene" ), UnityEngine.Scripting.Preserve] + public static void RestartScene() + { + SceneManager.LoadScene( SceneManager.GetActiveScene().name, LoadSceneMode.Single ); + } + } +} \ No newline at end of file diff --git a/Assets/Third/IngameDebugConsole/Scripts/Commands/SceneCommands.cs.meta b/Assets/Third/IngameDebugConsole/Scripts/Commands/SceneCommands.cs.meta new file mode 100644 index 0000000..d1003b2 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/Commands/SceneCommands.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 45984eacd62d9a3489fd62689265a23c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Scripts/Commands/TimeCommands.cs b/Assets/Third/IngameDebugConsole/Scripts/Commands/TimeCommands.cs new file mode 100644 index 0000000..71eb017 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/Commands/TimeCommands.cs @@ -0,0 +1,19 @@ +using UnityEngine; + +namespace IngameDebugConsole.Commands +{ + public class TimeCommands + { + [ConsoleMethod( "time.scale", "Sets the Time.timeScale value" ), UnityEngine.Scripting.Preserve] + public static void SetTimeScale( float value ) + { + Time.timeScale = Mathf.Max( value, 0f ); + } + + [ConsoleMethod( "time.scale", "Returns the current Time.timeScale value" ), UnityEngine.Scripting.Preserve] + public static float GetTimeScale() + { + return Time.timeScale; + } + } +} \ No newline at end of file diff --git a/Assets/Third/IngameDebugConsole/Scripts/Commands/TimeCommands.cs.meta b/Assets/Third/IngameDebugConsole/Scripts/Commands/TimeCommands.cs.meta new file mode 100644 index 0000000..c7da305 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/Commands/TimeCommands.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bb12a1f557fffa541909fcfe92d9c1bf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Scripts/ConsoleMethodAttribute.cs b/Assets/Third/IngameDebugConsole/Scripts/ConsoleMethodAttribute.cs new file mode 100644 index 0000000..c1259d0 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/ConsoleMethodAttribute.cs @@ -0,0 +1,23 @@ +using System; + +namespace IngameDebugConsole +{ + [AttributeUsage( AttributeTargets.Method, Inherited = false, AllowMultiple = true )] + public class ConsoleMethodAttribute : Attribute + { + private string m_command; + private string m_description; + private string[] m_parameterNames; + + public string Command { get { return m_command; } } + public string Description { get { return m_description; } } + public string[] ParameterNames { get { return m_parameterNames; } } + + public ConsoleMethodAttribute( string command, string description, params string[] parameterNames ) + { + m_command = command; + m_description = description; + m_parameterNames = parameterNames; + } + } +} \ No newline at end of file diff --git a/Assets/Third/IngameDebugConsole/Scripts/ConsoleMethodAttribute.cs.meta b/Assets/Third/IngameDebugConsole/Scripts/ConsoleMethodAttribute.cs.meta new file mode 100644 index 0000000..421a005 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/ConsoleMethodAttribute.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 324bb39c0bff0f74fa42f83e91f07e3a +timeCreated: 1520710946 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Scripts/DebugLogConsole.cs b/Assets/Third/IngameDebugConsole/Scripts/DebugLogConsole.cs new file mode 100644 index 0000000..ec1c44e --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/DebugLogConsole.cs @@ -0,0 +1,1507 @@ +#if UNITY_EDITOR || UNITY_STANDALONE +// Unity's Text component doesn't render tag correctly on mobile devices +#define USE_BOLD_COMMAND_SIGNATURES +#endif + +using UnityEngine; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Reflection; +using System.Text; +using Object = UnityEngine.Object; +#if UNITY_EDITOR && UNITY_2021_1_OR_NEWER +using SystemInfo = UnityEngine.Device.SystemInfo; // To support Device Simulator on Unity 2021.1+ +#endif + +// Manages the console commands, parses console input and handles execution of commands +// Supported method parameter types: int, float, bool, string, Vector2, Vector3, Vector4 + +// Helper class to store important information about a command +namespace IngameDebugConsole +{ + public class ConsoleMethodInfo + { + public readonly MethodInfo method; + public readonly Type[] parameterTypes; + public readonly object instance; + + public readonly string command; + public readonly string signature; + public readonly string[] parameters; + + public ConsoleMethodInfo( MethodInfo method, Type[] parameterTypes, object instance, string command, string signature, string[] parameters ) + { + this.method = method; + this.parameterTypes = parameterTypes; + this.instance = instance; + this.command = command; + this.signature = signature; + this.parameters = parameters; + } + + public bool IsValid() + { + if( !method.IsStatic && ( instance == null || instance.Equals( null ) ) ) + return false; + + return true; + } + } + + public static class DebugLogConsole + { + public delegate bool ParseFunction( string input, out object output ); + + // All the commands + private static readonly List methods = new List(); + private static readonly List matchingMethods = new List( 4 ); + + // All the parse functions + private static readonly Dictionary parseFunctions = new Dictionary() + { + { typeof( string ), ParseString }, + { typeof( bool ), ParseBool }, + { typeof( int ), ParseInt }, + { typeof( uint ), ParseUInt }, + { typeof( long ), ParseLong }, + { typeof( ulong ), ParseULong }, + { typeof( byte ), ParseByte }, + { typeof( sbyte ), ParseSByte }, + { typeof( short ), ParseShort }, + { typeof( ushort ), ParseUShort }, + { typeof( char ), ParseChar }, + { typeof( float ), ParseFloat }, + { typeof( double ), ParseDouble }, + { typeof( decimal ), ParseDecimal }, + { typeof( Vector2 ), ParseVector2 }, + { typeof( Vector3 ), ParseVector3 }, + { typeof( Vector4 ), ParseVector4 }, + { typeof( Quaternion ), ParseQuaternion }, + { typeof( Color ), ParseColor }, + { typeof( Color32 ), ParseColor32 }, + { typeof( Rect ), ParseRect }, + { typeof( RectOffset ), ParseRectOffset }, + { typeof( Bounds ), ParseBounds }, + { typeof( GameObject ), ParseGameObject }, +#if UNITY_2017_2_OR_NEWER + { typeof( Vector2Int ), ParseVector2Int }, + { typeof( Vector3Int ), ParseVector3Int }, + { typeof( RectInt ), ParseRectInt }, + { typeof( BoundsInt ), ParseBoundsInt }, +#endif + }; + + // All the readable names of accepted types + private static readonly Dictionary typeReadableNames = new Dictionary() + { + { typeof( string ), "String" }, + { typeof( bool ), "Boolean" }, + { typeof( int ), "Integer" }, + { typeof( uint ), "Unsigned Integer" }, + { typeof( long ), "Long" }, + { typeof( ulong ), "Unsigned Long" }, + { typeof( byte ), "Byte" }, + { typeof( sbyte ), "Short Byte" }, + { typeof( short ), "Short" }, + { typeof( ushort ), "Unsigned Short" }, + { typeof( char ), "Char" }, + { typeof( float ), "Float" }, + { typeof( double ), "Double" }, + { typeof( decimal ), "Decimal" } + }; + + // Split arguments of an entered command + private static readonly List commandArguments = new List( 8 ); + + // Command parameter delimeter groups + private static readonly string[] inputDelimiters = new string[] { "\"\"", "''", "{}", "()", "[]" }; + + // CompareInfo used for case-insensitive command name comparison + private static readonly CompareInfo caseInsensitiveComparer = new CultureInfo( "en-US" ).CompareInfo; + + static DebugLogConsole() + { + AddCommand( "help", "Prints all commands", LogAllCommands ); + AddCommand( "help", "Prints all matching commands", LogAllCommandsWithName ); + AddCommand( "sysinfo", "Prints system information", LogSystemInfo ); + +#if UNITY_EDITOR || !NETFX_CORE + // Find all [ConsoleMethod] functions + // Don't search built-in assemblies for console methods since they can't have any + string[] ignoredAssemblies = new string[] + { + "Unity", + "System", + "Mono.", + "mscorlib", + "netstandard", + "TextMeshPro", + "Microsoft.GeneratedCode", + "I18N", + "Boo.", + "UnityScript.", + "ICSharpCode.", + "ExCSS.Unity", +#if UNITY_EDITOR + "Assembly-CSharp-Editor", + "Assembly-UnityScript-Editor", + "nunit.", + "SyntaxTree.", + "AssetStoreTools", +#endif + }; +#endif + +#if UNITY_EDITOR || !NETFX_CORE + foreach( Assembly assembly in AppDomain.CurrentDomain.GetAssemblies() ) +#else + foreach( Assembly assembly in new Assembly[] { typeof( DebugLogConsole ).Assembly } ) // On UWP, at least search this plugin's Assembly for console methods +#endif + { +#if( NET_4_6 || NET_STANDARD_2_0 ) && ( UNITY_EDITOR || !NETFX_CORE ) + if( assembly.IsDynamic ) + continue; +#endif + + string assemblyName = assembly.GetName().Name; + +#if UNITY_EDITOR || !NETFX_CORE + bool ignoreAssembly = false; + for( int i = 0; i < ignoredAssemblies.Length; i++ ) + { + if( caseInsensitiveComparer.IsPrefix( assemblyName, ignoredAssemblies[i], CompareOptions.IgnoreCase ) ) + { + ignoreAssembly = true; + break; + } + } + + if( ignoreAssembly ) + continue; +#endif + + try + { + foreach( Type type in assembly.GetExportedTypes() ) + { + foreach( MethodInfo method in type.GetMethods( BindingFlags.Static | BindingFlags.Public | BindingFlags.DeclaredOnly ) ) + { + foreach( object attribute in method.GetCustomAttributes( typeof( ConsoleMethodAttribute ), false ) ) + { + ConsoleMethodAttribute consoleMethod = attribute as ConsoleMethodAttribute; + if( consoleMethod != null ) + AddCommand( consoleMethod.Command, consoleMethod.Description, method, null, consoleMethod.ParameterNames ); + } + } + } + } + catch( NotSupportedException ) { } + catch( System.IO.FileNotFoundException ) { } + catch( Exception e ) + { + Debug.LogError( "Couldn't search assembly for [ConsoleMethod] attributes: " + assemblyName + "\n" + e.ToString() ); + } + } + } + + // Logs the list of available commands + public static void LogAllCommands() + { + int length = 25; + for( int i = 0; i < methods.Count; i++ ) + { + if( methods[i].IsValid() ) + length += methods[i].signature.Length + 7; + } + + StringBuilder stringBuilder = new StringBuilder( length ); + stringBuilder.Append( "Available commands:" ); + + for( int i = 0; i < methods.Count; i++ ) + { + if( methods[i].IsValid() ) + stringBuilder.Append( "\n - " ).Append( methods[i].signature ); + } + + Debug.Log( stringBuilder.ToString() ); + + // After typing help, the log that lists all the commands should automatically be expanded for better UX + if( DebugLogManager.Instance ) + { + DebugLogManager.Instance.ExpandLatestPendingLog(); + DebugLogManager.Instance.StripStackTraceFromLatestPendingLog(); + } + } + + // Logs the list of available commands that are either equal to commandName or contain commandName as substring + public static void LogAllCommandsWithName( string commandName ) + { + matchingMethods.Clear(); + + // First, try to find commands that exactly match the commandName. If there are no such commands, try to find + // commands that contain commandName as substring + FindCommands( commandName, false, matchingMethods ); + if( matchingMethods.Count == 0 ) + FindCommands( commandName, true, matchingMethods ); + + if( matchingMethods.Count == 0 ) + Debug.LogWarning( string.Concat( "ERROR: can't find command '", commandName, "'" ) ); + else + { + int commandsLength = 25; + for( int i = 0; i < matchingMethods.Count; i++ ) + commandsLength += matchingMethods[i].signature.Length + 7; + + StringBuilder stringBuilder = new StringBuilder( commandsLength ); + stringBuilder.Append( "Matching commands:" ); + + for( int i = 0; i < matchingMethods.Count; i++ ) + stringBuilder.Append( "\n - " ).Append( matchingMethods[i].signature ); + + Debug.Log( stringBuilder.ToString() ); + + if( DebugLogManager.Instance ) + { + DebugLogManager.Instance.ExpandLatestPendingLog(); + DebugLogManager.Instance.StripStackTraceFromLatestPendingLog(); + } + } + } + + // Logs system information + public static void LogSystemInfo() + { + StringBuilder stringBuilder = new StringBuilder( 1024 ); + stringBuilder.Append( "Rig: " ).AppendSysInfoIfPresent( SystemInfo.deviceModel ).AppendSysInfoIfPresent( SystemInfo.processorType ) + .AppendSysInfoIfPresent( SystemInfo.systemMemorySize, "MB RAM" ).Append( SystemInfo.processorCount ).Append( " cores\n" ); + stringBuilder.Append( "OS: " ).Append( SystemInfo.operatingSystem ).Append( "\n" ); + stringBuilder.Append( "GPU: " ).Append( SystemInfo.graphicsDeviceName ).Append( " " ).Append( SystemInfo.graphicsMemorySize ) + .Append( "MB " ).Append( SystemInfo.graphicsDeviceVersion ) + .Append( SystemInfo.graphicsMultiThreaded ? " multi-threaded\n" : "\n" ); + stringBuilder.Append( "Data Path: " ).Append( Application.dataPath ).Append( "\n" ); + stringBuilder.Append( "Persistent Data Path: " ).Append( Application.persistentDataPath ).Append( "\n" ); + stringBuilder.Append( "StreamingAssets Path: " ).Append( Application.streamingAssetsPath ).Append( "\n" ); + stringBuilder.Append( "Temporary Cache Path: " ).Append( Application.temporaryCachePath ).Append( "\n" ); + stringBuilder.Append( "Device ID: " ).Append( SystemInfo.deviceUniqueIdentifier ).Append( "\n" ); + stringBuilder.Append( "Max Texture Size: " ).Append( SystemInfo.maxTextureSize ).Append( "\n" ); +#if UNITY_5_6_OR_NEWER + stringBuilder.Append( "Max Cubemap Size: " ).Append( SystemInfo.maxCubemapSize ).Append( "\n" ); +#endif + stringBuilder.Append( "Accelerometer: " ).Append( SystemInfo.supportsAccelerometer ? "supported\n" : "not supported\n" ); + stringBuilder.Append( "Gyro: " ).Append( SystemInfo.supportsGyroscope ? "supported\n" : "not supported\n" ); + stringBuilder.Append( "Location Service: " ).Append( SystemInfo.supportsLocationService ? "supported\n" : "not supported\n" ); +#if !UNITY_2019_1_OR_NEWER + stringBuilder.Append( "Image Effects: " ).Append( SystemInfo.supportsImageEffects ? "supported\n" : "not supported\n" ); + stringBuilder.Append( "RenderToCubemap: " ).Append( SystemInfo.supportsRenderToCubemap ? "supported\n" : "not supported\n" ); +#endif + stringBuilder.Append( "Compute Shaders: " ).Append( SystemInfo.supportsComputeShaders ? "supported\n" : "not supported\n" ); + stringBuilder.Append( "Shadows: " ).Append( SystemInfo.supportsShadows ? "supported\n" : "not supported\n" ); + stringBuilder.Append( "Instancing: " ).Append( SystemInfo.supportsInstancing ? "supported\n" : "not supported\n" ); + stringBuilder.Append( "Motion Vectors: " ).Append( SystemInfo.supportsMotionVectors ? "supported\n" : "not supported\n" ); + stringBuilder.Append( "3D Textures: " ).Append( SystemInfo.supports3DTextures ? "supported\n" : "not supported\n" ); +#if UNITY_5_6_OR_NEWER + stringBuilder.Append( "3D Render Textures: " ).Append( SystemInfo.supports3DRenderTextures ? "supported\n" : "not supported\n" ); +#endif + stringBuilder.Append( "2D Array Textures: " ).Append( SystemInfo.supports2DArrayTextures ? "supported\n" : "not supported\n" ); + stringBuilder.Append( "Cubemap Array Textures: " ).Append( SystemInfo.supportsCubemapArrayTextures ? "supported" : "not supported" ); + + Debug.Log( stringBuilder.ToString() ); + + // After typing sysinfo, the log that lists system information should automatically be expanded for better UX + if( DebugLogManager.Instance ) + { + DebugLogManager.Instance.ExpandLatestPendingLog(); + DebugLogManager.Instance.StripStackTraceFromLatestPendingLog(); + } + } + + private static StringBuilder AppendSysInfoIfPresent( this StringBuilder sb, string info, string postfix = null ) + { + if( info != SystemInfo.unsupportedIdentifier ) + { + sb.Append( info ); + + if( postfix != null ) + sb.Append( postfix ); + + sb.Append( " " ); + } + + return sb; + } + + private static StringBuilder AppendSysInfoIfPresent( this StringBuilder sb, int info, string postfix = null ) + { + if( info > 0 ) + { + sb.Append( info ); + + if( postfix != null ) + sb.Append( postfix ); + + sb.Append( " " ); + } + + return sb; + } + + // Add a custom Type to the list of recognized command parameter Types + public static void AddCustomParameterType( Type type, ParseFunction parseFunction, string typeReadableName = null ) + { + if( type == null ) + { + Debug.LogError( "Parameter type can't be null!" ); + return; + } + else if( parseFunction == null ) + { + Debug.LogError( "Parameter parseFunction can't be null!" ); + return; + } + + parseFunctions[type] = parseFunction; + + if( !string.IsNullOrEmpty( typeReadableName ) ) + typeReadableNames[type] = typeReadableName; + } + + // Remove a custom Type from the list of recognized command parameter Types + public static void RemoveCustomParameterType( Type type ) + { + parseFunctions.Remove( type ); + typeReadableNames.Remove( type ); + } + + // Add a command related with an instance method (i.e. non static method) + public static void AddCommandInstance( string command, string description, string methodName, object instance, params string[] parameterNames ) + { + if( instance == null ) + { + Debug.LogError( "Instance can't be null!" ); + return; + } + + AddCommand( command, description, methodName, instance.GetType(), instance, parameterNames ); + } + + // Add a command related with a static method (i.e. no instance is required to call the method) + public static void AddCommandStatic( string command, string description, string methodName, Type ownerType, params string[] parameterNames ) + { + AddCommand( command, description, methodName, ownerType, null, parameterNames ); + } + + // Add a command that can be related to either a static or an instance method + public static void AddCommand( string command, string description, Action method ) { AddCommand( command, description, method.Method, method.Target, null ); } + public static void AddCommand( string command, string description, Action method ) { AddCommand( command, description, method.Method, method.Target, null ); } + public static void AddCommand( string command, string description, Func method ) { AddCommand( command, description, method.Method, method.Target, null ); } + public static void AddCommand( string command, string description, Action method ) { AddCommand( command, description, method.Method, method.Target, null ); } + public static void AddCommand( string command, string description, Func method ) { AddCommand( command, description, method.Method, method.Target, null ); } + public static void AddCommand( string command, string description, Action method ) { AddCommand( command, description, method.Method, method.Target, null ); } + public static void AddCommand( string command, string description, Func method ) { AddCommand( command, description, method.Method, method.Target, null ); } + public static void AddCommand( string command, string description, Action method ) { AddCommand( command, description, method.Method, method.Target, null ); } + public static void AddCommand( string command, string description, Func method ) { AddCommand( command, description, method.Method, method.Target, null ); } + public static void AddCommand( string command, string description, Func method ) { AddCommand( command, description, method.Method, method.Target, null ); } + public static void AddCommand( string command, string description, Delegate method ) { AddCommand( command, description, method.Method, method.Target, null ); } + + // Add a command with custom parameter names + public static void AddCommand( string command, string description, Action method, string parameterName ) { AddCommand( command, description, method.Method, method.Target, new string[1] { parameterName } ); } + public static void AddCommand( string command, string description, Action method, string parameterName1, string parameterName2 ) { AddCommand( command, description, method.Method, method.Target, new string[2] { parameterName1, parameterName2 } ); } + public static void AddCommand( string command, string description, Func method, string parameterName ) { AddCommand( command, description, method.Method, method.Target, new string[1] { parameterName } ); } + public static void AddCommand( string command, string description, Action method, string parameterName1, string parameterName2, string parameterName3 ) { AddCommand( command, description, method.Method, method.Target, new string[3] { parameterName1, parameterName2, parameterName3 } ); } + public static void AddCommand( string command, string description, Func method, string parameterName1, string parameterName2 ) { AddCommand( command, description, method.Method, method.Target, new string[2] { parameterName1, parameterName2 } ); } + public static void AddCommand( string command, string description, Action method, string parameterName1, string parameterName2, string parameterName3, string parameterName4 ) { AddCommand( command, description, method.Method, method.Target, new string[4] { parameterName1, parameterName2, parameterName3, parameterName4 } ); } + public static void AddCommand( string command, string description, Func method, string parameterName1, string parameterName2, string parameterName3 ) { AddCommand( command, description, method.Method, method.Target, new string[3] { parameterName1, parameterName2, parameterName3 } ); } + public static void AddCommand( string command, string description, Func method, string parameterName1, string parameterName2, string parameterName3, string parameterName4 ) { AddCommand( command, description, method.Method, method.Target, new string[4] { parameterName1, parameterName2, parameterName3, parameterName4 } ); } + public static void AddCommand( string command, string description, Delegate method, params string[] parameterNames ) { AddCommand( command, description, method.Method, method.Target, parameterNames ); } + + // Create a new command and set its properties + private static void AddCommand( string command, string description, string methodName, Type ownerType, object instance, string[] parameterNames ) + { + // Get the method from the class + MethodInfo method = ownerType.GetMethod( methodName, BindingFlags.Public | BindingFlags.NonPublic | ( instance != null ? BindingFlags.Instance : BindingFlags.Static ) ); + if( method == null ) + { + Debug.LogError( methodName + " does not exist in " + ownerType ); + return; + } + + AddCommand( command, description, method, instance, parameterNames ); + } + + private static void AddCommand( string command, string description, MethodInfo method, object instance, string[] parameterNames ) + { + if( string.IsNullOrEmpty( command ) ) + { + Debug.LogError( "Command name can't be empty!" ); + return; + } + + command = command.Trim(); + if( command.IndexOf( ' ' ) >= 0 ) + { + Debug.LogError( "Command name can't contain whitespace: " + command ); + return; + } + + // Fetch the parameters of the class + ParameterInfo[] parameters = method.GetParameters(); + if( parameters == null ) + parameters = new ParameterInfo[0]; + + // Store the parameter types in an array + Type[] parameterTypes = new Type[parameters.Length]; + for( int i = 0; i < parameters.Length; i++ ) + { + if( parameters[i].ParameterType.IsByRef ) + { + Debug.LogError( "Command can't have 'out' or 'ref' parameters" ); + return; + } + + Type parameterType = parameters[i].ParameterType; + if( parseFunctions.ContainsKey( parameterType ) || typeof( Component ).IsAssignableFrom( parameterType ) || parameterType.IsEnum || IsSupportedArrayType( parameterType ) ) + parameterTypes[i] = parameterType; + else + { + Debug.LogError( string.Concat( "Parameter ", parameters[i].Name, "'s Type ", parameterType, " isn't supported" ) ); + return; + } + } + + int commandIndex = FindCommandIndex( command ); + if( commandIndex < 0 ) + commandIndex = ~commandIndex; + else + { + int commandFirstIndex = commandIndex; + int commandLastIndex = commandIndex; + + while( commandFirstIndex > 0 && caseInsensitiveComparer.Compare( methods[commandFirstIndex - 1].command, command, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ) == 0 ) + commandFirstIndex--; + while( commandLastIndex < methods.Count - 1 && caseInsensitiveComparer.Compare( methods[commandLastIndex + 1].command, command, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ) == 0 ) + commandLastIndex++; + + commandIndex = commandFirstIndex; + for( int i = commandFirstIndex; i <= commandLastIndex; i++ ) + { + int parameterCountDiff = methods[i].parameterTypes.Length - parameterTypes.Length; + if( parameterCountDiff <= 0 ) + { + // We are sorting the commands in 2 steps: + // 1: Sorting by their 'command' names which is handled by FindCommandIndex + // 2: Sorting by their parameter counts which is handled here (parameterCountDiff <= 0) + commandIndex = i + 1; + + // Check if this command has been registered before and if it is, overwrite that command + if( parameterCountDiff == 0 ) + { + int j = 0; + while( j < parameterTypes.Length && parameterTypes[j] == methods[i].parameterTypes[j] ) + j++; + + if( j >= parameterTypes.Length ) + { + commandIndex = i; + commandLastIndex--; + methods.RemoveAt( i-- ); + + continue; + } + } + } + } + } + + // Create the command + StringBuilder methodSignature = new StringBuilder( 256 ); + string[] parameterSignatures = new string[parameterTypes.Length]; + +#if USE_BOLD_COMMAND_SIGNATURES + methodSignature.Append( "" ); +#endif + methodSignature.Append( command ); + + if( parameterTypes.Length > 0 ) + { + methodSignature.Append( " " ); + + for( int i = 0; i < parameterTypes.Length; i++ ) + { + int parameterSignatureStartIndex = methodSignature.Length; + + methodSignature.Append( "[" ).Append( GetTypeReadableName( parameterTypes[i] ) ).Append( " " ).Append( ( parameterNames != null && i < parameterNames.Length && !string.IsNullOrEmpty( parameterNames[i] ) ) ? parameterNames[i] : parameters[i].Name ).Append( "]" ); + + if( i < parameterTypes.Length - 1 ) + methodSignature.Append( " " ); + + parameterSignatures[i] = methodSignature.ToString( parameterSignatureStartIndex, methodSignature.Length - parameterSignatureStartIndex ); + } + } + +#if USE_BOLD_COMMAND_SIGNATURES + methodSignature.Append( "" ); +#endif + + if( !string.IsNullOrEmpty( description ) ) + methodSignature.Append( ": " ).Append( description ); + + methods.Insert( commandIndex, new ConsoleMethodInfo( method, parameterTypes, instance, command, methodSignature.ToString(), parameterSignatures ) ); + } + + // Remove all commands with the matching command name from the console + public static void RemoveCommand( string command ) + { + if( !string.IsNullOrEmpty( command ) ) + { + for( int i = methods.Count - 1; i >= 0; i-- ) + { + if( caseInsensitiveComparer.Compare( methods[i].command, command, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ) == 0 ) + methods.RemoveAt( i ); + } + } + } + + // Remove all commands with the matching method from the console + public static void RemoveCommand( Action method ) { RemoveCommand( method.Method ); } + public static void RemoveCommand( Action method ) { RemoveCommand( method.Method ); } + public static void RemoveCommand( Func method ) { RemoveCommand( method.Method ); } + public static void RemoveCommand( Action method ) { RemoveCommand( method.Method ); } + public static void RemoveCommand( Func method ) { RemoveCommand( method.Method ); } + public static void RemoveCommand( Action method ) { RemoveCommand( method.Method ); } + public static void RemoveCommand( Func method ) { RemoveCommand( method.Method ); } + public static void RemoveCommand( Action method ) { RemoveCommand( method.Method ); } + public static void RemoveCommand( Func method ) { RemoveCommand( method.Method ); } + public static void RemoveCommand( Func method ) { RemoveCommand( method.Method ); } + public static void RemoveCommand( Delegate method ) { RemoveCommand( method.Method ); } + + public static void RemoveCommand( MethodInfo method ) + { + if( method != null ) + { + for( int i = methods.Count - 1; i >= 0; i-- ) + { + if( methods[i].method == method ) + methods.RemoveAt( i ); + } + } + } + + // Returns the first command that starts with the entered argument + public static string GetAutoCompleteCommand( string commandStart ) + { + int commandIndex = FindCommandIndex( commandStart ); + if( commandIndex < 0 ) + commandIndex = ~commandIndex; + + string result = null; + for( int i = commandIndex; i >= 0 && caseInsensitiveComparer.IsPrefix( methods[i].command, commandStart, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ); i-- ) + result = methods[i].command; + + if( result == null ) + { + for( int i = commandIndex + 1; i < methods.Count && caseInsensitiveComparer.IsPrefix( methods[i].command, commandStart, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ); i++ ) + result = methods[i].command; + } + + return result; + } + + // Parse the command and try to execute it + public static void ExecuteCommand( string command ) + { + if( command == null ) + return; + + command = command.Trim(); + + if( command.Length == 0 ) + return; + + // Split the command's arguments + commandArguments.Clear(); + FetchArgumentsFromCommand( command, commandArguments ); + + // Find all matching commands + matchingMethods.Clear(); + bool parameterCountMismatch = false; + int commandIndex = FindCommandIndex( commandArguments[0] ); + if( commandIndex >= 0 ) + { + string _command = commandArguments[0]; + + int commandLastIndex = commandIndex; + while( commandIndex > 0 && caseInsensitiveComparer.Compare( methods[commandIndex - 1].command, _command, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ) == 0 ) + commandIndex--; + while( commandLastIndex < methods.Count - 1 && caseInsensitiveComparer.Compare( methods[commandLastIndex + 1].command, _command, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ) == 0 ) + commandLastIndex++; + + while( commandIndex <= commandLastIndex ) + { + if( !methods[commandIndex].IsValid() ) + { + methods.RemoveAt( commandIndex ); + commandLastIndex--; + } + else + { + // Check if number of parameters match + if( methods[commandIndex].parameterTypes.Length == commandArguments.Count - 1 ) + matchingMethods.Add( methods[commandIndex] ); + else + parameterCountMismatch = true; + + commandIndex++; + } + } + } + + if( matchingMethods.Count == 0 ) + { + string _command = commandArguments[0]; + FindCommands( _command, !parameterCountMismatch, matchingMethods ); + + if( matchingMethods.Count == 0 ) + Debug.LogWarning( string.Concat( "ERROR: can't find command '", _command, "'" ) ); + else + { + int commandsLength = _command.Length + 75; + for( int i = 0; i < matchingMethods.Count; i++ ) + commandsLength += matchingMethods[i].signature.Length + 7; + + StringBuilder stringBuilder = new StringBuilder( commandsLength ); + if( parameterCountMismatch ) + stringBuilder.Append( "ERROR: '" ).Append( _command ).Append( "' doesn't take " ).Append( commandArguments.Count - 1 ).Append( " parameter(s). Available command(s):" ); + else + stringBuilder.Append( "ERROR: can't find command '" ).Append( _command ).Append( "'. Did you mean:" ); + + for( int i = 0; i < matchingMethods.Count; i++ ) + stringBuilder.Append( "\n - " ).Append( matchingMethods[i].signature ); + + Debug.LogWarning( stringBuilder.ToString() ); + + // The log that lists method signature(s) for this command should automatically be expanded for better UX + if( DebugLogManager.Instance ) + { + DebugLogManager.Instance.ExpandLatestPendingLog(); + DebugLogManager.Instance.StripStackTraceFromLatestPendingLog(); + } + } + + return; + } + + ConsoleMethodInfo methodToExecute = null; + object[] parameters = new object[commandArguments.Count - 1]; + string errorMessage = null; + for( int i = 0; i < matchingMethods.Count && methodToExecute == null; i++ ) + { + ConsoleMethodInfo methodInfo = matchingMethods[i]; + + // Parse the parameters into objects + bool success = true; + for( int j = 0; j < methodInfo.parameterTypes.Length && success; j++ ) + { + try + { + string argument = commandArguments[j + 1]; + Type parameterType = methodInfo.parameterTypes[j]; + + object val; + if( ParseArgument( argument, parameterType, out val ) ) + parameters[j] = val; + else + { + success = false; + errorMessage = string.Concat( "ERROR: couldn't parse ", argument, " to ", GetTypeReadableName( parameterType ) ); + } + } + catch( Exception e ) + { + success = false; + errorMessage = "ERROR: " + e.ToString(); + } + } + + if( success ) + methodToExecute = methodInfo; + } + + if( methodToExecute == null ) + Debug.LogWarning( !string.IsNullOrEmpty( errorMessage ) ? errorMessage : "ERROR: something went wrong" ); + else + { + // Execute the method associated with the command + object result = methodToExecute.method.Invoke( methodToExecute.instance, parameters ); + if( methodToExecute.method.ReturnType != typeof( void ) ) + { + // Print the returned value to the console + if( result == null || result.Equals( null ) ) + Debug.Log( "Returned: null" ); + else + Debug.Log( "Returned: " + result.ToString() ); + } + } + } + + public static void FetchArgumentsFromCommand( string command, List commandArguments ) + { + for( int i = 0; i < command.Length; i++ ) + { + if( char.IsWhiteSpace( command[i] ) ) + continue; + + int delimiterIndex = IndexOfDelimiterGroup( command[i] ); + if( delimiterIndex >= 0 ) + { + int endIndex = IndexOfDelimiterGroupEnd( command, delimiterIndex, i + 1 ); + commandArguments.Add( command.Substring( i + 1, endIndex - i - 1 ) ); + i = ( endIndex < command.Length - 1 && command[endIndex + 1] == ',' ) ? endIndex + 1 : endIndex; + } + else + { + int endIndex = IndexOfChar( command, ' ', i + 1 ); + commandArguments.Add( command.Substring( i, command[endIndex - 1] == ',' ? endIndex - 1 - i : endIndex - i ) ); + i = endIndex; + } + } + } + + public static void FindCommands( string commandName, bool allowSubstringMatching, List matchingCommands ) + { + if( allowSubstringMatching ) + { + for( int i = 0; i < methods.Count; i++ ) + { + if( methods[i].IsValid() && caseInsensitiveComparer.IndexOf( methods[i].command, commandName, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ) >= 0 ) + matchingCommands.Add( methods[i] ); + } + } + else + { + for( int i = 0; i < methods.Count; i++ ) + { + if( methods[i].IsValid() && caseInsensitiveComparer.Compare( methods[i].command, commandName, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ) == 0 ) + matchingCommands.Add( methods[i] ); + } + } + } + + // Finds all commands that have a matching signature with command + // - caretIndexIncrements: indices inside "string command" that separate two arguments in the command. This is used to + // figure out which argument the caret is standing on + // - commandName: command's name (first argument) + internal static void GetCommandSuggestions( string command, List matchingCommands, List caretIndexIncrements, ref string commandName, out int numberOfParameters ) + { + bool commandNameCalculated = false; + bool commandNameFullyTyped = false; + numberOfParameters = -1; + for( int i = 0; i < command.Length; i++ ) + { + if( char.IsWhiteSpace( command[i] ) ) + continue; + + int delimiterIndex = IndexOfDelimiterGroup( command[i] ); + if( delimiterIndex >= 0 ) + { + int endIndex = IndexOfDelimiterGroupEnd( command, delimiterIndex, i + 1 ); + if( !commandNameCalculated ) + { + commandNameCalculated = true; + commandNameFullyTyped = command.Length > endIndex; + + int commandNameLength = endIndex - i - 1; + if( commandName == null || commandNameLength == 0 || commandName.Length != commandNameLength || caseInsensitiveComparer.IndexOf( command, commandName, i + 1, commandNameLength, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ) != i + 1 ) + commandName = command.Substring( i + 1, commandNameLength ); + } + + i = ( endIndex < command.Length - 1 && command[endIndex + 1] == ',' ) ? endIndex + 1 : endIndex; + caretIndexIncrements.Add( i + 1 ); + } + else + { + int endIndex = IndexOfChar( command, ' ', i + 1 ); + if( !commandNameCalculated ) + { + commandNameCalculated = true; + commandNameFullyTyped = command.Length > endIndex; + + int commandNameLength = command[endIndex - 1] == ',' ? endIndex - 1 - i : endIndex - i; + if( commandName == null || commandNameLength == 0 || commandName.Length != commandNameLength || caseInsensitiveComparer.IndexOf( command, commandName, i, commandNameLength, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ) != i ) + commandName = command.Substring( i, commandNameLength ); + } + + i = endIndex; + caretIndexIncrements.Add( i ); + } + + numberOfParameters++; + } + + if( !commandNameCalculated ) + commandName = string.Empty; + + if( !string.IsNullOrEmpty( commandName ) ) + { + int commandIndex = FindCommandIndex( commandName ); + if( commandIndex < 0 ) + commandIndex = ~commandIndex; + + int commandLastIndex = commandIndex; + if( !commandNameFullyTyped ) + { + // Match all commands that start with commandName + if( commandIndex < methods.Count && caseInsensitiveComparer.IsPrefix( methods[commandIndex].command, commandName, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ) ) + { + while( commandIndex > 0 && caseInsensitiveComparer.IsPrefix( methods[commandIndex - 1].command, commandName, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ) ) + commandIndex--; + while( commandLastIndex < methods.Count - 1 && caseInsensitiveComparer.IsPrefix( methods[commandLastIndex + 1].command, commandName, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ) ) + commandLastIndex++; + } + else + commandLastIndex = -1; + } + else + { + // Match only the commands that are equal to commandName + if( commandIndex < methods.Count && caseInsensitiveComparer.Compare( methods[commandIndex].command, commandName, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ) == 0 ) + { + while( commandIndex > 0 && caseInsensitiveComparer.Compare( methods[commandIndex - 1].command, commandName, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ) == 0 ) + commandIndex--; + while( commandLastIndex < methods.Count - 1 && caseInsensitiveComparer.Compare( methods[commandLastIndex + 1].command, commandName, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ) == 0 ) + commandLastIndex++; + } + else + commandLastIndex = -1; + } + + for( ; commandIndex <= commandLastIndex; commandIndex++ ) + { + if( methods[commandIndex].parameterTypes.Length >= numberOfParameters ) + matchingCommands.Add( methods[commandIndex] ); + } + } + } + + // Find the index of the delimiter group that 'c' belongs to + private static int IndexOfDelimiterGroup( char c ) + { + for( int i = 0; i < inputDelimiters.Length; i++ ) + { + if( c == inputDelimiters[i][0] ) + return i; + } + + return -1; + } + + private static int IndexOfDelimiterGroupEnd( string command, int delimiterIndex, int startIndex ) + { + char startChar = inputDelimiters[delimiterIndex][0]; + char endChar = inputDelimiters[delimiterIndex][1]; + + // Check delimiter's depth for array support (e.g. [[1 2] [3 4]] for Vector2 array) + int depth = 1; + + for( int i = startIndex; i < command.Length; i++ ) + { + char c = command[i]; + if( c == endChar && --depth <= 0 ) + return i; + else if( c == startChar ) + depth++; + } + + return command.Length; + } + + // Find the index of char in the string, or return the length of string instead of -1 + private static int IndexOfChar( string command, char c, int startIndex ) + { + int result = command.IndexOf( c, startIndex ); + if( result < 0 ) + result = command.Length; + + return result; + } + + // Find command's index in the list of registered commands using binary search + private static int FindCommandIndex( string command ) + { + int min = 0; + int max = methods.Count - 1; + while( min <= max ) + { + int mid = ( min + max ) / 2; + int comparison = caseInsensitiveComparer.Compare( command, methods[mid].command, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace ); + if( comparison == 0 ) + return mid; + else if( comparison < 0 ) + max = mid - 1; + else + min = mid + 1; + } + + return ~min; + } + + public static bool IsSupportedArrayType( Type type ) + { + if( type.IsArray ) + { + if( type.GetArrayRank() != 1 ) + return false; + + type = type.GetElementType(); + } + else if( type.IsGenericType ) + { + if( type.GetGenericTypeDefinition() != typeof( List<> ) ) + return false; + + type = type.GetGenericArguments()[0]; + } + else + return false; + + return parseFunctions.ContainsKey( type ) || typeof( Component ).IsAssignableFrom( type ) || type.IsEnum; + } + + public static string GetTypeReadableName( Type type ) + { + string result; + if( typeReadableNames.TryGetValue( type, out result ) ) + return result; + + if( IsSupportedArrayType( type ) ) + { + Type elementType = type.IsArray ? type.GetElementType() : type.GetGenericArguments()[0]; + if( typeReadableNames.TryGetValue( elementType, out result ) ) + return result + "[]"; + else + return elementType.Name + "[]"; + } + + return type.Name; + } + + public static bool ParseArgument( string input, Type argumentType, out object output ) + { + ParseFunction parseFunction; + if( parseFunctions.TryGetValue( argumentType, out parseFunction ) ) + return parseFunction( input, out output ); + else if( typeof( Component ).IsAssignableFrom( argumentType ) ) + return ParseComponent( input, argumentType, out output ); + else if( argumentType.IsEnum ) + return ParseEnum( input, argumentType, out output ); + else if( IsSupportedArrayType( argumentType ) ) + return ParseArray( input, argumentType, out output ); + else + { + output = null; + return false; + } + } + + public static bool ParseString( string input, out object output ) + { + output = input; + return true; + } + + public static bool ParseBool( string input, out object output ) + { + if( input == "1" || input.ToLowerInvariant() == "true" ) + { + output = true; + return true; + } + + if( input == "0" || input.ToLowerInvariant() == "false" ) + { + output = false; + return true; + } + + output = false; + return false; + } + + public static bool ParseInt( string input, out object output ) + { + int value; + bool result = int.TryParse( input, out value ); + + output = value; + return result; + } + + public static bool ParseUInt( string input, out object output ) + { + uint value; + bool result = uint.TryParse( input, out value ); + + output = value; + return result; + } + + public static bool ParseLong( string input, out object output ) + { + long value; + bool result = long.TryParse( !input.EndsWith( "L", StringComparison.OrdinalIgnoreCase ) ? input : input.Substring( 0, input.Length - 1 ), out value ); + + output = value; + return result; + } + + public static bool ParseULong( string input, out object output ) + { + ulong value; + bool result = ulong.TryParse( !input.EndsWith( "L", StringComparison.OrdinalIgnoreCase ) ? input : input.Substring( 0, input.Length - 1 ), out value ); + + output = value; + return result; + } + + public static bool ParseByte( string input, out object output ) + { + byte value; + bool result = byte.TryParse( input, out value ); + + output = value; + return result; + } + + public static bool ParseSByte( string input, out object output ) + { + sbyte value; + bool result = sbyte.TryParse( input, out value ); + + output = value; + return result; + } + + public static bool ParseShort( string input, out object output ) + { + short value; + bool result = short.TryParse( input, out value ); + + output = value; + return result; + } + + public static bool ParseUShort( string input, out object output ) + { + ushort value; + bool result = ushort.TryParse( input, out value ); + + output = value; + return result; + } + + public static bool ParseChar( string input, out object output ) + { + char value; + bool result = char.TryParse( input, out value ); + + output = value; + return result; + } + + public static bool ParseFloat( string input, out object output ) + { + float value; + bool result = float.TryParse( !input.EndsWith( "f", StringComparison.OrdinalIgnoreCase ) ? input : input.Substring( 0, input.Length - 1 ), out value ); + + output = value; + return result; + } + + public static bool ParseDouble( string input, out object output ) + { + double value; + bool result = double.TryParse( !input.EndsWith( "f", StringComparison.OrdinalIgnoreCase ) ? input : input.Substring( 0, input.Length - 1 ), out value ); + + output = value; + return result; + } + + public static bool ParseDecimal( string input, out object output ) + { + decimal value; + bool result = decimal.TryParse( !input.EndsWith( "f", StringComparison.OrdinalIgnoreCase ) ? input : input.Substring( 0, input.Length - 1 ), out value ); + + output = value; + return result; + } + + public static bool ParseVector2( string input, out object output ) + { + return ParseVector( input, typeof( Vector2 ), out output ); + } + + public static bool ParseVector3( string input, out object output ) + { + return ParseVector( input, typeof( Vector3 ), out output ); + } + + public static bool ParseVector4( string input, out object output ) + { + return ParseVector( input, typeof( Vector4 ), out output ); + } + + public static bool ParseQuaternion( string input, out object output ) + { + return ParseVector( input, typeof( Quaternion ), out output ); + } + + public static bool ParseColor( string input, out object output ) + { + return ParseVector( input, typeof( Color ), out output ); + } + + public static bool ParseColor32( string input, out object output ) + { + return ParseVector( input, typeof( Color32 ), out output ); + } + + public static bool ParseRect( string input, out object output ) + { + return ParseVector( input, typeof( Rect ), out output ); + } + + public static bool ParseRectOffset( string input, out object output ) + { + return ParseVector( input, typeof( RectOffset ), out output ); + } + + public static bool ParseBounds( string input, out object output ) + { + return ParseVector( input, typeof( Bounds ), out output ); + } + +#if UNITY_2017_2_OR_NEWER + public static bool ParseVector2Int( string input, out object output ) + { + return ParseVector( input, typeof( Vector2Int ), out output ); + } + + public static bool ParseVector3Int( string input, out object output ) + { + return ParseVector( input, typeof( Vector3Int ), out output ); + } + + public static bool ParseRectInt( string input, out object output ) + { + return ParseVector( input, typeof( RectInt ), out output ); + } + + public static bool ParseBoundsInt( string input, out object output ) + { + return ParseVector( input, typeof( BoundsInt ), out output ); + } +#endif + + public static bool ParseGameObject( string input, out object output ) + { + output = input == "null" ? null : GameObject.Find( input ); + return true; + } + + public static bool ParseComponent( string input, Type componentType, out object output ) + { + GameObject gameObject = input == "null" ? null : GameObject.Find( input ); + output = gameObject ? gameObject.GetComponent( componentType ) : null; + return true; + } + + public static bool ParseEnum( string input, Type enumType, out object output ) + { + const int NONE = 0, OR = 1, AND = 2; + + int outputInt = 0; + int operation = NONE; // 0: nothing, 1: OR with outputInt, 2: AND with outputInt + for( int i = 0; i < input.Length; i++ ) + { + string enumStr; + int orIndex = input.IndexOf( '|', i ); + int andIndex = input.IndexOf( '&', i ); + if( orIndex < 0 ) + enumStr = input.Substring( i, ( andIndex < 0 ? input.Length : andIndex ) - i ).Trim(); + else + enumStr = input.Substring( i, ( andIndex < 0 ? orIndex : Mathf.Min( andIndex, orIndex ) ) - i ).Trim(); + + int value; + if( !int.TryParse( enumStr, out value ) ) + { + try + { + // Case-insensitive enum parsing + value = Convert.ToInt32( Enum.Parse( enumType, enumStr, true ) ); + } + catch + { + output = null; + return false; + } + } + + if( operation == NONE ) + outputInt = value; + else if( operation == OR ) + outputInt |= value; + else + outputInt &= value; + + if( orIndex >= 0 ) + { + if( andIndex > orIndex ) + { + operation = AND; + i = andIndex; + } + else + { + operation = OR; + i = orIndex; + } + } + else if( andIndex >= 0 ) + { + operation = AND; + i = andIndex; + } + else + i = input.Length; + } + + output = Enum.ToObject( enumType, outputInt ); + return true; + } + + public static bool ParseArray( string input, Type arrayType, out object output ) + { + List valuesToParse = new List( 2 ); + FetchArgumentsFromCommand( input, valuesToParse ); + + IList result = (IList) Activator.CreateInstance( arrayType, new object[1] { valuesToParse.Count } ); + output = result; + + if( arrayType.IsArray ) + { + Type elementType = arrayType.GetElementType(); + for( int i = 0; i < valuesToParse.Count; i++ ) + { + object obj; + if( !ParseArgument( valuesToParse[i], elementType, out obj ) ) + return false; + + result[i] = obj; + } + } + else + { + Type elementType = arrayType.GetGenericArguments()[0]; + for( int i = 0; i < valuesToParse.Count; i++ ) + { + object obj; + if( !ParseArgument( valuesToParse[i], elementType, out obj ) ) + return false; + + result.Add( obj ); + } + } + + return true; + } + + // Create a vector of specified type (fill the blank slots with 0 or ignore unnecessary slots) + private static bool ParseVector( string input, Type vectorType, out object output ) + { + List tokens = new List( input.Replace( ',', ' ' ).Trim().Split( ' ' ) ); + for( int i = tokens.Count - 1; i >= 0; i-- ) + { + tokens[i] = tokens[i].Trim(); + if( tokens[i].Length == 0 ) + tokens.RemoveAt( i ); + } + + float[] tokenValues = new float[tokens.Count]; + for( int i = 0; i < tokens.Count; i++ ) + { + object val; + if( !ParseFloat( tokens[i], out val ) ) + { + if( vectorType == typeof( Vector3 ) ) + output = Vector3.zero; + else if( vectorType == typeof( Vector2 ) ) + output = Vector2.zero; + else + output = Vector4.zero; + + return false; + } + + tokenValues[i] = (float) val; + } + + if( vectorType == typeof( Vector3 ) ) + { + Vector3 result = Vector3.zero; + + for( int i = 0; i < tokenValues.Length && i < 3; i++ ) + result[i] = tokenValues[i]; + + output = result; + } + else if( vectorType == typeof( Vector2 ) ) + { + Vector2 result = Vector2.zero; + + for( int i = 0; i < tokenValues.Length && i < 2; i++ ) + result[i] = tokenValues[i]; + + output = result; + } + else if( vectorType == typeof( Vector4 ) ) + { + Vector4 result = Vector4.zero; + + for( int i = 0; i < tokenValues.Length && i < 4; i++ ) + result[i] = tokenValues[i]; + + output = result; + } + else if( vectorType == typeof( Quaternion ) ) + { + Quaternion result = Quaternion.identity; + + for( int i = 0; i < tokenValues.Length && i < 4; i++ ) + result[i] = tokenValues[i]; + + output = result; + } + else if( vectorType == typeof( Color ) ) + { + Color result = Color.black; + + for( int i = 0; i < tokenValues.Length && i < 4; i++ ) + result[i] = tokenValues[i]; + + output = result; + } + else if( vectorType == typeof( Color32 ) ) + { + Color32 result = new Color32( 0, 0, 0, 255 ); + + if( tokenValues.Length > 0 ) + result.r = (byte) Mathf.RoundToInt( tokenValues[0] ); + if( tokenValues.Length > 1 ) + result.g = (byte) Mathf.RoundToInt( tokenValues[1] ); + if( tokenValues.Length > 2 ) + result.b = (byte) Mathf.RoundToInt( tokenValues[2] ); + if( tokenValues.Length > 3 ) + result.a = (byte) Mathf.RoundToInt( tokenValues[3] ); + + output = result; + } + else if( vectorType == typeof( Rect ) ) + { + Rect result = Rect.zero; + + if( tokenValues.Length > 0 ) + result.x = tokenValues[0]; + if( tokenValues.Length > 1 ) + result.y = tokenValues[1]; + if( tokenValues.Length > 2 ) + result.width = tokenValues[2]; + if( tokenValues.Length > 3 ) + result.height = tokenValues[3]; + + output = result; + } + else if( vectorType == typeof( RectOffset ) ) + { + RectOffset result = new RectOffset(); + + if( tokenValues.Length > 0 ) + result.left = Mathf.RoundToInt( tokenValues[0] ); + if( tokenValues.Length > 1 ) + result.right = Mathf.RoundToInt( tokenValues[1] ); + if( tokenValues.Length > 2 ) + result.top = Mathf.RoundToInt( tokenValues[2] ); + if( tokenValues.Length > 3 ) + result.bottom = Mathf.RoundToInt( tokenValues[3] ); + + output = result; + } + else if( vectorType == typeof( Bounds ) ) + { + Vector3 center = Vector3.zero; + for( int i = 0; i < tokenValues.Length && i < 3; i++ ) + center[i] = tokenValues[i]; + + Vector3 size = Vector3.zero; + for( int i = 3; i < tokenValues.Length && i < 6; i++ ) + size[i - 3] = tokenValues[i]; + + output = new Bounds( center, size ); + } +#if UNITY_2017_2_OR_NEWER + else if( vectorType == typeof( Vector3Int ) ) + { + Vector3Int result = Vector3Int.zero; + + for( int i = 0; i < tokenValues.Length && i < 3; i++ ) + result[i] = Mathf.RoundToInt( tokenValues[i] ); + + output = result; + } + else if( vectorType == typeof( Vector2Int ) ) + { + Vector2Int result = Vector2Int.zero; + + for( int i = 0; i < tokenValues.Length && i < 2; i++ ) + result[i] = Mathf.RoundToInt( tokenValues[i] ); + + output = result; + } + else if( vectorType == typeof( RectInt ) ) + { + RectInt result = new RectInt(); + + if( tokenValues.Length > 0 ) + result.x = Mathf.RoundToInt( tokenValues[0] ); + if( tokenValues.Length > 1 ) + result.y = Mathf.RoundToInt( tokenValues[1] ); + if( tokenValues.Length > 2 ) + result.width = Mathf.RoundToInt( tokenValues[2] ); + if( tokenValues.Length > 3 ) + result.height = Mathf.RoundToInt( tokenValues[3] ); + + output = result; + } + else if( vectorType == typeof( BoundsInt ) ) + { + Vector3Int center = Vector3Int.zero; + for( int i = 0; i < tokenValues.Length && i < 3; i++ ) + center[i] = Mathf.RoundToInt( tokenValues[i] ); + + Vector3Int size = Vector3Int.zero; + for( int i = 3; i < tokenValues.Length && i < 6; i++ ) + size[i - 3] = Mathf.RoundToInt( tokenValues[i] ); + + output = new BoundsInt( center, size ); + } +#endif + else + { + output = null; + return false; + } + + return true; + } + } +} \ No newline at end of file diff --git a/Assets/Third/IngameDebugConsole/Scripts/DebugLogConsole.cs.meta b/Assets/Third/IngameDebugConsole/Scripts/DebugLogConsole.cs.meta new file mode 100644 index 0000000..d28442c --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/DebugLogConsole.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d15693a03d0d33b4892c6365a2a97e19 +timeCreated: 1472036503 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Scripts/DebugLogEntry.cs b/Assets/Third/IngameDebugConsole/Scripts/DebugLogEntry.cs new file mode 100644 index 0000000..8914ece --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/DebugLogEntry.cs @@ -0,0 +1,165 @@ +//#define IDG_OMIT_ELAPSED_TIME +//#define IDG_OMIT_FRAMECOUNT + +using System.Text; +using UnityEngine; + +// Container for a simple debug entry +namespace IngameDebugConsole +{ + public class DebugLogEntry : System.IEquatable + { + private const int HASH_NOT_CALCULATED = -623218; + + public string logString; + public string stackTrace; + + private string completeLog; + + // Sprite to show with this entry + public Sprite logTypeSpriteRepresentation; + + // Collapsed count + public int count; + + private int hashValue; + + public void Initialize( string logString, string stackTrace ) + { + this.logString = logString; + this.stackTrace = stackTrace; + + completeLog = null; + count = 1; + hashValue = HASH_NOT_CALCULATED; + } + + // Check if two entries have the same origin + public bool Equals( DebugLogEntry other ) + { + return this.logString == other.logString && this.stackTrace == other.stackTrace; + } + + // Checks if logString or stackTrace contains the search term + public bool MatchesSearchTerm( string searchTerm ) + { + return ( logString != null && logString.IndexOf( searchTerm, System.StringComparison.OrdinalIgnoreCase ) >= 0 ) || + ( stackTrace != null && stackTrace.IndexOf( searchTerm, System.StringComparison.OrdinalIgnoreCase ) >= 0 ); + } + + // Return a string containing complete information about this debug entry + public override string ToString() + { + if( completeLog == null ) + completeLog = string.Concat( logString, "\n", stackTrace ); + + return completeLog; + } + + // Credit: https://stackoverflow.com/a/19250516/2373034 + public override int GetHashCode() + { + if( hashValue == HASH_NOT_CALCULATED ) + { + unchecked + { + hashValue = 17; + hashValue = hashValue * 23 + ( logString == null ? 0 : logString.GetHashCode() ); + hashValue = hashValue * 23 + ( stackTrace == null ? 0 : stackTrace.GetHashCode() ); + } + } + + return hashValue; + } + } + + public struct QueuedDebugLogEntry + { + public readonly string logString; + public readonly string stackTrace; + public readonly LogType logType; + + public QueuedDebugLogEntry( string logString, string stackTrace, LogType logType ) + { + this.logString = logString; + this.stackTrace = stackTrace; + this.logType = logType; + } + + // Checks if logString or stackTrace contains the search term + public bool MatchesSearchTerm( string searchTerm ) + { + return ( logString != null && logString.IndexOf( searchTerm, System.StringComparison.OrdinalIgnoreCase ) >= 0 ) || + ( stackTrace != null && stackTrace.IndexOf( searchTerm, System.StringComparison.OrdinalIgnoreCase ) >= 0 ); + } + } + + public struct DebugLogEntryTimestamp + { + public readonly System.DateTime dateTime; +#if !IDG_OMIT_ELAPSED_TIME + public readonly float elapsedSeconds; +#endif +#if !IDG_OMIT_FRAMECOUNT + public readonly int frameCount; +#endif + + public DebugLogEntryTimestamp( System.TimeSpan localTimeUtcOffset ) + { + // It is 10 times faster to cache local time's offset from UtcNow and add it to UtcNow to get local time at any time + dateTime = System.DateTime.UtcNow + localTimeUtcOffset; +#if !IDG_OMIT_ELAPSED_TIME + elapsedSeconds = Time.realtimeSinceStartup; +#endif +#if !IDG_OMIT_FRAMECOUNT + frameCount = Time.frameCount; +#endif + } + + public void AppendTime( StringBuilder sb ) + { + // Add DateTime in format: [HH:mm:ss] + sb.Append( "[" ); + + int hour = dateTime.Hour; + if( hour >= 10 ) + sb.Append( hour ); + else + sb.Append( "0" ).Append( hour ); + + sb.Append( ":" ); + + int minute = dateTime.Minute; + if( minute >= 10 ) + sb.Append( minute ); + else + sb.Append( "0" ).Append( minute ); + + sb.Append( ":" ); + + int second = dateTime.Second; + if( second >= 10 ) + sb.Append( second ); + else + sb.Append( "0" ).Append( second ); + + sb.Append( "]" ); + } + + public void AppendFullTimestamp( StringBuilder sb ) + { + AppendTime( sb ); + +#if !IDG_OMIT_ELAPSED_TIME && !IDG_OMIT_FRAMECOUNT + // Append elapsed seconds and frame count in format: [1.0s at #Frame] + sb.Append( "[" ).Append( elapsedSeconds.ToString( "F1" ) ).Append( "s at " ).Append( "#" ).Append( frameCount ).Append( "]" ); +#elif !IDG_OMIT_ELAPSED_TIME + // Append elapsed seconds in format: [1.0s] + sb.Append( "[" ).Append( elapsedSeconds.ToString( "F1" ) ).Append( "s]" ); +#elif !IDG_OMIT_FRAMECOUNT + // Append frame count in format: [#Frame] + sb.Append( "[#" ).Append( frameCount ).Append( "]" ); +#endif + } + } +} \ No newline at end of file diff --git a/Assets/Third/IngameDebugConsole/Scripts/DebugLogEntry.cs.meta b/Assets/Third/IngameDebugConsole/Scripts/DebugLogEntry.cs.meta new file mode 100644 index 0000000..fe3d897 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/DebugLogEntry.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e7b1a420c564be040bf73b8a377fc2c2 +timeCreated: 1466375168 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Scripts/DebugLogIndexList.cs b/Assets/Third/IngameDebugConsole/Scripts/DebugLogIndexList.cs new file mode 100644 index 0000000..e98dd53 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/DebugLogIndexList.cs @@ -0,0 +1,39 @@ +namespace IngameDebugConsole +{ + public class DebugLogIndexList + { + private T[] indices; + private int size; + + public int Count { get { return size; } } + public T this[int index] + { + get { return indices[index]; } + set { indices[index] = value; } + } + + public DebugLogIndexList() + { + indices = new T[64]; + size = 0; + } + + public void Add( T value ) + { + if( size == indices.Length ) + System.Array.Resize( ref indices, size * 2 ); + + indices[size++] = value; + } + + public void Clear() + { + size = 0; + } + + public int IndexOf( T value ) + { + return System.Array.IndexOf( indices, value ); + } + } +} \ No newline at end of file diff --git a/Assets/Third/IngameDebugConsole/Scripts/DebugLogIndexList.cs.meta b/Assets/Third/IngameDebugConsole/Scripts/DebugLogIndexList.cs.meta new file mode 100644 index 0000000..3d11a6a --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/DebugLogIndexList.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 37c6c91e5bfac6f499698c03f593bcbb +timeCreated: 1520627934 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Scripts/DebugLogItem.cs b/Assets/Third/IngameDebugConsole/Scripts/DebugLogItem.cs new file mode 100644 index 0000000..7256de7 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/DebugLogItem.cs @@ -0,0 +1,283 @@ +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; +using System.Text; +#if UNITY_EDITOR +using UnityEditor; +using System.Text.RegularExpressions; +#endif + +// A UI element to show information about a debug entry +namespace IngameDebugConsole +{ + public class DebugLogItem : MonoBehaviour, IPointerClickHandler + { + #region Platform Specific Elements +#if !UNITY_2018_1_OR_NEWER +#if !UNITY_EDITOR && UNITY_ANDROID + private static AndroidJavaClass m_ajc = null; + private static AndroidJavaClass AJC + { + get + { + if( m_ajc == null ) + m_ajc = new AndroidJavaClass( "com.yasirkula.unity.DebugConsole" ); + + return m_ajc; + } + } + + private static AndroidJavaObject m_context = null; + private static AndroidJavaObject Context + { + get + { + if( m_context == null ) + { + using( AndroidJavaObject unityClass = new AndroidJavaClass( "com.unity3d.player.UnityPlayer" ) ) + { + m_context = unityClass.GetStatic( "currentActivity" ); + } + } + + return m_context; + } + } +#elif !UNITY_EDITOR && UNITY_IOS + [System.Runtime.InteropServices.DllImport( "__Internal" )] + private static extern void _DebugConsole_CopyText( string text ); +#endif +#endif + #endregion + +#pragma warning disable 0649 + // Cached components + [SerializeField] + private RectTransform transformComponent; + public RectTransform Transform { get { return transformComponent; } } + + [SerializeField] + private Image imageComponent; + public Image Image { get { return imageComponent; } } + + [SerializeField] + private CanvasGroup canvasGroupComponent; + public CanvasGroup CanvasGroup { get { return canvasGroupComponent; } } + + [SerializeField] + private Text logText; + [SerializeField] + private Image logTypeImage; + + // Objects related to the collapsed count of the debug entry + [SerializeField] + private GameObject logCountParent; + [SerializeField] + private Text logCountText; + + [SerializeField] + private RectTransform copyLogButton; +#pragma warning restore 0649 + + // Debug entry to show with this log item + private DebugLogEntry logEntry; + public DebugLogEntry Entry { get { return logEntry; } } + + private DebugLogEntryTimestamp? logEntryTimestamp; + public DebugLogEntryTimestamp? Timestamp { get { return logEntryTimestamp; } } + + // Index of the entry in the list of entries + private int entryIndex; + public int Index { get { return entryIndex; } } + + private bool isExpanded; + public bool Expanded { get { return isExpanded; } } + + private Vector2 logTextOriginalPosition; + private Vector2 logTextOriginalSize; + private float copyLogButtonHeight; + + private DebugLogRecycledListView listView; + + public void Initialize( DebugLogRecycledListView listView ) + { + this.listView = listView; + + logTextOriginalPosition = logText.rectTransform.anchoredPosition; + logTextOriginalSize = logText.rectTransform.sizeDelta; + copyLogButtonHeight = copyLogButton.anchoredPosition.y + copyLogButton.sizeDelta.y + 2f; // 2f: space between text and button + +#if !UNITY_EDITOR && UNITY_WEBGL + copyLogButton.gameObject.AddComponent().Initialize( this ); +#endif + } + + public void SetContent( DebugLogEntry logEntry, DebugLogEntryTimestamp? logEntryTimestamp, int entryIndex, bool isExpanded ) + { + this.logEntry = logEntry; + this.logEntryTimestamp = logEntryTimestamp; + this.entryIndex = entryIndex; + this.isExpanded = isExpanded; + + Vector2 size = transformComponent.sizeDelta; + if( isExpanded ) + { + logText.horizontalOverflow = HorizontalWrapMode.Wrap; + size.y = listView.SelectedItemHeight; + + if( !copyLogButton.gameObject.activeSelf ) + { + copyLogButton.gameObject.SetActive( true ); + + logText.rectTransform.anchoredPosition = new Vector2( logTextOriginalPosition.x, logTextOriginalPosition.y + copyLogButtonHeight * 0.5f ); + logText.rectTransform.sizeDelta = logTextOriginalSize - new Vector2( 0f, copyLogButtonHeight ); + } + } + else + { + logText.horizontalOverflow = HorizontalWrapMode.Overflow; + size.y = listView.ItemHeight; + + if( copyLogButton.gameObject.activeSelf ) + { + copyLogButton.gameObject.SetActive( false ); + + logText.rectTransform.anchoredPosition = logTextOriginalPosition; + logText.rectTransform.sizeDelta = logTextOriginalSize; + } + } + + transformComponent.sizeDelta = size; + + SetText( logEntry, logEntryTimestamp, isExpanded ); + logTypeImage.sprite = logEntry.logTypeSpriteRepresentation; + } + + // Show the collapsed count of the debug entry + public void ShowCount() + { + logCountText.text = logEntry.count.ToString(); + + if( !logCountParent.activeSelf ) + logCountParent.SetActive( true ); + } + + // Hide the collapsed count of the debug entry + public void HideCount() + { + if( logCountParent.activeSelf ) + logCountParent.SetActive( false ); + } + + // Update the debug entry's displayed timestamp + public void UpdateTimestamp( DebugLogEntryTimestamp timestamp ) + { + logEntryTimestamp = timestamp; + + if( isExpanded || listView.manager.alwaysDisplayTimestamps ) + SetText( logEntry, timestamp, isExpanded ); + } + + private void SetText( DebugLogEntry logEntry, DebugLogEntryTimestamp? logEntryTimestamp, bool isExpanded ) + { + if( !logEntryTimestamp.HasValue || ( !isExpanded && !listView.manager.alwaysDisplayTimestamps ) ) + logText.text = isExpanded ? logEntry.ToString() : logEntry.logString; + else + { + StringBuilder sb = listView.manager.sharedStringBuilder; + sb.Length = 0; + + if( isExpanded ) + { + logEntryTimestamp.Value.AppendFullTimestamp( sb ); + sb.Append( ": " ).Append( logEntry.ToString() ); + } + else + { + logEntryTimestamp.Value.AppendTime( sb ); + sb.Append( " " ).Append( logEntry.logString ); + } + + logText.text = sb.ToString(); + } + } + + // This log item is clicked, show the debug entry's stack trace + public void OnPointerClick( PointerEventData eventData ) + { +#if UNITY_EDITOR + if( eventData.button == PointerEventData.InputButton.Right ) + { + Match regex = Regex.Match( logEntry.stackTrace, @"\(at .*\.cs:[0-9]+\)$", RegexOptions.Multiline ); + if( regex.Success ) + { + string line = logEntry.stackTrace.Substring( regex.Index + 4, regex.Length - 5 ); + int lineSeparator = line.IndexOf( ':' ); + MonoScript script = AssetDatabase.LoadAssetAtPath( line.Substring( 0, lineSeparator ) ); + if( script != null ) + AssetDatabase.OpenAsset( script, int.Parse( line.Substring( lineSeparator + 1 ) ) ); + } + } + else + listView.OnLogItemClicked( this ); +#else + listView.OnLogItemClicked( this ); +#endif + } + + public void CopyLog() + { +#if UNITY_EDITOR || !UNITY_WEBGL + string log = GetCopyContent(); + if( string.IsNullOrEmpty( log ) ) + return; + +#if UNITY_EDITOR || UNITY_2018_1_OR_NEWER || ( !UNITY_ANDROID && !UNITY_IOS ) + GUIUtility.systemCopyBuffer = log; +#elif UNITY_ANDROID + AJC.CallStatic( "CopyText", Context, log ); +#elif UNITY_IOS + _DebugConsole_CopyText( log ); +#endif +#endif + } + + internal string GetCopyContent() + { + if( !logEntryTimestamp.HasValue ) + return logEntry.ToString(); + else + { + StringBuilder sb = listView.manager.sharedStringBuilder; + sb.Length = 0; + + logEntryTimestamp.Value.AppendFullTimestamp( sb ); + sb.Append( ": " ).Append( logEntry.ToString() ); + + return sb.ToString(); + } + } + + public float CalculateExpandedHeight( DebugLogEntry logEntry, DebugLogEntryTimestamp? logEntryTimestamp ) + { + string text = logText.text; + HorizontalWrapMode wrapMode = logText.horizontalOverflow; + + SetText( logEntry, logEntryTimestamp, true ); + logText.horizontalOverflow = HorizontalWrapMode.Wrap; + + float result = logText.preferredHeight + copyLogButtonHeight; + + logText.text = text; + logText.horizontalOverflow = wrapMode; + + return Mathf.Max( listView.ItemHeight, result ); + } + + // Return a string containing complete information about the debug entry + public override string ToString() + { + return logEntry.ToString(); + } + } +} \ No newline at end of file diff --git a/Assets/Third/IngameDebugConsole/Scripts/DebugLogItem.cs.meta b/Assets/Third/IngameDebugConsole/Scripts/DebugLogItem.cs.meta new file mode 100644 index 0000000..da77aa1 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/DebugLogItem.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d2ea291be9de70a4abfec595203c96c1 +timeCreated: 1465919949 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Scripts/DebugLogItemCopyWebGL.cs b/Assets/Third/IngameDebugConsole/Scripts/DebugLogItemCopyWebGL.cs new file mode 100644 index 0000000..a02f3ad --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/DebugLogItemCopyWebGL.cs @@ -0,0 +1,36 @@ +#if !UNITY_EDITOR && UNITY_WEBGL +using System.Runtime.InteropServices; +using UnityEngine; +using UnityEngine.EventSystems; + +namespace IngameDebugConsole +{ + public class DebugLogItemCopyWebGL : MonoBehaviour, IPointerDownHandler, IPointerUpHandler + { + [DllImport( "__Internal" )] + private static extern void IngameDebugConsoleStartCopy( string textToCopy ); + [DllImport( "__Internal" )] + private static extern void IngameDebugConsoleCancelCopy(); + + private DebugLogItem logItem; + + public void Initialize( DebugLogItem logItem ) + { + this.logItem = logItem; + } + + public void OnPointerDown( PointerEventData eventData ) + { + string log = logItem.GetCopyContent(); + if( !string.IsNullOrEmpty( log ) ) + IngameDebugConsoleStartCopy( log ); + } + + public void OnPointerUp( PointerEventData eventData ) + { + if( eventData.dragging ) + IngameDebugConsoleCancelCopy(); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Third/IngameDebugConsole/Scripts/DebugLogItemCopyWebGL.cs.meta b/Assets/Third/IngameDebugConsole/Scripts/DebugLogItemCopyWebGL.cs.meta new file mode 100644 index 0000000..539dfd8 --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/DebugLogItemCopyWebGL.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5a7d9d894141e704d8160fb4632121ac +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Third/IngameDebugConsole/Scripts/DebugLogManager.cs b/Assets/Third/IngameDebugConsole/Scripts/DebugLogManager.cs new file mode 100644 index 0000000..58dff4c --- /dev/null +++ b/Assets/Third/IngameDebugConsole/Scripts/DebugLogManager.cs @@ -0,0 +1,1573 @@ +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Text; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; +#if ENABLE_INPUT_SYSTEM && !ENABLE_LEGACY_INPUT_MANAGER +using UnityEngine.InputSystem; +#endif +#if UNITY_EDITOR && UNITY_2021_1_OR_NEWER +using Screen = UnityEngine.Device.Screen; // To support Device Simulator on Unity 2021.1+ +#endif + +// Receives debug entries and custom events (e.g. Clear, Collapse, Filter by Type) +// and notifies the recycled list view of changes to the list of debug entries +// +// - Vocabulary - +// Debug/Log entry: a Debug.Log/LogError/LogWarning/LogException/LogAssertion request made by +// the client and intercepted by this manager object +// Debug/Log item: a visual (uGUI) representation of a debug entry +// +// There can be a lot of debug entries in the system but there will only be a handful of log items +// to show their properties on screen (these log items are recycled as the list is scrolled) + +// An enum to represent filtered log types +namespace IngameDebugConsole +{ + public enum DebugLogFilter + { + None = 0, + Info = 1, + Warning = 2, + Error = 4, + All = 7 + } + + public class DebugLogManager : MonoBehaviour + { + public static DebugLogManager Instance { get; private set; } + +#pragma warning disable 0649 + [Header( "Properties" )] + [SerializeField] + [HideInInspector] + [Tooltip( "If enabled, console window will persist between scenes (i.e. not be destroyed when scene changes)" )] + private bool singleton = true; + + [SerializeField] + [HideInInspector] + [Tooltip( "Minimum height of the console window" )] + private float minimumHeight = 200f; + + [SerializeField] + [HideInInspector] + [Tooltip( "If enabled, console window can be resized horizontally, as well" )] + private bool enableHorizontalResizing = false; + + [SerializeField] + [HideInInspector] + [Tooltip( "If enabled, console window's resize button will be located at bottom-right corner. Otherwise, it will be located at bottom-left corner" )] + private bool resizeFromRight = true; + + [SerializeField] + [HideInInspector] + [Tooltip( "Minimum width of the console window" )] + private float minimumWidth = 240f; + + [SerializeField] + [HideInInspector] + [Tooltip( "If disabled, no popup will be shown when the console window is hidden" )] + private bool enablePopup = true; + + [SerializeField] + [HideInInspector] + [Tooltip( "If enabled, console will be initialized as a popup" )] + private bool startInPopupMode = true; + + [SerializeField] + [HideInInspector] + [Tooltip( "If enabled, console window will initially be invisible" )] + private bool startMinimized = false; + + [SerializeField] + [HideInInspector] + [Tooltip( "If enabled, pressing the Toggle Key will show/hide (i.e. toggle) the console window at runtime" )] + private bool toggleWithKey = false; + +#if ENABLE_INPUT_SYSTEM && !ENABLE_LEGACY_INPUT_MANAGER + [SerializeField] + [HideInInspector] + public InputAction toggleBinding = new InputAction( "Toggle Binding", type: InputActionType.Button, binding: "/backquote", expectedControlType: "Button" ); +#else + [SerializeField] + [HideInInspector] + private KeyCode toggleKey = KeyCode.BackQuote; +#endif + + [SerializeField] + [HideInInspector] + [Tooltip( "If enabled, the console window will have a searchbar" )] + private bool enableSearchbar = true; + + [SerializeField] + [HideInInspector] + [Tooltip( "Width of the canvas determines whether the searchbar will be located inside the menu bar or underneath the menu bar. This way, the menu bar doesn't get too crowded on narrow screens. This value determines the minimum width of the canvas for the searchbar to appear inside the menu bar" )] + private float topSearchbarMinWidth = 360f; + + [SerializeField] + [HideInInspector] + [Tooltip( "If enabled, the arrival times of logs will be recorded and displayed when a log is expanded" )] + private bool captureLogTimestamps = false; + + [SerializeField] + [HideInInspector] + [Tooltip( "If enabled, timestamps will be displayed for logs even if they aren't expanded" )] + internal bool alwaysDisplayTimestamps = false; + + [SerializeField] + [HideInInspector] + [Tooltip( "If enabled, the command input field at the bottom of the console window will automatically be cleared after entering a command" )] + private bool clearCommandAfterExecution = true; + + [SerializeField] + [HideInInspector] + [Tooltip( "Console keeps track of the previously entered commands. This value determines the capacity of the command history (you can scroll through the history via up and down arrow keys while the command input field is focused)" )] + private int commandHistorySize = 15; + + [SerializeField] + [HideInInspector] + [Tooltip( "If enabled, while typing a command, all of the matching commands' signatures will be displayed in a popup" )] + private bool showCommandSuggestions = true; + + [SerializeField] + [HideInInspector] + [Tooltip( "If enabled, on Android platform, logcat entries of the application will also be logged to the console with the prefix \"LOGCAT: \". This may come in handy especially if you want to access the native logs of your Android plugins (like Admob)" )] + private bool receiveLogcatLogsInAndroid = false; + +#pragma warning disable 0414 +#if UNITY_2018_3_OR_NEWER // On older Unity versions, disabling CS0169 is problematic: "Cannot restore warning 'CS0169' because it was disabled globally" +#pragma warning disable 0169 +#endif + [SerializeField] + [HideInInspector] + [Tooltip( "Native logs will be filtered using these arguments. If left blank, all native logs of the application will be logged to the console. But if you want to e.g. see Admob's logs only, you can enter \"-s Ads\" (without quotes) here" )] + private string logcatArguments; +#if UNITY_2018_3_OR_NEWER +#pragma warning restore 0169 +#endif +#pragma warning restore 0414 + + [SerializeField] + [Tooltip( "If enabled, on Android and iOS devices with notch screens, the console window will be repositioned so that the cutout(s) don't obscure it" )] + private bool avoidScreenCutout = true; + + [SerializeField] + [Tooltip( "If a log is longer than this limit, it will be truncated. This helps avoid reaching Unity's 65000 vertex limit for UI canvases" )] + private int maxLogLength = 10000; + +#if UNITY_EDITOR || UNITY_STANDALONE + [SerializeField] + [Tooltip( "If enabled, on standalone platforms, command input field will automatically be focused (start receiving keyboard input) after opening the console window" )] + private bool autoFocusOnCommandInputField = true; +#endif + + [Header( "Visuals" )] + [SerializeField] + private DebugLogItem logItemPrefab; + + [SerializeField] + private Text commandSuggestionPrefab; + + // Visuals for different log types + [SerializeField] + private Sprite infoLog; + [SerializeField] + private Sprite warningLog; + [SerializeField] + private Sprite errorLog; + + // Visuals for resize button + [SerializeField] + private Sprite resizeIconAllDirections; + [SerializeField] + private Sprite resizeIconVerticalOnly; + + private Dictionary logSpriteRepresentations; + + [SerializeField] + private Color collapseButtonNormalColor; + [SerializeField] + private Color collapseButtonSelectedColor; + + [SerializeField] + private Color filterButtonsNormalColor; + [SerializeField] + private Color filterButtonsSelectedColor; + + [SerializeField] + private string commandSuggestionHighlightStart = ""; + [SerializeField] + private string commandSuggestionHighlightEnd = ""; + + [Header( "Internal References" )] + [SerializeField] + private RectTransform logWindowTR; + + internal RectTransform canvasTR; + + [SerializeField] + private RectTransform logItemsContainer; + + [SerializeField] + private RectTransform commandSuggestionsContainer; + + [SerializeField] + private InputField commandInputField; + + [SerializeField] + private Button hideButton; + + [SerializeField] + private Button clearButton; + + [SerializeField] + private Image collapseButton; + + [SerializeField] + private Image filterInfoButton; + [SerializeField] + private Image filterWarningButton; + [SerializeField] + private Image filterErrorButton; + + [SerializeField] + private Text infoEntryCountText; + [SerializeField] + private Text warningEntryCountText; + [SerializeField] + private Text errorEntryCountText; + + [SerializeField] + private RectTransform searchbar; + [SerializeField] + private RectTransform searchbarSlotTop; + [SerializeField] + private RectTransform searchbarSlotBottom; + + [SerializeField] + private Image resizeButton; + + [SerializeField] + private GameObject snapToBottomButton; + + // Canvas group to modify visibility of the log window + [SerializeField] + private CanvasGroup logWindowCanvasGroup; + + [SerializeField] + private DebugLogPopup popupManager; + + [SerializeField] + private ScrollRect logItemsScrollRect; + private RectTransform logItemsScrollRectTR; + private Vector2 logItemsScrollRectOriginalSize; + + // Recycled list view to handle the log items efficiently + [SerializeField] + private DebugLogRecycledListView recycledListView; +#pragma warning restore 0649 + + private bool isLogWindowVisible = true; + public bool IsLogWindowVisible { get { return isLogWindowVisible; } } + + public bool PopupEnabled + { + get { return popupManager.gameObject.activeSelf; } + set { popupManager.gameObject.SetActive( value ); } + } + + private bool screenDimensionsChanged = true; + private float logWindowPreviousWidth; + + // Number of entries filtered by their types + private int infoEntryCount = 0, warningEntryCount = 0, errorEntryCount = 0; + + // Number of new entries received this frame + private int newInfoEntryCount = 0, newWarningEntryCount = 0, newErrorEntryCount = 0; + + // Filters to apply to the list of debug entries to show + private bool isCollapseOn = false; + private DebugLogFilter logFilter = DebugLogFilter.All; + + // Search filter + private string searchTerm; + private bool isInSearchMode; + + // If the last log item is completely visible (scrollbar is at the bottom), + // scrollbar will remain at the bottom when new debug entries are received + private bool snapToBottom = true; + + // List of unique debug entries (duplicates of entries are not kept) + private List collapsedLogEntries; + private List collapsedLogEntriesTimestamps; + + // Dictionary to quickly find if a log already exists in collapsedLogEntries + private Dictionary collapsedLogEntriesMap; + + // The order the collapsedLogEntries are received + // (duplicate entries have the same index (value)) + private DebugLogIndexList uncollapsedLogEntriesIndices; + private DebugLogIndexList uncollapsedLogEntriesTimestamps; + + // Filtered list of debug entries to show + private DebugLogIndexList indicesOfListEntriesToShow; + private DebugLogIndexList timestampsOfListEntriesToShow; + + // The log entry that must be focused this frame + private int indexOfLogEntryToSelectAndFocus = -1; + + // Whether or not logs list view should be updated this frame + private bool shouldUpdateRecycledListView = false; + + // Logs that should be registered in Update-loop + private DynamicCircularBuffer queuedLogEntries; + private object logEntriesLock; + private int pendingLogToAutoExpand; + + // Command suggestions that match the currently entered command + private List commandSuggestionInstances; + private int visibleCommandSuggestionInstances = 0; + private List matchingCommandSuggestions; + private List commandCaretIndexIncrements; + private string commandInputFieldPrevCommand; + private string commandInputFieldPrevCommandName; + private int commandInputFieldPrevParamCount = -1; + private int commandInputFieldPrevCaretPos = -1; + private int commandInputFieldPrevCaretArgumentIndex = -1; + + // Pools for memory efficiency + private List pooledLogEntries; + private List pooledLogItems; + + // History of the previously entered commands + private CircularBuffer commandHistory; + private int commandHistoryIndex = -1; + private string unfinishedCommand; + + // StringBuilder used by various functions + internal StringBuilder sharedStringBuilder; + + // Offset of DateTime.Now from DateTime.UtcNow + private System.TimeSpan localTimeUtcOffset; + + // Required in ValidateScrollPosition() function + private PointerEventData nullPointerEventData; + + // Callbacks for log window show/hide events + public System.Action OnLogWindowShown, OnLogWindowHidden; + +#if UNITY_EDITOR + private bool isQuittingApplication; +#endif + +#if !UNITY_EDITOR && UNITY_ANDROID + private DebugLogLogcatListener logcatListener; +#endif + + private void Awake() + { + // Only one instance of debug console is allowed + if( !Instance ) + { + Instance = this; + + // If it is a singleton object, don't destroy it between scene changes + if( singleton ) + DontDestroyOnLoad( gameObject ); + } + else if( Instance != this ) + { + Destroy( gameObject ); + return; + } + + pooledLogEntries = new List( 16 ); + pooledLogItems = new List( 16 ); + commandSuggestionInstances = new List( 8 ); + matchingCommandSuggestions = new List( 8 ); + commandCaretIndexIncrements = new List( 8 ); + queuedLogEntries = new DynamicCircularBuffer( 16 ); + commandHistory = new CircularBuffer( commandHistorySize ); + + logEntriesLock = new object(); + sharedStringBuilder = new StringBuilder( 1024 ); + + canvasTR = (RectTransform) transform; + logItemsScrollRectTR = (RectTransform) logItemsScrollRect.transform; + logItemsScrollRectOriginalSize = logItemsScrollRectTR.sizeDelta; + + // Associate sprites with log types + logSpriteRepresentations = new Dictionary() + { + { LogType.Log, infoLog }, + { LogType.Warning, warningLog }, + { LogType.Error, errorLog }, + { LogType.Exception, errorLog }, + { LogType.Assert, errorLog } + }; + + // Initially, all log types are visible + filterInfoButton.color = filterButtonsSelectedColor; + filterWarningButton.color = filterButtonsSelectedColor; + filterErrorButton.color = filterButtonsSelectedColor; + + resizeButton.sprite = enableHorizontalResizing ? resizeIconAllDirections : resizeIconVerticalOnly; + + collapsedLogEntries = new List( 128 ); + collapsedLogEntriesMap = new Dictionary( 128 ); + uncollapsedLogEntriesIndices = new DebugLogIndexList(); + indicesOfListEntriesToShow = new DebugLogIndexList(); + + if( captureLogTimestamps ) + { + collapsedLogEntriesTimestamps = new List( 128 ); + uncollapsedLogEntriesTimestamps = new DebugLogIndexList(); + timestampsOfListEntriesToShow = new DebugLogIndexList(); + } + + recycledListView.Initialize( this, collapsedLogEntries, indicesOfListEntriesToShow, timestampsOfListEntriesToShow, logItemPrefab.Transform.sizeDelta.y ); + recycledListView.UpdateItemsInTheList( true ); + + if( minimumWidth < 100f ) + minimumWidth = 100f; + if( minimumHeight < 200f ) + minimumHeight = 200f; + + if( !resizeFromRight ) + { + RectTransform resizeButtonTR = (RectTransform) resizeButton.GetComponentInParent().transform; + resizeButtonTR.anchorMin = new Vector2( 0f, resizeButtonTR.anchorMin.y ); + resizeButtonTR.anchorMax = new Vector2( 0f, resizeButtonTR.anchorMax.y ); + resizeButtonTR.pivot = new Vector2( 0f, resizeButtonTR.pivot.y ); + + ( (RectTransform) commandInputField.transform ).anchoredPosition += new Vector2( resizeButtonTR.sizeDelta.x, 0f ); + } + + if( enableSearchbar ) + searchbar.GetComponent().onValueChanged.AddListener( SearchTermChanged ); + else + { + searchbar = null; + searchbarSlotTop.gameObject.SetActive( false ); + searchbarSlotBottom.gameObject.SetActive( false ); + } + + if( commandSuggestionsContainer.gameObject.activeSelf ) + commandSuggestionsContainer.gameObject.SetActive( false ); + + // Register to UI events + commandInputField.onValidateInput += OnValidateCommand; + commandInputField.onValueChanged.AddListener( RefreshCommandSuggestions ); + commandInputField.onEndEdit.AddListener( OnEndEditCommand ); + hideButton.onClick.AddListener( HideLogWindow ); + clearButton.onClick.AddListener( ClearLogs ); + collapseButton.GetComponent