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

BasicCursor.cs sometimes creates null reference exception #246

Closed
jomalli opened this issue Sep 29, 2016 · 3 comments
Closed

BasicCursor.cs sometimes creates null reference exception #246

jomalli opened this issue Sep 29, 2016 · 3 comments

Comments

@jomalli
Copy link

jomalli commented Sep 29, 2016

BasicCursor sometimes cannot find GazeManager.Instance because it is doing it from Awake().

The reason for this appears to be script execution order.

Solution: place all the Awake() code into the Start() function instead.

@StephenHodgson
Copy link
Contributor

Not sure how many people use the Basic cursor but it might not be good that we change the Awake to Start because it might break the inherited classes.

@jomalli
Copy link
Author

jomalli commented Sep 29, 2016

@HodgsonSDAS good point. Another solution would be to include script execution order in project settings, and place GazeManager before BasicCursor. Any other suggestions?

@StephenHodgson
Copy link
Contributor

StephenHodgson commented Sep 30, 2016

We just moved the trouble code into Start. Left everything else in place.

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

2 participants