Skip to content

Commit 48dfedf

Browse files
committed
add Hotkey [N] to show/hide group names of each car
1 parent b47f900 commit 48dfedf

13 files changed

Lines changed: 34 additions & 70 deletions

File tree

Assets/Prefabs/Cars/Car-1.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ GameObject:
1515
- component: {fileID: 73075287911449227}
1616
m_Layer: 5
1717
m_Name: CarGroupName
18-
m_TagString: Untagged
18+
m_TagString: CarNameTags
1919
m_Icon: {fileID: 0}
2020
m_NavMeshLayer: 0
2121
m_StaticEditorFlags: 0

Assets/Prefabs/Cars/Car-2.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ GameObject:
1515
- component: {fileID: 5820989346702349183}
1616
m_Layer: 5
1717
m_Name: CarGroupName
18-
m_TagString: Untagged
18+
m_TagString: CarNameTags
1919
m_Icon: {fileID: 0}
2020
m_NavMeshLayer: 0
2121
m_StaticEditorFlags: 0

Assets/Prefabs/Cars/Car-3.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ GameObject:
1515
- component: {fileID: 1998079534703763149}
1616
m_Layer: 5
1717
m_Name: CarGroupName
18-
m_TagString: Untagged
18+
m_TagString: CarNameTags
1919
m_Icon: {fileID: 0}
2020
m_NavMeshLayer: 0
2121
m_StaticEditorFlags: 0

Assets/Prefabs/Cars/Car-4.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ GameObject:
1515
- component: {fileID: 7366179781037376043}
1616
m_Layer: 5
1717
m_Name: CarGroupName
18-
m_TagString: Untagged
18+
m_TagString: CarNameTags
1919
m_Icon: {fileID: 0}
2020
m_NavMeshLayer: 0
2121
m_StaticEditorFlags: 0

Assets/Prefabs/Cars/Car-5.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ GameObject:
149149
- component: {fileID: 8342125733085015546}
150150
m_Layer: 5
151151
m_Name: CarGroupName
152-
m_TagString: Untagged
152+
m_TagString: CarNameTags
153153
m_Icon: {fileID: 0}
154154
m_NavMeshLayer: 0
155155
m_StaticEditorFlags: 0

Assets/Prefabs/Cars/Car-6.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ GameObject:
149149
- component: {fileID: 5812352073625202275}
150150
m_Layer: 5
151151
m_Name: CarGroupName
152-
m_TagString: Untagged
152+
m_TagString: CarNameTags
153153
m_Icon: {fileID: 0}
154154
m_NavMeshLayer: 0
155155
m_StaticEditorFlags: 0

Assets/Prefabs/Cars/Car-7.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ GameObject:
149149
- component: {fileID: 1161603946341030030}
150150
m_Layer: 5
151151
m_Name: CarGroupName
152-
m_TagString: Untagged
152+
m_TagString: CarNameTags
153153
m_Icon: {fileID: 0}
154154
m_NavMeshLayer: 0
155155
m_StaticEditorFlags: 0

Assets/Prefabs/Cars/Car-8.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ GameObject:
1515
- component: {fileID: 5646417242405145729}
1616
m_Layer: 5
1717
m_Name: CarGroupName
18-
m_TagString: Untagged
18+
m_TagString: CarNameTags
1919
m_Icon: {fileID: 0}
2020
m_NavMeshLayer: 0
2121
m_StaticEditorFlags: 0

