How to modify the texture of a SUIImage by script using Java
In your Java class, do the following:
public class YourClass extends Component {
// creates a new texture
public Texture texture; // select in properties
// creates a new SUIImage, @AutoWired selects the component from this object
@AutoWiredcreates a new SUIImage, @AutoWired selects the component from this object
@AutoWired
private SUIImage image;
@Override
public void start() {
}
@Override
public void repeat() {
// change texture of SUIImage
image.setTexture(texture);
}
}