Exemple #1
0
 public static ObjectAnchor Create(Subject2 owner, LayerRect rect, int cullingLayer)
 {
     ObjectAnchor ret = new GameObject(owner.GetType().Name).AddComponent<ObjectAnchor>();
     ret.gameObject.layer = cullingLayer;
     ret.SetForcingly("owner", owner);
     ret.SetForcingly("centerRect", rect.ObjectRectInLayer);
     ret.transform.parent = rect.point.layer.transform;
     ret.transform.localPosition = new Vector3(ret.centerRect.x, ret.centerRect.y, 0);
     return ret;
 }