public SvgComponent(UGUIContext context, string tag = "svg") : base(context, tag) { #if REACT_VECTOR_GRAPHICS Image = ImageContainer.AddComponent <Unity.VectorGraphics.SVGImage>(); Measurer.Sprite = Image.sprite; #else Debug.LogWarning("Unity.VectorGraphics module is required to use SVG components"); #endif }
public RawImageComponent(UGUIContext context, string tag = "rawimage") : base(context, tag) { Image = ImageContainer.AddComponent <RawImage>(); Measurer.Texture = Image.texture; }
public ImageComponent(UGUIContext context, string tag = "image") : base(context, tag) { Image = ImageContainer.AddComponent <Image>(); Measurer.Sprite = Image.sprite; }