Skip to content

Commit db564ad

Browse files
committed
Fix null shader array when changing graphy mode from shortcut
1 parent 6b0fad8 commit db564ad

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Assets/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Audio/G_AudioGraph.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ protected override void UpdateGraph()
195195
protected override void CreatePoints()
196196
{
197197
// Init Arrays
198-
if (m_graphArray == null || m_graphArray.Length != m_resolution)
198+
if (m_shaderGraph.Array == null || m_shaderGraph.Array.Length != m_resolution)
199199
{
200200
m_graphArray = new float[m_resolution];
201201
m_graphArrayHighestValue = new float[m_resolution];

Assets/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Fps/G_FpsGraph.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ protected override void UpdateGraph()
124124

125125
m_highestFps = m_highestFps < 1 || m_highestFps <= currentMaxFps ? currentMaxFps : m_highestFps - 1;
126126

127+
if (m_shaderGraph.Array == null)
128+
{
129+
m_fpsArray = new int[m_resolution];
130+
m_shaderGraph.Array = new float[m_resolution];
131+
}
132+
127133
for (int i = 0; i <= m_resolution - 1; i++)
128134
{
129135
m_shaderGraph.Array[i] = m_fpsArray[i] / (float) m_highestFps;
@@ -143,7 +149,7 @@ protected override void UpdateGraph()
143149

144150
protected override void CreatePoints()
145151
{
146-
if (m_fpsArray == null || m_fpsArray.Length != m_resolution)
152+
if (m_shaderGraph.Array == null || m_fpsArray.Length != m_resolution)
147153
{
148154
m_fpsArray = new int[m_resolution];
149155
m_shaderGraph.Array = new float[m_resolution];

Assets/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Ram/G_RamGraph.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ protected override void UpdateGraph()
164164

165165
protected override void CreatePoints()
166166
{
167-
if (m_allocatedArray == null || m_allocatedArray.Length != m_resolution)
167+
if (m_shaderGraphAllocated.Array == null || m_shaderGraphAllocated.Array.Length != m_resolution)
168168
{
169169
m_allocatedArray = new float[m_resolution];
170170
m_reservedArray = new float[m_resolution];

0 commit comments

Comments
 (0)