- Home /
Question by
true_chungus · Feb 13, 2020 at 04:00 AM ·
uitextimageui image
Instantiated UI objects with image components not appearing, rest of object works fine.
I have a UI object with two key components, an image and some text. When I instantiate this object, the text shows but not the image. It's instantiated as a child of a ScrollView content object, so it's definitely in the canvas. When it instantiates the Image component is definitely enabled, it just doesn't seem to actually show up. Has anyone else run into this image and fixed it, or come up with a workaround?
Comment
Hello.
Can we have a look at your code?
Here is how I do it and it works fine
Image img= (Image)Instantiate(imgPrefab, scrollContent.transform, false);
Text txt= (Text)Instantiate(txtPrefab, scrollContent.transform, false);