protected override void Awake() { if (m_TargetGraphic == null) { m_TargetGraphic = GetComponent <BrandoUIGraphic>(); } }
public static void TrackGraphic(BrandoUIGraphic g) { if (!s_Initialized) { CanvasRenderer.onRequestRebuild += OnRebuildRequested; s_Initialized = true; } m_Tracked.Add(g); }
/// <summary> /// ×¢ÏúÔڸà Canvas ÖеÄͼÐÎ /// </summary> /// <param name="c"></param> /// <param name="graphic"></param> public static void UnregisterGraphicForCanvas(Canvas c, BrandoUIGraphic graphic) { if (c == null) { return; } IndexedSet <BrandoUIGraphic> graphics; if (instance.m_Graphics.TryGetValue(c, out graphics)) { graphics.Remove(graphic); } }
public static void RegisterGraphicForCanvas(Canvas c, BrandoUIGraphic graphic) { if (c == null) { return; } IndexedSet <BrandoUIGraphic> graphics; instance.m_Graphics.TryGetValue(c, out graphics); if (graphics != null) { graphics.Add(graphic); return; } graphics = new IndexedSet <BrandoUIGraphic>(); graphics.Add(graphic); instance.m_Graphics.Add(c, graphics); }
public static void UnTrackGraphic(BrandoUIGraphic g) { m_Tracked.Remove(g); }
protected override void Reset() { m_TargetGraphic = GetComponent <BrandoUIGraphic>(); }