Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
man-in-the-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MIM
man-in-the-mirror
Commits
8314db35
Commit
8314db35
authored
May 15, 2019
by
18신대성
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mirrorreflect.cs 좀 변경 및 프리팹 변경
parent
7bf9ab38
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
219 additions
and
191 deletions
+219
-191
mirror.prefab
Assets/Prefabs/MapObjects/mirror.prefab
+20
-19
wall.prefab
Assets/Prefabs/MapObjects/wall.prefab
+1
-1
ModelScene.meta
Assets/Scenes/ModelScene.meta
+1
-1
ModelScene.unity
Assets/Scenes/ModelScene.unity
+171
-166
SampleScene.unity
Assets/Scenes/SampleScene.unity
+7
-1
MirrorReflect.cs
Assets/Scripts/MirrorReflect.cs
+19
-3
No files found.
Assets/Prefabs/MapObjects/mirror.prefab
View file @
8314db35
...
...
@@ -10,8 +10,7 @@ GameObject:
m_Component
:
-
component
:
{
fileID
:
1244481854741161101
}
-
component
:
{
fileID
:
1244481854741161102
}
-
component
:
{
fileID
:
1244481854741161100
}
m_Layer
:
0
m_Layer
:
9
m_Name
:
Reflection Probe
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
...
...
@@ -26,7 +25,7 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1244481854741161103
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
.568
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
1244481854748242454
}
...
...
@@ -65,21 +64,6 @@ ReflectionProbe:
m_UseOcclusionCulling
:
1
m_Importance
:
1
m_CustomBakedTexture
:
{
fileID
:
0
}
---
!u!114
&1244481854741161100
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1244481854741161103
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
e1dd51c2faa2bf14a9c711dadc76f117
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
direction
:
0
mirror
:
{
fileID
:
1244481854748242454
}
mainCam
:
{
fileID
:
0
}
---
!u!1
&1244481854748732982
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -94,7 +78,8 @@ GameObject:
-
component
:
{
fileID
:
2694312363380670797
}
-
component
:
{
fileID
:
7225251243996645269
}
-
component
:
{
fileID
:
17874052963739924
}
m_Layer
:
0
-
component
:
{
fileID
:
1188277518114524885
}
m_Layer
:
9
m_Name
:
mirror
m_TagString
:
wall
m_Icon
:
{
fileID
:
0
}
...
...
@@ -205,3 +190,19 @@ MonoBehaviour:
mapPos
:
{
x
:
0
,
y
:
0
}
len
:
1
type
:
2
---
!u!114
&1188277518114524885
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1244481854748732982
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
e1dd51c2faa2bf14a9c711dadc76f117
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
direction
:
0
mirror
:
{
fileID
:
0
}
probe
:
{
fileID
:
1244481854741161101
}
mainCam
:
{
fileID
:
0
}
Assets/Prefabs/MapObjects/wall.prefab
View file @
8314db35
...
...
@@ -14,7 +14,7 @@ GameObject:
-
component
:
{
fileID
:
5992419591198202452
}
-
component
:
{
fileID
:
1788580750165913660
}
-
component
:
{
fileID
:
2953616027608884528
}
m_Layer
:
0
m_Layer
:
9
m_Name
:
wall
m_TagString
:
wall
m_Icon
:
{
fileID
:
0
}
...
...
Assets/
Data
.meta
→
Assets/
Scenes/ModelScene
.meta
View file @
8314db35
fileFormatVersion: 2
guid:
f6226b2548447a54486acfc694a44e4d
guid:
a32ca40f7f255ea47ac7ee9d558755ce
folderAsset: yes
DefaultImporter:
externalObjects: {}
...
...
Assets/Scenes/ModelScene.unity
View file @
8314db35
This diff is collapsed.
Click to expand it.
Assets/Scenes/SampleScene.unity
View file @
8314db35
...
...
@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity
:
1
m_CustomReflection
:
{
fileID
:
0
}
m_Sun
:
{
fileID
:
170076734
}
m_IndirectSpecularColor
:
{
r
:
0.446578
98
,
g
:
0.4964133
,
b
:
0.5748178
,
a
:
1
}
m_IndirectSpecularColor
:
{
r
:
0.446578
26
,
g
:
0.49641263
,
b
:
0.57481676
,
a
:
1
}
m_UseRadianceAmbientProbe
:
0
---
!u!157
&3
LightmapSettings
:
...
...
@@ -634,6 +634,12 @@ PrefabInstance:
propertyPath
:
surface
value
:
objectReference
:
{
fileID
:
2102809461
}
-
target
:
{
fileID
:
3268100033343711389
,
guid
:
11285456de5f1854d947bea83275646f
,
type
:
3
}
propertyPath
:
player
value
:
objectReference
:
{
fileID
:
4091712138085544178
,
guid
:
2761dd87fd5be3146b193f53ec0c4cdd
,
type
:
3
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
11285456de5f1854d947bea83275646f
,
type
:
3
}
---
!u!1001
&7277015660625800392
...
...
Assets/Scripts/MirrorReflect.cs
View file @
8314db35
...
...
@@ -11,16 +11,21 @@ public class MirrorReflect : MonoBehaviour
private
Direction
direction
=
Direction
.
X
;
public
Transform
mirror
;
public
Transform
probe
;
public
Transform
mainCam
;
private
float
offset
;
private
Vector3
probePos
;
// Update is called once per frame
void
Update
()
private
void
Start
()
{
mirror
=
gameObject
.
transform
;
mainCam
=
Camera
.
main
.
transform
;
// find main camera
}
// Update is called once per frame
void
Update
()
{
if
(
direction
==
Direction
.
X
)
{
offset
=
mirror
.
position
.
x
-
mainCam
.
position
.
x
;
...
...
@@ -38,6 +43,17 @@ public class MirrorReflect : MonoBehaviour
probePos
.
z
=
mirror
.
position
.
z
+
offset
;
}
transform
.
position
=
probePos
;
probe
.
position
=
probePos
;
if
(
GetComponent
<
Renderer
>().
isVisible
)
{
Debug
.
Log
(
"visible"
);
gameObject
.
layer
=
9
;
}
else
{
Debug
.
Log
(
"invisible"
);
gameObject
.
layer
=
0
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment