Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexOutOfRangeException running on Device Simulator in Unity 2022.3 #112

Open
micsanbr opened this issue Dec 8, 2023 · 0 comments
Open

Comments

@micsanbr
Copy link

micsanbr commented Dec 8, 2023

Running on Unity 2022.3.0 with AR Foundation and URP.
Graphy installed via git url in package manager.

Looks related to issue #107.

File
com.tayx.graphy@38d5399c46\Runtime\Advanced\G_AdvancedData.cs

Error at line 330
IndexOutOfRangeException: Index was outside the bounds of the array.

            m_screenResolutionText.text
                = "Screen: "
                  + res.width
                  + "x"
                  + res.height
                  + "@"
#if UNITY_2022_2_OR_NEWER
                  + ((int)Screen.currentResolution.refreshRateRatio.value).ToStringNonAlloc()
#else
                  + res.refreshRate
#endif
                  + "Hz";

// print((Screen.currentResolution)); // prints 2048 x 1536 @ NaNHz
// print((Screen.currentResolution.refreshRateRatio.value)); // prints NaN

Error at line 108
IndexOutOfRangeException: Index was outside the bounds of the array.

                m_sb.Append( m_windowStrings[ 0 ] ).Append( Screen.width.ToStringNonAlloc() )
                    .Append( m_windowStrings[ 1 ] ).Append( Screen.height.ToStringNonAlloc() )
                    .Append( m_windowStrings[ 2 ] ).Append(
#if UNITY_2022_2_OR_NEWER
                        ((int)Screen.currentResolution.refreshRateRatio.value).ToStringNonAlloc()
#else
                        Screen.currentResolution.refreshRate.ToStringNonAlloc()
#endif
                        )
                    .Append( m_windowStrings[ 3 ] )
                    .Append( m_windowStrings[ 4 ] ).Append( ((int) Screen.dpi).ToStringNonAlloc() )
                    .Append( m_windowStrings[ 5 ] );

Editor + Game view: Graphy runs fine.
Editor + Simulator view: Graphy halts and pauses the editor. After pressing the play button, it resumes and shows placeholder hashtag characters instead of showing the Hz value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant