Commit 75bf378f authored by 17김현학's avatar 17김현학

Change some option (Issue #24)

Use panel for pathUI.
parent 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:
This diff is collapsed.
......@@ -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;
}
}
}
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()
{
}
}
fileFormatVersion: 2
guid: db6831d28b87b2745b9eff23a7e565c8
PrefabImporter:
guid: e114018b688cebb48bea3ec355707687
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment