/// <summary> /// On start, we store the current offset /// </summary> protected virtual void Start() { CurrentParallaxOffset = this; if (GetComponent <Renderer>() != null) { _renderer = GetComponent <Renderer> (); } if (_renderer == null && GetComponent <RawImage>() != null) { _rawImage = GetComponent <RawImage> (); } }
/// <summary> /// On start, we store the current offset /// </summary> protected virtual void Start() { CurrentParallaxOffset = this; yOffset = GetComponent <Renderer>().material.mainTextureOffset.y; }
/// <summary> /// On start, we store the current offset /// </summary> protected virtual void Start() { CurrentParallaxOffset = this; }