Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
1465 Разработка игрового приложения для демонстрации возможностей VR оборудования
MainProject
Commits
14bcdca7
Commit
14bcdca7
authored
1 year ago
by
Букина Валерия Сергеевна
Browse files
Options
Download
Patches
Plain Diff
tp
parent
fe39310e
master
develop
1 merge request
!5
Merge from develop into master
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Assets/!visualRoom/scripts/autoPlay.cs
+25
-0
Assets/!visualRoom/scripts/autoPlay.cs
Assets/!visualRoom/scripts/autoPlay.cs.meta
+2
-0
Assets/!visualRoom/scripts/autoPlay.cs.meta
Assets/Scenes/Main.unity
+60
-8
Assets/Scenes/Main.unity
with
87 additions
and
8 deletions
+87
-8
Assets/!visualRoom/scripts/autoPlay.cs
0 → 100644
+
25
−
0
View file @
14bcdca7
using
UnityEngine
;
public
class
autoPlay
:
MonoBehaviour
{
public
Videoplayback
Videoplayback
;
public
GameObject
player
,
screen
;
public
bool
interactable
,
firstTime
=
true
;
public
float
DistanceParameter
=
3f
;
private
void
Start
()
{
}
private
void
Update
()
{
if
(
firstTime
)
{
float
distance
=
Vector3
.
Distance
(
player
.
transform
.
position
,
screen
.
transform
.
position
);
interactable
=
distance
<
DistanceParameter
;
if
(
interactable
)
{
Videoplayback
.
playPause
();
firstTime
=
false
;
}
}
}
}
This diff is collapsed.
Click to expand it.
Assets/!visualRoom/scripts/autoPlay.cs.meta
0 → 100644
+
2
−
0
View file @
14bcdca7
fileFormatVersion: 2
guid: 91f5e1880c5a67d4ebb647254793a19b
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Assets/Scenes/Main.unity
+
60
−
8
View file @
14bcdca7
...
...
@@ -22371,15 +22371,15 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 682615456}
- component: {fileID: 682615458}
- component: {fileID: 682615457}
- component: {fileID: 682615458}
m_Layer: 0
m_Name: autoPlay
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive:
0
m_IsActive:
1
--- !u!4 &682615456
Transform:
m_ObjectHideFlags: 0
...
...
@@ -22414,7 +22414,7 @@ BoxCollider:
m_ProvidesContacts: 0
m_Enabled: 0
serializedVersion: 3
m_Size: {x:
4.980591
, y: 1, z: 1}
m_Size: {x:
3
, y: 1, z: 1}
m_Center: {x: -1.9902954, y: 0, z: 0}
--- !u!114 &682615458
MonoBehaviour:
...
...
@@ -22423,12 +22423,17 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 682615455}
m_Enabled:
0
m_Enabled:
1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9
7245f7a216b3cc4d904bc13fefe3572
, type: 3}
m_Script: {fileID: 11500000, guid: 9
1f5e1880c5a67d4ebb647254793a19b
, type: 3}
m_Name:
m_EditorClassIdentifier:
hintObject: {fileID: 0}
Videoplayback: {fileID: 56591360}
player: {fileID: 2114507851}
screen: {fileID: 56591354}
interactable: 0
firstTime: 1
DistanceParameter: 4.5
--- !u!1001 &685709895
PrefabInstance:
m_ObjectHideFlags: 0
...
...
@@ -29177,6 +29182,52 @@ BoxCollider:
serializedVersion: 3
m_Size: {x: 1.0000002, y: 1, z: 1.0000002}
m_Center: {x: -0.025390625, y: 0, z: -0.00018310547}
--- !u!1 &888088931
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 888088933}
- component: {fileID: 888088932}
m_Layer: 0
m_Name: XR Interaction Manager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &888088932
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 888088931}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 83e4e6cca11330d4088d729ab4fc9d9f, type: 3}
m_Name:
m_EditorClassIdentifier:
m_StartingHoverFilters: []
m_StartingSelectFilters: []
--- !u!4 &888088933
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 888088931}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 225.02354, y: 105.48906, z: 42.833763}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &890258567
GameObject:
m_ObjectHideFlags: 0
...
...
@@ -67219,8 +67270,8 @@ Transform:
m_GameObject: {fileID: 1920827023}
serializedVersion: 2
m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: -0.7071068}
m_LocalPosition: {x: 1.1
52
, y: -2.9900284, z: -2.103}
m_LocalScale: {x: 0.1847923, y: 0.27580944, z: 0.1
8755041
}
m_LocalPosition: {x: 1.1
179
, y: -2.9900284, z: -2.103}
m_LocalScale: {x: 0.1847923, y: 0.27580944, z: 0.1
9437724
}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1349340784}
...
...
@@ -77898,3 +77949,4 @@ SceneRoots:
- {fileID: 1766434243}
- {fileID: 2106648748}
- {fileID: 464151210}
- {fileID: 888088933}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets