Skip to content

Commit ca3e1cc

Browse files
committed
Renamed files, converted action indicators to prefabs and replaced them with prefab overrides to reduce scene file size
1 parent 8500e3e commit ca3e1cc

8 files changed

+1235
-1316
lines changed

Assets/Samples/RebindingUI/ActionIndicator.cs renamed to Assets/Samples/RebindingUI/RebindUIActionIndicator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/// </summary>
99
/// <remarks>Error handling have been excluded for simplicity.</remarks>
1010
[RequireComponent(typeof(Image))]
11-
public class ActionUIIndicator : MonoBehaviour
11+
public class RebindUIActionIndicator : MonoBehaviour
1212
{
1313
[Tooltip("Reference to the associated action to be visualized.")]
1414
public InputActionReference action;
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!1 &1255350527062619510
4+
GameObject:
5+
m_ObjectHideFlags: 0
6+
m_CorrespondingSourceObject: {fileID: 0}
7+
m_PrefabInstance: {fileID: 0}
8+
m_PrefabAsset: {fileID: 0}
9+
serializedVersion: 6
10+
m_Component:
11+
- component: {fileID: 1777307397533242038}
12+
- component: {fileID: 1780074258963799934}
13+
- component: {fileID: 4442569273011091735}
14+
- component: {fileID: 8586258032687207620}
15+
m_Layer: 5
16+
m_Name: RebindUIActionIndicator
17+
m_TagString: Untagged
18+
m_Icon: {fileID: 0}
19+
m_NavMeshLayer: 0
20+
m_StaticEditorFlags: 0
21+
m_IsActive: 1
22+
--- !u!224 &1777307397533242038
23+
RectTransform:
24+
m_ObjectHideFlags: 0
25+
m_CorrespondingSourceObject: {fileID: 0}
26+
m_PrefabInstance: {fileID: 0}
27+
m_PrefabAsset: {fileID: 0}
28+
m_GameObject: {fileID: 1255350527062619510}
29+
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
30+
m_LocalPosition: {x: 0, y: 0, z: 0}
31+
m_LocalScale: {x: 1, y: 1, z: 1}
32+
m_ConstrainProportionsScale: 0
33+
m_Children:
34+
- {fileID: 943689430639722906}
35+
m_Father: {fileID: 0}
36+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
37+
m_AnchorMin: {x: 0.5, y: 0}
38+
m_AnchorMax: {x: 0.5, y: 0}
39+
m_AnchoredPosition: {x: 0, y: 0}
40+
m_SizeDelta: {x: 30, y: 30}
41+
m_Pivot: {x: 0.5, y: 0.5}
42+
--- !u!222 &1780074258963799934
43+
CanvasRenderer:
44+
m_ObjectHideFlags: 0
45+
m_CorrespondingSourceObject: {fileID: 0}
46+
m_PrefabInstance: {fileID: 0}
47+
m_PrefabAsset: {fileID: 0}
48+
m_GameObject: {fileID: 1255350527062619510}
49+
m_CullTransparentMesh: 1
50+
--- !u!114 &4442569273011091735
51+
MonoBehaviour:
52+
m_ObjectHideFlags: 0
53+
m_CorrespondingSourceObject: {fileID: 0}
54+
m_PrefabInstance: {fileID: 0}
55+
m_PrefabAsset: {fileID: 0}
56+
m_GameObject: {fileID: 1255350527062619510}
57+
m_Enabled: 1
58+
m_EditorHideFlags: 0
59+
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
60+
m_Name:
61+
m_EditorClassIdentifier:
62+
m_Material: {fileID: 0}
63+
m_Color: {r: 0, g: 1, b: 0.19607843, a: 1}
64+
m_RaycastTarget: 1
65+
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
66+
m_Maskable: 1
67+
m_OnCullStateChanged:
68+
m_PersistentCalls:
69+
m_Calls: []
70+
m_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0}
71+
m_Type: 0
72+
m_PreserveAspect: 0
73+
m_FillCenter: 1
74+
m_FillMethod: 4
75+
m_FillAmount: 1
76+
m_FillClockwise: 1
77+
m_FillOrigin: 0
78+
m_UseSpriteMesh: 0
79+
m_PixelsPerUnitMultiplier: 1
80+
--- !u!114 &8586258032687207620
81+
MonoBehaviour:
82+
m_ObjectHideFlags: 0
83+
m_CorrespondingSourceObject: {fileID: 0}
84+
m_PrefabInstance: {fileID: 0}
85+
m_PrefabAsset: {fileID: 0}
86+
m_GameObject: {fileID: 1255350527062619510}
87+
m_Enabled: 1
88+
m_EditorHideFlags: 0
89+
m_Script: {fileID: 11500000, guid: b5c8f13dfafeb5445b872565802d1e44, type: 3}
90+
m_Name:
91+
m_EditorClassIdentifier:
92+
action: {fileID: 0}
93+
activeColor: {r: 0, g: 1, b: 0, a: 1}
94+
inactiveColor: {r: 0, g: 0, b: 0, a: 1}
95+
duration: 1
96+
--- !u!1 &5827664391383982697
97+
GameObject:
98+
m_ObjectHideFlags: 0
99+
m_CorrespondingSourceObject: {fileID: 0}
100+
m_PrefabInstance: {fileID: 0}
101+
m_PrefabAsset: {fileID: 0}
102+
serializedVersion: 6
103+
m_Component:
104+
- component: {fileID: 943689430639722906}
105+
- component: {fileID: 6561043267186049780}
106+
- component: {fileID: 4072204658071074964}
107+
m_Layer: 5
108+
m_Name: Label
109+
m_TagString: Untagged
110+
m_Icon: {fileID: 0}
111+
m_NavMeshLayer: 0
112+
m_StaticEditorFlags: 0
113+
m_IsActive: 1
114+
--- !u!224 &943689430639722906
115+
RectTransform:
116+
m_ObjectHideFlags: 0
117+
m_CorrespondingSourceObject: {fileID: 0}
118+
m_PrefabInstance: {fileID: 0}
119+
m_PrefabAsset: {fileID: 0}
120+
m_GameObject: {fileID: 5827664391383982697}
121+
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
122+
m_LocalPosition: {x: 0, y: 0, z: 0}
123+
m_LocalScale: {x: 1, y: 1, z: 1}
124+
m_ConstrainProportionsScale: 0
125+
m_Children: []
126+
m_Father: {fileID: 1777307397533242038}
127+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
128+
m_AnchorMin: {x: 0.5, y: 0}
129+
m_AnchorMax: {x: 0.5, y: 0}
130+
m_AnchoredPosition: {x: 0, y: 45.000015}
131+
m_SizeDelta: {x: 103.7, y: 30}
132+
m_Pivot: {x: 0.5, y: 0.5}
133+
--- !u!222 &6561043267186049780
134+
CanvasRenderer:
135+
m_ObjectHideFlags: 0
136+
m_CorrespondingSourceObject: {fileID: 0}
137+
m_PrefabInstance: {fileID: 0}
138+
m_PrefabAsset: {fileID: 0}
139+
m_GameObject: {fileID: 5827664391383982697}
140+
m_CullTransparentMesh: 0
141+
--- !u!114 &4072204658071074964
142+
MonoBehaviour:
143+
m_ObjectHideFlags: 0
144+
m_CorrespondingSourceObject: {fileID: 0}
145+
m_PrefabInstance: {fileID: 0}
146+
m_PrefabAsset: {fileID: 0}
147+
m_GameObject: {fileID: 5827664391383982697}
148+
m_Enabled: 1
149+
m_EditorHideFlags: 0
150+
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
151+
m_Name:
152+
m_EditorClassIdentifier:
153+
m_Material: {fileID: 0}
154+
m_Color: {r: 1, g: 1, b: 1, a: 1}
155+
m_RaycastTarget: 1
156+
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
157+
m_Maskable: 1
158+
m_OnCullStateChanged:
159+
m_PersistentCalls:
160+
m_Calls: []
161+
m_FontData:
162+
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
163+
m_FontSize: 16
164+
m_FontStyle: 0
165+
m_BestFit: 0
166+
m_MinSize: 1
167+
m_MaxSize: 40
168+
m_Alignment: 4
169+
m_AlignByGeometry: 0
170+
m_RichText: 1
171+
m_HorizontalOverflow: 0
172+
m_VerticalOverflow: 0
173+
m_LineSpacing: 1
174+
m_Text: Indicator

