diff --git a/.gitmodules b/.gitmodules index e3c5df5..e6245ac 100644 --- a/.gitmodules +++ b/.gitmodules @@ -21,19 +21,12 @@ path = Unity-19050-01_ForstCoronation/Packages/com.ultracombos.osc url = https://github.com/UltraCombos/com.ultracombos.osc.git branch = master -[submodule "Unity-19050-01_ForstCoronation/Packages/KlakSpout"] - path = Unity-19050-01_ForstCoronation/Packages/KlakSpout - url = https://github.com/UltraCombos/KlakSpout - branch = upm [submodule "_Package/com.ultracombos.osc"] path = _Package/com.ultracombos.osc url = https://github.com/UltraCombos/com.ultracombos.osc [submodule "_Package/com.ultracombos.tuio"] path = _Package/com.ultracombos.tuio url = https://github.com/UltraCombos/com.ultracombos.tuio -[submodule "_Package/jp.keijiro.klak.spout"] - path = _Package/jp.keijiro.klak.spout - url = "https://github.com/keijiro/KlakSpout#upm" [submodule "_Package/com.ultracombos.configuration"] path = _Package/com.ultracombos.configuration url = https://github.com/UltraCombos/com.ultracombos.configuration.git @@ -53,3 +46,7 @@ path = Unity-19050-03_RoyalGallery_iPad/Packages/com.ultracombos.utility-native-plugin url = https://github.com/UltraCombos/com.ultracombos.utility-native-plugin.git branch = master +[submodule "_Package/KlakSpout"] + path = _Package/KlakSpout + url = https://github.com/keijiro/KlakSpout + branch = upm diff --git a/Unity-19050-05-BallPool/ProjectSettings/EditorBuildSettings.asset b/Unity-19050-05-BallPool/ProjectSettings/EditorBuildSettings.asset index 5b95cf1..e684673 100644 --- a/Unity-19050-05-BallPool/ProjectSettings/EditorBuildSettings.asset +++ b/Unity-19050-05-BallPool/ProjectSettings/EditorBuildSettings.asset @@ -8,6 +8,4 @@ EditorBuildSettings: - enabled: 1 path: Assets/Frozen/Frozen.unity guid: 34b4afb9026442541b75a5cc9009882b - - enabled: 0 - path: - guid: 00000000000000000000000000000000 + m_configObjects: {} diff --git a/Unity-19050-05-BallPool/ProjectSettings/UnityConnectSettings.asset b/Unity-19050-05-BallPool/ProjectSettings/UnityConnectSettings.asset index 3da14d5..c3ae9a0 100644 --- a/Unity-19050-05-BallPool/ProjectSettings/UnityConnectSettings.asset +++ b/Unity-19050-05-BallPool/ProjectSettings/UnityConnectSettings.asset @@ -3,25 +3,25 @@ --- !u!310 &1 UnityConnectSettings: m_ObjectHideFlags: 0 - m_Enabled: 0 + serializedVersion: 1 + m_Enabled: 1 m_TestMode: 0 - m_TestEventUrl: - m_TestConfigUrl: + m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events + m_EventUrl: https://cdp.cloud.unity3d.com/v1/events + m_ConfigUrl: https://config.uca.cloud.unity3d.com m_TestInitMode: 0 CrashReportingSettings: - m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes - m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate + m_EventUrl: https://perf-events.cloud.unity3d.com m_Enabled: 0 + m_LogBufferSize: 10 m_CaptureEditorExceptions: 1 UnityPurchasingSettings: m_Enabled: 0 m_TestMode: 0 UnityAnalyticsSettings: m_Enabled: 0 - m_InitializeOnStartup: 1 m_TestMode: 0 - m_TestEventUrl: - m_TestConfigUrl: + m_InitializeOnStartup: 1 UnityAdsSettings: m_Enabled: 0 m_InitializeOnStartup: 1 diff --git a/_Package/KlakSpout b/_Package/KlakSpout new file mode 160000 index 0000000..a0096e3 --- /dev/null +++ b/_Package/KlakSpout @@ -0,0 +1 @@ +Subproject commit a0096e3172c22009678fc94cbd8c8f549a0149f1 diff --git a/_Package/KlakSpout/.gitattributes b/_Package/KlakSpout/.gitattributes deleted file mode 100644 index 962aa38..0000000 --- a/_Package/KlakSpout/.gitattributes +++ /dev/null @@ -1,9 +0,0 @@ -* -text - -*.cs text eol=lf diff=csharp -*.shader text eol=lf -*.cginc text eol=lf -*.hlsl text eol=lf -*.compute text eol=lf - -*.meta text eol=lf diff --git a/_Package/KlakSpout/.gitignore b/_Package/KlakSpout/.gitignore deleted file mode 100644 index 2fe5828..0000000 --- a/_Package/KlakSpout/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -# Windows -Thumbs.db -Desktop.ini - -# macOS -.DS_Store - -# Code Editors -.idea -.vscode -*.csproj -*.sln -*.swp - -# Unity -/Library -/Temp - -Assets/Plugins -Assets/Plugins.meta diff --git a/_Package/KlakSpout/.npmignore b/_Package/KlakSpout/.npmignore deleted file mode 100644 index 65b2db7..0000000 --- a/_Package/KlakSpout/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -.git -.gitignore -.gitattributes -.gitmodules diff --git a/_Package/KlakSpout/Editor.meta b/_Package/KlakSpout/Editor.meta deleted file mode 100644 index e69a378..0000000 --- a/_Package/KlakSpout/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: bfb9850bc5423b54c862ff4b58e1ea25 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/_Package/KlakSpout/Editor/SpoutReceiverEditor.cs b/_Package/KlakSpout/Editor/SpoutReceiverEditor.cs deleted file mode 100644 index 5277ae7..0000000 --- a/_Package/KlakSpout/Editor/SpoutReceiverEditor.cs +++ /dev/null @@ -1,125 +0,0 @@ -// KlakSpout - Spout realtime video sharing plugin for Unity -// https://github.com/keijiro/KlakSpout -using UnityEngine; -using UnityEditor; -using System; -using System.Collections.Generic; - -namespace Klak.Spout -{ - [CanEditMultipleObjects] - [CustomEditor(typeof(SpoutReceiver))] - public class SpoutReceiverEditor : Editor - { - SerializedProperty _nameFilter; - SerializedProperty _targetTexture; - SerializedProperty _targetRenderer; - SerializedProperty _targetMaterialProperty; - - static GUIContent _labelProperty = new GUIContent("Property"); - - string[] _propertyList; // cached property list - Shader _cachedShader; // shader used to cache the list - - // Retrieve shader from a target renderer. - Shader RetrieveTargetShader(UnityEngine.Object target) - { - var renderer = target as Renderer; - if (renderer == null) return null; - - var material = renderer.sharedMaterial; - if (material == null) return null; - - return material.shader; - } - - // Cache properties of a given shader if it's - // different from a previously given one. - void CachePropertyList(Shader shader) - { - if (_cachedShader == shader) return; - - var temp = new List(); - - var count = ShaderUtil.GetPropertyCount(shader); - for (var i = 0; i < count; i++) - { - var propType = ShaderUtil.GetPropertyType(shader, i); - if (propType == ShaderUtil.ShaderPropertyType.TexEnv) - temp.Add(ShaderUtil.GetPropertyName(shader, i)); - } - - _propertyList = temp.ToArray(); - _cachedShader = shader; - } - - // Material property drop-down list. - void ShowMaterialPropertyDropDown() - { - // Try to retrieve the target shader. - var shader = RetrieveTargetShader(_targetRenderer.objectReferenceValue); - - if (shader != null) - { - // Cache the property list of the target shader. - CachePropertyList(shader); - - // If there are suitable candidates... - if (_propertyList.Length > 0) - { - // Show the drop-down list. - var index = Array.IndexOf(_propertyList, _targetMaterialProperty.stringValue); - var newIndex = EditorGUILayout.Popup("Property", index, _propertyList); - - // Update the property if the selection was changed. - if (index != newIndex) - _targetMaterialProperty.stringValue = _propertyList[newIndex]; - } - else - _targetMaterialProperty.stringValue = ""; // reset on failure - } - else - _targetMaterialProperty.stringValue = ""; // reset on failure - } - - void OnEnable() - { - _nameFilter = serializedObject.FindProperty("_nameFilter"); - _targetTexture = serializedObject.FindProperty("_targetTexture"); - _targetRenderer = serializedObject.FindProperty("_targetRenderer"); - _targetMaterialProperty = serializedObject.FindProperty("_targetMaterialProperty"); - } - - void OnDisable() - { - _propertyList = null; - _cachedShader = null; - } - - public override void OnInspectorGUI() - { - serializedObject.Update(); - - EditorGUILayout.PropertyField(_nameFilter); - EditorGUILayout.PropertyField(_targetTexture); - EditorGUILayout.PropertyField(_targetRenderer); - - EditorGUI.indentLevel++; - - if (_targetRenderer.hasMultipleDifferentValues) - { - // Show a simple text field if there are multiple values. - EditorGUILayout.PropertyField(_targetMaterialProperty, _labelProperty); - } - else if (_targetRenderer.objectReferenceValue != null) - { - // Show the material property drop-down list. - ShowMaterialPropertyDropDown(); - } - - EditorGUI.indentLevel--; - - serializedObject.ApplyModifiedProperties(); - } - } -} diff --git a/_Package/KlakSpout/Editor/SpoutReceiverEditor.cs.meta b/_Package/KlakSpout/Editor/SpoutReceiverEditor.cs.meta deleted file mode 100644 index f7ae8d2..0000000 --- a/_Package/KlakSpout/Editor/SpoutReceiverEditor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e66c46a000456b34e95a2661f5d5391b -timeCreated: 1492008499 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/_Package/KlakSpout/Editor/SpoutSenderEditor.cs b/_Package/KlakSpout/Editor/SpoutSenderEditor.cs deleted file mode 100644 index 1bf82a1..0000000 --- a/_Package/KlakSpout/Editor/SpoutSenderEditor.cs +++ /dev/null @@ -1,28 +0,0 @@ -// KlakSpout - Spout realtime video sharing plugin for Unity -// https://github.com/keijiro/KlakSpout -using UnityEngine; -using UnityEditor; - -namespace Klak.Spout -{ - [CanEditMultipleObjects] - [CustomEditor(typeof(SpoutSender))] - public class SpoutSenderEditor : Editor - { - SerializedProperty _clearAlpha; - - void OnEnable() - { - _clearAlpha = serializedObject.FindProperty("_clearAlpha"); - } - - public override void OnInspectorGUI() - { - serializedObject.Update(); - - EditorGUILayout.PropertyField(_clearAlpha); - - serializedObject.ApplyModifiedProperties(); - } - } -} diff --git a/_Package/KlakSpout/Editor/SpoutSenderEditor.cs.meta b/_Package/KlakSpout/Editor/SpoutSenderEditor.cs.meta deleted file mode 100644 index f910062..0000000 --- a/_Package/KlakSpout/Editor/SpoutSenderEditor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4d54f6c4c801e1148b465b8fb9d50412 -timeCreated: 1492008196 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/_Package/KlakSpout/Editor/SpoutSenderListWindow.cs b/_Package/KlakSpout/Editor/SpoutSenderListWindow.cs deleted file mode 100644 index 88095b0..0000000 --- a/_Package/KlakSpout/Editor/SpoutSenderListWindow.cs +++ /dev/null @@ -1,46 +0,0 @@ -// KlakSpout - Spout realtime video sharing plugin for Unity -// https://github.com/keijiro/KlakSpout -using UnityEngine; -using UnityEditor; - -namespace Klak.Spout -{ - // Spout sender list window - public class SpoutSenderListWindow : EditorWindow - { - [MenuItem("Window/Klak/Spout Sender List")] - static void Init() - { - EditorWindow.GetWindow("Spout Senders").Show(); - } - - int _updateCount; - - void OnInspectorUpdate() - { - // Update once per eight calls. - if ((_updateCount++ & 7) == 0) Repaint(); - } - - void OnGUI() - { - var count = PluginEntry.CountSharedObjects(); - - EditorGUILayout.Space(); - EditorGUI.indentLevel++; - - if (count == 0) - EditorGUILayout.LabelField("No sender detected."); - else - EditorGUILayout.LabelField(count + " sender(s) detected."); - - for (var i = 0; i < count; i++) - { - var name = PluginEntry.GetSharedObjectNameString(i); - if (name != null) EditorGUILayout.LabelField("- " + name); - } - - EditorGUI.indentLevel--; - } - } -} diff --git a/_Package/KlakSpout/Editor/SpoutSenderListWindow.cs.meta b/_Package/KlakSpout/Editor/SpoutSenderListWindow.cs.meta deleted file mode 100644 index 5d55074..0000000 --- a/_Package/KlakSpout/Editor/SpoutSenderListWindow.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 66d9365756bb8784faa1774081cc4a3e -timeCreated: 1492007252 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/_Package/KlakSpout/Editor/jp.keijiro.klak.spout.Editor.asmdef b/_Package/KlakSpout/Editor/jp.keijiro.klak.spout.Editor.asmdef deleted file mode 100644 index a1da6c0..0000000 --- a/_Package/KlakSpout/Editor/jp.keijiro.klak.spout.Editor.asmdef +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "jp.keijiro.klak.spout.Editor", - "references": [ - "jp.keijiro.klak.spout.Runtime" - ], - "optionalUnityReferences": [], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [], - "allowUnsafeCode": false -} diff --git a/_Package/KlakSpout/Editor/jp.keijiro.klak.spout.Editor.asmdef.meta b/_Package/KlakSpout/Editor/jp.keijiro.klak.spout.Editor.asmdef.meta deleted file mode 100644 index 883b1e2..0000000 --- a/_Package/KlakSpout/Editor/jp.keijiro.klak.spout.Editor.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 21435214e6169c649985b5540a63188a -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/_Package/KlakSpout/LICENSE.md b/_Package/KlakSpout/LICENSE.md deleted file mode 100644 index 19c77b8..0000000 --- a/_Package/KlakSpout/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Keijiro Takahashi - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/_Package/KlakSpout/LICENSE.md.meta b/_Package/KlakSpout/LICENSE.md.meta deleted file mode 100644 index a1ca9bf..0000000 --- a/_Package/KlakSpout/LICENSE.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: a3a09c268502f7746810f38992bd70b2 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/_Package/KlakSpout/README.md b/_Package/KlakSpout/README.md deleted file mode 100644 index bb24f0f..0000000 --- a/_Package/KlakSpout/README.md +++ /dev/null @@ -1,94 +0,0 @@ -KlakSpout -========= - -![gif](http://i.imgur.com/LxjjcrY.gif) - -**KlakSpout** is a Unity plugin that allows sharing rendered frames with other -applications with using the [Spout] protocol. - -The Spout protocol is supported by several frameworks (Processing, -openFrameworks, etc.) and software packages (Resolume, AfterEffects, etc.). -The plugin allows Unity to interoperate with them in real time without -incurring much overhead. - -[Spout]: http://spout.zeal.co/ - -System Requirements and Compatibilities ---------------------------------------- - -- KlakSpout requires Unity 5.6.0 or later. -- KlakSpout only supports Direct3D 11 (DX11) graphics API mode. Other APIs - (DX9, DX12, OpenGL core, etc.) are not supported at the moment. - -Features --------- - -### Sending frames from a camera - -You can send rendered frames from a camera in a scene with attaching the -**SpoutSender** component to it. - -### Receiving frames from other applications - -You can receive frames from other applications and store them into a render -texture, or set them to a material property as an animating texture. - -Installation ------------- - -Download one of the unitypackage files from the [Releases] page and import it -to a project. - -[Releases]: https://github.com/keijiro/KlakSpout/releases - -Component Reference -------------------- - -### SpoutSender component - -![inspector](http://i.imgur.com/6oYHWpu.png) - -**SpoutSender** is a component for sending rendered frames to other -Spout-compatible applications. - -SpoutSender has only one property. **Clear Alpha** controls whether if contents -of the alpha channel are to be shared or discarded. When it's set to true, it -clears up the contents of the alpha channel with 1.0 (100% opacity). It's -useful when the alpha channel doesn't have any particular use. - -### SpoutReceiver component - -![inspector](http://i.imgur.com/0BWmM8i.png) - -**SpoutReceiver** is a component for receiving frames sent from other -Spout-compatible applications. - -**Name Filter** is used to select which Spout sender to connect to. The -receiver only tries to connect to a sender that has the given string in its -name. For instance, when Name Filter is set to "resolume", it doesn't connect -to "Processing 1" nor "maxSender", but "resolumeOut". When Name Filter is kept -empty, it tries to connect to the first found sender without name filtering. - -SpoutReceiver supports two ways of storing received frames. When a render -texture is set to **Target Texture**, it updates the render texture with the -received frames. When Target Texture is kept null, it automatically allocates -a temporary render texture for storing frames. These render textures are -accessible from scripts with the `sharedTexture` property. - -Received frames can be rendered with using material overriding. To override a -material, set a renderer to **Target Renderer**, then select a property to be -overridden from the drop-down list. - -Sender List Window ------------------- - -![Sender List](http://i.imgur.com/XbN7RvC.png) - -The **Spout Sender List** window is available from the menu "Window" -> "Spout" --> "Spout Sender List". It shows the names of the senders that are currently -available. - -License -------- - -[MIT](LICENSE.md) diff --git a/_Package/KlakSpout/README.md.meta b/_Package/KlakSpout/README.md.meta deleted file mode 100644 index 7179502..0000000 --- a/_Package/KlakSpout/README.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 4825f67de1ac6914bb329d527edf03bb -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/_Package/KlakSpout/Resources.meta b/_Package/KlakSpout/Resources.meta deleted file mode 100644 index e8f4214..0000000 --- a/_Package/KlakSpout/Resources.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c3a1c3646309d4f469c999381310b88c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/_Package/KlakSpout/Resources/Fixup.cginc b/_Package/KlakSpout/Resources/Fixup.cginc deleted file mode 100644 index 06a40f4..0000000 --- a/_Package/KlakSpout/Resources/Fixup.cginc +++ /dev/null @@ -1,24 +0,0 @@ -// KlakSpout - Spout realtime video sharing plugin for Unity -// https://github.com/keijiro/KlakSpout -#include "UnityCG.cginc" - -sampler2D _MainTex; -fixed _ClearAlpha; - -v2f_img vert(appdata_img v) -{ - v2f_img o; - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = float2(v.texcoord.x, 1 - v.texcoord.y); - return o; -} - -fixed4 frag(v2f_img i) : SV_Target -{ - fixed4 col = tex2D(_MainTex, i.uv); - #if defined(SPOUT_RECEIVER) && !defined(UNITY_COLORSPACE_GAMMA) - col.rgb = GammaToLinearSpace(col.rgb); - #endif - col.a = saturate(col.a + _ClearAlpha); - return col; -} diff --git a/_Package/KlakSpout/Resources/Fixup.cginc.meta b/_Package/KlakSpout/Resources/Fixup.cginc.meta deleted file mode 100644 index c9aa2c2..0000000 --- a/_Package/KlakSpout/Resources/Fixup.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 35d67d62b7c939d4e8fdb1c3bed59a83 -timeCreated: 1491926074 -licenseType: Pro -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/_Package/KlakSpout/Resources/Fixup.shader b/_Package/KlakSpout/Resources/Fixup.shader deleted file mode 100644 index 4ec4bbe..0000000 --- a/_Package/KlakSpout/Resources/Fixup.shader +++ /dev/null @@ -1,32 +0,0 @@ -// KlakSpout - Spout realtime video sharing plugin for Unity -// https://github.com/keijiro/KlakSpout -Shader "Hidden/Spout/Fixup" -{ - Properties - { - _MainTex("", 2D) = "white" {} - } - SubShader - { - Cull Off ZWrite Off ZTest Always - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - #define SPOUT_SENDER - #include "Fixup.cginc" - ENDCG - } - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - #pragma multi_compile _ UNITY_COLORSPACE_GAMMA - #define SPOUT_RECEIVER - #include "Fixup.cginc" - ENDCG - } - } -} diff --git a/_Package/KlakSpout/Resources/Fixup.shader.meta b/_Package/KlakSpout/Resources/Fixup.shader.meta deleted file mode 100644 index 2a7d508..0000000 --- a/_Package/KlakSpout/Resources/Fixup.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: eb56c59e60b76874692c486f3bdd860d -timeCreated: 1491925542 -licenseType: Pro -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/_Package/KlakSpout/Runtime.meta b/_Package/KlakSpout/Runtime.meta deleted file mode 100644 index 0fbe191..0000000 --- a/_Package/KlakSpout/Runtime.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a9ca729c9d09d03428ab5e26dc0170b2 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/_Package/KlakSpout/Runtime/Internal.meta b/_Package/KlakSpout/Runtime/Internal.meta deleted file mode 100644 index 73fcda7..0000000 --- a/_Package/KlakSpout/Runtime/Internal.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 82c81c4751c9a7145a4d491944d132ab -folderAsset: yes -timeCreated: 1491924284 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/_Package/KlakSpout/Runtime/Internal/KlakSpout.dll b/_Package/KlakSpout/Runtime/Internal/KlakSpout.dll deleted file mode 100644 index 197cf27..0000000 Binary files a/_Package/KlakSpout/Runtime/Internal/KlakSpout.dll and /dev/null differ diff --git a/_Package/KlakSpout/Runtime/Internal/KlakSpout.dll.meta b/_Package/KlakSpout/Runtime/Internal/KlakSpout.dll.meta deleted file mode 100644 index b929284..0000000 --- a/_Package/KlakSpout/Runtime/Internal/KlakSpout.dll.meta +++ /dev/null @@ -1,139 +0,0 @@ -fileFormatVersion: 2 -guid: dc935766d7c9fd44181cb4b58ef3627e -timeCreated: 1491793810 -licenseType: Pro -PluginImporter: - serializedVersion: 2 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - isOverridable: 0 - platformData: - data: - first: - '': Any - second: - enabled: 0 - settings: - Exclude Editor: 0 - Exclude Linux: 0 - Exclude Linux64: 0 - Exclude LinuxUniversal: 0 - Exclude OSXIntel: 0 - Exclude OSXIntel64: 0 - Exclude OSXUniversal: 0 - Exclude PS4: 1 - Exclude Win: 1 - Exclude Win64: 0 - Exclude WindowsStoreApps: 1 - data: - first: - '': Editor - second: - enabled: 0 - settings: - CPU: x86_64 - OS: Windows - 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: None - data: - first: - Facebook: Win64 - second: - enabled: 0 - settings: - CPU: AnyCPU - data: - first: - PS4: PS4 - second: - enabled: 0 - settings: {} - 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 - ScriptingBackend: AnyScriptingBackend - userData: - assetBundleName: - assetBundleVariant: diff --git a/_Package/KlakSpout/Runtime/Internal/PluginEntry.cs b/_Package/KlakSpout/Runtime/Internal/PluginEntry.cs deleted file mode 100644 index 5a4a3ad..0000000 --- a/_Package/KlakSpout/Runtime/Internal/PluginEntry.cs +++ /dev/null @@ -1,74 +0,0 @@ -// KlakSpout - Spout realtime video sharing plugin for Unity -// https://github.com/keijiro/KlakSpout -using UnityEngine; -using System.Runtime.InteropServices; - -namespace Klak.Spout -{ - public static class PluginEntry - { - #region Plugin polling - - static int _lastUpdateFrame = -1; - - public static void Poll() - { - if (Time.frameCount != _lastUpdateFrame) - { - GL.IssuePluginEvent(GetRenderEventFunc(), 0); - _lastUpdateFrame = Time.frameCount; - } - } - - #endregion - - #region Native plugin interface - - [DllImport("KlakSpout")] - public static extern System.IntPtr GetRenderEventFunc(); - - [DllImport("KlakSpout")] - public static extern System.IntPtr CreateSender(string name, int width, int height); - - [DllImport("KlakSpout")] - public static extern System.IntPtr CreateReceiver(string name); - - [DllImport("KlakSpout")] - public static extern void DestroySharedObject(System.IntPtr ptr); - - [DllImport("KlakSpout")] - public static extern bool DetectDisconnection(System.IntPtr ptr); - - [DllImport("KlakSpout")] - public static extern System.IntPtr GetTexturePointer(System.IntPtr ptr); - - [DllImport("KlakSpout")] - public static extern int GetTextureWidth(System.IntPtr ptr); - - [DllImport("KlakSpout")] - public static extern int GetTextureHeight(System.IntPtr ptr); - - [DllImport("KlakSpout")] - public static extern int CountSharedObjects(); - - [DllImport("KlakSpout")] - public static extern System.IntPtr GetSharedObjectName(int index); - - public static string GetSharedObjectNameString(int index) - { - var ptr = GetSharedObjectName(index); - return ptr != System.IntPtr.Zero ? Marshal.PtrToStringAnsi(ptr) : null; - } - - [DllImport("KlakSpout")] - public static extern System.IntPtr SearchSharedObjectName(string keyword); - - public static string SearchSharedObjectNameString(string keyword) - { - var ptr = SearchSharedObjectName(keyword); - return ptr != System.IntPtr.Zero ? Marshal.PtrToStringAnsi(ptr) : null; - } - - #endregion - } -} diff --git a/_Package/KlakSpout/Runtime/Internal/PluginEntry.cs.meta b/_Package/KlakSpout/Runtime/Internal/PluginEntry.cs.meta deleted file mode 100644 index 0b4efa5..0000000 --- a/_Package/KlakSpout/Runtime/Internal/PluginEntry.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 5833bfa0ae0a90e478f1f90a455ee667 -timeCreated: 1491903743 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/_Package/KlakSpout/Runtime/SpoutReceiver.cs b/_Package/KlakSpout/Runtime/SpoutReceiver.cs deleted file mode 100644 index 743b787..0000000 --- a/_Package/KlakSpout/Runtime/SpoutReceiver.cs +++ /dev/null @@ -1,161 +0,0 @@ -// KlakSpout - Spout realtime video sharing plugin for Unity -// https://github.com/keijiro/KlakSpout -using UnityEngine; - -namespace Klak.Spout -{ - /// Spout receiver class - [AddComponentMenu("Klak/Spout/Spout Receiver")] - public class SpoutReceiver : MonoBehaviour - { - #region Editable properties - - [SerializeField] string _nameFilter; - - public string nameFilter { - get { return _nameFilter; } - set { _nameFilter = value; } - } - - [SerializeField] RenderTexture _targetTexture; - - public RenderTexture targetTexture { - get { return _targetTexture; } - set { _targetTexture = value; } - } - - [SerializeField] Renderer _targetRenderer; - - public Renderer targetRenderer { - get { return _targetRenderer; } - set { _targetRenderer = value; } - } - - [SerializeField] string _targetMaterialProperty; - - public string targetMaterialProperty { - get { return _targetMaterialProperty; } - set { targetMaterialProperty = value; } - } - - #endregion - - #region Public property - - Texture2D _sharedTexture; - RenderTexture _fixedTexture; - - public Texture receivedTexture { - get { return _targetTexture != null ? _targetTexture : _fixedTexture; } - } - - #endregion - - #region Private variables - - System.IntPtr _receiver; - Material _fixupMaterial; - MaterialPropertyBlock _propertyBlock; - - // Search the texture list and create a receiver when found one. - void SearchAndCreateTexture() - { - var name = PluginEntry.SearchSharedObjectNameString(_nameFilter); - if (name != null) _receiver = PluginEntry.CreateReceiver(name); - } - - #endregion - - #region MonoBehaviour functions - - void Start() - { - _fixupMaterial = new Material(Shader.Find("Hidden/Spout/Fixup")); - _propertyBlock = new MaterialPropertyBlock(); - - // Initial search. - SearchAndCreateTexture(); - } - - void OnDestroy() - { - if (_receiver != System.IntPtr.Zero) - { - PluginEntry.DestroySharedObject(_receiver); - _receiver = System.IntPtr.Zero; - } - - if (_sharedTexture != null) - { - Destroy(_sharedTexture); - _sharedTexture = null; - } - - if (_fixedTexture != null) - { - Destroy(_fixedTexture); - _fixedTexture = null; - } - } - - void Update() - { - PluginEntry.Poll(); - - if (_receiver == System.IntPtr.Zero) - { - // The receiver hasn't been set up yet; try to get one. - SearchAndCreateTexture(); - } - else - { - // We've received textures via this receiver - // but now it's disconnected from the sender -> Destroy it. - if (PluginEntry.GetTexturePointer(_receiver) != System.IntPtr.Zero && - PluginEntry.DetectDisconnection(_receiver)) - { - OnDestroy(); - } - } - - if (_receiver != System.IntPtr.Zero) - { - if (_sharedTexture == null) - { - // Try to initialize the shared texture. - var ptr = PluginEntry.GetTexturePointer(_receiver); - if (ptr != System.IntPtr.Zero) - { - _sharedTexture = Texture2D.CreateExternalTexture( - PluginEntry.GetTextureWidth(_receiver), - PluginEntry.GetTextureHeight(_receiver), - TextureFormat.ARGB32, false, false, ptr - ); - } - } - else - { - // Update external objects. - if (_targetTexture != null) - { - Graphics.Blit(_sharedTexture, _targetTexture, _fixupMaterial, 1); - } - else - { - if (_fixedTexture == null) - _fixedTexture = new RenderTexture(_sharedTexture.width, _sharedTexture.height, 0); - Graphics.Blit(_sharedTexture, _fixedTexture, _fixupMaterial, 1); - } - - if (_targetRenderer != null) - { - _propertyBlock.SetTexture(_targetMaterialProperty, receivedTexture); - _targetRenderer.SetPropertyBlock(_propertyBlock); - } - } - } - } - - #endregion - } -} diff --git a/_Package/KlakSpout/Runtime/SpoutReceiver.cs.meta b/_Package/KlakSpout/Runtime/SpoutReceiver.cs.meta deleted file mode 100644 index b2a596f..0000000 --- a/_Package/KlakSpout/Runtime/SpoutReceiver.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 62f7dec0b00674947bc631624c21970a -timeCreated: 1491895289 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/_Package/KlakSpout/Runtime/SpoutSender.cs b/_Package/KlakSpout/Runtime/SpoutSender.cs deleted file mode 100644 index 0ac79a1..0000000 --- a/_Package/KlakSpout/Runtime/SpoutSender.cs +++ /dev/null @@ -1,106 +0,0 @@ -// KlakSpout - Spout realtime video sharing plugin for Unity -// https://github.com/keijiro/KlakSpout -using UnityEngine; - -namespace Klak.Spout -{ - /// Spout sender class - [AddComponentMenu("Klak/Spout/Spout Sender")] - [RequireComponent(typeof(Camera))] - [ExecuteInEditMode] - public class SpoutSender : MonoBehaviour - { - #region Editable properties - - [SerializeField] bool _clearAlpha = true; - - public bool clearAlpha { - get { return _clearAlpha; } - set { _clearAlpha = value; } - } - - #endregion - - #region Private members - - System.IntPtr _sender; - Texture2D _sharedTexture; - Material _fixupMaterial; - - #endregion - - #region MonoBehaviour functions - - void OnEnable() - { - var camera = GetComponent(); - _sender = PluginEntry.CreateSender(name, camera.pixelWidth, camera.pixelHeight); - } - - void OnDisable() - { - if (_sender != System.IntPtr.Zero) - { - PluginEntry.DestroySharedObject(_sender); - _sender = System.IntPtr.Zero; - } - - if (_sharedTexture != null) - { - if (Application.isPlaying) - Destroy(_sharedTexture); - else - DestroyImmediate(_sharedTexture); - _sharedTexture = null; - } - } - - void Update() - { - PluginEntry.Poll(); - } - - void OnRenderImage(RenderTexture source, RenderTexture destination) - { - // Lazy initialization for the shared texture. - if (_sharedTexture == null) - { - var ptr = PluginEntry.GetTexturePointer(_sender); - if (ptr != System.IntPtr.Zero) - { - _sharedTexture = Texture2D.CreateExternalTexture( - PluginEntry.GetTextureWidth(_sender), - PluginEntry.GetTextureHeight(_sender), - TextureFormat.ARGB32, false, false, ptr - ); - } - } - - // Update the shared texture. - if (_sharedTexture != null) - { - // Lazy initialization for the fix-up shader. - if (_fixupMaterial == null) - _fixupMaterial = new Material(Shader.Find("Hidden/Spout/Fixup")); - - // Parameters for the fix-up shader. - _fixupMaterial.SetFloat("_ClearAlpha", _clearAlpha ? 1 : 0); - - // Apply the fix-up shader. - var tempRT = RenderTexture.GetTemporary(_sharedTexture.width, _sharedTexture.height); - Graphics.Blit(source, tempRT, _fixupMaterial, 0); - - // Copy the result to the shared texture. - Graphics.CopyTexture(tempRT, _sharedTexture); - - // Release temporaries. - RenderTexture.ReleaseTemporary(tempRT); - } - - // Just transfer the source to the destination. - Graphics.Blit(source, destination); - } - - #endregion - } -} diff --git a/_Package/KlakSpout/Runtime/SpoutSender.cs.meta b/_Package/KlakSpout/Runtime/SpoutSender.cs.meta deleted file mode 100644 index 2ebfc50..0000000 --- a/_Package/KlakSpout/Runtime/SpoutSender.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 45099d624c1e6c14e9514f4e5ea1ed9c -timeCreated: 1491793847 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/_Package/KlakSpout/Runtime/jp.keijiro.klak.spout.Runtime.asmdef b/_Package/KlakSpout/Runtime/jp.keijiro.klak.spout.Runtime.asmdef deleted file mode 100644 index e34064e..0000000 --- a/_Package/KlakSpout/Runtime/jp.keijiro.klak.spout.Runtime.asmdef +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name": "jp.keijiro.klak.spout.Runtime" -} diff --git a/_Package/KlakSpout/Runtime/jp.keijiro.klak.spout.Runtime.asmdef.meta b/_Package/KlakSpout/Runtime/jp.keijiro.klak.spout.Runtime.asmdef.meta deleted file mode 100644 index 969e4dc..0000000 --- a/_Package/KlakSpout/Runtime/jp.keijiro.klak.spout.Runtime.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 7cdfac5ef1f961d4ebfe51361a2020bd -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/_Package/KlakSpout/package.json b/_Package/KlakSpout/package.json deleted file mode 100644 index f7773eb..0000000 --- a/_Package/KlakSpout/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "jp.keijiro.klak.spout", - "displayName": "KlakSpout", - "version": "0.0.1", - "unity": "2018.1", - "description": "KlakSpout is a Unity plugin that allows sharing rendered frames with other applications with using the Spout protocol.", - "dependencies": { } -} diff --git a/_Package/KlakSpout/package.json.meta b/_Package/KlakSpout/package.json.meta deleted file mode 100644 index c881615..0000000 --- a/_Package/KlakSpout/package.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 46d658811c8e74d42a9b9d2ee0dd286a -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: