void Awake() { instance = this; oldPos = rectTransform.anchoredPosition; //OnMove (rectTransform.anchoredPosition); //scrollRect.verticalNormalizedPosition = 0.5f; Invoke("setFixHeight", 0.05f); //print (Screen.height); }
private float XAnchorPos; //para evitar leer el anchor pos cada frame void Start() { if (rectTransform == null) { rectTransform = GetComponent <RectTransform> (); } content = ParalaxManager.instance; content.OnMove += OnMove; content.OnUnsubscribe += OnUnsubscribe; if (clamped) { initialValue = rectTransform.anchoredPosition.y; } XAnchorPos = rectTransform.anchoredPosition.x; }
public void setParalaxManager(ParalaxManager paralaxManager) { this.paralaxManager = paralaxManager; }