UnityEngine.UI.GraphicRebuildTracker.TrackGraphic C# (CSharp) Method

TrackGraphic() public static method

public static TrackGraphic ( Graphic g ) : void
g Graphic
return void
        public static void TrackGraphic(Graphic g)
        {
            if (!s_Initialized)
            {
                CanvasRenderer.onRequestRebuild += new CanvasRenderer.OnRequestRebuild(GraphicRebuildTracker.OnRebuildRequested);
                s_Initialized = true;
            }
            m_Tracked.Add(g);
        }

Usage Example

Esempio n. 1
0
        /// <summary>
        /// Mark the Graphic and the canvas as having been changed.
        /// </summary>
        protected override void OnEnable()
        {
            base.OnEnable();
            CacheCanvas();
            GraphicRegistry.RegisterGraphicForCanvas(canvas, this);

#if UNITY_EDITOR
            GraphicRebuildTracker.TrackGraphic(this);
#endif
            SetAllDirty();
        }
All Usage Examples Of UnityEngine.UI.GraphicRebuildTracker::TrackGraphic