2
\$\begingroup\$

I'm setting up a system for people to load up extra levels. Since I don't know how many levels are going to be loaded I have a UI prefab that gets added to the main Level Load UI. However, the Text components of the prefab are not being bound by the scrollrect mask. The panel, images and button all are, and they are all children of the panel getting added to the panel that is the scrollrect's content.

Text not being masked correctly.

Another related problem, each of the prefabs also has a button on it. I've given it some alpha because I find that once it's in the scrollrect only the top half is clickable. You can see below that it only highlights (as red) if your on the top half of the button. The exception is that the final button will work if your mouse is anywhere on the button. This isn't an issue for the buttons if they're just placed in the scene. It only happens inside the scrollrect.

Buttons being too picky...

I have a smaller version of the project right here for download. The 'main' gameobject starts a script that instantiates the main 'Load Level Screen' prefab and populates it with the 'LoadLevel - Single' prefabs.

I've been banging my head against the wall for over a week now, so any help would be appreciated!

\$\endgroup\$
  • 1
    \$\begingroup\$ Provide your content here in question. nobody will download and install your project. Take screenshots, post scripts you use, etc. \$\endgroup\$ – S. Tarık Çetin Nov 29 '15 at 20:56
  • \$\begingroup\$ Thank you for the useful advice, Samed! While I was cleaning up a screenshot I took I saw a warning that I hadn't noticed before. After removing the material from my text my scrolling issues have vanished. The buttons are still acting silly, but I think it would be better for me to try another question since it isn't related to the title of this question. \$\endgroup\$ – Califer Nov 30 '15 at 5:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.