Assets/Scenes/Track_1.unity

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -5613,63 +5613,6 @@ CanvasRenderer:
56135613
m_PrefabAsset: {fileID: 0}
56145614
m_GameObject: {fileID: 1222611525}
56155615
m_CullTransparentMesh: 1
5616-
--- !u!1001 &1246009415
5617-
PrefabInstance:
5618-
m_ObjectHideFlags: 0
5619-
serializedVersion: 2
5620-
m_Modification:
5621-
serializedVersion: 3
5622-
m_TransformParent: {fileID: 0}
5623-
m_Modifications:
5624-
- target: {fileID: 13841283902607572, guid: 7a55140c08ee62242aa12fdecf4174a9, type: 3}
5625-
propertyPath: m_LocalPosition.x
5626-
value: 0
5627-
objectReference: {fileID: 0}
5628-
- target: {fileID: 13841283902607572, guid: 7a55140c08ee62242aa12fdecf4174a9, type: 3}
5629-
propertyPath: m_LocalPosition.y
5630-
value: 1
5631-
objectReference: {fileID: 0}
5632-
- target: {fileID: 13841283902607572, guid: 7a55140c08ee62242aa12fdecf4174a9, type: 3}
5633-
propertyPath: m_LocalPosition.z
5634-
value: -7.53
5635-
objectReference: {fileID: 0}
5636-
- target: {fileID: 13841283902607572, guid: 7a55140c08ee62242aa12fdecf4174a9, type: 3}
5637-
propertyPath: m_LocalRotation.w
5638-
value: 0.7071068
5639-
objectReference: {fileID: 0}
5640-
- target: {fileID: 13841283902607572, guid: 7a55140c08ee62242aa12fdecf4174a9, type: 3}
5641-
propertyPath: m_LocalRotation.x
5642-
value: 0
5643-
objectReference: {fileID: 0}
5644-
- target: {fileID: 13841283902607572, guid: 7a55140c08ee62242aa12fdecf4174a9, type: 3}
5645-
propertyPath: m_LocalRotation.y
5646-
value: -0.7071068
5647-
objectReference: {fileID: 0}
5648-
- target: {fileID: 13841283902607572, guid: 7a55140c08ee62242aa12fdecf4174a9, type: 3}
5649-
propertyPath: m_LocalRotation.z
5650-
value: 0
5651-
objectReference: {fileID: 0}
5652-
- target: {fileID: 13841283902607572, guid: 7a55140c08ee62242aa12fdecf4174a9, type: 3}
5653-
propertyPath: m_LocalEulerAnglesHint.x
5654-
value: 0
5655-
objectReference: {fileID: 0}
5656-
- target: {fileID: 13841283902607572, guid: 7a55140c08ee62242aa12fdecf4174a9, type: 3}
5657-
propertyPath: m_LocalEulerAnglesHint.y
5658-
value: -90
5659-
objectReference: {fileID: 0}
5660-
- target: {fileID: 13841283902607572, guid: 7a55140c08ee62242aa12fdecf4174a9, type: 3}
5661-
propertyPath: m_LocalEulerAnglesHint.z
5662-
value: 0
5663-
objectReference: {fileID: 0}
5664-
- target: {fileID: 827250831520713326, guid: 7a55140c08ee62242aa12fdecf4174a9, type: 3}
5665-
propertyPath: m_Name
5666-
value: Car-1
5667-
objectReference: {fileID: 0}
5668-
m_RemovedComponents: []
5669-
m_RemovedGameObjects: []
5670-
m_AddedGameObjects: []
5671-
m_AddedComponents: []
5672-
m_SourcePrefab: {fileID: 100100000, guid: 7a55140c08ee62242aa12fdecf4174a9, type: 3}
56735616
--- !u!1 &1340385712
56745617
GameObject:
56755618
m_ObjectHideFlags: 0
@@ -14785,4 +14728,3 @@ SceneRoots:
1478514728
- {fileID: 642441546}
1478614729
- {fileID: 8096024002980510821}
1478714730
- {fileID: 501158559}
14788-
- {fileID: 1246009415}

Assets/Scripts/Game Manager/hotKeys.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public class hotKeys : MonoBehaviour
1010
private GameObject[] pauseUIs;
1111
private GameObject[] scoreDashbaords;
1212
private GameObject[] scoreRanking;
13+
private GameObject[] carNameTags;
1314

1415
// Start is called before the first frame update
1516
void Start()
@@ -23,6 +24,14 @@ void Start()
2324
setActive(scoreRanking, false);
2425
}
2526

27+
void FixedUpdate()
28+
{
29+
if (carNameTags == null || carNameTags.Length == 0)
30+
{
31+
carNameTags = GameObject.FindGameObjectsWithTag("CarNameTags");
32+
}
33+
}
34+
2635
// Update is called once per frame
2736
void Update()
2837
{
@@ -69,6 +78,12 @@ void Update()
6978
setActive(scoreRanking);
7079
}
7180

81+
// "N" to Show Each Car Name
82+
if (Input.GetKeyDown(KeyCode.N))
83+
{
84+
toggleActive(carNameTags);
85+
}
86+
7287
}
7388

7489
public bool isPaused()

0 commit comments

Comments
 (0)