init
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b57a498e71a67247b6120da0f958dc6
|
||||
folderAsset: yes
|
||||
timeCreated: 1462209926
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7cb274224585bd349b4e49e20afd64cd
|
||||
timeCreated: 1460812117
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ca8ff4dde9e415459cc5c36199c9516
|
||||
timeCreated: 1462214496
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c65a1491470906a4d8896dd1258839dc
|
||||
timeCreated: 1463149604
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c3b80d58be409c6499d58221af3bd5eb
|
||||
timeCreated: 1462192050
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 251bf42be90463449852661dad19c21d
|
||||
timeCreated: 1459799714
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15600e8c9bf8574489ba40daf829614a
|
||||
folderAsset: yes
|
||||
timeCreated: 1459800811
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
|
||||
public class BackgroundKey : MonoBehaviour
|
||||
{
|
||||
|
||||
#region dll
|
||||
[DllImport("Dwmapi.dll")]static extern uint DwmExtendFrameIntoClientArea(IntPtr hWnd, ref Margins margins);
|
||||
[DllImport("user32.dll")]static extern int SetWindowLong(IntPtr hWnd, int nIndex, uint dwNewLong);
|
||||
[DllImport("user32.dll")]public static extern int GetWindowLong(IntPtr hWnd, int nIndex);
|
||||
|
||||
private struct Margins{
|
||||
public int Left;
|
||||
public int Right;
|
||||
public int Top;
|
||||
public int Bottom;
|
||||
}
|
||||
#endregion dll
|
||||
|
||||
#region Private
|
||||
|
||||
private bool active = true;
|
||||
[SerializeField]private Material _keyMaterial;
|
||||
|
||||
#endregion Private
|
||||
|
||||
void Start() {
|
||||
transform.SetAsFirstSibling();
|
||||
}
|
||||
|
||||
public void ActivateTransparency(IntPtr hWnd) {
|
||||
active = true;
|
||||
Color32 c =GetComponent<Camera>().backgroundColor;
|
||||
GetComponent<Camera>().backgroundColor=new Color32(c.r,c.g,c.b,5);
|
||||
#if !UNITY_EDITOR
|
||||
var m = new Margins() { Left = -1 };
|
||||
SetWindowLong(hWnd, -16, 0x80000000 | 0x10000000);
|
||||
DwmExtendFrameIntoClientArea(hWnd, ref m);
|
||||
#endif
|
||||
}
|
||||
|
||||
public void DisableTransparency() {
|
||||
active = false;
|
||||
Color32 c = GetComponent<Camera>().backgroundColor;
|
||||
GetComponent<Camera>().backgroundColor = new Color32(c.r, c.g, c.b, 255);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void OnRenderImage(RenderTexture a, RenderTexture n)
|
||||
{
|
||||
if (active) {
|
||||
Graphics.Blit(a, n, _keyMaterial);
|
||||
}
|
||||
// else {
|
||||
// Graphics.Blit(a, n);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c3808b38eeffeff4eb72dbddcad60761
|
||||
timeCreated: 1459541451
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c6b634a35f2895141a4ef3c7bdb72d4e
|
||||
timeCreated: 1459541451
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,58 @@
|
||||
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
|
||||
|
||||
Shader "Custom/BackgroundKeyShader" {
|
||||
Properties {
|
||||
_MainTex ("Base (RGB)", 2D) = "white" {}
|
||||
_ColorKey ("Color Key", Color) = (0,0,0,1)
|
||||
_ColorSensitivity ("Color Sensitivity", Float) = 0.6
|
||||
}
|
||||
SubShader {
|
||||
Pass {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 200
|
||||
|
||||
CGPROGRAM
|
||||
|
||||
#pragma vertex VertexShaderFunction
|
||||
#pragma fragment FragmentShaderFunction
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct VertexData{
|
||||
float4 position : POSITION;
|
||||
float2 uvs : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VertexToFragment {
|
||||
float4 position : SV_POSITION;
|
||||
float2 uvs : TEXCOORD0;
|
||||
};
|
||||
|
||||
VertexToFragment VertexShaderFunction(VertexData input) {
|
||||
VertexToFragment result;
|
||||
result.position = UnityObjectToClipPos (input.position);
|
||||
result.uvs = input.uvs;
|
||||
return result;
|
||||
}
|
||||
|
||||
sampler2D _MainTex;
|
||||
float3 _ColorKey;
|
||||
float _ColorSensitivity;
|
||||
|
||||
float4 FragmentShaderFunction(VertexToFragment input) : SV_Target {
|
||||
float4 color = tex2D(_MainTex, input.uvs);
|
||||
|
||||
float R = abs(color.r - _ColorKey.r);
|
||||
float G = abs(color.g - _ColorKey.g);
|
||||
float B = abs(color.b - _ColorKey.b);
|
||||
|
||||
if (R < _ColorSensitivity && G < _ColorSensitivity && B < _ColorSensitivity){
|
||||
return float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7bc350edc0d27db4f9c09e07fabc7ac7
|
||||
timeCreated: 1459541451
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fae392461979ef54e9963845024aa16d
|
||||
folderAsset: yes
|
||||
timeCreated: 1460320288
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Binary file not shown.
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8dcd8931665df574b8544dad8abceaf0
|
||||
timeCreated: 1458501145
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9caac2c457b3db44783922b7e523fecb
|
||||
timeCreated: 1459801098
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class Rotate : MonoBehaviour {
|
||||
|
||||
void Update () {
|
||||
transform.Rotate(0,Time.deltaTime * 20,0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d9c08aa2495aec41bf701573e6fbe5c
|
||||
timeCreated: 1459957281
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b8441fae24f8904cac33031d035959c
|
||||
timeCreated: 1460658780
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bdc79bb12585e3d498ff4ece94bf1f87
|
||||
folderAsset: yes
|
||||
timeCreated: 1458513403
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f2b59f9b25a6aa40a54682d8a06b95b
|
||||
timeCreated: 1458501097
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88892820e74b95f4cbbc0548a78f6c12
|
||||
timeCreated: 1459798117
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 31b3ec37cfab8ac4ba709269044fda07
|
||||
timeCreated: 1458513468
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e6575b7851975bc4eb5e92a5f7820530
|
||||
folderAsset: yes
|
||||
timeCreated: 1458513386
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 43e1d1c69012c9f46b82cc5597ad393d
|
||||
timeCreated: 1461859568
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,33 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class QuitVLCHelper : MonoBehaviour {
|
||||
|
||||
private PlayVLC[] videos;
|
||||
|
||||
void Start () {
|
||||
videos = GameObject.FindObjectsOfType<PlayVLC>();
|
||||
}
|
||||
|
||||
public void QuitAllVideos() {
|
||||
foreach (PlayVLC video in videos) {
|
||||
video.StopVideo();
|
||||
}
|
||||
}
|
||||
|
||||
public void QuitApplication() {
|
||||
foreach (PlayVLC video in videos) {
|
||||
video.StopVideo();
|
||||
}
|
||||
|
||||
Application.Quit();
|
||||
}
|
||||
|
||||
void OnApplicationQuit() {
|
||||
foreach (PlayVLC video in videos)
|
||||
{
|
||||
video.StopVideo();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 850c65b6690b7534591705191168ce88
|
||||
timeCreated: 1461859571
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1540a75c114c3c34e8cea04640f0bea3
|
||||
timeCreated: 1465214994
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user