Compare commits
115 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57c48b0589 | ||
|
|
954734efc4 | ||
|
|
0f77155f4e | ||
|
|
179966dcdc | ||
|
|
ab8671fb84 | ||
|
|
18c5edf423 | ||
|
|
4f1a274e6a | ||
|
|
1b0fd94fcb | ||
|
|
7bf645f500 | ||
|
|
9dc63e7c9c | ||
|
|
b4135c317f | ||
|
|
cfdfb1f50e | ||
|
|
20589c23b9 | ||
|
|
b836c1dc03 | ||
|
|
4ba7caf792 | ||
|
|
0329eef501 | ||
|
|
bcce6d5749 | ||
|
|
650ce296ce | ||
|
|
74c51e7072 | ||
|
|
267b286765 | ||
|
|
f060ffbfba | ||
|
|
467fa86f59 | ||
|
|
608509aa22 | ||
|
|
9aa488e100 | ||
|
|
4c225c21c9 | ||
|
|
b8b4238b5f | ||
|
|
4d2766ce3f | ||
|
|
f4096ec9fb | ||
|
|
0f43788650 | ||
|
|
1c1381a7ba | ||
|
|
08903cd27a | ||
|
|
d840983829 | ||
|
|
8a6cee9c2d | ||
|
|
f7798f752f | ||
|
|
70cfad90a9 | ||
|
|
c926127e49 | ||
|
|
03469ce429 | ||
|
|
f63e573f04 | ||
|
|
682553a5a2 | ||
|
|
b5fd483d6a | ||
|
|
0d2c0e02f0 | ||
|
|
6f876f65ed | ||
|
|
8434d803bb | ||
|
|
1c332ebca7 | ||
|
|
340e2d5194 | ||
|
|
e397f5eb84 | ||
|
|
c20c09e275 | ||
|
|
a0ca46630e | ||
|
|
5b5995d7d0 | ||
|
|
808a71ed6d | ||
|
|
da072aa9f3 | ||
|
|
7237d283ef | ||
|
|
4a28b5f341 | ||
|
|
10091be4b3 | ||
|
|
c41fe42aa3 | ||
|
|
c0e1967e2e | ||
|
|
f5a8a83c7e | ||
|
|
c251de3a30 | ||
|
|
b0877a49ed | ||
|
|
68d9e30816 | ||
|
|
b8ae1d6c4a | ||
|
|
15624dc0f4 | ||
|
|
06d4edbcb0 | ||
|
|
9ee2d35175 | ||
|
|
0634993bb0 | ||
|
|
6bd892bc4b | ||
|
|
2a631a0a89 | ||
|
|
0833b965e9 | ||
|
|
12726d85dc | ||
|
|
29920b6b94 | ||
|
|
4de8f0ba51 | ||
|
|
476be8243a | ||
|
|
c681e43d65 | ||
|
|
ed24ca2fb2 | ||
|
|
791fa42478 | ||
|
|
11dbb7be57 | ||
|
|
9ed24dd3b1 | ||
|
|
cfbd218374 | ||
|
|
bf7174f406 | ||
|
|
4a761a06f3 | ||
|
|
1effd65aeb | ||
|
|
46cc789be5 | ||
|
|
1053b30d7e | ||
|
|
d58855ff8a | ||
|
|
741e2c0bc1 | ||
|
|
f6ce875463 | ||
|
|
e6407d1c3b | ||
|
|
620a0f3150 | ||
|
|
d519dba120 | ||
|
|
295b41f57b | ||
|
|
6a8bd86d2b | ||
|
|
22bc306732 | ||
|
|
3ed37d1436 | ||
|
|
03419f2918 | ||
|
|
2ee8ba35b7 | ||
|
|
2a536ce018 | ||
|
|
54531a90f3 | ||
|
|
ae8323fe29 | ||
|
|
d23fe2fc3d | ||
|
|
81bc23d0bc | ||
|
|
583af4ff46 | ||
|
|
7e3df8ec2e | ||
|
|
32adf6c2d0 | ||
|
|
a24472bd92 | ||
|
|
cfee22832a | ||
|
|
9c467a0e6f | ||
|
|
87557ed5ff | ||
|
|
67c90073d9 | ||
|
|
ce9c148282 | ||
|
|
8201a22523 | ||
|
|
5cfbd70e0b | ||
|
|
f2b6a99af3 | ||
|
|
c48bf7fecf | ||
|
|
6673734b9c | ||
|
|
3364c19adf |
36
.github/workflows/main.yml
vendored
Normal file
36
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Create UPM branches and run NPM publish
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Tag name
|
||||
id: tag
|
||||
run: echo ::set-output name=name::${GITHUB_REF#refs/tags/v}
|
||||
|
||||
- name: Create UPM Branch
|
||||
uses: hecomi/create-upm-branch-action@main
|
||||
with:
|
||||
git-tag: ${{ steps.tag.outputs.name }}
|
||||
pkg-root-dir-path: Assets/uDesktopDuplication
|
||||
main-branch: master
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: NPM publish
|
||||
run: npm publish --access public
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||
60
.gitignore
vendored
60
.gitignore
vendored
@@ -1,12 +1,38 @@
|
||||
# Unity3D temporary directories
|
||||
# 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/
|
||||
/[Uu]ser[Ss]ettings/
|
||||
/[Ww]iki/
|
||||
/[Mm]isc/
|
||||
|
||||
# Autogenerated VS/MD solution and project files
|
||||
# MemoryCaptures can get excessive in size.
|
||||
# They also could contain extremely sensitive data
|
||||
/[Mm]emoryCaptures/
|
||||
|
||||
# Asset meta data should only be ignored when the corresponding asset is also ignored
|
||||
!/[Aa]ssets/**/*.meta
|
||||
|
||||
# Uncomment this line if you wish to ignore the asset store tools plugin
|
||||
/[Aa]ssets/AssetStoreTools*
|
||||
|
||||
# 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
|
||||
@@ -16,15 +42,37 @@
|
||||
*.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
|
||||
# Unity3D generated file on crash reports
|
||||
sysinfo.txt
|
||||
|
||||
# Builds
|
||||
*.apk
|
||||
*.aab
|
||||
*.unitypackage
|
||||
|
||||
# Crashlytics generated file
|
||||
crashlytics-build.properties
|
||||
|
||||
# Packed Addressables
|
||||
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
|
||||
|
||||
# Temporary auto-generated Android Assets
|
||||
/[Aa]ssets/[Ss]treamingAssets/aa.meta
|
||||
/[Aa]ssets/[Ss]treamingAssets/aa/*
|
||||
|
||||
# Others
|
||||
.DS_Store
|
||||
/Assets/AssetStoreTools*
|
||||
/Assets/Extensions*
|
||||
/uDesktopDuplication.log
|
||||
/*.log
|
||||
.vsconfig
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0a3456d4b2f59e84f969e31deca4016d
|
||||
guid: a1751102df1deec40b6053b59f70b3d8
|
||||
folderAsset: yes
|
||||
timeCreated: 1477643596
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,86 @@
|
||||
%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: uDD_Screen_Standard
|
||||
m_Shader: {fileID: 4800000, guid: 1428bebbde173ab4ab509941809d6aec, type: 3}
|
||||
m_ShaderKeywords: INVERT_X _CULL_BACK _EMISSION _FORWARD_Y
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 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:
|
||||
- PixelSnap: 0
|
||||
- _Bend: 0
|
||||
- _BumpScale: 1
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _Forward: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _InvFade: 1
|
||||
- _InvertX: 1
|
||||
- _InvertY: 0
|
||||
- _Mask: 0.653
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _Radius: 30
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _Thickness: 1
|
||||
- _UVSec: 0
|
||||
- _Width: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
@@ -0,0 +1,58 @@
|
||||
%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: uDD_Screen_Unlit
|
||||
m_Shader: {fileID: 4800000, guid: 2ca7b38c676bddd439a77a646a279a54, type: 3}
|
||||
m_ShaderKeywords: _CULL_BACK _EMISSION _FORWARD_Y _USEBEND_ON
|
||||
m_LightmapFlags: 1
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: <noninit>
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: <noninit>
|
||||
second: 0
|
||||
- first:
|
||||
name: _Bend
|
||||
second: 0
|
||||
- first:
|
||||
name: _Cull
|
||||
second: 2
|
||||
- first:
|
||||
name: _Forward
|
||||
second: 0
|
||||
- first:
|
||||
name: _Radius
|
||||
second: 30
|
||||
- first:
|
||||
name: _Thickness
|
||||
second: 1
|
||||
- first:
|
||||
name: _Width
|
||||
second: 1
|
||||
m_Colors:
|
||||
- first:
|
||||
name: <noninit>
|
||||
second: {r: 0, g: 1.3912242e-34, b: 0, a: 1.3912168e-34}
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -0,0 +1,86 @@
|
||||
%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: uDD_Screen_Unlit_BlackMask
|
||||
m_Shader: {fileID: 4800000, guid: 8d8bed8b85c7bb844a44481b2feb53ca, type: 3}
|
||||
m_ShaderKeywords: INVERT_X _CULL_BACK _EMISSION _FORWARD_Y
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 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:
|
||||
- PixelSnap: 0
|
||||
- _Bend: 0
|
||||
- _BumpScale: 1
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _Forward: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _InvFade: 1
|
||||
- _InvertX: 1
|
||||
- _InvertY: 0
|
||||
- _Mask: 0.2
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _Radius: 30
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _Thickness: 1
|
||||
- _UVSec: 0
|
||||
- _Width: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
@@ -0,0 +1,49 @@
|
||||
%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: uDD_Screen_Unlit_Displacement
|
||||
m_Shader: {fileID: 4800000, guid: 05df46eb51b13c84eabbdf4c53cc8db7, type: 3}
|
||||
m_ShaderKeywords: BEND_ON _CULL_OFF _FORWARD_Z
|
||||
m_LightmapFlags: 5
|
||||
m_EnableInstancingVariants: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _CursorTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DispTex:
|
||||
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}
|
||||
m_Floats:
|
||||
- _Bend: 1
|
||||
- _Cull: 0
|
||||
- _DispFactor: 0.1
|
||||
- _Displacement: 0.3
|
||||
- _Forward: 1
|
||||
- _InsideTessFactor: 1
|
||||
- _Radius: 15.4
|
||||
- _TessDistFactor: 3
|
||||
- _TessDistPower: 1.545
|
||||
- _TessEdgeLen: 1
|
||||
- _TessFactor: 25
|
||||
- _TessMaxDist: 10
|
||||
- _TessMinDist: 0.5
|
||||
- _Thickness: 1
|
||||
- _Width: 1.92
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 596fd740aeeee0d4cb4f962d4072954e
|
||||
timeCreated: 1480074277
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,86 @@
|
||||
%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: uDD_Screen_Unlit_Transparent
|
||||
m_Shader: {fileID: 4800000, guid: 32b14c1fb31640f43b002138823eb1e1, type: 3}
|
||||
m_ShaderKeywords: INVERT_X _CULL_BACK _EMISSION _FORWARD_Y
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 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:
|
||||
- PixelSnap: 0
|
||||
- _Bend: 0
|
||||
- _BumpScale: 1
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _Forward: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _InvFade: 1
|
||||
- _InvertX: 1
|
||||
- _InvertY: 0
|
||||
- _Mask: 0.653
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _Radius: 30
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _Thickness: 1
|
||||
- _UVSec: 0
|
||||
- _Width: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 0.497}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
@@ -39,11 +39,11 @@ ModelImporter:
|
||||
globalScale: 0.1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
importBlendShapes: 1
|
||||
importBlendShapes: 0
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
optimizeMeshForGPU: 1
|
||||
optimizeMeshForGPU: 0
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
secondaryUVAngleDistortion: 8
|
||||
BIN
Assets/uDesktopDuplication/Assets/Models/uDD_Plane.fbx
Normal file
BIN
Assets/uDesktopDuplication/Assets/Models/uDD_Plane.fbx
Normal file
Binary file not shown.
87
Assets/uDesktopDuplication/Assets/Models/uDD_Plane.fbx.meta
Normal file
87
Assets/uDesktopDuplication/Assets/Models/uDD_Plane.fbx.meta
Normal file
@@ -0,0 +1,87 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f30f6cfd6aa37554ca886424cada7cbb
|
||||
timeCreated: 1480072865
|
||||
licenseType: Pro
|
||||
ModelImporter:
|
||||
serializedVersion: 19
|
||||
fileIDToRecycleName:
|
||||
100000: //RootNode
|
||||
100002: uDD_Plane_MeshPart0
|
||||
100004: uDD_Plane_MeshPart1
|
||||
400000: //RootNode
|
||||
400002: uDD_Plane_MeshPart0
|
||||
400004: uDD_Plane_MeshPart1
|
||||
2300000: //RootNode
|
||||
2300002: uDD_Plane_MeshPart0
|
||||
2300004: uDD_Plane_MeshPart1
|
||||
3300000: //RootNode
|
||||
3300002: uDD_Plane_MeshPart0
|
||||
3300004: uDD_Plane_MeshPart1
|
||||
4300000: uDD_Plane
|
||||
4300002: uDD_Plane_MeshPart0
|
||||
4300004: uDD_Plane_MeshPart1
|
||||
9500000: //RootNode
|
||||
materials:
|
||||
importMaterials: 0
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
motionNodeName:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 0.1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
importBlendShapes: 0
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
optimizeMeshForGPU: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 2
|
||||
importAnimation: 0
|
||||
copyAvatar: 0
|
||||
humanDescription:
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
animationType: 0
|
||||
humanoidOversampling: 1
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,99 @@
|
||||
%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: 1000012642892690}
|
||||
m_IsPrefabParent: 1
|
||||
--- !u!1 &1000012642892690
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4000011474108562}
|
||||
- component: {fileID: 33000012841683532}
|
||||
- component: {fileID: 23000011974915108}
|
||||
- component: {fileID: 114000012274256594}
|
||||
m_Layer: 0
|
||||
m_Name: Monitor Board
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4000011474108562
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000012642892690}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 10}
|
||||
m_LocalScale: {x: 1.92, y: 1.08, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &23000011974915108
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000012642892690}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: c181d333a7bee7a44b94c0f4e02c4bd4, 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: 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!33 &33000012841683532
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000012642892690}
|
||||
m_Mesh: {fileID: 4300002, guid: d6b30b913257fee4d8246bf7a2620fcd, type: 3}
|
||||
--- !u!114 &114000012274256594
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000012642892690}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bb54a34570e4747429b1c5b66c69d356, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
invertX_: 0
|
||||
invertY_: 0
|
||||
useClip_: 0
|
||||
clipPos: {x: 0, y: 0}
|
||||
clipScale: {x: 0.2, y: 0.2}
|
||||
@@ -0,0 +1,116 @@
|
||||
%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: 1000012030065192}
|
||||
m_IsPrefabParent: 1
|
||||
--- !u!1 &1000012030065192
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4000012948588652}
|
||||
- component: {fileID: 33000012667387780}
|
||||
- component: {fileID: 23000013406986662}
|
||||
- component: {fileID: 114000010662012988}
|
||||
- component: {fileID: 114000012475682042}
|
||||
m_Layer: 0
|
||||
m_Name: Monitor Plane for Displacement Mapping
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4000012948588652
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000012030065192}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 10}
|
||||
m_LocalScale: {x: 1.92, y: 1, z: 1.08}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &23000013406986662
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000012030065192}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 596fd740aeeee0d4cb4f962d4072954e, 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: 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!33 &33000012667387780
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000012030065192}
|
||||
m_Mesh: {fileID: 4300000, guid: f30f6cfd6aa37554ca886424cada7cbb, type: 3}
|
||||
--- !u!114 &114000010662012988
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000012030065192}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bb54a34570e4747429b1c5b66c69d356, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
invertX_: 0
|
||||
invertY_: 0
|
||||
useClip_: 0
|
||||
clipPos: {x: 0, y: 0}
|
||||
clipScale: {x: 0.2, y: 0.2}
|
||||
--- !u!114 &114000012475682042
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000012030065192}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 859a2446b86e55c43932212872c82748, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
target: 0
|
||||
displacementFactor: 0.1
|
||||
tessellationMinDist: 0.5
|
||||
tessellationMaxDist: 10
|
||||
tessellationFactor: 25
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57d4a6e606848364c9880f2adec16d90
|
||||
timeCreated: 1480074774
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,99 @@
|
||||
%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: 1000010241636970}
|
||||
m_IsPrefabParent: 1
|
||||
--- !u!1 &1000010241636970
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4000010860913228}
|
||||
- component: {fileID: 33000013746893738}
|
||||
- component: {fileID: 23000010406152182}
|
||||
- component: {fileID: 114000011004997192}
|
||||
m_Layer: 0
|
||||
m_Name: Monitor Unity Plane
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4000010860913228
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000010241636970}
|
||||
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 10}
|
||||
m_LocalScale: {x: 1.92, y: 1, z: 1.08}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
|
||||
--- !u!23 &23000010406152182
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000010241636970}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: c181d333a7bee7a44b94c0f4e02c4bd4, 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: 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!33 &33000013746893738
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000010241636970}
|
||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!114 &114000011004997192
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000010241636970}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bb54a34570e4747429b1c5b66c69d356, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
invertX_: 0
|
||||
invertY_: 0
|
||||
useClip_: 0
|
||||
clipPos: {x: 0, y: 0}
|
||||
clipScale: {x: 0.2, y: 0.2}
|
||||
@@ -1,17 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89616e59e1cccb346bd4e959257990ca
|
||||
timeCreated: 1477555207
|
||||
licenseType: Pro
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 10
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
@@ -20,40 +21,71 @@ TextureImporter:
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
buildTargetSettings: []
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
120
Assets/uDesktopDuplication/Editor/TextureEditor.cs
Normal file
120
Assets/uDesktopDuplication/Editor/TextureEditor.cs
Normal file
@@ -0,0 +1,120 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System.Linq;
|
||||
|
||||
namespace uDesktopDuplication
|
||||
{
|
||||
|
||||
[CustomEditor(typeof(Texture))]
|
||||
public class TextureEditor : Editor
|
||||
{
|
||||
Texture texture
|
||||
{
|
||||
get { return target as Texture; }
|
||||
}
|
||||
|
||||
Monitor monitor
|
||||
{
|
||||
get { return texture.monitor; }
|
||||
}
|
||||
|
||||
bool isAvailable
|
||||
{
|
||||
get { return monitor == null || !Application.isPlaying; }
|
||||
}
|
||||
|
||||
bool basicsFolded_ = true;
|
||||
bool invertFolded_ = true;
|
||||
bool clipFolded_ = true;
|
||||
bool matFolded_ = true;
|
||||
|
||||
SerializedProperty invertX_;
|
||||
SerializedProperty invertY_;
|
||||
SerializedProperty useClip_;
|
||||
SerializedProperty clipPos_;
|
||||
SerializedProperty clipScale_;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
invertX_ = serializedObject.FindProperty("invertX_");
|
||||
invertY_ = serializedObject.FindProperty("invertY_");
|
||||
useClip_ = serializedObject.FindProperty("useClip_");
|
||||
clipPos_ = serializedObject.FindProperty("clipPos");
|
||||
clipScale_ = serializedObject.FindProperty("clipScale");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
DrawMonitor();
|
||||
DrawInvert();
|
||||
DrawClip();
|
||||
DrawMaterial();
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
void Fold(string name, ref bool folded, System.Action func)
|
||||
{
|
||||
folded = Utils.Foldout(name, folded);
|
||||
if (folded) {
|
||||
++EditorGUI.indentLevel;
|
||||
func();
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
void DrawMonitor()
|
||||
{
|
||||
Fold("Monitor", ref basicsFolded_, () => {
|
||||
if (isAvailable) {
|
||||
EditorGUILayout.HelpBox("Monitor information is available only in runtime.", MessageType.Info);
|
||||
return;
|
||||
}
|
||||
var id = EditorGUILayout.Popup("Monitor", monitor.id, Manager.monitors.Select(x => x.name).ToArray());
|
||||
if (id != monitor.id) { texture.monitorId = id; }
|
||||
EditorGUILayout.IntField("ID", monitor.id);
|
||||
EditorGUILayout.Toggle("Is Primary", monitor.isPrimary);
|
||||
EditorGUILayout.EnumPopup("Rotation", monitor.rotation);
|
||||
EditorGUILayout.Vector2Field("Resolution", new Vector2(monitor.width, monitor.height));
|
||||
EditorGUILayout.Vector2Field("DPI", new Vector2(monitor.dpiX, monitor.dpiY));
|
||||
EditorGUILayout.Toggle("Is HDR", monitor.isHDR);
|
||||
});
|
||||
}
|
||||
|
||||
void DrawInvert()
|
||||
{
|
||||
Fold("Invert", ref invertFolded_, () => {
|
||||
texture.invertX = EditorGUILayout.Toggle("Invert X", invertX_.boolValue);
|
||||
texture.invertY = EditorGUILayout.Toggle("Invert Y", invertY_.boolValue);
|
||||
});
|
||||
}
|
||||
|
||||
void DrawClip()
|
||||
{
|
||||
Fold("Clip", ref clipFolded_, () => {
|
||||
texture.useClip = EditorGUILayout.Toggle("Use Clip", useClip_.boolValue);
|
||||
EditorGUILayout.PropertyField(clipPos_);
|
||||
EditorGUILayout.PropertyField(clipScale_);
|
||||
});
|
||||
}
|
||||
|
||||
void DrawMaterial()
|
||||
{
|
||||
Fold("Material", ref matFolded_, () => {
|
||||
if (!Application.isPlaying) {
|
||||
EditorGUILayout.HelpBox("These parameters are applied to the shared material when not playing.", MessageType.Info);
|
||||
}
|
||||
texture.meshForwardDirection = (Texture.MeshForwardDirection)EditorGUILayout.EnumPopup("Mesh Forward Direction", texture.meshForwardDirection);
|
||||
texture.bend = EditorGUILayout.Toggle("Use Bend", texture.bend);
|
||||
texture.width = EditorGUILayout.FloatField("Bend Width", texture.width);
|
||||
texture.radius = EditorGUILayout.Slider("Bend Radius", texture.radius, texture.worldWidth / (2 * Mathf.PI), 100f);
|
||||
texture.thickness = EditorGUILayout.Slider("Thickness", texture.thickness, 0f, 30f);
|
||||
texture.culling = (Texture.Culling)EditorGUILayout.EnumPopup("Culling", texture.culling);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d2d9e4ca459ecb44da8815bafe9655c5
|
||||
timeCreated: 1477635630
|
||||
guid: 1202a4540abf0ad4781c025339772c4a
|
||||
timeCreated: 1480758898
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: 89616e59e1cccb346bd4e959257990ca, type: 3}
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
46
Assets/uDesktopDuplication/Editor/Utils.cs
Normal file
46
Assets/uDesktopDuplication/Editor/Utils.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace uDesktopDuplication
|
||||
{
|
||||
|
||||
public static class Utils
|
||||
{
|
||||
public static bool Foldout(string title, bool display)
|
||||
{
|
||||
var style = new GUIStyle("ShurikenModuleTitle");
|
||||
style.font = new GUIStyle(EditorStyles.label).font;
|
||||
style.border = new RectOffset(15, 7, 4, 4);
|
||||
style.fixedHeight = 22;
|
||||
style.contentOffset = new Vector2(20f, -2f);
|
||||
|
||||
var rect = GUILayoutUtility.GetRect(16f, 22f, style);
|
||||
GUI.Box(rect, title, style);
|
||||
|
||||
var e = Event.current;
|
||||
|
||||
var toggleRect = new Rect(rect.x + 4f, rect.y + 2f, 13f, 13f);
|
||||
if (e.type == EventType.Repaint) {
|
||||
EditorStyles.foldout.Draw(toggleRect, false, false, display, false);
|
||||
}
|
||||
|
||||
if (e.type == EventType.MouseDown && rect.Contains(e.mousePosition)) {
|
||||
display = !display;
|
||||
e.Use();
|
||||
}
|
||||
|
||||
return display;
|
||||
}
|
||||
|
||||
public static void ReadOnlyTextField(string label, string text)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
{
|
||||
EditorGUILayout.LabelField(label, GUILayout.Width(EditorGUIUtility.labelWidth - 4));
|
||||
EditorGUILayout.SelectableLabel(text, EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight));
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
12
Assets/uDesktopDuplication/Editor/Utils.cs.meta
Normal file
12
Assets/uDesktopDuplication/Editor/Utils.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 278117152a6252546a219a17ef6f21f4
|
||||
timeCreated: 1480759393
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "uDesktopDuplication.Editor",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:7547219be89abee4ba3cf7f48b516b7b"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fdd0fabca6c1f06439b59586bbe3a4dd
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 71921882396f0f345aa8a66e2fcb0b6c
|
||||
guid: a3ded3542f0e6b74ea0ff9ea58aea2f2
|
||||
folderAsset: yes
|
||||
timeCreated: 1477643608
|
||||
timeCreated: 1480693928
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
BIN
Assets/uDesktopDuplication/Plugins/x86/uDesktopDuplication.dll
Normal file
BIN
Assets/uDesktopDuplication/Plugins/x86/uDesktopDuplication.dll
Normal file
Binary file not shown.
@@ -0,0 +1,150 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d3ab0ac3a3d6bb643af0a464a93be957
|
||||
timeCreated: 1503496900
|
||||
licenseType: Pro
|
||||
PluginImporter:
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
data:
|
||||
first:
|
||||
'': Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 0
|
||||
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
|
||||
data:
|
||||
first:
|
||||
'': data
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
data:
|
||||
first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: ARMv7
|
||||
data:
|
||||
first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
Exclude Editor: 0
|
||||
Exclude Linux: 0
|
||||
Exclude Linux64: 0
|
||||
Exclude LinuxUniversal: 0
|
||||
Exclude OSXIntel: 0
|
||||
Exclude OSXIntel64: 0
|
||||
Exclude OSXUniversal: 0
|
||||
Exclude WebGL: 0
|
||||
Exclude Win: 0
|
||||
Exclude Win64: 1
|
||||
data:
|
||||
first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
data:
|
||||
first:
|
||||
Facebook: WebGL
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
data:
|
||||
first:
|
||||
Facebook: Win
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
data:
|
||||
first:
|
||||
Facebook: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
data:
|
||||
first:
|
||||
Standalone: Linux
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86
|
||||
data:
|
||||
first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: None
|
||||
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: None
|
||||
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:
|
||||
WebGL: WebGL
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,20 +1,150 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02fc121822cf2ea4e82e16c4a28bf711
|
||||
timeCreated: 1477546714
|
||||
guid: 7cb91c9ae744dc5429005b20e11f4f37
|
||||
timeCreated: 1503505907
|
||||
licenseType: Pro
|
||||
PluginImporter:
|
||||
serializedVersion: 1
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
Any:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
Editor:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
data:
|
||||
first:
|
||||
'': Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 0
|
||||
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
|
||||
data:
|
||||
first:
|
||||
'': data
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
data:
|
||||
first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: ARMv7
|
||||
data:
|
||||
first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
Exclude Editor: 0
|
||||
Exclude Linux: 0
|
||||
Exclude Linux64: 0
|
||||
Exclude LinuxUniversal: 0
|
||||
Exclude OSXIntel: 0
|
||||
Exclude OSXIntel64: 0
|
||||
Exclude OSXUniversal: 0
|
||||
Exclude WebGL: 0
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 0
|
||||
data:
|
||||
first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
data:
|
||||
first:
|
||||
Facebook: WebGL
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
data:
|
||||
first:
|
||||
Facebook: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
data:
|
||||
first:
|
||||
Facebook: Win64
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
data:
|
||||
first:
|
||||
Standalone: Linux
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: None
|
||||
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: None
|
||||
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:
|
||||
WebGL: WebGL
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
8
Assets/uDesktopDuplication/Runtime.meta
Normal file
8
Assets/uDesktopDuplication/Runtime.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 03474092f80c83a488098d221122604e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
252
Assets/uDesktopDuplication/Runtime/Scripts/Lib.cs
Normal file
252
Assets/uDesktopDuplication/Runtime/Scripts/Lib.cs
Normal file
@@ -0,0 +1,252 @@
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
#pragma warning disable 114, 465
|
||||
|
||||
namespace uDesktopDuplication
|
||||
{
|
||||
|
||||
public enum Message
|
||||
{
|
||||
None = -1,
|
||||
Reinitialized = 0,
|
||||
TextureSizeChanged = 1,
|
||||
}
|
||||
|
||||
public enum CursorShapeType
|
||||
{
|
||||
Unspecified = 0,
|
||||
MonoChrome = 1,
|
||||
Color = 2,
|
||||
MaskedColor = 4,
|
||||
}
|
||||
|
||||
public enum MonitorRotation
|
||||
{
|
||||
Unspecified = 0,
|
||||
Identity = 1,
|
||||
Rotate90 = 2,
|
||||
Rotate180 = 3,
|
||||
Rotate270 = 4
|
||||
}
|
||||
|
||||
public enum DuplicatorState
|
||||
{
|
||||
NotSet = -1,
|
||||
Ready = 0,
|
||||
Running = 1,
|
||||
InvalidArg = 2,
|
||||
AccessDenied = 3,
|
||||
Unsupported = 4,
|
||||
CurrentlyNotAvailable = 5,
|
||||
SessionDisconnected = 6,
|
||||
AccessLost = 7,
|
||||
TextureSizeInconsistent = 8,
|
||||
Unknown = 999,
|
||||
}
|
||||
|
||||
public enum DebugMode
|
||||
{
|
||||
None = 0,
|
||||
File = 1,
|
||||
UnityLog = 2, /* currently has bug when app exits. */
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct RECT
|
||||
{
|
||||
[MarshalAs(UnmanagedType.I4)]
|
||||
public int left;
|
||||
[MarshalAs(UnmanagedType.I4)]
|
||||
public int top;
|
||||
[MarshalAs(UnmanagedType.I4)]
|
||||
public int right;
|
||||
[MarshalAs(UnmanagedType.I4)]
|
||||
public int bottom;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DXGI_OUTDUPL_MOVE_RECT
|
||||
{
|
||||
public RECT source;
|
||||
public RECT destination;
|
||||
}
|
||||
|
||||
public static class Lib
|
||||
{
|
||||
const string dllName = "uDesktopDuplication";
|
||||
|
||||
public delegate void MessageHandler(Message message);
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
public delegate void DebugLogDelegate(string str);
|
||||
|
||||
[DllImport(dllName)]
|
||||
public static extern bool IsInitialized();
|
||||
[DllImport(dllName)]
|
||||
public static extern void Initialize();
|
||||
[DllImport(dllName)]
|
||||
public static extern void Finalize();
|
||||
[DllImport(dllName)]
|
||||
public static extern void Reinitialize();
|
||||
[DllImport(dllName)]
|
||||
public static extern void Update();
|
||||
[DllImport(dllName)]
|
||||
public static extern Message PopMessage();
|
||||
[DllImport(dllName)]
|
||||
public static extern void EnableDebug();
|
||||
[DllImport(dllName)]
|
||||
public static extern void DisableDebug();
|
||||
[DllImport(dllName)]
|
||||
public static extern void SetDebugMode(DebugMode mode);
|
||||
[DllImport(dllName)]
|
||||
public static extern void SetLogFunc(DebugLogDelegate func);
|
||||
[DllImport(dllName)]
|
||||
public static extern void SetErrorFunc(DebugLogDelegate func);
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetMonitorCount();
|
||||
[DllImport(dllName)]
|
||||
public static extern bool HasMonitorCountChanged();
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetCursorMonitorId();
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetTotalWidth();
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetTotalHeight();
|
||||
[DllImport(dllName)]
|
||||
public static extern IntPtr GetRenderEventFunc();
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetId(int id);
|
||||
[DllImport(dllName)]
|
||||
public static extern DuplicatorState GetState(int id);
|
||||
[DllImport(dllName)]
|
||||
public static extern void GetName(int id, StringBuilder buf, int len);
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetLeft(int id);
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetRight(int id);
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetTop(int id);
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetBottom(int id);
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetWidth(int id);
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetHeight(int id);
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetDpiX(int id);
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetDpiY(int id);
|
||||
[DllImport(dllName)]
|
||||
public static extern bool IsHDR(int id);
|
||||
[DllImport(dllName)]
|
||||
public static extern MonitorRotation GetRotation(int id);
|
||||
[DllImport(dllName)]
|
||||
public static extern bool IsPrimary(int id);
|
||||
[DllImport(dllName)]
|
||||
public static extern bool IsCursorVisible();
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetCursorX();
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetCursorY();
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetCursorShapeWidth();
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetCursorShapeHeight();
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetCursorShapePitch();
|
||||
[DllImport(dllName)]
|
||||
public static extern CursorShapeType GetCursorShapeType();
|
||||
[DllImport(dllName)]
|
||||
public static extern void GetCursorTexture(IntPtr ptr);
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetCursorHotSpotX();
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetCursorHotSpotY();
|
||||
[DllImport(dllName)]
|
||||
public static extern int SetTexturePtr(int id, IntPtr ptr);
|
||||
[DllImport(dllName)]
|
||||
public static extern IntPtr GetSharedTextureHandle(int id);
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetMoveRectCount(int id);
|
||||
[DllImport(dllName, EntryPoint = "GetMoveRects")]
|
||||
private static extern IntPtr GetMoveRects_Internal(int id);
|
||||
[DllImport(dllName)]
|
||||
public static extern int GetDirtyRectCount(int id);
|
||||
[DllImport(dllName, EntryPoint = "GetDirtyRects")]
|
||||
private static extern IntPtr GetDirtyRects_Internal(int id);
|
||||
[DllImport(dllName, EntryPoint = "GetPixels")]
|
||||
private static extern bool GetPixels_Internal(int id, IntPtr ptr, int x, int y, int width, int height);
|
||||
[DllImport(dllName)]
|
||||
public static extern IntPtr GetBuffer(int id);
|
||||
[DllImport(dllName)]
|
||||
public static extern bool HasBeenUpdated(int id);
|
||||
[DllImport(dllName)]
|
||||
public static extern bool UseGetPixels(int id, bool use);
|
||||
[DllImport(dllName)]
|
||||
public static extern void SetFrameRate(uint frameRate);
|
||||
|
||||
public static string GetName(int id)
|
||||
{
|
||||
var buf = new StringBuilder(32);
|
||||
GetName(id, buf, buf.Capacity);
|
||||
return buf.ToString();
|
||||
}
|
||||
|
||||
public static DXGI_OUTDUPL_MOVE_RECT[] GetMoveRects(int id)
|
||||
{
|
||||
var count = GetMoveRectCount(id);
|
||||
var rects = new DXGI_OUTDUPL_MOVE_RECT[count];
|
||||
var ptr = GetMoveRects_Internal(id);
|
||||
var size = Marshal.SizeOf(typeof(DXGI_OUTDUPL_MOVE_RECT));
|
||||
for (int i = 0; i < count; ++i) {
|
||||
var data = new IntPtr(ptr.ToInt64() + size * i);
|
||||
rects[i] = (DXGI_OUTDUPL_MOVE_RECT)Marshal.PtrToStructure(data, typeof(DXGI_OUTDUPL_MOVE_RECT));
|
||||
}
|
||||
return rects;
|
||||
}
|
||||
|
||||
public static RECT[] GetDirtyRects(int id)
|
||||
{
|
||||
var count = GetDirtyRectCount(id);
|
||||
var rects = new RECT[count];
|
||||
var ptr = GetDirtyRects_Internal(id);
|
||||
var size = Marshal.SizeOf(typeof(RECT));
|
||||
for (int i = 0; i < count; ++i) {
|
||||
var data = new IntPtr(ptr.ToInt64() + size * i);
|
||||
rects[i] = (RECT)Marshal.PtrToStructure(data, typeof(RECT));
|
||||
}
|
||||
return rects;
|
||||
}
|
||||
|
||||
public static Color32[] GetPixels(int id, int x, int y, int width, int height)
|
||||
{
|
||||
var color = new Color32[width * height];
|
||||
GetPixels(id, color, x, y, width, height);
|
||||
return color;
|
||||
}
|
||||
|
||||
public static bool GetPixels(int id, Color32[] colors, int x, int y, int width, int height)
|
||||
{
|
||||
if (colors.Length < width * height) {
|
||||
Debug.LogErrorFormat("colors is small.", id, x, y, width, height);
|
||||
return false;
|
||||
}
|
||||
var handle = GCHandle.Alloc(colors, GCHandleType.Pinned);
|
||||
var ptr = handle.AddrOfPinnedObject();
|
||||
if (!GetPixels_Internal(id, ptr, x, y, width, height)) {
|
||||
Debug.LogErrorFormat("GetPixels({0}, {1}, {2}, {3}, {4}) failed.", id, x, y, width, height);
|
||||
return false;
|
||||
}
|
||||
handle.Free();
|
||||
return true;
|
||||
}
|
||||
|
||||
public static Color32 GetPixel(int id, int x, int y)
|
||||
{
|
||||
return GetPixels(id, x, y, 1, 1)[0];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -52,8 +52,9 @@ public class Manager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
[Tooltip("Debug mode is not applied while running.")]
|
||||
[SerializeField] DebugMode debugMode = DebugMode.File;
|
||||
[SerializeField] int desktopDuplicationApiTimeout = 0;
|
||||
|
||||
[SerializeField] float retryReinitializationDuration = 1f;
|
||||
|
||||
private Coroutine renderCoroutine_ = null;
|
||||
@@ -61,6 +62,14 @@ public class Manager : MonoBehaviour
|
||||
private float reinitializationTimer_ = 0f;
|
||||
private bool isFirstFrame_ = true;
|
||||
|
||||
public static event Lib.DebugLogDelegate onDebugLog = OnDebugLog;
|
||||
public static event Lib.DebugLogDelegate onDebugErr = OnDebugErr;
|
||||
|
||||
[AOT.MonoPInvokeCallback(typeof(Lib.DebugLogDelegate))]
|
||||
private static void OnDebugLog(string msg) { Debug.Log(msg); }
|
||||
[AOT.MonoPInvokeCallback(typeof(Lib.DebugLogDelegate))]
|
||||
private static void OnDebugErr(string msg) { Debug.LogError(msg); }
|
||||
|
||||
public delegate void ReinitializeHandler();
|
||||
public static event ReinitializeHandler onReinitialized;
|
||||
|
||||
@@ -89,15 +98,23 @@ public class Manager : MonoBehaviour
|
||||
instance_ = this;
|
||||
|
||||
Lib.SetDebugMode(debugMode);
|
||||
Lib.SetTimeout(desktopDuplicationApiTimeout);
|
||||
Lib.InitializeUDD();
|
||||
Lib.SetLogFunc(onDebugLog);
|
||||
Lib.SetErrorFunc(onDebugErr);
|
||||
|
||||
Lib.Initialize();
|
||||
|
||||
CreateMonitors();
|
||||
|
||||
#if UNITY_2018_1_OR_NEWER
|
||||
Shader.DisableKeyword("USE_GAMMA_TO_LINEAR_SPACE");
|
||||
#else
|
||||
Shader.EnableKeyword("USE_GAMMA_TO_LINEAR_SPACE");
|
||||
#endif
|
||||
}
|
||||
|
||||
void OnApplicationQuit()
|
||||
{
|
||||
Lib.FinalizeUDD();
|
||||
Lib.Finalize();
|
||||
DestroyMonitors();
|
||||
}
|
||||
|
||||
@@ -107,6 +124,9 @@ public class Manager : MonoBehaviour
|
||||
if (!isFirstFrame_) {
|
||||
Reinitialize();
|
||||
}
|
||||
|
||||
Lib.SetDebugMode(debugMode);
|
||||
Lib.SetLogFunc(onDebugLog);
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
@@ -115,6 +135,9 @@ public class Manager : MonoBehaviour
|
||||
StopCoroutine(renderCoroutine_);
|
||||
renderCoroutine_ = null;
|
||||
}
|
||||
|
||||
Lib.SetLogFunc(null);
|
||||
Lib.SetErrorFunc(null);
|
||||
}
|
||||
|
||||
void Update()
|
||||
@@ -144,10 +167,11 @@ public class Manager : MonoBehaviour
|
||||
var monitor = monitors[i];
|
||||
var state = monitor.state;
|
||||
if (
|
||||
state == MonitorState.NotSet ||
|
||||
state == MonitorState.AccessLost ||
|
||||
state == MonitorState.AccessDenied ||
|
||||
state == MonitorState.SessionDisconnected
|
||||
state == DuplicatorState.NotSet ||
|
||||
state == DuplicatorState.AccessLost ||
|
||||
state == DuplicatorState.AccessDenied ||
|
||||
state == DuplicatorState.SessionDisconnected ||
|
||||
state == DuplicatorState.Unknown
|
||||
) {
|
||||
reinitializeNeeded = true;
|
||||
break;
|
||||
@@ -11,21 +11,23 @@ public class Monitor
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case MonitorState.Available:
|
||||
case DuplicatorState.Ready:
|
||||
break;
|
||||
case MonitorState.InvalidArg:
|
||||
case DuplicatorState.Running:
|
||||
break;
|
||||
case DuplicatorState.InvalidArg:
|
||||
Debug.LogErrorFormat("[uDD] {0}:{1} => Invalid.", id, name);
|
||||
break;
|
||||
case MonitorState.AccessDenied:
|
||||
case DuplicatorState.AccessDenied:
|
||||
Debug.LogWarningFormat("[uDD] {0}:{1} => Access Denied.", id, name);
|
||||
break;
|
||||
case MonitorState.Unsupported:
|
||||
case DuplicatorState.Unsupported:
|
||||
Debug.LogWarningFormat("[uDD] {0}:{1} => Unsupported.", id, name);
|
||||
break;
|
||||
case MonitorState.SessionDisconnected:
|
||||
case DuplicatorState.SessionDisconnected:
|
||||
Debug.LogWarningFormat("[uDD] {0}:{1} => Disconnected.", id, name);
|
||||
break;
|
||||
case MonitorState.NotSet:
|
||||
case DuplicatorState.NotSet:
|
||||
Debug.LogErrorFormat("[uDD] {0}:{1} => Something wrong.", id, name);
|
||||
break;
|
||||
default:
|
||||
@@ -40,7 +42,6 @@ public class Monitor
|
||||
|
||||
~Monitor()
|
||||
{
|
||||
DestroyTexture();
|
||||
}
|
||||
|
||||
public int id
|
||||
@@ -54,14 +55,19 @@ public class Monitor
|
||||
get { return id < Manager.monitorCount; }
|
||||
}
|
||||
|
||||
public MonitorState state
|
||||
public DuplicatorState state
|
||||
{
|
||||
get { return Lib.GetState(id); }
|
||||
}
|
||||
|
||||
public bool available
|
||||
{
|
||||
get { return state == MonitorState.Available; }
|
||||
get
|
||||
{
|
||||
return
|
||||
state == DuplicatorState.Ready ||
|
||||
state == DuplicatorState.Running;
|
||||
}
|
||||
}
|
||||
|
||||
public string name
|
||||
@@ -124,6 +130,11 @@ public class Monitor
|
||||
}
|
||||
}
|
||||
|
||||
public bool isHDR
|
||||
{
|
||||
get { return Lib.IsHDR(id); }
|
||||
}
|
||||
|
||||
public float widthMeter
|
||||
{
|
||||
get { return width / dpiX * 0.0254f; }
|
||||
@@ -146,27 +157,37 @@ public class Monitor
|
||||
|
||||
public bool isHorizontal
|
||||
{
|
||||
get { return width > height; }
|
||||
get
|
||||
{
|
||||
return
|
||||
(rotation == MonitorRotation.Identity) ||
|
||||
(rotation == MonitorRotation.Rotate180);
|
||||
}
|
||||
}
|
||||
|
||||
public bool isVertical
|
||||
{
|
||||
get { return height > width; }
|
||||
get
|
||||
{
|
||||
return
|
||||
(rotation == MonitorRotation.Rotate90) ||
|
||||
(rotation == MonitorRotation.Rotate270);
|
||||
}
|
||||
}
|
||||
|
||||
public bool isCursorVisible
|
||||
{
|
||||
get { return Lib.IsCursorVisible(id); }
|
||||
get { return Lib.IsCursorVisible(); }
|
||||
}
|
||||
|
||||
public int cursorX
|
||||
{
|
||||
get { return Lib.GetCursorX(id); }
|
||||
get { return Lib.GetCursorMonitorId() == id ? Lib.GetCursorX() : -1; }
|
||||
}
|
||||
|
||||
public int cursorY
|
||||
{
|
||||
get { return Lib.GetCursorY(id); }
|
||||
get { return Lib.GetCursorMonitorId() == id ? Lib.GetCursorY() : -1; }
|
||||
}
|
||||
|
||||
public int systemCursorX
|
||||
@@ -189,17 +210,17 @@ public class Monitor
|
||||
|
||||
public int cursorShapeWidth
|
||||
{
|
||||
get { return Lib.GetCursorShapeWidth(id); }
|
||||
get { return Lib.GetCursorShapeWidth(); }
|
||||
}
|
||||
|
||||
public int cursorShapeHeight
|
||||
{
|
||||
get { return Lib.GetCursorShapeHeight(id); }
|
||||
get { return Lib.GetCursorShapeHeight(); }
|
||||
}
|
||||
|
||||
public CursorShapeType cursorShapeType
|
||||
{
|
||||
get { return Lib.GetCursorShapeType(id); }
|
||||
get { return Lib.GetCursorShapeType(); }
|
||||
}
|
||||
|
||||
public int moveRectCount
|
||||
@@ -222,6 +243,30 @@ public class Monitor
|
||||
get { return Lib.GetDirtyRects(id); }
|
||||
}
|
||||
|
||||
public System.IntPtr buffer
|
||||
{
|
||||
get { return Lib.GetBuffer(id); }
|
||||
}
|
||||
|
||||
public bool hasBeenUpdated
|
||||
{
|
||||
get { return Lib.HasBeenUpdated(id); }
|
||||
}
|
||||
|
||||
bool useGetPixels_ = false;
|
||||
public bool useGetPixels
|
||||
{
|
||||
get
|
||||
{
|
||||
return useGetPixels_;
|
||||
}
|
||||
set
|
||||
{
|
||||
useGetPixels_ = value;
|
||||
Lib.UseGetPixels(id, value);
|
||||
}
|
||||
}
|
||||
|
||||
public bool shouldBeUpdated
|
||||
{
|
||||
get;
|
||||
@@ -261,7 +306,7 @@ public class Monitor
|
||||
|
||||
public void GetCursorTexture(System.IntPtr ptr)
|
||||
{
|
||||
Lib.GetCursorTexture(id, ptr);
|
||||
Lib.GetCursorTexture(ptr);
|
||||
}
|
||||
|
||||
public void CreateTextureIfNeeded()
|
||||
@@ -307,6 +352,33 @@ public class Monitor
|
||||
{
|
||||
CreateTextureIfNeeded();
|
||||
}
|
||||
|
||||
public Color32[] GetPixels(int x, int y, int width, int height)
|
||||
{
|
||||
if (!useGetPixels_) {
|
||||
Debug.LogErrorFormat("Please set Monitor[{0}].useGetPixels as true.", id);
|
||||
return null;
|
||||
}
|
||||
return Lib.GetPixels(id, x, y, width, height);
|
||||
}
|
||||
|
||||
public bool GetPixels(Color32[] colors, int x, int y, int width, int height)
|
||||
{
|
||||
if (!useGetPixels_) {
|
||||
Debug.LogErrorFormat("Please set Monitor[{0}].useGetPixels as true.", id);
|
||||
return false;
|
||||
}
|
||||
return Lib.GetPixels(id, colors, x, y, width, height);
|
||||
}
|
||||
|
||||
public Color32 GetPixel(int x, int y)
|
||||
{
|
||||
if (!useGetPixels_) {
|
||||
Debug.LogErrorFormat("Please set Monitor[{0}].useGetPixels as true.", id);
|
||||
return Color.black;
|
||||
}
|
||||
return Lib.GetPixel(id, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
458
Assets/uDesktopDuplication/Runtime/Scripts/Texture.cs
Normal file
458
Assets/uDesktopDuplication/Runtime/Scripts/Texture.cs
Normal file
@@ -0,0 +1,458 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace uDesktopDuplication
|
||||
{
|
||||
|
||||
[RequireComponent(typeof(Renderer))]
|
||||
[AddComponentMenu("uDesktopDuplication/Texture")]
|
||||
public class Texture : MonoBehaviour
|
||||
{
|
||||
Monitor monitor_;
|
||||
public Monitor monitor
|
||||
{
|
||||
get { return monitor_; }
|
||||
set
|
||||
{
|
||||
monitor_ = value;
|
||||
if (monitor_ != null) {
|
||||
material.mainTexture = monitor_.texture;
|
||||
width = transform.localScale.x;
|
||||
rotation = monitor.rotation;
|
||||
invertX = invertX_;
|
||||
invertY = invertY_;
|
||||
useClip = useClip_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int lastMonitorId_ = 0;
|
||||
public int monitorId
|
||||
{
|
||||
get { return monitor.id; }
|
||||
set { monitor = Manager.GetMonitor(value); }
|
||||
}
|
||||
|
||||
[SerializeField] bool invertX_ = false;
|
||||
public bool invertX
|
||||
{
|
||||
get
|
||||
{
|
||||
return invertX_;
|
||||
}
|
||||
set
|
||||
{
|
||||
invertX_ = value;
|
||||
if (invertX_) {
|
||||
material.EnableKeyword("INVERT_X");
|
||||
} else {
|
||||
material.DisableKeyword("INVERT_X");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField] bool invertY_ = false;
|
||||
public bool invertY
|
||||
{
|
||||
get
|
||||
{
|
||||
return invertY_;
|
||||
}
|
||||
set
|
||||
{
|
||||
invertY_ = value;
|
||||
if (invertY_) {
|
||||
material.EnableKeyword("INVERT_Y");
|
||||
} else {
|
||||
material.DisableKeyword("INVERT_Y");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public MonitorRotation rotation
|
||||
{
|
||||
get
|
||||
{
|
||||
return monitor.rotation;
|
||||
}
|
||||
private set
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case MonitorRotation.Identity:
|
||||
material.DisableKeyword("ROTATE90");
|
||||
material.DisableKeyword("ROTATE180");
|
||||
material.DisableKeyword("ROTATE270");
|
||||
break;
|
||||
case MonitorRotation.Rotate90:
|
||||
material.EnableKeyword("ROTATE90");
|
||||
material.DisableKeyword("ROTATE180");
|
||||
material.DisableKeyword("ROTATE270");
|
||||
break;
|
||||
case MonitorRotation.Rotate180:
|
||||
material.DisableKeyword("ROTATE90");
|
||||
material.EnableKeyword("ROTATE180");
|
||||
material.DisableKeyword("ROTATE270");
|
||||
break;
|
||||
case MonitorRotation.Rotate270:
|
||||
material.DisableKeyword("ROTATE90");
|
||||
material.DisableKeyword("ROTATE180");
|
||||
material.EnableKeyword("ROTATE270");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField] bool useClip_ = false;
|
||||
public Vector2 clipPos = Vector2.zero;
|
||||
public Vector2 clipScale = new Vector2(0.2f, 0.2f);
|
||||
public bool useClip
|
||||
{
|
||||
get
|
||||
{
|
||||
return useClip_;
|
||||
}
|
||||
set
|
||||
{
|
||||
useClip_ = value;
|
||||
if (useClip_) {
|
||||
material.EnableKeyword("USE_CLIP");
|
||||
} else {
|
||||
material.DisableKeyword("USE_CLIP");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool bend
|
||||
{
|
||||
get
|
||||
{
|
||||
return material.GetInt("_Bend") != 0;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value) {
|
||||
material.EnableKeyword("BEND_ON");
|
||||
material.SetInt("_Bend", 1);
|
||||
} else {
|
||||
material.DisableKeyword("BEND_ON");
|
||||
material.SetInt("_Bend", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum MeshForwardDirection
|
||||
{
|
||||
Y = 0,
|
||||
Z = 1,
|
||||
}
|
||||
public MeshForwardDirection meshForwardDirection
|
||||
{
|
||||
get
|
||||
{
|
||||
return (MeshForwardDirection)material.GetInt("_Forward");
|
||||
}
|
||||
set
|
||||
{
|
||||
switch (value) {
|
||||
case MeshForwardDirection.Y:
|
||||
material.SetInt("_Forward", 0);
|
||||
material.EnableKeyword("_FORWARD_Y");
|
||||
material.DisableKeyword("_FORWARD_Z");
|
||||
break;
|
||||
case MeshForwardDirection.Z:
|
||||
material.SetInt("_Forward", 1);
|
||||
material.DisableKeyword("_FORWARD_Y");
|
||||
material.EnableKeyword("_FORWARD_Z");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum Culling
|
||||
{
|
||||
Off = 0,
|
||||
Front = 1,
|
||||
Back = 2,
|
||||
}
|
||||
public Culling culling
|
||||
{
|
||||
get
|
||||
{
|
||||
return (Culling)material.GetInt("_Cull");
|
||||
}
|
||||
set
|
||||
{
|
||||
material.SetInt("_Cull", (int)value);
|
||||
}
|
||||
}
|
||||
|
||||
public float radius
|
||||
{
|
||||
get { return material.GetFloat("_Radius"); }
|
||||
set { material.SetFloat("_Radius", value); }
|
||||
}
|
||||
|
||||
public float width
|
||||
{
|
||||
get { return material.GetFloat("_Width"); }
|
||||
set { material.SetFloat("_Width", value); }
|
||||
}
|
||||
|
||||
public float thickness
|
||||
{
|
||||
get { return material.GetFloat("_Thickness"); }
|
||||
set { material.SetFloat("_Thickness", value); }
|
||||
}
|
||||
|
||||
Material material_;
|
||||
public Material material
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Application.isPlaying) {
|
||||
return material_ ?? (material_ = GetComponent<Renderer>().material); // clone
|
||||
} else {
|
||||
return GetComponent<Renderer>().sharedMaterial;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Mesh mesh
|
||||
{
|
||||
get
|
||||
{
|
||||
return GetComponent<MeshFilter>().sharedMesh;
|
||||
}
|
||||
}
|
||||
public float worldWidth
|
||||
{
|
||||
get
|
||||
{
|
||||
return transform.localScale.x * (mesh.bounds.extents.x * 2f);
|
||||
}
|
||||
}
|
||||
public float worldHeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return transform.localScale.y * (mesh.bounds.extents.y * 2f);
|
||||
}
|
||||
}
|
||||
|
||||
int clipPositionScaleKey_;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
clipPositionScaleKey_ = Shader.PropertyToID("_ClipPositionScale");
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (monitor == null) {
|
||||
monitor = Manager.primary;
|
||||
}
|
||||
Manager.onReinitialized += Reinitialize;
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
Manager.onReinitialized -= Reinitialize;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
KeepMonitor();
|
||||
RequireUpdate();
|
||||
UpdateMaterial();
|
||||
}
|
||||
|
||||
void KeepMonitor()
|
||||
{
|
||||
if (monitor == null) {
|
||||
Reinitialize();
|
||||
} else {
|
||||
lastMonitorId_ = monitorId;
|
||||
}
|
||||
}
|
||||
|
||||
void RequireUpdate()
|
||||
{
|
||||
if (monitor != null) {
|
||||
monitor.shouldBeUpdated = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Reinitialize()
|
||||
{
|
||||
// Monitor instance is released here when initialized.
|
||||
monitor = Manager.GetMonitor(lastMonitorId_);
|
||||
}
|
||||
|
||||
void UpdateMaterial()
|
||||
{
|
||||
width = transform.localScale.x;
|
||||
|
||||
if (monitor != null) {
|
||||
rotation = monitor.rotation;
|
||||
}
|
||||
|
||||
material.SetVector(clipPositionScaleKey_, new Vector4(clipPos.x, clipPos.y, clipScale.x, clipScale.y));
|
||||
}
|
||||
|
||||
public Vector3 GetWorldPositionFromCoord(Vector2 coord)
|
||||
{
|
||||
return GetWorldPositionFromCoord((int)coord.x, (int)coord.y);
|
||||
}
|
||||
|
||||
public Vector3 GetWorldPositionFromCoord(int u, int v)
|
||||
{
|
||||
// Local position (scale included).
|
||||
var x = (float)(u - monitor.width / 2) / monitor.width;
|
||||
var y = -(float)(v - monitor.height / 2) / monitor.height;
|
||||
var localPos = new Vector3(worldWidth * x, worldHeight * y, 0f);
|
||||
|
||||
// Bending
|
||||
if (bend) {
|
||||
var angle = localPos.x / radius;
|
||||
if (meshForwardDirection == MeshForwardDirection.Y) {
|
||||
localPos.y -= radius * (1f - Mathf.Cos(angle));
|
||||
} else {
|
||||
localPos.z -= radius * (1f - Mathf.Cos(angle));
|
||||
}
|
||||
localPos.x = radius * Mathf.Sin(angle);
|
||||
}
|
||||
|
||||
// To world position
|
||||
return transform.position + (transform.rotation * localPos);
|
||||
}
|
||||
|
||||
public struct RayCastResult
|
||||
{
|
||||
public bool hit;
|
||||
public Texture texture;
|
||||
public Vector3 position;
|
||||
public Vector3 normal;
|
||||
public Vector2 coords;
|
||||
public Vector2 desktopCoord;
|
||||
}
|
||||
|
||||
static readonly RayCastResult raycastFailedResult = new RayCastResult {
|
||||
hit = false,
|
||||
texture = null,
|
||||
position = Vector3.zero,
|
||||
normal = Vector3.forward,
|
||||
coords = Vector2.zero,
|
||||
desktopCoord = Vector2.zero,
|
||||
};
|
||||
|
||||
// This function can be used only for vertical (= MeshForwardDirection.Z) plane.
|
||||
public RayCastResult RayCast(Vector3 from, Vector3 dir)
|
||||
{
|
||||
var r = radius;
|
||||
var center = transform.position - transform.forward * r;
|
||||
|
||||
// Localize the start point of the ray and the direction.
|
||||
var trs = Matrix4x4.TRS(center, transform.rotation, Vector3.one);
|
||||
var invTrs = trs.inverse;
|
||||
Vector3 localFrom = invTrs.MultiplyPoint3x4(from);
|
||||
Vector3 localDir = invTrs.MultiplyVector(dir).normalized;
|
||||
|
||||
// Calculate the intersection points of circle and line on the X-Z plane.
|
||||
var a = localDir.z / localDir.x;
|
||||
var b = localFrom.z - a * localFrom.x;
|
||||
|
||||
var aa = a * a;
|
||||
var bb = b * b;
|
||||
var ab = a * b;
|
||||
var rr = r * r;
|
||||
|
||||
var s = aa * rr - bb + rr;
|
||||
if (s < 0f) {
|
||||
return raycastFailedResult;
|
||||
}
|
||||
s = Mathf.Sqrt(s);
|
||||
|
||||
var t = aa + 1;
|
||||
|
||||
var lx0 = (-s - ab) / t;
|
||||
var lz0 = (b - a * s) / t;
|
||||
var to0 = new Vector3(lx0, 0f, lz0);
|
||||
|
||||
var lx1 = (s - ab) / t;
|
||||
var lz1 = (a * s + b) / t;
|
||||
var to1 = new Vector3(lx1, 0f, lz1);
|
||||
|
||||
var to = (Vector3.Dot(localDir, to0) > 0f) ? to0 : to1;
|
||||
|
||||
// Check if the point is inner angle of mesh width.
|
||||
var toAngle = Mathf.Atan2(to.x, to.z);
|
||||
var halfWidthAngle = (worldWidth / radius) * 0.5f;
|
||||
if (Mathf.Abs(toAngle) > halfWidthAngle) {
|
||||
return raycastFailedResult;
|
||||
}
|
||||
|
||||
// Calculate the intersection points on XZ-Y plane.
|
||||
var v = to - localFrom;
|
||||
var l = Mathf.Sqrt(Mathf.Pow(v.x, 2f) + Mathf.Pow(v.z, 2f));
|
||||
var ly = localFrom.y + l * localDir.y / Mathf.Sqrt(Mathf.Pow(localDir.x, 2f) + Mathf.Pow(localDir.z, 2f));
|
||||
|
||||
// Check if the point is inner mesh height.
|
||||
var halfHeight = worldHeight * 0.5f;
|
||||
if (Mathf.Abs(ly) > halfHeight) {
|
||||
return raycastFailedResult;
|
||||
}
|
||||
|
||||
// Check hit position is in the range of the ray.
|
||||
to.y = ly;
|
||||
var hitPos = trs.MultiplyPoint(to);
|
||||
|
||||
if ((hitPos - from).magnitude > dir.magnitude) {
|
||||
return raycastFailedResult;
|
||||
}
|
||||
|
||||
// Calculate coordinates.
|
||||
var coordX = toAngle / halfWidthAngle * 0.5f;
|
||||
var coordY = ly / halfHeight * 0.5f;
|
||||
|
||||
// Zoom
|
||||
if (useClip) {
|
||||
coordX = clipPos.x + (0.5f + coordX) * clipScale.x;
|
||||
coordX -= Mathf.Floor(coordX);
|
||||
coordX -= 0.5f;
|
||||
|
||||
coordY = (1f - clipPos.y) + (coordY - 0.5f) * clipScale.y;
|
||||
coordY -= Mathf.Floor(coordY);
|
||||
coordY -= 0.5f;
|
||||
}
|
||||
|
||||
// Desktop position
|
||||
int desktopX = monitor.left + (int)((coordX + 0.5f) * monitor.width);
|
||||
int desktopY = monitor.top + (int)((0.5f - coordY) * monitor.height);
|
||||
|
||||
// Calculate normal.
|
||||
var normal = new Vector3(-to.x, 0f, -to.z);
|
||||
|
||||
// Result
|
||||
return new RayCastResult {
|
||||
hit = true,
|
||||
texture = this,
|
||||
position = trs.MultiplyPoint(to),
|
||||
normal = trs.MultiplyVector(normal).normalized,
|
||||
coords = new Vector2(coordX, coordY),
|
||||
desktopCoord = new Vector2(desktopX, desktopY)
|
||||
};
|
||||
}
|
||||
|
||||
public static RayCastResult RayCastAll(Vector3 from, Vector3 dir)
|
||||
{
|
||||
foreach (var uddTexture in GameObject.FindObjectsOfType<uDesktopDuplication.Texture>()) {
|
||||
var result = uddTexture.RayCast(from, dir);
|
||||
if (result.hit) return result;
|
||||
}
|
||||
return raycastFailedResult;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,12 +8,14 @@ struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
struct Input
|
||||
@@ -58,23 +60,30 @@ inline float2 uddClipUV(float2 uv)
|
||||
|
||||
inline void uddConvertToLinearIfNeeded(inout fixed3 rgb)
|
||||
{
|
||||
#ifdef USE_GAMMA_TO_LINEAR_SPACE
|
||||
if (!IsGammaSpace()) {
|
||||
rgb = GammaToLinearSpace(rgb);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
inline fixed4 uddGetScreenTexture(float2 uv)
|
||||
inline fixed4 uddGetTexture(sampler2D tex, float2 uv)
|
||||
{
|
||||
uv = uddInvertUV(uv);
|
||||
#ifdef USE_CLIP
|
||||
uv = uddClipUV(uv);
|
||||
#endif
|
||||
fixed4 c = tex2D(_MainTex, uddRotateUV(uv));
|
||||
fixed4 c = tex2D(tex, uddRotateUV(uv));
|
||||
uddConvertToLinearIfNeeded(c.rgb);
|
||||
return c;
|
||||
}
|
||||
|
||||
inline void uddBendVertex(inout float4 v, half radius, half width, half thickness)
|
||||
inline fixed4 uddGetScreenTexture(float2 uv)
|
||||
{
|
||||
return uddGetTexture(_MainTex, uv);
|
||||
}
|
||||
|
||||
inline void uddBendVertex(inout float3 v, half radius, half width, half thickness)
|
||||
{
|
||||
#ifdef BEND_ON
|
||||
half angle = width * v.x / radius;
|
||||
@@ -90,9 +99,35 @@ inline void uddBendVertex(inout float4 v, half radius, half width, half thicknes
|
||||
v.x = radius * sin(angle) / width;
|
||||
#else
|
||||
#ifdef _FORWARD_Z
|
||||
v.y *= thickness;
|
||||
#elif _FORWARD_Y
|
||||
v.z *= thickness;
|
||||
#elif _FORWARD_Y
|
||||
v.y *= thickness;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
inline float3 uddRotateY(float3 n, float angle)
|
||||
{
|
||||
float c = cos(angle);
|
||||
float s = sin(angle);
|
||||
return float3(c * n.x - s * n.z, n.y, s * n.x + c * n.z);
|
||||
}
|
||||
|
||||
inline float3 uddRotateX(float3 n, float angle)
|
||||
{
|
||||
float c = cos(angle);
|
||||
float s = sin(angle);
|
||||
return float3(n.x, c * n.y + s * n.z, -s * n.y + c * n.z);
|
||||
}
|
||||
|
||||
inline void uddBendNormal(float4 x, inout float3 n, half radius, half width)
|
||||
{
|
||||
#ifdef BEND_ON
|
||||
half angle = width * x / radius;
|
||||
#ifdef _FORWARD_Z
|
||||
n = uddRotateY(n, -angle);
|
||||
#elif _FORWARD_Y
|
||||
n = uddRotateX(n, -angle);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
@@ -2,8 +2,11 @@
|
||||
#define UDD_PARAMS_CGINC
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
sampler2D _CursorTex;
|
||||
half4 _Color;
|
||||
half _ColorScale;
|
||||
half _Radius;
|
||||
half _Width;
|
||||
half _Thickness;
|
||||
|
||||
half4 _CursorPositionScale;
|
||||
#define _CursorX _CursorPositionScale.x
|
||||
@@ -7,6 +7,12 @@ Properties
|
||||
_MainTex ("Albedo (RGB)", 2D) = "white" {}
|
||||
_Glossiness ("Smoothness", Range(0, 1)) = 0.5
|
||||
_Metallic ("Metallic", Range(0, 1)) = 0.0
|
||||
_Emissive ("Emissive", Range(0, 10)) = 0.0
|
||||
[KeywordEnum(Y, Z)] _Forward("Mesh Forward Direction", Int) = 0
|
||||
[Toggle(BEND_ON)] _Bend("Use Bend", Int) = 0
|
||||
[PowerSlider(10.0)] _Radius("Bend Radius", Range(1, 100)) = 30
|
||||
[PowerSlider(10.0)] _Thickness("Thickness", Range(0.01, 10)) = 1
|
||||
_Width("Width", Range(0.0, 10.0)) = 1.0
|
||||
[KeywordEnum(Off, Front, Back)] _Cull("Culling", Int) = 2
|
||||
}
|
||||
|
||||
@@ -19,18 +25,27 @@ SubShader
|
||||
CGPROGRAM
|
||||
|
||||
#pragma target 3.0
|
||||
#pragma surface surf Standard fullforwardshadows
|
||||
#pragma multi_compile ___ INVERT_X
|
||||
#pragma multi_compile ___ INVERT_Y
|
||||
#pragma surface surf Standard fullforwardshadows vertex:vert
|
||||
#pragma shader_feature ___ INVERT_X
|
||||
#pragma shader_feature ___ INVERT_Y
|
||||
#pragma shader_feature _FORWARD_Y _FORWARD_Z
|
||||
#pragma shader_feature ___ USE_GAMMA_TO_LINEAR_SPACE
|
||||
#pragma multi_compile ___ ROTATE90 ROTATE180 ROTATE270
|
||||
#pragma multi_compile ___ USE_BEND
|
||||
#pragma multi_compile ___ USE_CLIP
|
||||
#pragma multi_compile ___ BEND_ON
|
||||
|
||||
#define SURFACE_SHADER
|
||||
#include "./uDD_Common.cginc"
|
||||
|
||||
half _Glossiness;
|
||||
half _Metallic;
|
||||
half _Emissive;
|
||||
|
||||
void vert(inout appdata_full v)
|
||||
{
|
||||
uddBendNormal(v.vertex.x, v.normal, _Radius, _Width);
|
||||
uddBendVertex(v.vertex.xyz, _Radius, _Width, _Thickness);
|
||||
}
|
||||
|
||||
void surf(Input IN, inout SurfaceOutputStandard o)
|
||||
{
|
||||
@@ -39,6 +54,7 @@ SubShader
|
||||
o.Metallic = _Metallic;
|
||||
o.Smoothness = _Glossiness;
|
||||
o.Alpha = c.a;
|
||||
o.Emission = c.rgb * _Emissive;
|
||||
}
|
||||
|
||||
ENDCG
|
||||
@@ -4,12 +4,13 @@
|
||||
Properties
|
||||
{
|
||||
_Color ("Color", Color) = (1, 1, 1, 1)
|
||||
_ColorScale ("ColorScale", Range(0.0, 10.0)) = 1.0
|
||||
_MainTex ("Texture", 2D) = "white" {}
|
||||
_CursorTex ("Cursor Texture", 2D) = "white" {}
|
||||
[KeywordEnum(Y, Z)] _Forward("Mesh Forward Direction", Int) = 0
|
||||
[Toggle(BEND_ON)] _Bend("Use Bend", Int) = 0
|
||||
[PowerSlider(10.0)] _Radius("Bend Radius", Range(1, 100)) = 30
|
||||
[PowerSlider(10.0)] _Thickness("Thickness", Range(0.01, 10)) = 1
|
||||
_Width("Width", Range(0.0, 10.0)) = 1.0
|
||||
[KeywordEnum(Off, Front, Back)] _Cull("Culling", Int) = 2
|
||||
}
|
||||
|
||||
@@ -24,14 +25,13 @@ CGINCLUDE
|
||||
|
||||
#include "./uDD_Common.cginc"
|
||||
|
||||
half _Radius;
|
||||
half _Width;
|
||||
half _Thickness;
|
||||
|
||||
v2f vert(appdata v)
|
||||
{
|
||||
v2f o;
|
||||
uddBendVertex(v.vertex, _Radius, _Width, _Thickness);
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_OUTPUT(v2f, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
uddBendVertex(v.vertex.xyz, _Radius, _Width, _Thickness);
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
||||
return o;
|
||||
@@ -39,7 +39,7 @@ v2f vert(appdata v)
|
||||
|
||||
fixed4 frag(v2f i) : SV_Target
|
||||
{
|
||||
return uddGetScreenTexture(i.uv);
|
||||
return uddGetScreenTexture(i.uv) * _Color * _ColorScale;
|
||||
}
|
||||
|
||||
ENDCG
|
||||
@@ -49,12 +49,13 @@ Pass
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile ___ INVERT_X
|
||||
#pragma multi_compile ___ INVERT_Y
|
||||
#pragma shader_feature ___ INVERT_X
|
||||
#pragma shader_feature ___ INVERT_Y
|
||||
#pragma shader_feature _FORWARD_Y _FORWARD_Z
|
||||
#pragma shader_feature ___ USE_GAMMA_TO_LINEAR_SPACE
|
||||
#pragma multi_compile ___ ROTATE90 ROTATE180 ROTATE270
|
||||
#pragma multi_compile ___ USE_CLIP
|
||||
#pragma multi_compile ___ BEND_ON
|
||||
#pragma multi_compile _FORWARD_Y _FORWARD_Z
|
||||
ENDCG
|
||||
}
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
Properties
|
||||
{
|
||||
_Color ("Color", Color) = (1, 1, 1, 1)
|
||||
_ColorScale ("ColorScale", Range(0.0, 10.0)) = 1.0
|
||||
_MainTex ("Texture", 2D) = "white" {}
|
||||
_Mask ("Mask", Range(0, 1)) = 0.1
|
||||
_CursorTex ("Cursor Texture", 2D) = "white" {}
|
||||
[KeywordEnum(Y, Z)] _Forward("Mesh Forward Direction", Int) = 0
|
||||
[Toggle(BEND_ON)] _Bend("Use Bend", Int) = 0
|
||||
[PowerSlider(10.0)] _Radius("Bend Radius", Range(1, 100)) = 30
|
||||
[PowerSlider(10.0)] _Thickness("Thickness", Range(0.01, 10)) = 1
|
||||
_Width("Width", Range(0.0, 10.0)) = 1.0
|
||||
[KeywordEnum(Off, Front, Back)] _Cull("Culling", Int) = 2
|
||||
}
|
||||
|
||||
@@ -28,14 +29,14 @@ CGINCLUDE
|
||||
#include "./uDD_Common.cginc"
|
||||
|
||||
fixed _Mask;
|
||||
half _Radius;
|
||||
half _Width;
|
||||
half _Thickness;
|
||||
|
||||
v2f vert(appdata v)
|
||||
{
|
||||
v2f o;
|
||||
uddBendVertex(v.vertex, _Radius, _Width, _Thickness);
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_OUTPUT(v2f, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
uddBendVertex(v.vertex.xyz, _Radius, _Width, _Thickness);
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
||||
return o;
|
||||
@@ -45,7 +46,7 @@ fixed4 frag(v2f i) : SV_Target
|
||||
{
|
||||
fixed4 tex = uddGetScreenTexture(i.uv);
|
||||
fixed alpha = pow((tex.r + tex.g + tex.b) / 3.0, _Mask);
|
||||
return fixed4(tex.rgb * _Color.rgb, alpha * _Color.a);
|
||||
return fixed4(tex.rgb * _Color.rgb * _ColorScale, alpha * _Color.a);
|
||||
}
|
||||
|
||||
ENDCG
|
||||
@@ -55,12 +56,13 @@ Pass
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile ___ INVERT_X
|
||||
#pragma multi_compile ___ INVERT_Y
|
||||
#pragma shader_feature ___ INVERT_X
|
||||
#pragma shader_feature ___ INVERT_Y
|
||||
#pragma shader_feature _FORWARD_Y _FORWARD_Z
|
||||
#pragma shader_feature ___ USE_GAMMA_TO_LINEAR_SPACE
|
||||
#pragma multi_compile ___ ROTATE90 ROTATE180 ROTATE270
|
||||
#pragma multi_compile ___ USE_BEND
|
||||
#pragma multi_compile ___ USE_CLIP
|
||||
#pragma multi_compile _BEND_OFF _BEND_Y _BEND_Z
|
||||
#pragma multi_compile ___ BEND_ON
|
||||
ENDCG
|
||||
}
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
Shader "uDesktopDuplication/Unlit_Displacement"
|
||||
{
|
||||
|
||||
Properties
|
||||
{
|
||||
_Color ("Color", Color) = (1, 1, 1, 1)
|
||||
_ColorScale ("ColorScale", Range(0.0, 10.0)) = 1.0
|
||||
_MainTex ("Texture", 2D) = "white" {}
|
||||
[KeywordEnum(Y, Z)] _Forward("Mesh Forward Direction", Int) = 0
|
||||
[Toggle(BEND_ON)] _Bend("Use Bend", Int) = 0
|
||||
[PowerSlider(10.0)] _Radius("Bend Radius", Range(1, 100)) = 30
|
||||
_Width ("Width", Range(0.0, 10.0)) = 1.92
|
||||
[PowerSlider(10.0)] _Thickness("Thickness", Range(0.01, 10)) = 1
|
||||
[KeywordEnum(Off, Front, Back)] _Cull("Culling", Int) = 2
|
||||
_DispTex ("Displacement Map", 2D) = "black" {}
|
||||
_DispFactor("Displacement Factor", Range(0, 5.0)) = 1
|
||||
_TessMinDist("Tessellation Min Distance", Range(0.1, 100.0)) = 1.0
|
||||
_TessMaxDist("Tessellation Max Distance", Range(0.1, 100.0)) = 5.0
|
||||
_TessFactor("Tessellation Factor", Range(0.1, 50.0)) = 10.0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
|
||||
Tags { "RenderType"="Opaque" }
|
||||
|
||||
Cull [_Cull]
|
||||
|
||||
CGINCLUDE
|
||||
|
||||
#include "./uDD_Common.cginc"
|
||||
#include "Tessellation.cginc"
|
||||
|
||||
Texture2D _DispTex;
|
||||
SamplerState sampler_DispTex;
|
||||
half _DispFactor;
|
||||
half _TessMinDist;
|
||||
half _TessMaxDist;
|
||||
half _TessFactor;
|
||||
|
||||
struct VsInput
|
||||
{
|
||||
float3 vertex : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct HsInput
|
||||
{
|
||||
float4 f4Position : POS;
|
||||
float3 f3Normal : NORMAL;
|
||||
float2 f2TexCoord : TEXCOORD;
|
||||
};
|
||||
|
||||
struct HsControlPointOutput
|
||||
{
|
||||
float3 f3Position : POS;
|
||||
float3 f3Normal : NORMAL;
|
||||
float2 f2TexCoord : TEXCOORD;
|
||||
};
|
||||
|
||||
struct HsConstantOutput
|
||||
{
|
||||
float fTessFactor[3] : SV_TessFactor;
|
||||
float fInsideTessFactor : SV_InsideTessFactor;
|
||||
};
|
||||
|
||||
struct DsOutput
|
||||
{
|
||||
float4 f4Position : SV_Position;
|
||||
float2 f2TexCoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
HsInput vert(VsInput i)
|
||||
{
|
||||
HsInput o;
|
||||
o.f4Position = float4(i.vertex, 1.0);
|
||||
o.f3Normal = i.normal;
|
||||
o.f2TexCoord = i.texcoord;
|
||||
return o;
|
||||
}
|
||||
|
||||
[domain("tri")]
|
||||
[partitioning("integer")]
|
||||
[outputtopology("triangle_cw")]
|
||||
[patchconstantfunc("hullConst")]
|
||||
[outputcontrolpoints(3)]
|
||||
HsControlPointOutput hull(InputPatch<HsInput, 3> i, uint id : SV_OutputControlPointID)
|
||||
{
|
||||
HsControlPointOutput o = (HsControlPointOutput)0;
|
||||
o.f3Position = i[id].f4Position.xyz;
|
||||
o.f3Normal = i[id].f3Normal;
|
||||
o.f2TexCoord = i[id].f2TexCoord;
|
||||
return o;
|
||||
}
|
||||
|
||||
HsConstantOutput hullConst(InputPatch<HsInput, 3> i)
|
||||
{
|
||||
HsConstantOutput o = (HsConstantOutput)0;
|
||||
|
||||
float4 p0 = i[0].f4Position;
|
||||
float4 p1 = i[1].f4Position;
|
||||
float4 p2 = i[2].f4Position;
|
||||
float4 tessFactor = UnityDistanceBasedTess(p0, p1, p2, _TessMinDist, _TessMaxDist, _TessFactor);
|
||||
|
||||
o.fTessFactor[0] = tessFactor.x;
|
||||
o.fTessFactor[1] = tessFactor.y;
|
||||
o.fTessFactor[2] = tessFactor.z;
|
||||
o.fInsideTessFactor = tessFactor.w;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
[domain("tri")]
|
||||
DsOutput domain(
|
||||
HsConstantOutput hsConst,
|
||||
const OutputPatch<HsControlPointOutput, 3> i,
|
||||
float3 bary : SV_DomainLocation)
|
||||
{
|
||||
DsOutput o = (DsOutput)0;
|
||||
|
||||
float3 f3Position =
|
||||
bary.x * i[0].f3Position +
|
||||
bary.y * i[1].f3Position +
|
||||
bary.z * i[2].f3Position;
|
||||
|
||||
float3 f3Normal = normalize(
|
||||
bary.x * i[0].f3Normal +
|
||||
bary.y * i[1].f3Normal +
|
||||
bary.z * i[2].f3Normal);
|
||||
|
||||
o.f2TexCoord =
|
||||
bary.x * i[0].f2TexCoord +
|
||||
bary.y * i[1].f2TexCoord +
|
||||
bary.z * i[2].f2TexCoord;
|
||||
|
||||
uddBendNormal(f3Position.x, f3Normal, _Radius, _Width);
|
||||
uddBendVertex(f3Position, _Radius, _Width, _Thickness);
|
||||
|
||||
float disp = length(_DispTex.SampleLevel(sampler_DispTex, o.f2TexCoord, 0)) * _DispFactor;
|
||||
f3Position.xyz += f3Normal * disp;
|
||||
|
||||
o.f4Position = UnityObjectToClipPos(float4(f3Position.xyz, 1.0));
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
fixed4 frag(DsOutput i) : SV_Target
|
||||
{
|
||||
return uddGetScreenTexture(i.f2TexCoord) * _Color * _ColorScale;
|
||||
}
|
||||
|
||||
ENDCG
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma hull hull
|
||||
#pragma domain domain
|
||||
#pragma shader_feature ___ INVERT_X
|
||||
#pragma shader_feature ___ INVERT_Y
|
||||
#pragma shader_feature _FORWARD_Y _FORWARD_Z
|
||||
#pragma shader_feature ___ USE_GAMMA_TO_LINEAR_SPACE
|
||||
#pragma multi_compile ___ ROTATE90 ROTATE180 ROTATE270
|
||||
#pragma multi_compile ___ USE_CLIP
|
||||
#pragma multi_compile ___ BEND_ON
|
||||
ENDCG
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Fallback "Unlit/Texture"
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05df46eb51b13c84eabbdf4c53cc8db7
|
||||
timeCreated: 1480072905
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -4,12 +4,13 @@
|
||||
Properties
|
||||
{
|
||||
_Color ("Color", Color) = (1, 1, 1, 1)
|
||||
_ColorScale ("ColorScale", Range(0.0, 10.0)) = 1.0
|
||||
_MainTex ("Texture", 2D) = "white" {}
|
||||
_CursorTex ("Cursor Texture", 2D) = "white" {}
|
||||
[KeywordEnum(Y, Z)] _Forward("Mesh Forward Direction", Int) = 0
|
||||
[Toggle(BEND_ON)] _Bend("Use Bend", Int) = 0
|
||||
[PowerSlider(10.0)] _Radius("Bend Radius", Range(1, 100)) = 30
|
||||
[PowerSlider(10.0)] _Thickness("Thickness", Range(0.01, 10)) = 1
|
||||
_Width("Width", Range(0.0, 10.0)) = 1.0
|
||||
[KeywordEnum(Off, Front, Back)] _Cull("Culling", Int) = 2
|
||||
}
|
||||
|
||||
@@ -26,14 +27,13 @@ CGINCLUDE
|
||||
|
||||
#include "./uDD_Common.cginc"
|
||||
|
||||
half _Radius;
|
||||
half _Width;
|
||||
half _Thickness;
|
||||
|
||||
v2f vert(appdata v)
|
||||
{
|
||||
v2f o;
|
||||
uddBendVertex(v.vertex, _Radius, _Width, _Thickness);
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_OUTPUT(v2f, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
uddBendVertex(v.vertex.xyz, _Radius, _Width, _Thickness);
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
||||
return o;
|
||||
@@ -41,7 +41,7 @@ v2f vert(appdata v)
|
||||
|
||||
fixed4 frag(v2f i) : SV_Target
|
||||
{
|
||||
return fixed4(uddGetScreenTexture(i.uv).rgb, 1.0) * _Color;
|
||||
return fixed4(uddGetScreenTexture(i.uv).rgb * _ColorScale, 1.0) * _Color;
|
||||
}
|
||||
|
||||
ENDCG
|
||||
@@ -51,12 +51,13 @@ Pass
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile ___ INVERT_X
|
||||
#pragma multi_compile ___ INVERT_Y
|
||||
#pragma shader_feature ___ INVERT_X
|
||||
#pragma shader_feature ___ INVERT_Y
|
||||
#pragma shader_feature _FORWARD_Y _FORWARD_Z
|
||||
#pragma shader_feature ___ USE_GAMMA_TO_LINEAR_SPACE
|
||||
#pragma multi_compile ___ ROTATE90 ROTATE180 ROTATE270
|
||||
#pragma multi_compile ___ USE_BEND
|
||||
#pragma multi_compile ___ USE_CLIP
|
||||
#pragma multi_compile _BEND_OFF _BEND_Y _BEND_Z
|
||||
#pragma multi_compile ___ BEND_ON
|
||||
ENDCG
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "uDesktopDuplication.Runtime",
|
||||
"rootNamespace": "",
|
||||
"references": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7547219be89abee4ba3cf7f48b516b7b
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/uDesktopDuplication/Samples/01. Basic.meta
Normal file
8
Assets/uDesktopDuplication/Samples/01. Basic.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28cfcf4621830a442ab6f1ac34e35842
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,381 @@
|
||||
%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: 9
|
||||
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.18028377, g: 0.22571409, b: 0.30692285, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 0
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 1024
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 1
|
||||
m_BakeBackend: 0
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 500
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 2
|
||||
m_PVRDenoiserTypeDirect: 0
|
||||
m_PVRDenoiserTypeIndirect: 0
|
||||
m_PVRDenoiserTypeAO: 0
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 0
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 4890085278179872738, guid: 1c9674dc16f852046900034b315a0e18,
|
||||
type: 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
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &79264388
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 79264393}
|
||||
- component: {fileID: 79264392}
|
||||
- component: {fileID: 79264390}
|
||||
- component: {fileID: 79264389}
|
||||
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 &79264389
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 79264388}
|
||||
m_Enabled: 1
|
||||
--- !u!124 &79264390
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 79264388}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &79264392
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 79264388}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
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: -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_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &79264393
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 79264388}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -6}
|
||||
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!1 &400296148
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 400296150}
|
||||
- component: {fileID: 400296149}
|
||||
- component: {fileID: 400296151}
|
||||
m_Layer: 0
|
||||
m_Name: Multiple Monitor Creator
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &400296149
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 400296148}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fb22986017201f74aa864dcbf0cab751, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
monitorPrefab: {fileID: 1000012642892690, guid: de6f36e446e5e8a48bf61fe198985bb4,
|
||||
type: 3}
|
||||
scaleMode: 1
|
||||
scale: 0.3
|
||||
meshForwardDirection: 1
|
||||
removeIfUnsupported: 1
|
||||
removeWaitDuration: 15
|
||||
removeChildrenWhenClear: 1
|
||||
--- !u!4 &400296150
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 400296148}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 3}
|
||||
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 &400296151
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 400296148}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a31b05fdfa301f14e88365e64622b43a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
updateEveryFrame: 1
|
||||
margin: 0.1
|
||||
thickness: 1
|
||||
debugDraw: 1
|
||||
radius: 5
|
||||
offsetAngle: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1738296145
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1738296147}
|
||||
- component: {fileID: 1738296146}
|
||||
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 &1738296146
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1738296145}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
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_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &1738296147
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1738296145}
|
||||
m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.109381676, w: 0.87542605}
|
||||
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: 0, y: 0, z: 0}
|
||||
@@ -0,0 +1,378 @@
|
||||
%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: 9
|
||||
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.18028377, g: 0.22571409, b: 0.30692285, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 0
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 1024
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 1
|
||||
m_BakeBackend: 0
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 500
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 2
|
||||
m_PVRDenoiserTypeDirect: 0
|
||||
m_PVRDenoiserTypeIndirect: 0
|
||||
m_PVRDenoiserTypeAO: 0
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 0
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 4890085278179872738, guid: e3d8a174f4f7f38499898d059b2eaca2,
|
||||
type: 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
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &79264388
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 79264393}
|
||||
- component: {fileID: 79264392}
|
||||
- component: {fileID: 79264390}
|
||||
- component: {fileID: 79264389}
|
||||
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 &79264389
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 79264388}
|
||||
m_Enabled: 1
|
||||
--- !u!124 &79264390
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 79264388}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &79264392
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 79264388}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
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: -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_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &79264393
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 79264388}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -3}
|
||||
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!1 &400296148
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 400296150}
|
||||
- component: {fileID: 400296149}
|
||||
- component: {fileID: 400296152}
|
||||
m_Layer: 0
|
||||
m_Name: Multiple Monitor Creator
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &400296149
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 400296148}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fb22986017201f74aa864dcbf0cab751, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
monitorPrefab: {fileID: 1000012642892690, guid: de6f36e446e5e8a48bf61fe198985bb4,
|
||||
type: 3}
|
||||
scaleMode: 1
|
||||
scale: 0.5
|
||||
meshForwardDirection: 1
|
||||
removeIfUnsupported: 1
|
||||
removeWaitDuration: 5
|
||||
removeChildrenWhenClear: 1
|
||||
--- !u!4 &400296150
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 400296148}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 3}
|
||||
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 &400296152
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 400296148}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0db1dcac2dedc724194c423ee75b3bf4, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
updateEveryFrame: 1
|
||||
margin: 0.1
|
||||
thickness: 1
|
||||
--- !u!1 &1738296145
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1738296147}
|
||||
- component: {fileID: 1738296146}
|
||||
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 &1738296146
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1738296145}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
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_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &1738296147
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1738296145}
|
||||
m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.109381676, w: 0.87542605}
|
||||
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: 0, y: 0, z: 0}
|
||||
@@ -2,7 +2,7 @@
|
||||
using UnityEngine.Assertions;
|
||||
using System.Collections.Generic;
|
||||
using MeshForwardDirection = uDesktopDuplication.Texture.MeshForwardDirection;
|
||||
using MonitorState = uDesktopDuplication.MonitorState;
|
||||
using DuplicatorState = uDesktopDuplication.DuplicatorState;
|
||||
|
||||
public class MultipleMonitorCreator : MonoBehaviour
|
||||
{
|
||||
@@ -92,11 +92,11 @@ public class MultipleMonitorCreator : MonoBehaviour
|
||||
if (removeWaitTimer_ > removeWaitDuration) {
|
||||
hasMonitorUnsupportStateChecked_ = true;
|
||||
foreach (var info in monitors) {
|
||||
if (info.uddTexture.monitor.state == MonitorState.Unsupported) {
|
||||
if (info.uddTexture.monitor.state == DuplicatorState.Unsupported) {
|
||||
Destroy(info.gameObject);
|
||||
}
|
||||
}
|
||||
monitors.RemoveAll(info => info.uddTexture.monitor.state == MonitorState.Unsupported);
|
||||
monitors.RemoveAll(info => info.uddTexture.monitor.state == DuplicatorState.Unsupported);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,7 +116,7 @@ public class MultipleMonitorCreator : MonoBehaviour
|
||||
for (int i = 0; i < n; ++i) {
|
||||
// Create monitor obeject
|
||||
var go = Instantiate(monitorPrefab);
|
||||
go.name = "Monitor " + i;
|
||||
go.name = uDesktopDuplication.Manager.monitors[i].name;
|
||||
|
||||
// Saved infomation
|
||||
if (savedInfoList.Count == i) {
|
||||
@@ -0,0 +1,427 @@
|
||||
%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, g: 0, b: 0, a: 1}
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
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: 9
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_TextureWidth: 1024
|
||||
m_TextureHeight: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 0
|
||||
m_CompAOExponentDirect: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 1024
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 1
|
||||
m_BakeBackend: 0
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVRFiltering: 0
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousColorSigma: 1
|
||||
m_PVRFilteringAtrousNormalSigma: 1
|
||||
m_PVRFilteringAtrousPositionSigma: 1
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_UseShadowmask: 0
|
||||
--- !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 &79264388
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 79264393}
|
||||
- component: {fileID: 79264392}
|
||||
- component: {fileID: 79264391}
|
||||
- component: {fileID: 79264390}
|
||||
- component: {fileID: 79264389}
|
||||
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 &79264389
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 79264388}
|
||||
m_Enabled: 1
|
||||
--- !u!124 &79264390
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 79264388}
|
||||
m_Enabled: 1
|
||||
--- !u!92 &79264391
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 79264388}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &79264392
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 79264388}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
|
||||
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: -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: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
m_StereoMirrorMode: 0
|
||||
--- !u!4 &79264393
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 79264388}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -3}
|
||||
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!1001 &105652574
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4000011474108562, guid: de6f36e446e5e8a48bf61fe198985bb4, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4000011474108562, guid: de6f36e446e5e8a48bf61fe198985bb4, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4000011474108562, guid: de6f36e446e5e8a48bf61fe198985bb4, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4000011474108562, guid: de6f36e446e5e8a48bf61fe198985bb4, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4000011474108562, guid: de6f36e446e5e8a48bf61fe198985bb4, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4000011474108562, guid: de6f36e446e5e8a48bf61fe198985bb4, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4000011474108562, guid: de6f36e446e5e8a48bf61fe198985bb4, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4000011474108562, guid: de6f36e446e5e8a48bf61fe198985bb4, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114000012274256594, guid: de6f36e446e5e8a48bf61fe198985bb4,
|
||||
type: 2}
|
||||
propertyPath: invertX_
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114000012274256594, guid: de6f36e446e5e8a48bf61fe198985bb4,
|
||||
type: 2}
|
||||
propertyPath: useClip_
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 23000011974915108, guid: de6f36e446e5e8a48bf61fe198985bb4,
|
||||
type: 2}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: c181d333a7bee7a44b94c0f4e02c4bd4, type: 2}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: de6f36e446e5e8a48bf61fe198985bb4, type: 2}
|
||||
m_RootGameObject: {fileID: 913398332}
|
||||
m_IsPrefabParent: 0
|
||||
--- !u!1 &913398332
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 1000012642892690, guid: de6f36e446e5e8a48bf61fe198985bb4,
|
||||
type: 2}
|
||||
m_PrefabInternal: {fileID: 105652574}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 913398336}
|
||||
- component: {fileID: 913398335}
|
||||
- component: {fileID: 913398334}
|
||||
- component: {fileID: 913398333}
|
||||
m_Layer: 0
|
||||
m_Name: Monitor Board
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &913398333
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 114000012274256594, guid: de6f36e446e5e8a48bf61fe198985bb4,
|
||||
type: 2}
|
||||
m_PrefabInternal: {fileID: 105652574}
|
||||
m_GameObject: {fileID: 913398332}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bb54a34570e4747429b1c5b66c69d356, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
invertX_: 0
|
||||
invertY_: 0
|
||||
useClip_: 0
|
||||
clipPos: {x: 0, y: 0}
|
||||
clipScale: {x: 0.2, y: 0.2}
|
||||
--- !u!23 &913398334
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 23000011974915108, guid: de6f36e446e5e8a48bf61fe198985bb4,
|
||||
type: 2}
|
||||
m_PrefabInternal: {fileID: 105652574}
|
||||
m_GameObject: {fileID: 913398332}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: c181d333a7bee7a44b94c0f4e02c4bd4, 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: 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!33 &913398335
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 33000012841683532, guid: de6f36e446e5e8a48bf61fe198985bb4,
|
||||
type: 2}
|
||||
m_PrefabInternal: {fileID: 105652574}
|
||||
m_GameObject: {fileID: 913398332}
|
||||
m_Mesh: {fileID: 4300002, guid: d6b30b913257fee4d8246bf7a2620fcd, type: 3}
|
||||
--- !u!4 &913398336
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 4000011474108562, guid: de6f36e446e5e8a48bf61fe198985bb4,
|
||||
type: 2}
|
||||
m_PrefabInternal: {fileID: 105652574}
|
||||
m_GameObject: {fileID: 913398332}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 10}
|
||||
m_LocalScale: {x: 1.92, y: 1.08, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1738296145
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 1738296147}
|
||||
- component: {fileID: 1738296146}
|
||||
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 &1738296146
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1738296145}
|
||||
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_FalloffTable:
|
||||
m_Table[0]: 0
|
||||
m_Table[1]: 0
|
||||
m_Table[2]: 0
|
||||
m_Table[3]: 0
|
||||
m_Table[4]: 0
|
||||
m_Table[5]: 0
|
||||
m_Table[6]: 0
|
||||
m_Table[7]: 0
|
||||
m_Table[8]: 0
|
||||
m_Table[9]: 0
|
||||
m_Table[10]: 0
|
||||
m_Table[11]: 0
|
||||
m_Table[12]: 0
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &1738296147
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1738296145}
|
||||
m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.109381676, w: 0.87542605}
|
||||
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: 0, y: 0, z: 0}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user