public static ITween <Vector2> ZKtextureOffsetTo(this Material self, Vector2 to, float duration, string propertyName) { var tweenTarget = new MaterialTextureOffsetTarget(self, propertyName); var tween = new Vector2Tween(tweenTarget, self.GetTextureOffset(propertyName), to, duration); return(tween); }
/// <summary> /// tweens the Materials texture offset /// </summary> /// <returns>The ktexture offset to.</returns> /// <param name="self">Self.</param> /// <param name="to">To.</param> /// <param name="duration">Duration.</param> /// <param name="propertyName">Property name.</param> public static ITween <Vector2> ZKtextureOffsetTo(this Material self, Vector2 to, float duration, string propertyName = "_MainTex") { var tweenTarget = new MaterialTextureOffsetTarget(self, propertyName); var tween = Vector2Tween.create(); tween.initialize(tweenTarget, to, duration); return(tween); }