Reducing internal callbacks from anchorMax and anchorMin setters.
I'm dynamically setting anchors on a RectTransform through the anchorMax
and anchorMin
properties.
I noticed while profiling that each time I set anchorMax and anchorMin I trigger a few internal callbacks. You can see them repeated in the profiler snapshot below:
Is there a way to set both anchorMax and anchorMin on a RectTransform such that internal "onChanged" callbacks are only triggered once?
The project I'm working on is performance-sensitive enough that the extra 0.05 ms incurred is a problem. I want to use this code for a large number of objects so 0.05 ms will be scaled up very quickly.
Your answer

Follow this Question
Related Questions
One FBX with whole map from 3D soft or create map in unity ? 1 Answer
Unity 2D build for android, memory issue. Sprite import? 0 Answers
Is there a performance increase from using point textures instead of Bi/Trilinear textures? 0 Answers
WebGl RAM requirements 1 Answer
Lag Spike using Particle System Emit 0 Answers