1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2026-02-12 01:58:47 +08:00

Added buttons on DOTween's Inspector to eventually show even more options about playing/paused tweens

This commit is contained in:
Demigiant 2015-11-20 22:06:50 +01:00
parent 2af024f03d
commit bcd700d6fb
75 changed files with 206 additions and 375 deletions

View File

@ -1,2 +1,4 @@
# dotween
A Unity C# animation engine. HOTween v2
Developed by Daniele Giardini - http://www.demigiant.com
Check the docs on DOTween's website - http://dotween.demigiant.com

View File

@ -4,48 +4,101 @@
<name>DemiEditor</name>
</assembly>
<members>
<member name="T:DG.DemiEditor.TextureExtensions">
<member name="T:DG.DemiEditor.DeFileUtils">
<summary>
Texture extensions
File utils
</summary>
</member>
<member name="M:DG.DemiEditor.TextureExtensions.SetFormat(UnityEngine.Texture2D,UnityEngine.FilterMode,System.Int32)">
<member name="F:DG.DemiEditor.DeFileUtils.ADBPathSlash">
<summary>Path slash for AssetDatabase format</summary>
</member>
<member name="F:DG.DemiEditor.DeFileUtils.ADBPathSlashToReplace">
<summary>Path slash to replace for AssetDatabase format</summary>
</member>
<member name="F:DG.DemiEditor.DeFileUtils.PathSlash">
<summary>Current OS path slash</summary>
</member>
<member name="F:DG.DemiEditor.DeFileUtils.PathSlashToReplace">
<summary>Path slash to replace on current OS</summary>
</member>
<member name="P:DG.DemiEditor.DeFileUtils.projectPath">
<summary>
Checks that the texture uses the correct import settings, and applies them if they're incorrect.
Full path to project directory, without final slash.
</summary>
</member>
<member name="T:DG.DemiEditor.DeGUI">
<member name="P:DG.DemiEditor.DeFileUtils.assetsPath">
<summary>
Global Demigiant GUI manager
Full path to project's Assets directory, without final slash.
</summary>
</member>
<member name="F:DG.DemiEditor.DeGUI.colors">
<member name="M:DG.DemiEditor.DeFileUtils.ADBPathToFullPath(System.String)">
<summary>
Default color palette
Converts the given project-relative path to a full path
</summary>
</member>
<member name="F:DG.DemiEditor.DeGUI.styles">
<member name="M:DG.DemiEditor.DeFileUtils.AssetExists(System.String)">
<summary>
Default style palette
Returns TRUE if the file/directory at the given path exists.
</summary>
<param name="adbPath">Path, relative to Unity's project folder</param>
</member>
<member name="M:DG.DemiEditor.DeFileUtils.GUIDToExistingAssetPath(System.String)">
<summary>
Returns the asset path of the given GUID (relative to Unity project's folder),
or an empty string if either the GUID is invalid or the related path doesn't exist.
</summary>
</member>
<member name="F:DG.DemiEditor.DeGUI.isProSkin">
<member name="M:DG.DemiEditor.DeFileUtils.MonoInstanceADBPath(UnityEngine.ScriptableObject)">
<summary>Returns the adb path to the given ScriptableObject</summary>
</member>
<member name="M:DG.DemiEditor.DeFileUtils.MonoInstanceADBPath(UnityEngine.MonoBehaviour)">
<summary>Returns the adb path to the given MonoBehaviour</summary>
</member>
<member name="M:DG.DemiEditor.DeFileUtils.MonoInstanceADBDir(UnityEngine.ScriptableObject)">
<summary>Returns the adb directory that contains the given ScriptableObject without final slash</summary>
</member>
<member name="M:DG.DemiEditor.DeFileUtils.MonoInstanceADBDir(UnityEngine.MonoBehaviour)">
<summary>Returns the adb directory that contains the given MonoBehaviour without final slash</summary>
</member>
<member name="M:DG.DemiEditor.DeFileUtils.SetScriptExecutionOrder(UnityEngine.MonoBehaviour,System.Int32)">
<summary>
TRUE if we're using the PRO skin
Sets the script execution order of the given MonoBehaviour
</summary>
</member>
<member name="M:DG.DemiEditor.DeGUI.BeginGUI(DG.DemiLib.DeColorPalette,DG.DemiEditor.DeStylePalette)">
<member name="M:DG.DemiEditor.DeFileUtils.GetScriptExecutionOrder(UnityEngine.MonoBehaviour)">
<summary>
Call this at the beginning of GUI methods
Gets the script execution order of the given MonoBehaviour
</summary>
<param name="guiColorPalette"></param>
</member>
<member name="M:DG.DemiEditor.DeGUI.ChangePalette(DG.DemiLib.DeColorPalette,DG.DemiEditor.DeStylePalette)">
<member name="T:DG.DemiEditor.DePanelUtils">
<summary>
Changes the active palettes to the given ones
(or resets them to the default ones if NULL)
Utilities for Editor Panels.
</summary>
</member>
<member name="M:DG.DemiEditor.DePanelUtils.ConnectToSourceAsset``1(System.String,System.Boolean)">
<summary>
Connects to a <see cref="T:UnityEngine.ScriptableObject"/> asset.
If the asset already exists at the given path, loads it and returns it.
Otherwise, depending on the given parameters, either returns NULL or automatically creates it before loading and returning it.
</summary>
<typeparam name="T">Asset type</typeparam>
<param name="adbFilePath">File path (relative to Unity's project folder)</param>
<param name="createIfMissing">If TRUE and the requested asset doesn't exist, forces its creation</param>
</member>
<member name="T:DG.DemiEditor.DeSkinStyle">
<summary>
Contains both free and pro skins GUIStyle variations,
and automatically returns the correct one when converted to GUIStyle
</summary>
</member>
<member name="T:DG.DemiEditor.AssemblyExtensions">
<summary>
Assembly extensions
</summary>
</member>
<member name="M:DG.DemiEditor.AssemblyExtensions.ADBDir(System.Reflection.Assembly)">
<summary>AssetDatabase path to the assembly directory, without final slash</summary>
</member>
<member name="T:DG.DemiEditor.GUIStyleExtensions">
<summary>
GUI extension methods
@ -171,31 +224,6 @@
Sets the stretchWidth property of the style
</summary>
</member>
<member name="T:DG.DemiEditor.AssemblyExtensions">
<summary>
Assembly extensions
</summary>
</member>
<member name="M:DG.DemiEditor.AssemblyExtensions.ADBDir(System.Reflection.Assembly)">
<summary>AssetDatabase path to the assembly directory, without final slash</summary>
</member>
<member name="T:DG.DemiEditor.DeFileUtils">
<summary>
File utils
</summary>
</member>
<member name="F:DG.DemiEditor.DeFileUtils.ADBPathSlash">
<summary>Path slash for AssetDatabase format</summary>
</member>
<member name="F:DG.DemiEditor.DeFileUtils.ADBPathSlashToReplace">
<summary>Path slash to replace for AssetDatabase format</summary>
</member>
<member name="F:DG.DemiEditor.DeFileUtils.PathSlash">
<summary>Current OS path slash</summary>
</member>
<member name="F:DG.DemiEditor.DeFileUtils.PathSlashToReplace">
<summary>Path slash to replace on current OS</summary>
</member>
<member name="T:DG.DemiEditor.DeStylePalette">
<summary>
Stores a GUIStyle palette, which can be passed to default DeGUI layouts when calling <code>DeGUI.BeginGUI</code>,
@ -300,10 +328,63 @@
<member name="M:DG.DemiEditor.DeGUILayout.HorizontalDivider(System.Nullable{UnityEngine.Color},System.Int32,System.Int32,System.Int32)">
<summary>Divider</summary>
</member>
<member name="T:DG.DemiEditor.DeSkinStyle">
<member name="M:DG.DemiEditor.DeGUILayout.SceneField(System.String,UnityEngine.Object)">
<summary>Scene field</summary>
</member>
<member name="T:DG.DemiEditor.DeGUI">
<summary>
Contains both free and pro skins GUIStyle variations,
and automatically returns the correct one when converted to GUIStyle
Global Demigiant GUI manager
</summary>
</member>
<member name="F:DG.DemiEditor.DeGUI.colors">
<summary>
Default color palette
</summary>
</member>
<member name="F:DG.DemiEditor.DeGUI.styles">
<summary>
Default style palette
</summary>
</member>
<member name="F:DG.DemiEditor.DeGUI.IsProSkin">
<summary>
TRUE if we're using the PRO skin
</summary>
</member>
<member name="M:DG.DemiEditor.DeGUI.BeginGUI(DG.DemiLib.DeColorPalette,DG.DemiEditor.DeStylePalette)">
<summary>
Call this at the beginning of GUI methods
</summary>
<param name="guiColorPalette"></param>
</member>
<member name="M:DG.DemiEditor.DeGUI.ChangePalette(DG.DemiLib.DeColorPalette,DG.DemiEditor.DeStylePalette)">
<summary>
Changes the active palettes to the given ones
(or resets them to the default ones if NULL)
</summary>
</member>
<member name="M:DG.DemiEditor.DeGUI.SceneField(UnityEngine.Rect,System.String,UnityEngine.Object)">
<summary>Scene field</summary>
</member>
<member name="T:DG.DemiEditor.StringExtensions">
<summary>
String extensions
</summary>
</member>
<member name="M:DG.DemiEditor.StringExtensions.Parent(System.String)">
<summary>
If the given string is a directory path, returns its parent
with or without final slash depending on the original directory format
</summary>
</member>
<member name="T:DG.DemiEditor.TextureExtensions">
<summary>
Texture extensions
</summary>
</member>
<member name="M:DG.DemiEditor.TextureExtensions.SetFormat(UnityEngine.Texture2D,UnityEngine.FilterMode,System.Int32)">
<summary>
Checks that the texture uses the correct import settings, and applies them if they're incorrect.
</summary>
</member>
</members>

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: abaf73559a636e64e806fc2f2e965e84
timeCreated: 1430738302
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,20 +0,0 @@
fileFormatVersion: 2
guid: ad7d8d86ac8f0fc49a81cb875a5be5c6
timeCreated: 1430738308
licenseType: Free
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Any:
enabled: 1
settings: {}
Editor:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: d648af5b6187e6b4a9e9ad2adf84b646
timeCreated: 1430738318
licenseType: Free
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: c760f6aafa0a81c4ea230ee15e51e164
folderAsset: yes
timeCreated: 1430325782
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 29fba45460626514c98ea3a468bfff31
timeCreated: 1430439750
licenseType: Free
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 4ff112d1a82bddc4e866e8f49b9237b4
timeCreated: 1430439738
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,20 +0,0 @@
fileFormatVersion: 2
guid: 914a65673c240394c942b48b8293b955
timeCreated: 1430439740
licenseType: Free
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Any:
enabled: 0
settings: {}
Editor:
enabled: 1
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: 0ee8fa7541fa42f4fbe49ffcc419eabf
folderAsset: yes
timeCreated: 1430439738
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,55 +0,0 @@
fileFormatVersion: 2
guid: 893c23ce13d59b14289a49ccdccad44b
timeCreated: 1430439760
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
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: -3
maxTextureSize: 16
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
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: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,55 +0,0 @@
fileFormatVersion: 2
guid: c1e04f5651b88934e8f92a1e46ca5155
timeCreated: 1430823723
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
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: -3
maxTextureSize: 16
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
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: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,55 +0,0 @@
fileFormatVersion: 2
guid: 499b4afbc3a217548bd8ca3f202172e5
timeCreated: 1430823723
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
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: -3
maxTextureSize: 16
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
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: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,55 +0,0 @@
fileFormatVersion: 2
guid: a8a5494500ebeba47886c12e70f98bac
timeCreated: 1430440877
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
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: -3
maxTextureSize: 16
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
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: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -9,17 +9,60 @@ using UnityEngine.UI;
public class TempTests : BrainBase
{
public Transform target;
public RectTransform rectTrans;
void Start()
{
float delay = 0.15f;
Sequence seq = DOTween.Sequence();
seq.Insert(delay, target.DOMoveX(0.5f, 0.5f).OnComplete(() => {
Debug.Log("Doesn't work");
}));
seq.OnComplete(()=> Debug.Log("Works"));
void Start()
{
DOTween.Init();
PlayTween();
}
target.DORotate (new Vector3 (1, 2, 1), 2);
}
Sequence mySequence;
Tween anchorMinTween = null;
Tween anchorMaxTween = null;
Tween anchorPositionTween = null;
Tween scaleTween = null;
void PlayTween()
{
mySequence = DOTween.Sequence();
anchorMaxTween = DOTween.To(() => rectTrans.anchorMax, v => rectTrans.anchorMax = v, new Vector2(0.5f, 0.5f), 1f)
// .Pause()
.SetDelay(2f)
.OnPlay(()=> Debug.Log(Time.realtimeSinceStartup + " Start MAX"))
;
anchorMinTween = DOTween.To(() => rectTrans.anchorMin, v => rectTrans.anchorMin = v, new Vector2(0.5f, 0.5f), 1f)
// .Pause()
.SetDelay(2f)
.OnPlay(() => Debug.Log(Time.realtimeSinceStartup + " Start MIN"))
;
anchorPositionTween = DOTween.To(() => rectTrans.anchoredPosition, v => rectTrans.anchoredPosition = v, Vector2.zero, 1f)
//.Pause()
.SetDelay(2f)
.OnPlay(() => Debug.Log(Time.realtimeSinceStartup + " Start POS"))
;
scaleTween = DOTween.To(() => rectTrans.localScale, v => rectTrans.localScale = v, Vector3.zero, 1f)
//.Pause()
.SetDelay(2f)
.OnPlay(() => Debug.Log(Time.realtimeSinceStartup + " Start SCALE"))
;
mySequence
.AppendInterval(5f)
.Append(anchorMaxTween)
.Join(anchorMinTween)
.Join(anchorPositionTween)
.AppendInterval(2f)
.Append(scaleTween)
//.SetDelay(2f)
//.Play()
.Pause()
.OnPlay(()=> Debug.Log(Time.realtimeSinceStartup + " >>> PLAY"))
;
}
}

View File

@ -1,2 +1,2 @@
m_EditorVersion: 5.2.1f1
m_EditorVersion: 5.2.2f1
m_StandardAssetsVersion: 0

View File

@ -29,7 +29,7 @@ namespace DG.Tweening.Core
// Tweens contained in Sequences are not inside the active lists
// Arrays are organized (max once per update) so that existing elements are next to each other from 0 to (totActiveTweens - 1)
static Tween[] _activeTweens = new Tween[_DefaultMaxTweeners];
internal static Tween[] _activeTweens = new Tween[_DefaultMaxTweeners]; // Internal just to allow DOTweenInspector to access it
static Tween[] _pooledTweeners = new Tween[_DefaultMaxTweeners];
static readonly Stack<Tween> _PooledSequences = new Stack<Tween>();

View File

@ -32,7 +32,7 @@ namespace DG.Tweening
public class DOTween
{
/// <summary>DOTween's version</summary>
public static readonly string Version = "1.1.060";
public static readonly string Version = "1.1.100";
///////////////////////////////////////////////
// Options ////////////////////////////////////

View File

@ -5,6 +5,7 @@
// This work is subject to the terms at http://dotween.demigiant.com/license.php
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using DG.DOTweenEditor.Core;
@ -18,9 +19,9 @@ namespace DG.DOTweenEditor
[CustomEditor(typeof(DOTweenComponent))]
public class DOTweenInspector : Editor
{
// DOTweenComponent _src;
string _title;
readonly StringBuilder _strBuilder = new StringBuilder();
bool _showPlayingTweensData, _showPausedTweensData;
// ===================================================================================
// MONOBEHAVIOUR METHODS -------------------------------------------------------------
@ -55,17 +56,31 @@ namespace DG.DOTweenEditor
if (GUILayout.Button("Documentation")) Application.OpenURL("http://dotween.demigiant.com/documentation.php");
if (GUILayout.Button("Check Updates")) Application.OpenURL("http://dotween.demigiant.com/download.php?v=" + DOTween.Version);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
if (GUILayout.Button(_showPlayingTweensData ? "Hide Playing Tweens" : "Show Playing Tweens")) _showPlayingTweensData = !_showPlayingTweensData;
if (GUILayout.Button(_showPausedTweensData ? "Hide Paused Tweens" : "Show Paused Tweens")) _showPausedTweensData = !_showPausedTweensData;
GUILayout.EndHorizontal();
GUILayout.Space(8);
_strBuilder.Remove(0, _strBuilder.Length);
_strBuilder.Length = 0;
_strBuilder.Append("Active tweens: ").Append(totActiveTweens)
.Append(" (").Append(TweenManager.totActiveTweeners)
.Append("/").Append(TweenManager.totActiveSequences).Append(")")
.Append("\nDefault/Late tweens: ").Append(totActiveDefaultTweens)
.Append("/").Append(totActiveLateTweens)
.Append("\nPlaying tweens: ").Append(totPlayingTweens)
.Append("\nPaused tweens: ").Append(totPausedTweens)
.Append("\nPooled tweens: ").Append(TweenManager.TotalPooledTweens())
.Append("\nPlaying tweens: ").Append(totPlayingTweens);
if (_showPlayingTweensData) {
foreach (Tween t in TweenManager._activeTweens) {
if (t != null && t.isPlaying) _strBuilder.Append("\n - [").Append(t.tweenType).Append("] ").Append(t.target);
}
}
_strBuilder.Append("\nPaused tweens: ").Append(totPausedTweens);
if (_showPausedTweensData) {
foreach (Tween t in TweenManager._activeTweens) {
if (t != null && !t.isPlaying) _strBuilder.Append("\n - [").Append(t.tweenType).Append("] ").Append(t.target);
}
}
_strBuilder.Append("\nPooled tweens: ").Append(TweenManager.TotalPooledTweens())
.Append(" (").Append(TweenManager.totPooledTweeners)
.Append("/").Append(TweenManager.totPooledSequences).Append(")");
GUILayout.Label(_strBuilder.ToString());

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.