-
Notifications
You must be signed in to change notification settings - Fork 320
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
NullReferenceException #123
Comments
Having the same error on Unity 2022.1.21f1 Mac Silicon. |
Having the same error on Unity 2022.2.1f1 Ubuntu 22.04 |
I had the same issue with unity 2022.2.7f1 on Windows. The issue seems to be at line 47 of /// Is the points array null?
public bool HasPoints
{
get
{
return points != null;
}
} and then i added the check at line 47 of - if (_bezierPath == null) {
+ if (_bezierPath == null || !_bezierPath.HasPoints) {
CreateBezier (Vector3.zero, defaultIs2D);
} I'm not very familiar with the codebase so i'm not sure if it will have impacts somewhere else in the code. |
If BezierPath having zero points is a valid scenario then I would change the method name from HasPoints to IsValid or IsPointsNull. edit: it looks like a problem with newer unity versions. when the editor is instantiating a new PathCreatorData it is probably setting the invalid BelzierPath instance through the |
When I create an empty object and add the path creator script, I get the following error messages.
The text was updated successfully, but these errors were encountered: