Hi!
I am using NGUI 3.5.5 in Unity 4.6.8
I want to add UIWidget and set anchor by script to all my scene.
I need to do this in Editor because i have many scenes.
So i've tried create Editor Script to do this but i don't know how to set
Type:Unified
Target:Top
Execute : On Update
Left:Target's Left + 70
Right:Target's Left + 70
Bottom:Target's Top + -53
Top:Target's Top + -30
This my code:
var dirLeftFit = new GameObject("dir_LeftFit");
var dirRightFit = new GameObject("dir_RightFit");
UIWidget label = null;
if (!dirLeftFit.GetComponent<UIWidget>())
label = dirLeftFit.AddComponent<UIWidget>();
label.leftAnchor = parent.transform;
label.leftAnchor.relative = 0.0f;
label.leftAnchor.absolute = 70;
label.ResetAnchors();
label.UpdateAnchors();
/* I don't know how to set this */
// Type = Unified
// Target = transform
// Execute = On Update