Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
curvedflats
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
6
Issues
6
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
Flatland
curvedflats
Commits
75bf378f
Commit
75bf378f
authored
Jul 23, 2019
by
17김현학
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change some option (Issue
#24
)
Use panel for pathUI.
parent
4c5084b2
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
799 additions
and
601 deletions
+799
-601
PathUI.prefab
Assets/Prefabs/PathUI.prefab
+0
-81
SampleScene.unity
Assets/Scenes/SampleScene.unity
+761
-506
UIManager.cs
Assets/Scripts/UIManager.cs
+9
-14
VelocitySlider.cs
Assets/VelocitySlider.cs
+18
-0
VelocitySlider.cs.meta
Assets/VelocitySlider.cs.meta
+11
-0
No files found.
Assets/Prefabs/PathUI.prefab
deleted
100644 → 0
View file @
4c5084b2
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!1
&6021508400235234101
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
5014434788102240908
}
-
component
:
{
fileID
:
5427705129206684837
}
-
component
:
{
fileID
:
5981043734760163717
}
m_Layer
:
0
m_Name
:
PathUI
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!224
&5014434788102240908
RectTransform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
6021508400235234101
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
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
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
80.15
,
y
:
13.48
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!222
&5427705129206684837
CanvasRenderer
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
6021508400235234101
}
m_CullTransparentMesh
:
0
---
!u!114
&5981043734760163717
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
6021508400235234101
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
708705254
,
guid
:
f70555f144d8491a825f0804e09c671c
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_Material
:
{
fileID
:
0
}
m_Color
:
{
r
:
0.19607843
,
g
:
0.19607843
,
b
:
0.19607843
,
a
:
1
}
m_RaycastTarget
:
1
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_TypeName
:
UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData
:
m_Font
:
{
fileID
:
10102
,
guid
:
0000000000000000e000000000000000
,
type
:
0
}
m_FontSize
:
6
m_FontStyle
:
0
m_BestFit
:
0
m_MinSize
:
1
m_MaxSize
:
40
m_Alignment
:
0
m_AlignByGeometry
:
0
m_RichText
:
0
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
Assets/Scenes/SampleScene.unity
View file @
75bf378f
This diff is collapsed.
Click to expand it.
Assets/Scripts/UIManager.cs
View file @
75bf378f
...
...
@@ -11,14 +11,12 @@ public class UIManager : MonoBehaviour
Square
square
;
public
GameObject
canvas
;
public
GameObject
pathUIPrefab
;
private
GameObject
_pathUI
;
public
GameObject
_pathUI
;
private
int
prevSelectPathNum
=
-
1
;
// Start is called before the first frame update
void
Start
()
{
_InstantiatePathUI
();
_pathUI
.
SetActive
(
false
);
}
...
...
@@ -40,7 +38,7 @@ public class UIManager : MonoBehaviour
if
(
pathNum
!=
prevSelectPathNum
)
{
_pathUI
.
GetComponent
<
Text
>().
text
=
obj
.
name
;
_pathUI
.
transform
.
Find
(
"Name"
).
GetComponent
<
Text
>().
text
=
obj
.
name
;
_pathUI
.
SetActive
(
true
);
prevSelectPathNum
=
pathNum
;
}
...
...
@@ -57,13 +55,10 @@ public class UIManager : MonoBehaviour
}
}
}
}
private
void
_InstantiatePathUI
()
else
if
(
Input
.
GetMouseButtonDown
(
1
))
{
_pathUI
=
Instantiate
(
pathUIPrefab
);
_pathUI
.
transform
.
SetParent
(
canvas
.
transform
);
_pathUI
.
name
=
"PathUI"
;
_pathUI
.
tag
=
"pathui"
;
_pathUI
.
SetActive
(
false
);
prevSelectPathNum
=
-
1
;
}
}
}
Assets/VelocitySlider.cs
0 → 100644
View file @
75bf378f
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
VelocitySlider
:
MonoBehaviour
{
// Start is called before the first frame update
void
Start
()
{
}
// Update is called once per frame
void
Update
()
{
}
}
Assets/
Prefabs/PathUI.prefab
.meta
→
Assets/
VelocitySlider.cs
.meta
View file @
75bf378f
fileFormatVersion: 2
guid:
db6831d28b87b2745b9eff23a7e565c8
Prefab
Importer:
guid:
e114018b688cebb48bea3ec355707687
Mono
Importer:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
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