not seen this error before, what is the M_Constant on the scroll rect option?

UnassignedReferenceException: The variable m_Content of ScrollRect has not been assigned.

this is the error i get, game runs… but i cant seem to work out what the M_Constant is on my scrollRect so i can fix that.

Yeah I have the same error, did you end up getting it solved?

Hey what did you guys do to fix this?

I had the same error.
I had added a ScrollView and removed the original Content-gameobject and added my own, which caused the m_Content variable of ScrollRect to not be set.
Solved by setting the Content variable in the inspector to my new contect-gameobject.

4 Likes

Remove Scrollbar(script).

1 Like

Getting the error “The variable m_Content of ScrollRect has not been assigned” on your ScrollBar is confusing.

To fix it, go up one level in your Hierarchy to your ScrollList game object that has the ScrollRect component, and set that component’s Content field to your ViewPort object (should be the other thing under your ScrollList besides the ScrollBar).

If I lost you with all those scroll objects, go watch check out “Scroll Menu Pt 2” by c00pala on YouTube.

3 Likes

You need to set the ‘Content’ in your scroll rect. It wasn’t assigned yet.