File tree 3 files changed +9
-3
lines changed
Assets/Tayx/Graphy - Ultimate Stats Monitor/Scripts
3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ protected override void UpdateGraph()
195
195
protected override void CreatePoints ( )
196
196
{
197
197
// Init Arrays
198
- if ( m_graphArray == null || m_graphArray . Length != m_resolution )
198
+ if ( m_shaderGraph . Array == null || m_shaderGraph . Array . Length != m_resolution )
199
199
{
200
200
m_graphArray = new float [ m_resolution ] ;
201
201
m_graphArrayHighestValue = new float [ m_resolution ] ;
Original file line number Diff line number Diff line change @@ -124,6 +124,12 @@ protected override void UpdateGraph()
124
124
125
125
m_highestFps = m_highestFps < 1 || m_highestFps <= currentMaxFps ? currentMaxFps : m_highestFps - 1 ;
126
126
127
+ if ( m_shaderGraph . Array == null )
128
+ {
129
+ m_fpsArray = new int [ m_resolution ] ;
130
+ m_shaderGraph . Array = new float [ m_resolution ] ;
131
+ }
132
+
127
133
for ( int i = 0 ; i <= m_resolution - 1 ; i ++ )
128
134
{
129
135
m_shaderGraph . Array [ i ] = m_fpsArray [ i ] / ( float ) m_highestFps ;
@@ -143,7 +149,7 @@ protected override void UpdateGraph()
143
149
144
150
protected override void CreatePoints ( )
145
151
{
146
- if ( m_fpsArray == null || m_fpsArray . Length != m_resolution )
152
+ if ( m_shaderGraph . Array == null || m_fpsArray . Length != m_resolution )
147
153
{
148
154
m_fpsArray = new int [ m_resolution ] ;
149
155
m_shaderGraph . Array = new float [ m_resolution ] ;
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ protected override void UpdateGraph()
164
164
165
165
protected override void CreatePoints ( )
166
166
{
167
- if ( m_allocatedArray == null || m_allocatedArray . Length != m_resolution )
167
+ if ( m_shaderGraphAllocated . Array == null || m_shaderGraphAllocated . Array . Length != m_resolution )
168
168
{
169
169
m_allocatedArray = new float [ m_resolution ] ;
170
170
m_reservedArray = new float [ m_resolution ] ;
You can’t perform that action at this time.
0 commit comments