[SerializeReference] is inaccessible due to its protection level
As the title says, I get this error when I try to add this attribute to my List.
My class :
[System.Serializable]
public class C_SplineV2 : ScriptableObject
{
public List<Point> points;
}
I want to add [SerializeReference] to my list but can't because of the error.
The Point class :
[System.Serializable]
public class Point
{
public int id;
public Vector3 anchor;
public Vector3 cp1;
public Vector3 cp2;
public List<Point> prevPoints = new List<Point>(); // semgent 1
public List<Point> nextPoints = new List<Point>(); // segment 2
}
I have no idea how to solve this, and can't find any forum post about it. Any help will be greatly appreciated, thanks !
I am having the same issue I found this:
"Note: before version 2019.3.0a2, SerializeReference was inaccessible due to its protection level"
So it looks like you may need to upgrade unity to fix this. I am doing that now, I will let you know if it helps.
Yes, upgrading to 2019.3.14 fixed the issue I was having.
Your answer

Follow this Question
Related Questions
How to call Animator from another script 0 Answers
Text Editors 0 Answers
Character swap breaks movement. 1 Answer
help! i am a newbie here and i got a problem in scripting 0 Answers