Setting the source image/texture in for the UnityEngine.UI.Image class?
I'm prototyping with UI elements that are constructed and instantiated at runtime via only C#. I have a canvas, button, and text object being made with the appropriate source code they use as if made from the editor. I thought the constructor in this class would assign the same default values I see in the editor, but it doesn't. The editor's doing black magic I don't see in the background that I want to replicate in my own code. Is this possible or are the all elements in that class locked down to a read only state?
Your answer
Follow this Question
Related Questions
Wobbly images on Canvas 0 Answers
[Help]Randomly Selecting a Background Image from an Array of Backgrounds 1 Answer
How to move a UI Image in the z axis? 2D 0 Answers
How to create a zoomable canvas image in Unity for mobile without scaling the main camera? 0 Answers
Image Component is always null even when I assign it myself in the editor 1 Answer