/// <summary> /// 序列化LitRawImage /// </summary> public static SerializeEntity Ser_RawImage(this LitRawImage img) { var se = img.Ser_MaskableGraphic(); se.Type = "RImg"; se.Add("path", SerializeUitls.GetResPath(img.texture)) .Add("UV", SerializeUitls.S_Rect(img.uvRect)); return(se); }
public static SerializeEntity Ser_MaskableGraphic(this MaskableGraphic mg) { SerializeEntity se = new SerializeEntity(); se.Add("m", SerializeUitls.GetResPath(mg.material)) .Add("col", SerializeUitls.S_Color(mg.color)) .Add("RT", mg.raycastTarget); return(se); }
/// <summary> /// 序列化LitImage /// </summary> public static SerializeEntity Ser_Image(this LitImage img) { var se = img.Ser_MaskableGraphic(); se.Type = "Img"; se.Add("path", SerializeUitls.GetResPath(img.sprite)) .Add("PA", img.preserveAspect); return(se); }
public void TestImagePath() { LitLogger.Log(SerializeUitls.GetResPath(sprite)); }