Assets/Samples/RebindingUI/RebindUIActionIndicator.prefab.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Samples/RebindingUI/GameManager.cs renamed to Assets/Samples/RebindingUI/RebindUIGameManager.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
/// <summary>
66
/// Simple game manager that manages enabling/disabling in-game and UI actions.
77
/// </summary>
8-
public class GameManager : MonoBehaviour
8+
public class RebindUIGameManager : MonoBehaviour
99
{
10-
// TODO Its still an issue if we assign UI cancel button in rebinding,
11-
// same goes for keyboard ESC
12-
1310
public GameObject menu;
1411
public InputActionAsset gameplayActions;
1512
public InputActionReference menuAction;

Assets/Samples/RebindingUI/RebindingMaterial.mat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Material:
7979
- _UVSec: 0
8080
- _ZWrite: 1
8181
m_Colors:
82-
- _Color: {r: 0.9995672, g: 0.9212032, b: 0.016187144, a: 1}
82+
- _Color: {r: 0.20000027, g: 0.20000029, b: 0.99999887, a: 1}
8383
- _EmissionColor: {r: 0.27450982, g: 0.078431375, b: 0.19607843, a: 1}
8484
m_BuildTextureStacks: []
8585
m_AllowLocking: 1

0 commit comments

Comments
 (0)