diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML index a384e21..2719cab 100644 --- a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML +++ b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML @@ -949,6 +949,32 @@ The name of the material property to tween The duration of the tween + + Tweens a Material's texture offset to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The duration of the tween + + + Tweens a Material's named texture offset property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + + + Tweens a Material's texture scale to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The duration of the tween + + + Tweens a Material's named texture scale property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + Tweens a Material's named Vector property to the given value. Also stores the material as the tween's target so it can be used for filtered operations diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll index 72a44a0..6ffeaa6 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll.mdb b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll.mdb index 3389871..1d38e39 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll.mdb differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML index a384e21..2719cab 100644 --- a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML +++ b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML @@ -949,6 +949,32 @@ The name of the material property to tween The duration of the tween + + Tweens a Material's texture offset to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The duration of the tween + + + Tweens a Material's named texture offset property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + + + Tweens a Material's texture scale to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The duration of the tween + + + Tweens a Material's named texture scale property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + Tweens a Material's named Vector property to the given value. Also stores the material as the tween's target so it can be used for filtered operations diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll index 72a44a0..6ffeaa6 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb index 3389871..1d38e39 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML index a384e21..2719cab 100644 --- a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML +++ b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML @@ -949,6 +949,32 @@ The name of the material property to tween The duration of the tween + + Tweens a Material's texture offset to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The duration of the tween + + + Tweens a Material's named texture offset property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + + + Tweens a Material's texture scale to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The duration of the tween + + + Tweens a Material's named texture scale property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + Tweens a Material's named Vector property to the given value. Also stores the material as the tween's target so it can be used for filtered operations diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll index 72a44a0..6ffeaa6 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb index 3389871..1d38e39 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/_Tests PRO/TempPro.unity b/UnityTests.Unity5/Assets/_Tests PRO/TempPro.unity index 3a8b96d..1d77d03 100644 Binary files a/UnityTests.Unity5/Assets/_Tests PRO/TempPro.unity and b/UnityTests.Unity5/Assets/_Tests PRO/TempPro.unity differ diff --git a/UnityTests.Unity5/Assets/_Tests/TextureTilingAndOffset.cs b/UnityTests.Unity5/Assets/_Tests/TextureTilingAndOffset.cs new file mode 100644 index 0000000..c54455b --- /dev/null +++ b/UnityTests.Unity5/Assets/_Tests/TextureTilingAndOffset.cs @@ -0,0 +1,14 @@ +using UnityEngine; +using System.Collections; +using DG.Tweening; + +public class TextureTilingAndOffset : BrainBase +{ + public Renderer rend; + + void Start() + { + rend.material.DOTiling(new Vector2(3, 3), 2).SetLoops(-1, LoopType.Yoyo); + rend.material.DOOffset(new Vector2(1, 0), "_Detail", 2).SetEase(Ease.Linear).SetLoops(-1, LoopType.Incremental); + } +} \ No newline at end of file diff --git a/UnityTests.Unity5/Assets/_Tests/TextureTilingAndOffset.cs.meta b/UnityTests.Unity5/Assets/_Tests/TextureTilingAndOffset.cs.meta new file mode 100644 index 0000000..f0d4ec6 --- /dev/null +++ b/UnityTests.Unity5/Assets/_Tests/TextureTilingAndOffset.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 65dfb16b254b0c14a93b4c9801fb9c0d +timeCreated: 1431076470 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityTests.Unity5/Assets/_Tests/TextureTilingAndOffset.unity b/UnityTests.Unity5/Assets/_Tests/TextureTilingAndOffset.unity new file mode 100644 index 0000000..9d63e27 Binary files /dev/null and b/UnityTests.Unity5/Assets/_Tests/TextureTilingAndOffset.unity differ diff --git a/UnityTests.Unity5/Assets/_Tests/TextureTilingAndOffset.unity.meta b/UnityTests.Unity5/Assets/_Tests/TextureTilingAndOffset.unity.meta new file mode 100644 index 0000000..5790bde --- /dev/null +++ b/UnityTests.Unity5/Assets/_Tests/TextureTilingAndOffset.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e71f67ccffdad8b45be5fbcf29bf04d8 +timeCreated: 1431076464 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/DoubleTex MAT.mat b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/DoubleTex MAT.mat new file mode 100644 index 0000000..4d4c20f Binary files /dev/null and b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/DoubleTex MAT.mat differ diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/DoubleTex MAT.mat.meta b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/DoubleTex MAT.mat.meta new file mode 100644 index 0000000..940c598 --- /dev/null +++ b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/DoubleTex MAT.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5802d8ca92f7bf84c9717237c42b3243 +timeCreated: 1431076590 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/Cube TEX 00.png b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX 00.png similarity index 100% rename from UnityTests.Unity5/Assets/_Tests/_Shared Materials/Cube TEX 00.png rename to UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX 00.png diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/Cube TEX 00.png.meta b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX 00.png.meta similarity index 100% rename from UnityTests.Unity5/Assets/_Tests/_Shared Materials/Cube TEX 00.png.meta rename to UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX 00.png.meta diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX 01.jpg b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX 01.jpg new file mode 100644 index 0000000..922087f Binary files /dev/null and b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX 01.jpg differ diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX 01.jpg.meta b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX 01.jpg.meta new file mode 100644 index 0000000..61e6490 --- /dev/null +++ b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX 01.jpg.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: b5bf3187386e9544ea239f2dbfbc8989 +timeCreated: 1431076560 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX 02.jpg b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX 02.jpg new file mode 100644 index 0000000..54a4743 Binary files /dev/null and b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX 02.jpg differ diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX 02.jpg.meta b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX 02.jpg.meta new file mode 100644 index 0000000..54215d8 --- /dev/null +++ b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX 02.jpg.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: 8c5e1a0ba4604a044bb2b668154f51ac +timeCreated: 1431076559 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/_DOTween.Assembly/DOTween/DOTween.cs b/_DOTween.Assembly/DOTween/DOTween.cs index 7542973..3459f28 100644 --- a/_DOTween.Assembly/DOTween/DOTween.cs +++ b/_DOTween.Assembly/DOTween/DOTween.cs @@ -32,7 +32,7 @@ namespace DG.Tweening public class DOTween { /// DOTween's version - public static readonly string Version = "1.0.685"; + public static readonly string Version = "1.0.690"; /////////////////////////////////////////////// // Options //////////////////////////////////// diff --git a/_DOTween.Assembly/DOTween/ShortcutExtensions.cs b/_DOTween.Assembly/DOTween/ShortcutExtensions.cs index 431cdb3..64fab6f 100644 --- a/_DOTween.Assembly/DOTween/ShortcutExtensions.cs +++ b/_DOTween.Assembly/DOTween/ShortcutExtensions.cs @@ -218,6 +218,50 @@ namespace DG.Tweening return DOTween.To(() => target.GetFloat(property), x => target.SetFloat(property, x), endValue, duration).SetTarget(target); } + /// Tweens a Material's texture offset to the given value. + /// Also stores the material as the tween's target so it can be used for filtered operations + /// The end value to reach + /// The duration of the tween + public static Tweener DOOffset(this Material target, Vector2 endValue, float duration) + { + return DOTween.To(() => target.mainTextureOffset, x => target.mainTextureOffset = x, endValue, duration).SetTarget(target); + } + /// Tweens a Material's named texture offset property to the given value. + /// Also stores the material as the tween's target so it can be used for filtered operations + /// The end value to reach + /// The name of the material property to tween + /// The duration of the tween + public static Tweener DOOffset(this Material target, Vector2 endValue, string property, float duration) + { + if (!target.HasProperty(property)) { + if (Debugger.logPriority > 0) Debugger.LogMissingMaterialProperty(property); + return null; + } + return DOTween.To(() => target.GetTextureOffset(property), x => target.SetTextureOffset(property, x), endValue, duration).SetTarget(target); + } + + /// Tweens a Material's texture scale to the given value. + /// Also stores the material as the tween's target so it can be used for filtered operations + /// The end value to reach + /// The duration of the tween + public static Tweener DOTiling(this Material target, Vector2 endValue, float duration) + { + return DOTween.To(() => target.mainTextureScale, x => target.mainTextureScale = x, endValue, duration).SetTarget(target); + } + /// Tweens a Material's named texture scale property to the given value. + /// Also stores the material as the tween's target so it can be used for filtered operations + /// The end value to reach + /// The name of the material property to tween + /// The duration of the tween + public static Tweener DOTiling(this Material target, Vector2 endValue, string property, float duration) + { + if (!target.HasProperty(property)) { + if (Debugger.logPriority > 0) Debugger.LogMissingMaterialProperty(property); + return null; + } + return DOTween.To(() => target.GetTextureScale(property), x => target.SetTextureScale(property, x), endValue, duration).SetTarget(target); + } + /// Tweens a Material's named Vector property to the given value. /// Also stores the material as the tween's target so it can be used for filtered operations /// The end value to reach diff --git a/_DOTween.Assembly/bin/DOTween.XML b/_DOTween.Assembly/bin/DOTween.XML index a384e21..2719cab 100644 --- a/_DOTween.Assembly/bin/DOTween.XML +++ b/_DOTween.Assembly/bin/DOTween.XML @@ -949,6 +949,32 @@ The name of the material property to tween The duration of the tween + + Tweens a Material's texture offset to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The duration of the tween + + + Tweens a Material's named texture offset property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + + + Tweens a Material's texture scale to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The duration of the tween + + + Tweens a Material's named texture scale property to the given value. + Also stores the material as the tween's target so it can be used for filtered operations + The end value to reach + The name of the material property to tween + The duration of the tween + Tweens a Material's named Vector property to the given value. Also stores the material as the tween's target so it can be used for filtered operations diff --git a/_DOTween.Assembly/bin/DOTween.dll b/_DOTween.Assembly/bin/DOTween.dll index 72a44a0..6ffeaa6 100644 Binary files a/_DOTween.Assembly/bin/DOTween.dll and b/_DOTween.Assembly/bin/DOTween.dll differ diff --git a/_DOTween.Assembly/bin/DOTween.dll.mdb b/_DOTween.Assembly/bin/DOTween.dll.mdb index 3389871..1d38e39 100644 Binary files a/_DOTween.Assembly/bin/DOTween.dll.mdb and b/_DOTween.Assembly/bin/DOTween.dll.mdb differ