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

进入 hotfix 的 Component 后没有 exception 日志 #9

Open
jokerjkeeper opened this issue May 9, 2023 · 0 comments
Open

进入 hotfix 的 Component 后没有 exception 日志 #9

jokerjkeeper opened this issue May 9, 2023 · 0 comments

Comments

@jokerjkeeper
Copy link

发现在 hotfix 的 component 里面处理数据应该出现 exception, 但unity没有任何提示,流程就断在 exception 出现的地方,

string aa = "123";
            if (!string.IsNullOrEmpty(aa))
            {
                string[] arr_str2 = aa.Split(',');
                int bb = Convert.ToInt32(arr_str2[0]);
                int cc = Convert.ToInt32(arr_str2[1]);
                int dd = Convert.ToInt32(arr_str2[2]);
            }

上面这段写在 model 的 Init.cs 或是 hotfix 的 Init.cs 都会有 outOfRangeException 提示,但如果写在继承 Component 的函数上就没提示

System.IndexOutOfRangeException: Index was outside the bounds of the array.

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