Merge branch 'release/v1.0.327'
19
.gitignore
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
_DOTween.Assembly/_ReSharper*
|
||||||
|
_DOTween.Assembly/bin_pro
|
||||||
|
_DOTween.Assembly/DOTweenPro*
|
||||||
|
_DOTween.Assembly/DOTween*/obj
|
||||||
|
_DOTween.Assembly/*.suo
|
||||||
|
_DOTween.Assembly/*.user
|
||||||
|
_DOTween.Assembly/.gitignore
|
||||||
|
_DOTween.Assembly/.git
|
||||||
|
*.Unity*/_ReSharper*
|
||||||
|
*.Unity*/Library
|
||||||
|
*.Unity*/obj
|
||||||
|
*.Unity*/Temp
|
||||||
|
*.Unity*/*.csproj
|
||||||
|
*.Unity*/*.sln
|
||||||
|
*.Unity*/*.user
|
||||||
|
*.Unity*/*.suo
|
||||||
|
*.Unity*/*.userprefs
|
||||||
|
*.Unity*/Assets/Demigiant/DOTweenPro*
|
||||||
|
*.Unity*/Assets/TK2D*
|
||||||
206
LICENSE
@ -1,202 +1,8 @@
|
|||||||
The Artistic License 2.0
|
Copyright (c) 2015 Daniele Giardini, Demigiant
|
||||||
|
|
||||||
Copyright (c) 2015 Daniele Giardini
|
To check out DOTween license, visit this page: http://dotween.demigiant.com/license.php
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
This license establishes the terms under which a given free software
|
|
||||||
Package may be copied, modified, distributed, and/or redistributed.
|
|
||||||
The intent is that the Copyright Holder maintains some artistic
|
|
||||||
control over the development of that Package while still keeping the
|
|
||||||
Package available as open source and free software.
|
|
||||||
|
|
||||||
You are always permitted to make arrangements wholly outside of this
|
|
||||||
license directly with the Copyright Holder of a given Package. If the
|
|
||||||
terms of this license do not permit the full use that you propose to
|
|
||||||
make of the Package, you should contact the Copyright Holder and seek
|
|
||||||
a different licensing arrangement.
|
|
||||||
|
|
||||||
Definitions
|
|
||||||
|
|
||||||
"Copyright Holder" means the individual(s) or organization(s)
|
|
||||||
named in the copyright notice for the entire Package.
|
|
||||||
|
|
||||||
"Contributor" means any party that has contributed code or other
|
|
||||||
material to the Package, in accordance with the Copyright Holder's
|
|
||||||
procedures.
|
|
||||||
|
|
||||||
"You" and "your" means any person who would like to copy,
|
|
||||||
distribute, or modify the Package.
|
|
||||||
|
|
||||||
"Package" means the collection of files distributed by the
|
|
||||||
Copyright Holder, and derivatives of that collection and/or of
|
|
||||||
those files. A given Package may consist of either the Standard
|
|
||||||
Version, or a Modified Version.
|
|
||||||
|
|
||||||
"Distribute" means providing a copy of the Package or making it
|
|
||||||
accessible to anyone else, or in the case of a company or
|
|
||||||
organization, to others outside of your company or organization.
|
|
||||||
|
|
||||||
"Distributor Fee" means any fee that you charge for Distributing
|
|
||||||
this Package or providing support for this Package to another
|
|
||||||
party. It does not mean licensing fees.
|
|
||||||
|
|
||||||
"Standard Version" refers to the Package if it has not been
|
|
||||||
modified, or has been modified only in ways explicitly requested
|
|
||||||
by the Copyright Holder.
|
|
||||||
|
|
||||||
"Modified Version" means the Package, if it has been changed, and
|
|
||||||
such changes were not explicitly requested by the Copyright
|
|
||||||
Holder.
|
|
||||||
|
|
||||||
"Original License" means this Artistic License as Distributed with
|
|
||||||
the Standard Version of the Package, in its current version or as
|
|
||||||
it may be modified by The Perl Foundation in the future.
|
|
||||||
|
|
||||||
"Source" form means the source code, documentation source, and
|
|
||||||
configuration files for the Package.
|
|
||||||
|
|
||||||
"Compiled" form means the compiled bytecode, object code, binary,
|
|
||||||
or any other form resulting from mechanical transformation or
|
|
||||||
translation of the Source form.
|
|
||||||
|
|
||||||
|
|
||||||
Permission for Use and Modification Without Distribution
|
|
||||||
|
|
||||||
(1) You are permitted to use the Standard Version and create and use
|
|
||||||
Modified Versions for any purpose without restriction, provided that
|
|
||||||
you do not Distribute the Modified Version.
|
|
||||||
|
|
||||||
|
|
||||||
Permissions for Redistribution of the Standard Version
|
|
||||||
|
|
||||||
(2) You may Distribute verbatim copies of the Source form of the
|
|
||||||
Standard Version of this Package in any medium without restriction,
|
|
||||||
either gratis or for a Distributor Fee, provided that you duplicate
|
|
||||||
all of the original copyright notices and associated disclaimers. At
|
|
||||||
your discretion, such verbatim copies may or may not include a
|
|
||||||
Compiled form of the Package.
|
|
||||||
|
|
||||||
(3) You may apply any bug fixes, portability changes, and other
|
|
||||||
modifications made available from the Copyright Holder. The resulting
|
|
||||||
Package will still be considered the Standard Version, and as such
|
|
||||||
will be subject to the Original License.
|
|
||||||
|
|
||||||
|
|
||||||
Distribution of Modified Versions of the Package as Source
|
|
||||||
|
|
||||||
(4) You may Distribute your Modified Version as Source (either gratis
|
|
||||||
or for a Distributor Fee, and with or without a Compiled form of the
|
|
||||||
Modified Version) provided that you clearly document how it differs
|
|
||||||
from the Standard Version, including, but not limited to, documenting
|
|
||||||
any non-standard features, executables, or modules, and provided that
|
|
||||||
you do at least ONE of the following:
|
|
||||||
|
|
||||||
(a) make the Modified Version available to the Copyright Holder
|
|
||||||
of the Standard Version, under the Original License, so that the
|
|
||||||
Copyright Holder may include your modifications in the Standard
|
|
||||||
Version.
|
|
||||||
|
|
||||||
(b) ensure that installation of your Modified Version does not
|
|
||||||
prevent the user installing or running the Standard Version. In
|
|
||||||
addition, the Modified Version must bear a name that is different
|
|
||||||
from the name of the Standard Version.
|
|
||||||
|
|
||||||
(c) allow anyone who receives a copy of the Modified Version to
|
|
||||||
make the Source form of the Modified Version available to others
|
|
||||||
under
|
|
||||||
|
|
||||||
(i) the Original License or
|
|
||||||
|
|
||||||
(ii) a license that permits the licensee to freely copy,
|
|
||||||
modify and redistribute the Modified Version using the same
|
|
||||||
licensing terms that apply to the copy that the licensee
|
|
||||||
received, and requires that the Source form of the Modified
|
|
||||||
Version, and of any works derived from it, be made freely
|
|
||||||
available in that license fees are prohibited but Distributor
|
|
||||||
Fees are allowed.
|
|
||||||
|
|
||||||
|
|
||||||
Distribution of Compiled Forms of the Standard Version
|
|
||||||
or Modified Versions without the Source
|
|
||||||
|
|
||||||
(5) You may Distribute Compiled forms of the Standard Version without
|
|
||||||
the Source, provided that you include complete instructions on how to
|
|
||||||
get the Source of the Standard Version. Such instructions must be
|
|
||||||
valid at the time of your distribution. If these instructions, at any
|
|
||||||
time while you are carrying out such distribution, become invalid, you
|
|
||||||
must provide new instructions on demand or cease further distribution.
|
|
||||||
If you provide valid instructions or cease distribution within thirty
|
|
||||||
days after you become aware that the instructions are invalid, then
|
|
||||||
you do not forfeit any of your rights under this license.
|
|
||||||
|
|
||||||
(6) You may Distribute a Modified Version in Compiled form without
|
|
||||||
the Source, provided that you comply with Section 4 with respect to
|
|
||||||
the Source of the Modified Version.
|
|
||||||
|
|
||||||
|
|
||||||
Aggregating or Linking the Package
|
|
||||||
|
|
||||||
(7) You may aggregate the Package (either the Standard Version or
|
|
||||||
Modified Version) with other packages and Distribute the resulting
|
|
||||||
aggregation provided that you do not charge a licensing fee for the
|
|
||||||
Package. Distributor Fees are permitted, and licensing fees for other
|
|
||||||
components in the aggregation are permitted. The terms of this license
|
|
||||||
apply to the use and Distribution of the Standard or Modified Versions
|
|
||||||
as included in the aggregation.
|
|
||||||
|
|
||||||
(8) You are permitted to link Modified and Standard Versions with
|
|
||||||
other works, to embed the Package in a larger work of your own, or to
|
|
||||||
build stand-alone binary or bytecode versions of applications that
|
|
||||||
include the Package, and Distribute the result without restriction,
|
|
||||||
provided the result does not expose a direct interface to the Package.
|
|
||||||
|
|
||||||
|
|
||||||
Items That are Not Considered Part of a Modified Version
|
|
||||||
|
|
||||||
(9) Works (including, but not limited to, modules and scripts) that
|
|
||||||
merely extend or make use of the Package, do not, by themselves, cause
|
|
||||||
the Package to be a Modified Version. In addition, such works are not
|
|
||||||
considered parts of the Package itself, and are not subject to the
|
|
||||||
terms of this license.
|
|
||||||
|
|
||||||
|
|
||||||
General Provisions
|
|
||||||
|
|
||||||
(10) Any use, modification, and distribution of the Standard or
|
|
||||||
Modified Versions is governed by this Artistic License. By using,
|
|
||||||
modifying or distributing the Package, you accept this license. Do not
|
|
||||||
use, modify, or distribute the Package, if you do not accept this
|
|
||||||
license.
|
|
||||||
|
|
||||||
(11) If your Modified Version has been derived from a Modified
|
|
||||||
Version made by someone other than you, you are nevertheless required
|
|
||||||
to ensure that your Modified Version complies with the requirements of
|
|
||||||
this license.
|
|
||||||
|
|
||||||
(12) This license does not grant you the right to use any trademark,
|
|
||||||
service mark, tradename, or logo of the Copyright Holder.
|
|
||||||
|
|
||||||
(13) This license includes the non-exclusive, worldwide,
|
|
||||||
free-of-charge patent license to make, have made, use, offer to sell,
|
|
||||||
sell, import and otherwise transfer the Package with respect to any
|
|
||||||
patent claims licensable by the Copyright Holder that are necessarily
|
|
||||||
infringed by the Package. If you institute patent litigation
|
|
||||||
(including a cross-claim or counterclaim) against any party alleging
|
|
||||||
that the Package constitutes direct or contributory patent
|
|
||||||
infringement, then this Artistic License to you shall terminate on the
|
|
||||||
date that such litigation is filed.
|
|
||||||
|
|
||||||
(14) Disclaimer of Warranty:
|
|
||||||
THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS
|
|
||||||
IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
|
|
||||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
|
|
||||||
NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL
|
|
||||||
LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL
|
|
||||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
||||||
DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF
|
|
||||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
|
In short:
|
||||||
|
- You can freely use DOTween in both commercial and non-commercial projects
|
||||||
|
- You can redistribute verbatim copies of the code, along with any readme files and attributions
|
||||||
|
- You can modify the code only for your own use and you cannot redistribute modified versions (but you can send pull requests to me)
|
||||||
|
|||||||
45
UnityCompatibilityTests.Unity35/Assets/CompatibilityTest.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
using DG.Tweening;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class CompatibilityTest : MonoBehaviour
|
||||||
|
{
|
||||||
|
public Transform cubeCont;
|
||||||
|
public Transform[] cubes;
|
||||||
|
public GUITexture logo;
|
||||||
|
|
||||||
|
Tween twSuccess;
|
||||||
|
bool success;
|
||||||
|
Color logoCol;
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
DOTween.Init(true);
|
||||||
|
Color c = logoCol = logo.color;
|
||||||
|
c.a = 0;
|
||||||
|
logo.color = c;
|
||||||
|
|
||||||
|
// Create sequence
|
||||||
|
Sequence seq = DOTween.Sequence()
|
||||||
|
.SetLoops(-1, LoopType.Restart)
|
||||||
|
.OnStepComplete(Success);
|
||||||
|
seq.Append(cubeCont.DORotate(new Vector3(0, 720, 360), 2.25f).SetRelative().SetEase(Ease.Linear));
|
||||||
|
foreach (Transform trans in cubes) {
|
||||||
|
Transform t = trans;
|
||||||
|
seq.Insert(0, t.DOScale(Vector3.one * 0.5f, 1f));
|
||||||
|
seq.Insert(0, t.DOLocalMove(t.position * 8, 1f).SetEase(Ease.InQuint));
|
||||||
|
seq.Insert(1, t.DOScale(Vector3.one * 0.5f, 1f));
|
||||||
|
seq.Insert(1, t.DOLocalMove(t.position, 1f).SetEase(Ease.OutQuint));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create success tween
|
||||||
|
twSuccess = DOTween.To(()=> logo.color, x => logo.color = x, logoCol, 1.25f).Pause();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Success()
|
||||||
|
{
|
||||||
|
if (success) return;
|
||||||
|
|
||||||
|
success = true;
|
||||||
|
twSuccess.Play();
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
UnityCompatibilityTests.Unity35/Assets/CompatibilityTest.unity
Normal file
1906
UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>DOTween43</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:DG.Tweening.ShortcutExtensions">
|
||||||
|
<summary>
|
||||||
|
Methods that extend known Unity objects and allow to directly create and control tweens from their instances.
|
||||||
|
These, as all DOTween43 methods, require Unity 4.3 or later.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOColor(UnityEngine.SpriteRenderer,UnityEngine.Color,System.Single)">
|
||||||
|
<summary>Tweens a SpriteRenderer's color to the given value.
|
||||||
|
Also stores the spriteRenderer as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFade(UnityEngine.SpriteRenderer,System.Single,System.Single)">
|
||||||
|
<summary>Tweens a Material's alpha color to the given value.
|
||||||
|
Also stores the spriteRenderer as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOMove(UnityEngine.Rigidbody2D,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens a Rigidbody2D's position to the given value.
|
||||||
|
Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOMoveX(UnityEngine.Rigidbody2D,System.Single,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens a Rigidbody2D's X position to the given value.
|
||||||
|
Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOMoveY(UnityEngine.Rigidbody2D,System.Single,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens a Rigidbody2D's Y position to the given value.
|
||||||
|
Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DORotate(UnityEngine.Rigidbody2D,System.Single,System.Single)">
|
||||||
|
<summary>Tweens a Rigidbody2D's rotation to the given value.
|
||||||
|
Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>DOTween46</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:DG.Tweening.ShortcutExtensions">
|
||||||
|
<summary>
|
||||||
|
Methods that extend known Unity objects and allow to directly create and control tweens from their instances.
|
||||||
|
These, as all DOTween46 methods, require Unity 4.6 or later.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFade(UnityEngine.CanvasGroup,System.Single,System.Single)">
|
||||||
|
<summary>Tweens a CanvasGroup's alpha color to the given value.
|
||||||
|
Also stores the canvasGroup as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOColor(UnityEngine.UI.Graphic,UnityEngine.Color,System.Single)">
|
||||||
|
<summary>Tweens an Graphic's color to the given value.
|
||||||
|
Also stores the image as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFade(UnityEngine.UI.Graphic,System.Single,System.Single)">
|
||||||
|
<summary>Tweens an Graphic's alpha color to the given value.
|
||||||
|
Also stores the image as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOColor(UnityEngine.UI.Image,UnityEngine.Color,System.Single)">
|
||||||
|
<summary>Tweens an Image's color to the given value.
|
||||||
|
Also stores the image as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFade(UnityEngine.UI.Image,System.Single,System.Single)">
|
||||||
|
<summary>Tweens an Image's alpha color to the given value.
|
||||||
|
Also stores the image as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFillAmount(UnityEngine.UI.Image,System.Single,System.Single)">
|
||||||
|
<summary>Tweens an Image's fillAmount to the given value.
|
||||||
|
Also stores the image as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach (0 to 1)</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFlexibleSize(UnityEngine.UI.LayoutElement,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens an LayoutElement's flexibleWidth/Height to the given value.
|
||||||
|
Also stores the LayoutElement as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOMinSize(UnityEngine.UI.LayoutElement,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens an LayoutElement's minWidth/Height to the given value.
|
||||||
|
Also stores the LayoutElement as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOPreferredSize(UnityEngine.UI.LayoutElement,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens an LayoutElement's preferredWidth/Height to the given value.
|
||||||
|
Also stores the LayoutElement as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOColor(UnityEngine.UI.Outline,UnityEngine.Color,System.Single)">
|
||||||
|
<summary>Tweens a Outline's effectColor to the given value.
|
||||||
|
Also stores the Outline as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFade(UnityEngine.UI.Outline,System.Single,System.Single)">
|
||||||
|
<summary>Tweens a Outline's effectColor alpha to the given value.
|
||||||
|
Also stores the Outline as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOScale(UnityEngine.UI.Outline,UnityEngine.Vector2,System.Single)">
|
||||||
|
<summary>Tweens a Outline's effectDistance to the given value.
|
||||||
|
Also stores the Outline as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOAnchorPos(UnityEngine.RectTransform,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens a RectTransform's anchoredPosition to the given value.
|
||||||
|
Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOAnchorPos3D(UnityEngine.RectTransform,UnityEngine.Vector3,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens a RectTransform's anchoredPosition3D to the given value.
|
||||||
|
Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOSizeDelta(UnityEngine.RectTransform,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens a RectTransform's sizeDelta to the given value.
|
||||||
|
Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOValue(UnityEngine.UI.Slider,System.Single,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens a Slider's value to the given value.
|
||||||
|
Also stores the Slider as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOColor(UnityEngine.UI.Text,UnityEngine.Color,System.Single)">
|
||||||
|
<summary>Tweens a Text's color to the given value.
|
||||||
|
Also stores the Text as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFade(UnityEngine.UI.Text,System.Single,System.Single)">
|
||||||
|
<summary>Tweens a Text's alpha color to the given value.
|
||||||
|
Also stores the Text as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOText(UnityEngine.UI.Text,System.String,System.Single,System.Boolean,System.String)">
|
||||||
|
<summary>Tweens a Text's text to the given value.
|
||||||
|
Also stores the Text as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end string to tween to</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="scramble">If TRUE the string will appear from a random animation of characters</param>
|
||||||
|
<param name="scrambleChars">A string containing the characters to use for scrambling.
|
||||||
|
Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters.
|
||||||
|
Leave it to NULL (default) to use default ones</param>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
@ -0,0 +1,103 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>DOTween50</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:DG.Tweening.ShortcutExtensions">
|
||||||
|
<summary>
|
||||||
|
Methods that extend known Unity objects and allow to directly create and control tweens from their instances.
|
||||||
|
These, as all DOTween50 methods, require Unity 5.0 or later.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOSetFloat(UnityEngine.Audio.AudioMixer,System.String,System.Single,System.Single)">
|
||||||
|
<summary>Tweens an AudioMixer's exposed float to the given value.
|
||||||
|
Also stores the AudioMixer as the tween's target so it can be used for filtered operations.
|
||||||
|
Note that you need to manually expose a float in an AudioMixerGroup in order to be able to tween it from an AudioMixer.</summary>
|
||||||
|
<param name="floatName">Name given to the exposed float to set</param>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOComplete(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Completes all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens completed
|
||||||
|
(meaning the tweens that don't have infinite loops and were not already complete)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOKill(UnityEngine.Audio.AudioMixer,System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
Kills all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens killed.
|
||||||
|
</summary>
|
||||||
|
<param name="complete">If TRUE completes the tween before killing it</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFlip(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Flips the direction (backwards if it was going forward or viceversa) of all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens flipped.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOGoto(UnityEngine.Audio.AudioMixer,System.Single,System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
Sends to the given position all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens involved.
|
||||||
|
</summary>
|
||||||
|
<param name="to">Time position to reach
|
||||||
|
(if higher than the whole tween duration the tween will simply reach its end)</param>
|
||||||
|
<param name="andPlay">If TRUE will play the tween after reaching the given position, otherwise it will pause it</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOPause(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Pauses all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens paused.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOPlay(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Plays all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens played.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOPlayBackwards(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Plays backwards all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens played.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOPlayForward(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Plays forward all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens played.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DORestart(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Restarts all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens restarted.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DORewind(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Rewinds all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens rewinded.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOTogglePause(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens involved.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>DOTweenEditor</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:DG.DOTweenEditor.DOTweenSetupMenuItem">
|
||||||
|
<summary>
|
||||||
|
Not used as menu item anymore, but as a utiity function
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.DOTweenEditor.DOTweenSetupMenuItem.Setup(System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
Setups DOTween
|
||||||
|
</summary>
|
||||||
|
<param name="partiallySilent">If TRUE, no warning window appears in case there is no need for setup</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.DOTweenEditor.Core.EditorUtils.SetEditorTexture(UnityEngine.Texture2D,UnityEngine.FilterMode,System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Checks that the given editor texture use the correct import settings,
|
||||||
|
and applies them if they're incorrect.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.DOTweenEditor.Core.EditorUtils.DOTweenSetupRequired">
|
||||||
|
<summary>
|
||||||
|
Returns TRUE if addons setup is required.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.DOTweenEditor.Core.EditorUtils.AssetExists(System.String)">
|
||||||
|
<summary>
|
||||||
|
Returns TRUE if the file/directory at the given path exists.
|
||||||
|
</summary>
|
||||||
|
<param name="adbPath">Path, relative to Unity's project folder</param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.DOTweenEditor.Core.EditorUtils.ADBPathToFullPath(System.String)">
|
||||||
|
<summary>
|
||||||
|
Converts the given project-relative path to a full path,
|
||||||
|
with backward (\) slashes).
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.DOTweenEditor.Core.EditorUtils.FullPathToADBPath(System.String)">
|
||||||
|
<summary>
|
||||||
|
Converts the given full path to a path usable with AssetDatabase methods
|
||||||
|
(relative to Unity's project folder, and with the correct Unity forward (/) slashes).
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.DOTweenEditor.Core.EditorUtils.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, either returns NULL or automatically creates it before loading and returning it
|
||||||
|
(depending on the given parameters).
|
||||||
|
</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>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 22 KiB |
@ -0,0 +1,18 @@
|
|||||||
|
DOTween and DOTween Pro are copyright (c) 2014 Daniele Giardini - Demigiant
|
||||||
|
|
||||||
|
// GET STARTED //////////////////////////////////////////////
|
||||||
|
|
||||||
|
- After importing a new DOTween update, select DOTween's Utility Panel from the Tools menu (if it doesn't open automatically) and press the "Setup DOTween..." button to set up additional features based on your Unity version.
|
||||||
|
- In your code, add "using DG.Tweening" to each class where you want to use DOTween.
|
||||||
|
- You're ready to tween. Check out the links below for full documentation and license info.
|
||||||
|
|
||||||
|
|
||||||
|
// LINKS ///////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
DOTween website (documentation, examples, etc): http://dotween.demigiant.com
|
||||||
|
DOTween license: http://dotween.demigiant.com/license.php
|
||||||
|
DOTween repository (Google Code): https://code.google.com/p/dotween/
|
||||||
|
|
||||||
|
// NOTES //////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
- DOTween's Utility Panel can be found under "Tools > DOTween Utility Panel" and also contains other useful options, plus a tab to set DOTween's preferences
|
||||||
BIN
UnityCompatibilityTests.Unity35/Assets/dotween_logo.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
UnityCompatibilityTests.Unity35/Assets/test MAT.mat
Normal file
BIN
UnityCompatibilityTests.Unity35/ProjectSettings/TagManager.asset
Normal file
5
UnityTests.Unity4/Assets/Demigiant.meta
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cb9375ae14b7c6d4da5d6f1482cb5d29
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
5
UnityTests.Unity4/Assets/Demigiant/DOTween.meta
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ad88d42122718d342a246e7d8d8c9983
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
1906
UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 32d3af87ee00b2540b93b3d175025be1
|
||||||
|
TextScriptImporter:
|
||||||
|
userData:
|
||||||
BIN
UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll
Normal file
BIN
UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 75fba9607a513b64984db6d29f41986c
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6cc6d4d0f1606b041be016a1b3105a6e
|
||||||
|
MonoAssemblyImporter:
|
||||||
|
serializedVersion: 1
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
userData:
|
||||||
BIN
UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll
Normal file
BIN
UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 589b8271dd960624a8620bca5ed778db
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cc98104edfc2736418636b4b8c0e3b0b
|
||||||
|
MonoAssemblyImporter:
|
||||||
|
serializedVersion: 1
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
userData:
|
||||||
47
UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.xml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>DOTween43</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:DG.Tweening.ShortcutExtensions">
|
||||||
|
<summary>
|
||||||
|
Methods that extend known Unity objects and allow to directly create and control tweens from their instances.
|
||||||
|
These, as all DOTween43 methods, require Unity 4.3 or later.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOColor(UnityEngine.SpriteRenderer,UnityEngine.Color,System.Single)">
|
||||||
|
<summary>Tweens a SpriteRenderer's color to the given value.
|
||||||
|
Also stores the spriteRenderer as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFade(UnityEngine.SpriteRenderer,System.Single,System.Single)">
|
||||||
|
<summary>Tweens a Material's alpha color to the given value.
|
||||||
|
Also stores the spriteRenderer as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOMove(UnityEngine.Rigidbody2D,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens a Rigidbody2D's position to the given value.
|
||||||
|
Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOMoveX(UnityEngine.Rigidbody2D,System.Single,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens a Rigidbody2D's X position to the given value.
|
||||||
|
Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOMoveY(UnityEngine.Rigidbody2D,System.Single,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens a Rigidbody2D's Y position to the given value.
|
||||||
|
Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DORotate(UnityEngine.Rigidbody2D,System.Single,System.Single)">
|
||||||
|
<summary>Tweens a Rigidbody2D's rotation to the given value.
|
||||||
|
Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6e08c600d5d981242b5d3c1d825106d6
|
||||||
|
TextScriptImporter:
|
||||||
|
userData:
|
||||||
BIN
UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll
Normal file
BIN
UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 773153d471589be45acb355405a2bcf5
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: da65c15675bf19f4c953026614098b09
|
||||||
|
MonoAssemblyImporter:
|
||||||
|
serializedVersion: 1
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
userData:
|
||||||
120
UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.xml
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>DOTween46</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:DG.Tweening.ShortcutExtensions">
|
||||||
|
<summary>
|
||||||
|
Methods that extend known Unity objects and allow to directly create and control tweens from their instances.
|
||||||
|
These, as all DOTween46 methods, require Unity 4.6 or later.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFade(UnityEngine.CanvasGroup,System.Single,System.Single)">
|
||||||
|
<summary>Tweens a CanvasGroup's alpha color to the given value.
|
||||||
|
Also stores the canvasGroup as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOColor(UnityEngine.UI.Graphic,UnityEngine.Color,System.Single)">
|
||||||
|
<summary>Tweens an Graphic's color to the given value.
|
||||||
|
Also stores the image as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFade(UnityEngine.UI.Graphic,System.Single,System.Single)">
|
||||||
|
<summary>Tweens an Graphic's alpha color to the given value.
|
||||||
|
Also stores the image as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOColor(UnityEngine.UI.Image,UnityEngine.Color,System.Single)">
|
||||||
|
<summary>Tweens an Image's color to the given value.
|
||||||
|
Also stores the image as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFade(UnityEngine.UI.Image,System.Single,System.Single)">
|
||||||
|
<summary>Tweens an Image's alpha color to the given value.
|
||||||
|
Also stores the image as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFillAmount(UnityEngine.UI.Image,System.Single,System.Single)">
|
||||||
|
<summary>Tweens an Image's fillAmount to the given value.
|
||||||
|
Also stores the image as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach (0 to 1)</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFlexibleSize(UnityEngine.UI.LayoutElement,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens an LayoutElement's flexibleWidth/Height to the given value.
|
||||||
|
Also stores the LayoutElement as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOMinSize(UnityEngine.UI.LayoutElement,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens an LayoutElement's minWidth/Height to the given value.
|
||||||
|
Also stores the LayoutElement as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOPreferredSize(UnityEngine.UI.LayoutElement,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens an LayoutElement's preferredWidth/Height to the given value.
|
||||||
|
Also stores the LayoutElement as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOColor(UnityEngine.UI.Outline,UnityEngine.Color,System.Single)">
|
||||||
|
<summary>Tweens a Outline's effectColor to the given value.
|
||||||
|
Also stores the Outline as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFade(UnityEngine.UI.Outline,System.Single,System.Single)">
|
||||||
|
<summary>Tweens a Outline's effectColor alpha to the given value.
|
||||||
|
Also stores the Outline as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOScale(UnityEngine.UI.Outline,UnityEngine.Vector2,System.Single)">
|
||||||
|
<summary>Tweens a Outline's effectDistance to the given value.
|
||||||
|
Also stores the Outline as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOAnchorPos(UnityEngine.RectTransform,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens a RectTransform's anchoredPosition to the given value.
|
||||||
|
Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOAnchorPos3D(UnityEngine.RectTransform,UnityEngine.Vector3,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens a RectTransform's anchoredPosition3D to the given value.
|
||||||
|
Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOSizeDelta(UnityEngine.RectTransform,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens a RectTransform's sizeDelta to the given value.
|
||||||
|
Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOValue(UnityEngine.UI.Slider,System.Single,System.Single,System.Boolean)">
|
||||||
|
<summary>Tweens a Slider's value to the given value.
|
||||||
|
Also stores the Slider as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOColor(UnityEngine.UI.Text,UnityEngine.Color,System.Single)">
|
||||||
|
<summary>Tweens a Text's color to the given value.
|
||||||
|
Also stores the Text as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFade(UnityEngine.UI.Text,System.Single,System.Single)">
|
||||||
|
<summary>Tweens a Text's alpha color to the given value.
|
||||||
|
Also stores the Text as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOText(UnityEngine.UI.Text,System.String,System.Single,System.Boolean,System.String)">
|
||||||
|
<summary>Tweens a Text's text to the given value.
|
||||||
|
Also stores the Text as the tween's target so it can be used for filtered operations</summary>
|
||||||
|
<param name="endValue">The end string to tween to</param><param name="duration">The duration of the tween</param>
|
||||||
|
<param name="scramble">If TRUE the string will appear from a random animation of characters</param>
|
||||||
|
<param name="scrambleChars">A string containing the characters to use for scrambling.
|
||||||
|
Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters.
|
||||||
|
Leave it to NULL (default) to use default ones</param>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d27835d6231b6aa48841c3f8b2214fa8
|
||||||
|
TextScriptImporter:
|
||||||
|
userData:
|
||||||
BIN
UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll
Normal file
BIN
UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll.mdb
Normal file
103
UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.xml
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>DOTween50</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:DG.Tweening.ShortcutExtensions">
|
||||||
|
<summary>
|
||||||
|
Methods that extend known Unity objects and allow to directly create and control tweens from their instances.
|
||||||
|
These, as all DOTween50 methods, require Unity 5.0 or later.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOSetFloat(UnityEngine.Audio.AudioMixer,System.String,System.Single,System.Single)">
|
||||||
|
<summary>Tweens an AudioMixer's exposed float to the given value.
|
||||||
|
Also stores the AudioMixer as the tween's target so it can be used for filtered operations.
|
||||||
|
Note that you need to manually expose a float in an AudioMixerGroup in order to be able to tween it from an AudioMixer.</summary>
|
||||||
|
<param name="floatName">Name given to the exposed float to set</param>
|
||||||
|
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOComplete(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Completes all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens completed
|
||||||
|
(meaning the tweens that don't have infinite loops and were not already complete)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOKill(UnityEngine.Audio.AudioMixer,System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
Kills all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens killed.
|
||||||
|
</summary>
|
||||||
|
<param name="complete">If TRUE completes the tween before killing it</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOFlip(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Flips the direction (backwards if it was going forward or viceversa) of all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens flipped.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOGoto(UnityEngine.Audio.AudioMixer,System.Single,System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
Sends to the given position all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens involved.
|
||||||
|
</summary>
|
||||||
|
<param name="to">Time position to reach
|
||||||
|
(if higher than the whole tween duration the tween will simply reach its end)</param>
|
||||||
|
<param name="andPlay">If TRUE will play the tween after reaching the given position, otherwise it will pause it</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOPause(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Pauses all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens paused.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOPlay(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Plays all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens played.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOPlayBackwards(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Plays backwards all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens played.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOPlayForward(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Plays forward all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens played.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DORestart(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Restarts all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens restarted.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DORewind(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Rewinds all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens rewinded.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.Tweening.ShortcutExtensions.DOTogglePause(UnityEngine.Audio.AudioMixer)">
|
||||||
|
<summary>
|
||||||
|
Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference
|
||||||
|
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||||
|
and returns the total number of tweens involved.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
5
UnityTests.Unity4/Assets/Demigiant/DOTween/Editor.meta
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3500705e15d89ff43a4ee7740f47688f
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>DOTweenEditor</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:DG.DOTweenEditor.DOTweenSetupMenuItem">
|
||||||
|
<summary>
|
||||||
|
Not used as menu item anymore, but as a utiity function
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.DOTweenEditor.DOTweenSetupMenuItem.Setup(System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
Setups DOTween
|
||||||
|
</summary>
|
||||||
|
<param name="partiallySilent">If TRUE, no warning window appears in case there is no need for setup</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.DOTweenEditor.Core.EditorUtils.SetEditorTexture(UnityEngine.Texture2D,UnityEngine.FilterMode,System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Checks that the given editor texture use the correct import settings,
|
||||||
|
and applies them if they're incorrect.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.DOTweenEditor.Core.EditorUtils.DOTweenSetupRequired">
|
||||||
|
<summary>
|
||||||
|
Returns TRUE if addons setup is required.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.DOTweenEditor.Core.EditorUtils.AssetExists(System.String)">
|
||||||
|
<summary>
|
||||||
|
Returns TRUE if the file/directory at the given path exists.
|
||||||
|
</summary>
|
||||||
|
<param name="adbPath">Path, relative to Unity's project folder</param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.DOTweenEditor.Core.EditorUtils.ADBPathToFullPath(System.String)">
|
||||||
|
<summary>
|
||||||
|
Converts the given project-relative path to a full path,
|
||||||
|
with backward (\) slashes).
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.DOTweenEditor.Core.EditorUtils.FullPathToADBPath(System.String)">
|
||||||
|
<summary>
|
||||||
|
Converts the given full path to a path usable with AssetDatabase methods
|
||||||
|
(relative to Unity's project folder, and with the correct Unity forward (/) slashes).
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:DG.DOTweenEditor.Core.EditorUtils.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, either returns NULL or automatically creates it before loading and returning it
|
||||||
|
(depending on the given parameters).
|
||||||
|
</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>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b1520efae3508be4a84aa316d04fc675
|
||||||
|
TextScriptImporter:
|
||||||
|
userData:
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f485bbcdc045cfb46ad37827b2f24d67
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 15321a018ba7b9f49a6442a41ee5dc70
|
||||||
|
MonoAssemblyImporter:
|
||||||
|
serializedVersion: 1
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
userData:
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a09669494da114f4fb79d0b583615396
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b7c3cf2b694a2ab4d8e1b5a45b028052
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,47 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b51ee612bc8b58e45b114f4f88219aa4
|
||||||
|
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
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: -3
|
||||||
|
maxTextureSize: 128
|
||||||
|
textureSettings:
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: -1
|
||||||
|
wrapMode: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 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:
|
||||||
|
After Width: | Height: | Size: 4.3 KiB |
@ -0,0 +1,47 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cbbac93ae244da644b3399f418baca2c
|
||||||
|
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
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: -3
|
||||||
|
maxTextureSize: 256
|
||||||
|
textureSettings:
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: -1
|
||||||
|
wrapMode: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 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:
|
||||||
|
After Width: | Height: | Size: 4.3 KiB |
@ -0,0 +1,47 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 47b1c758170446e478d8369151ad68c0
|
||||||
|
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
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: -1
|
||||||
|
maxTextureSize: 1024
|
||||||
|
textureSettings:
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -1
|
||||||
|
wrapMode: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 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:
|
||||||
|
After Width: | Height: | Size: 22 KiB |
@ -0,0 +1,47 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c75c360efddf317489499b0b8acad6be
|
||||||
|
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
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: -3
|
||||||
|
maxTextureSize: 512
|
||||||
|
textureSettings:
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: -1
|
||||||
|
wrapMode: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 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:
|
||||||
18
UnityTests.Unity4/Assets/Demigiant/DOTween/readme.txt
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
DOTween and DOTween Pro are copyright (c) 2014 Daniele Giardini - Demigiant
|
||||||
|
|
||||||
|
// GET STARTED //////////////////////////////////////////////
|
||||||
|
|
||||||
|
- After importing a new DOTween update, select DOTween's Utility Panel from the Tools menu (if it doesn't open automatically) and press the "Setup DOTween..." button to set up additional features based on your Unity version.
|
||||||
|
- In your code, add "using DG.Tweening" to each class where you want to use DOTween.
|
||||||
|
- You're ready to tween. Check out the links below for full documentation and license info.
|
||||||
|
|
||||||
|
|
||||||
|
// LINKS ///////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
DOTween website (documentation, examples, etc): http://dotween.demigiant.com
|
||||||
|
DOTween license: http://dotween.demigiant.com/license.php
|
||||||
|
DOTween repository (Google Code): https://code.google.com/p/dotween/
|
||||||
|
|
||||||
|
// NOTES //////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
- DOTween's Utility Panel can be found under "Tools > DOTween Utility Panel" and also contains other useful options, plus a tab to set DOTween's preferences
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d528b87e51999eb4bb9bb1050815c97d
|
||||||
|
TextScriptImporter:
|
||||||
|
userData:
|
||||||
5
UnityTests.Unity4/Assets/Dice.meta
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9208a251d3a0ed245a2207b7959b44b0
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
48
UnityTests.Unity4/Assets/Dice/-Read-Me-.txt
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
INSTALLATION FROM UNITY ASSET STORE
|
||||||
|
|
||||||
|
After you download and import this package from the Unity Asset Store, this product, containing the fully scripted and functional dice, will be automaticly installed.
|
||||||
|
|
||||||
|
INSTALLATION AFTER DOWNLOAD FROM WWW.WYRMTALE.COM WEBSITE
|
||||||
|
|
||||||
|
After you have downloaded the component archive file (Dices-Light.rar) you will find a Dices-Light.unitypackage when you extract the files from the archive.
|
||||||
|
|
||||||
|
To install this package :
|
||||||
|
|
||||||
|
- create an empty Unity Project.
|
||||||
|
- select [Menu] Assets->Import Package
|
||||||
|
- select the extracted Dices-Light.unitypackage and import all assets.
|
||||||
|
|
||||||
|
After importing is complete, you will be ready to go.
|
||||||
|
|
||||||
|
----------------
|
||||||
|
|
||||||
|
!!IMPORTANT!! - Set you project gravity to [-60] for the best rolling physics simulation behaviour
|
||||||
|
[Menu] Edit->Project Settings->Physics
|
||||||
|
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
|
||||||
|
Under [Project] Dice->Resources->Prefabs , you will find the full scripted and textured dice prefabs that you
|
||||||
|
can use in your project. The prefabs already have collider and rigid body components.
|
||||||
|
|
||||||
|
If you would want to change physics behaviour you could alter the physics material that all dice use. This physics material can be found at [Project] Dice->Materials->general = 'dice-material'
|
||||||
|
|
||||||
|
Each prefab has a Class Die (subclassed) script that contains a 'value' attribute that displays the 'side-up' value at all times.
|
||||||
|
|
||||||
|
Under [Project] Dice->Plugins, you find a Dice.cs script file that holds some static 'helper' methods that you can use to roll dice and calculate or display the values.
|
||||||
|
|
||||||
|
Under [Project] Dice->Scenes->Demo you will find the demo scene that makes use of the static helper functions.
|
||||||
|
|
||||||
|
All c# code in this project has 'inline' code documentation.
|
||||||
|
|
||||||
|
----------------
|
||||||
|
|
||||||
|
If you have any questions regarding this product send us an email at
|
||||||
|
support@wyrmtale.com
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Thanks for you interest in our components
|
||||||
|
|
||||||
|
The WyrmTale Team.
|
||||||
|
|
||||||
4
UnityTests.Unity4/Assets/Dice/-Read-Me-.txt.meta
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3c108f41fea98c449ae540d327852ac2
|
||||||
|
TextScriptImporter:
|
||||||
|
userData:
|
||||||
5
UnityTests.Unity4/Assets/Dice/Materials.meta
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2c042466e7fa4ef43a6ae76ff8e1692f
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
5
UnityTests.Unity4/Assets/Dice/Materials/d6.meta
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ea1263503347eb34ea2604b95084ea6f
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
BIN
UnityTests.Unity4/Assets/Dice/Materials/d6/d6-white-dots.mat
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 90eb9b65faccf864a8ec41e32802c85c
|
||||||
|
labels:
|
||||||
|
- d6
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
5
UnityTests.Unity4/Assets/Dice/Prefabs.meta
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7b6b8bf2adac7f148a19f09b7dba5a76
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
BIN
UnityTests.Unity4/Assets/Dice/Prefabs/Dice.prefab
Normal file
4
UnityTests.Unity4/Assets/Dice/Prefabs/Dice.prefab.meta
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c79f2f6981de7cd469e2dce06afe35c7
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
5
UnityTests.Unity4/Assets/Dice/Prefabs/_FBX.meta
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 37ba839696bf2ba41a1585af770bb7f1
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
3155
UnityTests.Unity4/Assets/Dice/Prefabs/_FBX/Dice.fbx
Normal file
95
UnityTests.Unity4/Assets/Dice/Prefabs/_FBX/Dice.fbx.meta
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e80dc46523d8f9f4cb6de5ffdb7b8639
|
||||||
|
ModelImporter:
|
||||||
|
serializedVersion: 16
|
||||||
|
fileIDToRecycleName:
|
||||||
|
100000: //RootNode
|
||||||
|
100002: d6
|
||||||
|
100006: d6Low
|
||||||
|
100016: d10
|
||||||
|
100018: d10Low
|
||||||
|
400000: //RootNode
|
||||||
|
400002: d6
|
||||||
|
400006: d6Low
|
||||||
|
400016: d10
|
||||||
|
400018: d10Low
|
||||||
|
2300000: d6
|
||||||
|
2300004: d6Low
|
||||||
|
2300014: d10
|
||||||
|
2300016: d10Low
|
||||||
|
3300000: d6
|
||||||
|
3300004: d6Low
|
||||||
|
3300014: d10
|
||||||
|
3300016: d10Low
|
||||||
|
4300000: Cube
|
||||||
|
4300002: d6
|
||||||
|
4300004: d6_beveled
|
||||||
|
4300006: d4
|
||||||
|
4300008: d12
|
||||||
|
4300010: d8
|
||||||
|
4300012: d8Low
|
||||||
|
4300014: d4Low
|
||||||
|
4300016: d6Low
|
||||||
|
4300018: d10Low
|
||||||
|
4300020: d10
|
||||||
|
4300022: d12Low_001
|
||||||
|
4300024: d12Low
|
||||||
|
4300026: d20Low
|
||||||
|
4300028: d20
|
||||||
|
4300030: galery
|
||||||
|
7400000: Default Take
|
||||||
|
11100000: //RootNode
|
||||||
|
materials:
|
||||||
|
importMaterials: 0
|
||||||
|
materialName: 3
|
||||||
|
materialSearch: 1
|
||||||
|
animations:
|
||||||
|
legacyGenerateAnimations: 4
|
||||||
|
bakeSimulation: 0
|
||||||
|
optimizeGameObjects: 0
|
||||||
|
motionNodeName:
|
||||||
|
animationCompression: 1
|
||||||
|
animationRotationError: .5
|
||||||
|
animationPositionError: .5
|
||||||
|
animationScaleError: .5
|
||||||
|
animationWrapMode: 0
|
||||||
|
extraExposedTransformPaths: []
|
||||||
|
clipAnimations: []
|
||||||
|
isReadable: 1
|
||||||
|
meshes:
|
||||||
|
lODScreenPercentages: []
|
||||||
|
globalScale: 1
|
||||||
|
meshCompression: 0
|
||||||
|
addColliders: 0
|
||||||
|
importBlendShapes: 1
|
||||||
|
swapUVChannels: 0
|
||||||
|
generateSecondaryUV: 0
|
||||||
|
useFileUnits: 1
|
||||||
|
optimizeMeshForGPU: 1
|
||||||
|
weldVertices: 1
|
||||||
|
secondaryUVAngleDistortion: 8
|
||||||
|
secondaryUVAreaDistortion: 15.000001
|
||||||
|
secondaryUVHardAngle: 88
|
||||||
|
secondaryUVPackMargin: 4
|
||||||
|
tangentSpace:
|
||||||
|
normalSmoothAngle: 99
|
||||||
|
splitTangentsAcrossUV: 1
|
||||||
|
normalImportMode: 0
|
||||||
|
tangentImportMode: 0
|
||||||
|
importAnimation: 1
|
||||||
|
copyAvatar: 0
|
||||||
|
humanDescription:
|
||||||
|
human: []
|
||||||
|
skeleton: []
|
||||||
|
armTwist: .5
|
||||||
|
foreArmTwist: .5
|
||||||
|
upperLegTwist: .5
|
||||||
|
legTwist: .5
|
||||||
|
armStretch: .0500000007
|
||||||
|
legStretch: .0500000007
|
||||||
|
feetSpacing: 0
|
||||||
|
rootMotionBoneName:
|
||||||
|
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||||
|
animationType: 0
|
||||||
|
additionalBone: 0
|
||||||
|
userData:
|
||||||
5
UnityTests.Unity4/Assets/Dice/Textures.meta
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: edc7fb94cecaa6242ae70fea7401c11a
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
5
UnityTests.Unity4/Assets/Dice/Textures/d6.meta
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a38ffb9a09e9db44182065c0bedd905b
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
BIN
UnityTests.Unity4/Assets/Dice/Textures/d6/d6-white-dots.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
@ -0,0 +1,47 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9e9c1db26c117a54b95cb11b5c5c4925
|
||||||
|
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
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: -1
|
||||||
|
maxTextureSize: 1024
|
||||||
|
textureSettings:
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -1
|
||||||
|
wrapMode: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 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:
|
||||||
5
UnityTests.Unity4/Assets/Editor.meta
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 805cdb447a0a94f85a92205ddec8d72e
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
504
UnityTests.Unity4/Assets/Editor/GoDummyPathEditor.cs
Normal file
@ -0,0 +1,504 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[CustomEditor( typeof( GoDummyPath ) )]
|
||||||
|
public class GoDummyPathEditor : Editor
|
||||||
|
{
|
||||||
|
private GoDummyPath _target;
|
||||||
|
private GUIStyle _labelStyle;
|
||||||
|
private GUIStyle _indexStyle;
|
||||||
|
|
||||||
|
private int _insertIndex = 0;
|
||||||
|
private float _snapDistance = 5f;
|
||||||
|
private bool _showNodeDetails;
|
||||||
|
private bool _fileLoadSaveDetails;
|
||||||
|
private int _selectedNodeIndex = -1;
|
||||||
|
|
||||||
|
|
||||||
|
#region Monobehaviour and Editor
|
||||||
|
|
||||||
|
void OnEnable()
|
||||||
|
{
|
||||||
|
// setup the font for the 'begin' 'end' text
|
||||||
|
_labelStyle = new GUIStyle();
|
||||||
|
_labelStyle.fontStyle = FontStyle.Bold;
|
||||||
|
_labelStyle.normal.textColor = Color.white;
|
||||||
|
_labelStyle.fontSize = 16;
|
||||||
|
|
||||||
|
_indexStyle = new GUIStyle();
|
||||||
|
_indexStyle.fontStyle = FontStyle.Bold;
|
||||||
|
_indexStyle.normal.textColor = Color.white;
|
||||||
|
_indexStyle.fontSize = 12;
|
||||||
|
|
||||||
|
_target = (GoDummyPath)target;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public override void OnInspectorGUI()
|
||||||
|
{
|
||||||
|
// what kind of handles shall we use?
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
EditorGUILayout.PrefixLabel( "Use Standard Handles" );
|
||||||
|
_target.useStandardHandles = EditorGUILayout.Toggle( _target.useStandardHandles );
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
|
||||||
|
// path name:
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
EditorGUILayout.PrefixLabel( "Route Name" );
|
||||||
|
_target.pathName = EditorGUILayout.TextField( _target.pathName );
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
if( _target.pathName == string.Empty )
|
||||||
|
_target.pathName = "route" + Random.Range( 1, 100000 );
|
||||||
|
|
||||||
|
|
||||||
|
// path color:
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
EditorGUILayout.PrefixLabel( "Route Color" );
|
||||||
|
_target.pathColor = EditorGUILayout.ColorField( _target.pathColor );
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
|
||||||
|
// force straight lines:
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
EditorGUILayout.PrefixLabel( "Force Straight Line Path" );
|
||||||
|
_target.forceStraightLinePath = EditorGUILayout.Toggle( _target.forceStraightLinePath );
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
|
||||||
|
// resolution
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
EditorGUILayout.PrefixLabel( "Editor Drawing Resolution" );
|
||||||
|
_target.pathResolution = EditorGUILayout.IntSlider( _target.pathResolution, 2, 100 );
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
|
||||||
|
EditorGUILayout.Separator();
|
||||||
|
|
||||||
|
|
||||||
|
// insert node - we need 3 or more nodes for insert to make sense
|
||||||
|
if( _target.nodes.Count > 2 )
|
||||||
|
{
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
EditorGUILayout.PrefixLabel( "Insert Node" );
|
||||||
|
_insertIndex = EditorGUILayout.IntField( _insertIndex );
|
||||||
|
if( GUILayout.Button( "Insert" ) )
|
||||||
|
{
|
||||||
|
// validate the index
|
||||||
|
if( _insertIndex >= 0 && _insertIndex < _target.nodes.Count )
|
||||||
|
{
|
||||||
|
// insert the node offsetting it a bit from the previous node
|
||||||
|
var copyNodeIndex = _insertIndex == 0 ? 0 : _insertIndex;
|
||||||
|
var copyNode = _target.nodes[copyNodeIndex];
|
||||||
|
copyNode.x += 10;
|
||||||
|
copyNode.z += 10;
|
||||||
|
|
||||||
|
insertNodeAtIndex( copyNode, _insertIndex );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// close route?
|
||||||
|
if( GUILayout.Button( "Close Path" ) )
|
||||||
|
{
|
||||||
|
Undo.RecordObject( _target, "Path Vector Changed" );
|
||||||
|
closeRoute();
|
||||||
|
GUI.changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// shift the start point to the origin
|
||||||
|
if( GUILayout.Button( "Shift Path to Start at Origin" ) )
|
||||||
|
{
|
||||||
|
Undo.RecordObject( _target, "Path Vector Changed" );
|
||||||
|
|
||||||
|
var offset = Vector3.zero;
|
||||||
|
|
||||||
|
// see what kind of path we are. the simplest case is just a straight line
|
||||||
|
var path = new GoSpline( _target.nodes, _target.forceStraightLinePath );
|
||||||
|
if( path.splineType == GoSplineType.StraightLine || _target.nodes.Count < 5 )
|
||||||
|
offset = Vector3.zero - _target.nodes[0];
|
||||||
|
else
|
||||||
|
offset = Vector3.zero - _target.nodes[1];
|
||||||
|
|
||||||
|
for( var i = 0; i < _target.nodes.Count; i++ )
|
||||||
|
_target.nodes[i] += offset;
|
||||||
|
|
||||||
|
GUI.changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// reverse
|
||||||
|
if( GUILayout.Button( "Reverse Path" ) )
|
||||||
|
{
|
||||||
|
Undo.RecordObject( _target, "Path Vector Changed" );
|
||||||
|
_target.nodes.Reverse();
|
||||||
|
GUI.changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// persist to disk
|
||||||
|
EditorGUILayout.Space();
|
||||||
|
EditorGUILayout.LabelField( "Save to/Read from Disk" );
|
||||||
|
|
||||||
|
EditorGUILayout.Space();
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
EditorGUILayout.PrefixLabel( "Serialize and Save Path" );
|
||||||
|
if( GUILayout.Button( "Save" ) )
|
||||||
|
{
|
||||||
|
var path = EditorUtility.SaveFilePanel( "Save path", Application.dataPath + "/StreamingAssets", _target.pathName + ".asset", "asset" );
|
||||||
|
if( path != string.Empty )
|
||||||
|
{
|
||||||
|
persistRouteToDisk( path );
|
||||||
|
|
||||||
|
// fetch the filename and set it as the routeName
|
||||||
|
_target.pathName = Path.GetFileName( path ).Replace( ".asset", string.Empty );
|
||||||
|
GUI.changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
|
||||||
|
// load from disk
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
EditorGUILayout.PrefixLabel( "Load saved path" );
|
||||||
|
if( GUILayout.Button( "Load" ) )
|
||||||
|
{
|
||||||
|
var path = EditorUtility.OpenFilePanel( "Choose path to load", Path.Combine( Application.dataPath, "StreamingAssets" ), "asset" );
|
||||||
|
if( path != string.Empty )
|
||||||
|
{
|
||||||
|
if( !File.Exists( path ) )
|
||||||
|
{
|
||||||
|
EditorUtility.DisplayDialog( "File does not exist", "Path couldn't find the file you specified", "Close" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_target.nodes = GoSpline.bytesToVector3List( File.ReadAllBytes( path ) );
|
||||||
|
_target.pathName = Path.GetFileName( path ).Replace( ".asset", string.Empty );
|
||||||
|
GUI.changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
|
||||||
|
// node display
|
||||||
|
EditorGUILayout.Space();
|
||||||
|
_showNodeDetails = EditorGUILayout.Foldout( _showNodeDetails, "Show Node Values" );
|
||||||
|
if( _showNodeDetails )
|
||||||
|
{
|
||||||
|
EditorGUI.indentLevel++;
|
||||||
|
for( int i = 0; i < _target.nodes.Count; i++ )
|
||||||
|
_target.nodes[i] = EditorGUILayout.Vector3Field( "Node " + ( i + 1 ), _target.nodes[i] );
|
||||||
|
EditorGUI.indentLevel--;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// instructions
|
||||||
|
EditorGUILayout.Space();
|
||||||
|
EditorGUILayout.HelpBox( "While dragging a node, hold down Ctrl and slowly move the cursor to snap to a nearby point\n\n" +
|
||||||
|
"Click the 'Close Path' button to add a new node that will close out the current path.\n\n" +
|
||||||
|
"Hold Command while dragging a node to snap in 5 point increments\n\n" +
|
||||||
|
"Double click to add a new node at the end of the path\n\n" +
|
||||||
|
"Hold down alt while adding a node to prepend the new node at the front of the route\n\n" +
|
||||||
|
"Press delete or backspace to delete the selected node\n\n" +
|
||||||
|
"NOTE: make sure you have the pan tool selected while editing paths", MessageType.None );
|
||||||
|
|
||||||
|
|
||||||
|
// update and redraw:
|
||||||
|
if( GUI.changed )
|
||||||
|
{
|
||||||
|
EditorUtility.SetDirty( _target );
|
||||||
|
Repaint();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void OnSceneGUI()
|
||||||
|
{
|
||||||
|
if( !_target.gameObject.activeSelf )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// handle current selection and node addition via double click or ctrl click
|
||||||
|
if( Event.current.type == EventType.mouseDown )
|
||||||
|
{
|
||||||
|
var nearestIndex = getNearestNodeForMousePosition( Event.current.mousePosition );
|
||||||
|
_selectedNodeIndex = nearestIndex;
|
||||||
|
|
||||||
|
// double click to add
|
||||||
|
if( Event.current.clickCount > 1 )
|
||||||
|
{
|
||||||
|
var translatedPoint = HandleUtility.GUIPointToWorldRay( Event.current.mousePosition )
|
||||||
|
.GetPoint( ( _target.transform.position - Camera.current.transform.position ).magnitude );
|
||||||
|
|
||||||
|
Undo.RecordObject( _target, "Path Node Added" );
|
||||||
|
|
||||||
|
// if alt is down then prepend the node to the beginning
|
||||||
|
if( Event.current.alt )
|
||||||
|
insertNodeAtIndex( translatedPoint, 0 );
|
||||||
|
else
|
||||||
|
appendNodeAtPoint( translatedPoint );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if( _selectedNodeIndex >= 0 )
|
||||||
|
{
|
||||||
|
// shall we delete the selected node?
|
||||||
|
if( Event.current.keyCode == KeyCode.Delete || Event.current.keyCode == KeyCode.Backspace )
|
||||||
|
{
|
||||||
|
if (_target.nodes.Count > 2) {
|
||||||
|
Undo.RecordObject( _target, "Path Node Deleted" );
|
||||||
|
Event.current.Use();
|
||||||
|
removeNodeAtIndex( _selectedNodeIndex );
|
||||||
|
_selectedNodeIndex = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if( _target.nodes.Count > 1 )
|
||||||
|
{
|
||||||
|
// allow path adjustment undo:
|
||||||
|
Undo.RecordObject( _target, "Path Vector Changed" );
|
||||||
|
|
||||||
|
// path begin and end labels or just one if the path is closed
|
||||||
|
if( Vector3.Distance( _target.nodes[0], _target.nodes[_target.nodes.Count - 1] ) == 0 )
|
||||||
|
{
|
||||||
|
Handles.Label( _target.nodes[0], " Begin and End", _labelStyle );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Handles.Label( _target.nodes[0], " Begin", _labelStyle );
|
||||||
|
Handles.Label( _target.nodes[_target.nodes.Count - 1], " End", _labelStyle );
|
||||||
|
}
|
||||||
|
|
||||||
|
// draw the handles, arrows and lines
|
||||||
|
drawRoute();
|
||||||
|
|
||||||
|
for( var i = 0; i < _target.nodes.Count; i++ )
|
||||||
|
{
|
||||||
|
Handles.color = _target.pathColor;
|
||||||
|
|
||||||
|
// dont label the first and last nodes
|
||||||
|
if( i > 0 && i < _target.nodes.Count - 1 )
|
||||||
|
Handles.Label( _target.nodes[i] + new Vector3( 3f, 0, 1.5f ), i.ToString(), _indexStyle );
|
||||||
|
|
||||||
|
Handles.color = Color.white;
|
||||||
|
if( _target.useStandardHandles )
|
||||||
|
{
|
||||||
|
_target.nodes[i] = Handles.PositionHandle( _target.nodes[i], Quaternion.identity );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// how big shall we draw the handles?
|
||||||
|
var distanceToTarget = Vector3.Distance( SceneView.lastActiveSceneView.camera.transform.position, _target.transform.position );
|
||||||
|
distanceToTarget = Mathf.Abs( distanceToTarget );
|
||||||
|
var handleSize = Mathf.Ceil( distanceToTarget / 75 );
|
||||||
|
|
||||||
|
_target.nodes[i] = Handles.FreeMoveHandle( _target.nodes[i],
|
||||||
|
Quaternion.identity,
|
||||||
|
handleSize,
|
||||||
|
new Vector3( 5, 0, 5 ),
|
||||||
|
Handles.SphereCap );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// should we snap? we need at least 4 nodes because we dont snap to the previous and next nodes
|
||||||
|
if( Event.current.control && _target.nodes.Count > 3 )
|
||||||
|
{
|
||||||
|
// dont even bother checking for snapping to the previous/next nodes
|
||||||
|
var index = getNearestNode( _target.nodes[i], i, i + 1, i - 1 );
|
||||||
|
var nearest = _target.nodes[index];
|
||||||
|
var distanceToNearestNode = Vector3.Distance( nearest, _target.nodes[i] );
|
||||||
|
|
||||||
|
// is it close enough to snap?
|
||||||
|
if( distanceToNearestNode <= _snapDistance )
|
||||||
|
{
|
||||||
|
GUI.changed = true;
|
||||||
|
_target.nodes[i] = nearest;
|
||||||
|
}
|
||||||
|
else if( distanceToNearestNode <= _snapDistance * 2 )
|
||||||
|
{
|
||||||
|
// show which nodes are getting close enough to snap to
|
||||||
|
var color = Color.red;
|
||||||
|
color.a = 0.3f;
|
||||||
|
Handles.color = color;
|
||||||
|
Handles.SphereCap( 0, _target.nodes[i], Quaternion.identity, _snapDistance * 2 );
|
||||||
|
//Handles.DrawWireDisc( _target.nodes[i], Vector3.up, _snapDistance );
|
||||||
|
Handles.color = Color.white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // end for
|
||||||
|
|
||||||
|
|
||||||
|
if( GUI.changed )
|
||||||
|
{
|
||||||
|
Repaint();
|
||||||
|
EditorUtility.SetDirty( _target );
|
||||||
|
}
|
||||||
|
} // end if
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region Private methods
|
||||||
|
|
||||||
|
private void appendNodeAtPoint( Vector3 node )
|
||||||
|
{
|
||||||
|
_target.nodes.Add( node );
|
||||||
|
|
||||||
|
GUI.changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void removeNodeAtIndex( int index )
|
||||||
|
{
|
||||||
|
if( index >= _target.nodes.Count || index < 0 )
|
||||||
|
return;
|
||||||
|
|
||||||
|
_target.nodes.RemoveAt( index );
|
||||||
|
|
||||||
|
GUI.changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void insertNodeAtIndex( Vector3 node, int index )
|
||||||
|
{
|
||||||
|
// validate the index
|
||||||
|
if( index >= 0 && index < _target.nodes.Count )
|
||||||
|
{
|
||||||
|
_target.nodes.Insert( index, node );
|
||||||
|
|
||||||
|
GUI.changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void drawArrowBetweenPoints( Vector3 point1, Vector3 point2 )
|
||||||
|
{
|
||||||
|
// no need to draw arrows for tiny segments
|
||||||
|
var distance = Vector3.Distance( point1, point2 );
|
||||||
|
if( distance < 40 )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// we dont want to be exactly in the middle so we offset the length of the arrow
|
||||||
|
var lerpModifier = ( distance * 0.5f - 25 ) / distance;
|
||||||
|
|
||||||
|
Handles.color = _target.pathColor;
|
||||||
|
|
||||||
|
// get the midpoint between the 2 points
|
||||||
|
var dir = Vector3.Lerp( point1, point2, lerpModifier );
|
||||||
|
var quat = Quaternion.LookRotation( point2 - point1 );
|
||||||
|
Handles.ArrowCap( 0, dir, quat, 25 );
|
||||||
|
|
||||||
|
Handles.color = Color.white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private int getNearestNode( Vector3 pos, params int[] excludeNodes )
|
||||||
|
{
|
||||||
|
var excludeNodesList = new System.Collections.Generic.List<int>( excludeNodes );
|
||||||
|
var bestDistance = float.MaxValue;
|
||||||
|
var index = -1;
|
||||||
|
|
||||||
|
var distance = float.MaxValue;
|
||||||
|
for( var i = _target.nodes.Count - 1; i >= 0; i-- )
|
||||||
|
{
|
||||||
|
if( excludeNodesList.Contains( i ) )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
distance = Vector3.Distance( pos, _target.nodes[i] );
|
||||||
|
if( distance < bestDistance )
|
||||||
|
{
|
||||||
|
bestDistance = distance;
|
||||||
|
index = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private int getNearestNodeForMousePosition( Vector3 mousePos )
|
||||||
|
{
|
||||||
|
var bestDistance = float.MaxValue;
|
||||||
|
var index = -1;
|
||||||
|
|
||||||
|
var distance = float.MaxValue;
|
||||||
|
for( var i = _target.nodes.Count - 1; i >= 0; i-- )
|
||||||
|
{
|
||||||
|
var nodeToGui = HandleUtility.WorldToGUIPoint( _target.nodes[i] );
|
||||||
|
distance = Vector2.Distance( nodeToGui, mousePos );
|
||||||
|
|
||||||
|
if( distance < bestDistance )
|
||||||
|
{
|
||||||
|
bestDistance = distance;
|
||||||
|
index = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// make sure we are close enough to a node
|
||||||
|
if( bestDistance < 10 )
|
||||||
|
return index;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void closeRoute()
|
||||||
|
{
|
||||||
|
// we will use the GoSpline class to handle the dirtywork of closing the path
|
||||||
|
var path = new GoSpline( _target.nodes, _target.forceStraightLinePath );
|
||||||
|
path.closePath();
|
||||||
|
|
||||||
|
_target.nodes = path.nodes;
|
||||||
|
|
||||||
|
GUI.changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void persistRouteToDisk( string path )
|
||||||
|
{
|
||||||
|
var bytes = new List<byte>();
|
||||||
|
|
||||||
|
foreach( var vec in _target.nodes )
|
||||||
|
{
|
||||||
|
bytes.AddRange( System.BitConverter.GetBytes( vec.x ) );
|
||||||
|
bytes.AddRange( System.BitConverter.GetBytes( vec.y ) );
|
||||||
|
bytes.AddRange( System.BitConverter.GetBytes( vec.z ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
File.WriteAllBytes( path, bytes.ToArray() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void drawRoute()
|
||||||
|
{
|
||||||
|
// if we are forcing straight lines just use this setup
|
||||||
|
if( _target.forceStraightLinePath )
|
||||||
|
{
|
||||||
|
// draw just the route here and optional arrows
|
||||||
|
for( var i = 0; i < _target.nodes.Count; i++ )
|
||||||
|
{
|
||||||
|
Handles.color = _target.pathColor;
|
||||||
|
if( i < _target.nodes.Count - 1 )
|
||||||
|
{
|
||||||
|
Handles.DrawLine( _target.nodes[i], _target.nodes[i + 1] );
|
||||||
|
drawArrowBetweenPoints( _target.nodes[i], _target.nodes[i + 1] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 14be03d8aa8eb4defb30eb2e964df151
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
346
UnityTests.Unity4/Assets/EnginesComparison.cs
Normal file
@ -0,0 +1,346 @@
|
|||||||
|
using DG.Tweening;
|
||||||
|
using Holoville.DebugFramework.Components;
|
||||||
|
using Holoville.HOTween;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class EnginesComparison : MonoBehaviour
|
||||||
|
{
|
||||||
|
public GameObject prefab;
|
||||||
|
|
||||||
|
enum State {
|
||||||
|
Menu,
|
||||||
|
Starting,
|
||||||
|
Executing
|
||||||
|
}
|
||||||
|
enum TestType {
|
||||||
|
Transforms,
|
||||||
|
GenericFloats
|
||||||
|
}
|
||||||
|
enum EngineType {
|
||||||
|
DOTween, HOTween, LeanTween, GoKit, iTween
|
||||||
|
}
|
||||||
|
string[] tweensList = new[] {
|
||||||
|
"1", "10", "100", "500", "1,000", "2,000", "4,000", "8,000", "16,000", "32,000", "64,000", "128,000"
|
||||||
|
};
|
||||||
|
|
||||||
|
TestType testType;
|
||||||
|
EngineType engineType;
|
||||||
|
public static int totTweens;
|
||||||
|
bool disableRenderers;
|
||||||
|
|
||||||
|
State state = State.Menu;
|
||||||
|
HOFpsGadget fpsGadget;
|
||||||
|
float startupTime;
|
||||||
|
Transform container;
|
||||||
|
Action concludeTest;
|
||||||
|
public static Transform[] ts;
|
||||||
|
public static GameObject[] gos;
|
||||||
|
[System.NonSerialized] public float floatVal; // Used by iTween to at least do something during its update
|
||||||
|
|
||||||
|
string testTitle;
|
||||||
|
string[] testTypeList, engineTypeList;
|
||||||
|
int tweensListId = 4;
|
||||||
|
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
GameObject fpsGadgetGo = new GameObject("FPS");
|
||||||
|
DontDestroyOnLoad(fpsGadgetGo);
|
||||||
|
fpsGadget = fpsGadgetGo.AddComponent<HOFpsGadget>();
|
||||||
|
fpsGadget.showMemory = true;
|
||||||
|
|
||||||
|
testTypeList = Enum.GetNames(typeof(TestType));
|
||||||
|
engineTypeList = Enum.GetNames(typeof(EngineType));
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnGUI()
|
||||||
|
{
|
||||||
|
GUILayout.BeginArea(new Rect(10, 10, Screen.width - 20, Screen.height - 20));
|
||||||
|
GUILayout.BeginHorizontal();
|
||||||
|
GUILayout.FlexibleSpace();
|
||||||
|
GUILayout.BeginVertical();
|
||||||
|
GUILayout.FlexibleSpace();
|
||||||
|
|
||||||
|
switch (state) {
|
||||||
|
case State.Menu:
|
||||||
|
testType = (TestType)GUILayout.Toolbar((int)testType, testTypeList);
|
||||||
|
engineType = (EngineType)GUILayout.Toolbar((int)engineType, engineTypeList);
|
||||||
|
tweensListId = GUILayout.Toolbar(tweensListId, tweensList);
|
||||||
|
GUILayout.BeginHorizontal();
|
||||||
|
if (GUILayout.Button("START")) StartCoroutine(StartTest());
|
||||||
|
if (testType == TestType.Transforms) {
|
||||||
|
if (GUILayout.Button("START (renderers disabled)")) {
|
||||||
|
disableRenderers = true;
|
||||||
|
StartCoroutine(StartTest());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
GUILayout.EndHorizontal();
|
||||||
|
GUILayout.FlexibleSpace();
|
||||||
|
break;
|
||||||
|
case State.Starting:
|
||||||
|
GUILayout.Label("Starting the test...");
|
||||||
|
GUILayout.FlexibleSpace();
|
||||||
|
break;
|
||||||
|
case State.Executing:
|
||||||
|
GUILayout.Label(testTitle);
|
||||||
|
if (GUILayout.Button("STOP")) StopTest();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
GUILayout.EndVertical();
|
||||||
|
GUILayout.FlexibleSpace();
|
||||||
|
GUILayout.EndHorizontal();
|
||||||
|
GUILayout.EndArea();
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator StartTest()
|
||||||
|
{
|
||||||
|
state = State.Starting;
|
||||||
|
totTweens = int.Parse(tweensList[tweensListId], System.Globalization.NumberStyles.AllowThousands);
|
||||||
|
testTitle = engineType.ToString();
|
||||||
|
SampleClass[] cs = null;
|
||||||
|
Vector3[] toPositions = null;
|
||||||
|
float[] toFloats = null;
|
||||||
|
// Prepare test
|
||||||
|
switch (testType) {
|
||||||
|
case TestType.Transforms:
|
||||||
|
ts = new Transform[totTweens];
|
||||||
|
gos = new GameObject[totTweens];
|
||||||
|
toPositions = new Vector3[totTweens];
|
||||||
|
container = new GameObject("Container").transform;
|
||||||
|
for (int i = 0; i < totTweens; ++i) {
|
||||||
|
GameObject go = (GameObject)Instantiate(prefab);
|
||||||
|
if (disableRenderers) go.renderer.enabled = false;
|
||||||
|
Transform t = go.transform;
|
||||||
|
t.parent = container;
|
||||||
|
t.position = new Vector3(UnityEngine.Random.Range(-40f, 40f), UnityEngine.Random.Range(-40f, 40f), UnityEngine.Random.Range(-40f, 40f));
|
||||||
|
gos[i] = go;
|
||||||
|
ts[i] = t;
|
||||||
|
toPositions[i] = new Vector3(UnityEngine.Random.Range(-40f, 40f), UnityEngine.Random.Range(-40f, 40f), UnityEngine.Random.Range(-40f, 40f));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TestType.GenericFloats:
|
||||||
|
cs = new SampleClass[totTweens];
|
||||||
|
toFloats = new float[totTweens];
|
||||||
|
for (int i = 0; i < totTweens; ++i) {
|
||||||
|
SampleClass c = new SampleClass(UnityEngine.Random.Range(-100f, 100f));
|
||||||
|
cs[i] = c;
|
||||||
|
toFloats[i] = UnityEngine.Random.Range(-100f, 100f);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
yield return null;
|
||||||
|
|
||||||
|
// Prepare and start engine
|
||||||
|
float time;
|
||||||
|
switch (engineType) {
|
||||||
|
case EngineType.DOTween:
|
||||||
|
testTitle += " v" + DOTween.Version;
|
||||||
|
concludeTest = DOTweenTester.Conclude;
|
||||||
|
DOTween.Init(true, false);
|
||||||
|
DOTween.SetTweensCapacity(totTweens, 0);
|
||||||
|
yield return null;
|
||||||
|
// Start
|
||||||
|
time = Time.realtimeSinceStartup;
|
||||||
|
if (testType == TestType.Transforms) DOTweenTester.Start(ts, toPositions);
|
||||||
|
else DOTweenTester.Start(cs, toFloats);
|
||||||
|
startupTime = Time.realtimeSinceStartup - time;
|
||||||
|
break;
|
||||||
|
case EngineType.HOTween:
|
||||||
|
testTitle += " v" + HOTween.VERSION;
|
||||||
|
concludeTest = HOTweenTester.Conclude;
|
||||||
|
HOTween.Init(true, false, false);
|
||||||
|
yield return null;
|
||||||
|
// Start
|
||||||
|
time = Time.realtimeSinceStartup;
|
||||||
|
if (testType == TestType.Transforms) HOTweenTester.Start(ts, toPositions);
|
||||||
|
else HOTweenTester.Start(cs, toFloats);
|
||||||
|
startupTime = Time.realtimeSinceStartup - time;
|
||||||
|
break;
|
||||||
|
case EngineType.LeanTween:
|
||||||
|
concludeTest = LeanTweenTester.Conclude;
|
||||||
|
LeanTween.init(totTweens + 1);
|
||||||
|
yield return null;
|
||||||
|
// Start
|
||||||
|
time = Time.realtimeSinceStartup;
|
||||||
|
if (testType == TestType.Transforms) LeanTweenTester.Start(gos, toPositions);
|
||||||
|
else LeanTweenTester.Start(this.gameObject, cs, toFloats);
|
||||||
|
startupTime = Time.realtimeSinceStartup - time;
|
||||||
|
break;
|
||||||
|
case EngineType.GoKit:
|
||||||
|
concludeTest = GoKitTester.Conclude;
|
||||||
|
yield return null;
|
||||||
|
// Start
|
||||||
|
time = Time.realtimeSinceStartup;
|
||||||
|
if (testType == TestType.Transforms) GoKitTester.Start(ts, toPositions);
|
||||||
|
else GoKitTester.Start(cs, toFloats);
|
||||||
|
startupTime = Time.realtimeSinceStartup - time;
|
||||||
|
break;
|
||||||
|
case EngineType.iTween:
|
||||||
|
concludeTest = iTweenTester.Conclude;
|
||||||
|
yield return null;
|
||||||
|
// Start
|
||||||
|
time = Time.realtimeSinceStartup;
|
||||||
|
if (testType == TestType.Transforms) iTweenTester.Start(gos, toPositions);
|
||||||
|
else iTweenTester.Start(this.gameObject, cs, toFloats);
|
||||||
|
startupTime = Time.realtimeSinceStartup - time;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
testTitle += " (startup time: " + startupTime + ")";
|
||||||
|
yield return null;
|
||||||
|
|
||||||
|
state = State.Executing;
|
||||||
|
fpsGadget.ResetFps();
|
||||||
|
}
|
||||||
|
|
||||||
|
void StopTest()
|
||||||
|
{
|
||||||
|
state = State.Menu;
|
||||||
|
this.StopAllCoroutines();
|
||||||
|
concludeTest();
|
||||||
|
if (container != null) {
|
||||||
|
Destroy(container.gameObject);
|
||||||
|
container = null;
|
||||||
|
}
|
||||||
|
ts = null;
|
||||||
|
gos = null;
|
||||||
|
disableRenderers = false;
|
||||||
|
GC.Collect();
|
||||||
|
fpsGadget.ResetFps();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UpdateiTweenFloat(float newVal)
|
||||||
|
{
|
||||||
|
// Practically does nothing: iTween can't logically tween many floats
|
||||||
|
// Still a valid test though, and even grants iTween some slack since it will do a LOT less than other engines
|
||||||
|
floatVal = newVal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class DOTweenTester
|
||||||
|
{
|
||||||
|
public static void Start(Transform[] ts, Vector3[] to)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < ts.Length; ++i) {
|
||||||
|
ts[i].DOMove(to[i], 1).SetEase(Ease.InOutQuad).SetLoops(-1, DG.Tweening.LoopType.Yoyo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void Start(SampleClass[] cs, float[] to)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < cs.Length; ++i) {
|
||||||
|
SampleClass c = cs[i];
|
||||||
|
DOTween.To(()=> c.floatVal, x=> c.floatVal = x, to[i], 1).SetEase(Ease.InOutQuad).SetLoops(-1, DG.Tweening.LoopType.Yoyo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void Conclude()
|
||||||
|
{
|
||||||
|
DOTween.Clear(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class HOTweenTester
|
||||||
|
{
|
||||||
|
public static void Start(Transform[] ts, Vector3[] to)
|
||||||
|
{
|
||||||
|
Holoville.HOTween.TweenParms tp = new Holoville.HOTween.TweenParms().Ease(EaseType.EaseInOutQuad).Loops(-1, Holoville.HOTween.LoopType.Yoyo);
|
||||||
|
for (int i = 0; i < ts.Length; ++i) {
|
||||||
|
HOTween.To(ts[i], 1, tp.NewProp("position", to[i]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void Start(SampleClass[] cs, float[] to)
|
||||||
|
{
|
||||||
|
Holoville.HOTween.TweenParms tp = new Holoville.HOTween.TweenParms().Ease(EaseType.EaseInOutQuad).Loops(-1, Holoville.HOTween.LoopType.Yoyo);
|
||||||
|
for (int i = 0; i < cs.Length; ++i) {
|
||||||
|
HOTween.To(cs[i], 1, tp.NewProp("floatVal", to[i]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void Conclude()
|
||||||
|
{
|
||||||
|
HOTween.Kill();
|
||||||
|
UnityEngine.Object.Destroy(GameObject.Find("HOTween"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class LeanTweenTester
|
||||||
|
{
|
||||||
|
public static void Start(GameObject[] gos, Vector3[] to)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < gos.Length; ++i) {
|
||||||
|
LeanTween.move(gos[i], to[i], 1).setEase(LeanTweenType.easeInOutQuad).setRepeat(-1).setLoopType(LeanTweenType.pingPong);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void Start(GameObject target, SampleClass[] cs, float[] to)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < cs.Length; ++i) {
|
||||||
|
SampleClass c = cs[i];
|
||||||
|
LeanTween.value(target, x=> c.floatVal = x, c.floatVal, to[i], 1).setEase(LeanTweenType.easeInOutQuad).setRepeat(-1).setLoopType(LeanTweenType.pingPong);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void Conclude()
|
||||||
|
{
|
||||||
|
LeanTween.reset();
|
||||||
|
UnityEngine.Object.Destroy(GameObject.Find("~LeanTween"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class GoKitTester
|
||||||
|
{
|
||||||
|
public static void Start(Transform[] ts, Vector3[] to)
|
||||||
|
{
|
||||||
|
GoTweenConfig goConfig = new GoTweenConfig().setEaseType(GoEaseType.QuadInOut).setIterations(-1, GoLoopType.PingPong);
|
||||||
|
for (int i = 0; i < ts.Length; ++i) {
|
||||||
|
goConfig.clearProperties();
|
||||||
|
goConfig.addTweenProperty(new PositionTweenProperty(to[i]));
|
||||||
|
Go.to(ts[i], 1, goConfig);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void Start(SampleClass[] cs, float[] to)
|
||||||
|
{
|
||||||
|
GoTweenConfig goConfig = new GoTweenConfig().setEaseType(GoEaseType.QuadInOut).setIterations(-1, GoLoopType.PingPong);
|
||||||
|
for (int i = 0; i < cs.Length; ++i) {
|
||||||
|
goConfig.clearProperties();
|
||||||
|
goConfig.floatProp("floatVal", to[i]);
|
||||||
|
Go.to(cs[i], 1, goConfig);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void Conclude()
|
||||||
|
{
|
||||||
|
if(EnginesComparison.ts != null) for(int i = 0; i < EnginesComparison.ts.Length; ++i) Go.killAllTweensWithTarget(EnginesComparison.ts[i]);
|
||||||
|
UnityEngine.Object.Destroy(GameObject.Find("GoKit (" + EnginesComparison.totTweens + " tweens)"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class iTweenTester
|
||||||
|
{
|
||||||
|
public static void Start(GameObject[] gos, Vector3[] to)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < gos.Length; ++i) {
|
||||||
|
Hashtable hs = new Hashtable();
|
||||||
|
hs.Add("position", to[i]);
|
||||||
|
hs.Add("time", 1);
|
||||||
|
hs.Add("looptype", iTween.LoopType.pingPong);
|
||||||
|
hs.Add("easetype", iTween.EaseType.easeInOutQuad);
|
||||||
|
iTween.MoveTo(gos[i], hs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void Start(GameObject target, SampleClass[] cs, float[] to)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < cs.Length; ++i) {
|
||||||
|
SampleClass c = cs[i];
|
||||||
|
Hashtable hs = new Hashtable();
|
||||||
|
hs.Add("from", c.floatVal);
|
||||||
|
hs.Add("to", to[i]);
|
||||||
|
hs.Add("time", 1);
|
||||||
|
hs.Add("onupdate", "UpdateiTweenFloat");
|
||||||
|
hs.Add("looptype", iTween.LoopType.pingPong);
|
||||||
|
hs.Add("easetype", iTween.EaseType.easeInOutQuad);
|
||||||
|
iTween.ValueTo(target, hs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void Conclude()
|
||||||
|
{
|
||||||
|
iTween.Stop();
|
||||||
|
}
|
||||||
|
}
|
||||||