You've already forked FateViewer
Add project files.
This commit is contained in:
256
Assets/Scripts/SimpleAnimationComponent/Tests/AnimationProxy.cs
Normal file
256
Assets/Scripts/SimpleAnimationComponent/Tests/AnimationProxy.cs
Normal file
@@ -0,0 +1,256 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[RequireComponent(typeof(Animation))]
|
||||
public class AnimationProxy : MonoBehaviour, IAnimation
|
||||
{
|
||||
|
||||
private class AnimationStateProxy: IAnimationState
|
||||
{
|
||||
public AnimationStateProxy(AnimationState state)
|
||||
{
|
||||
m_State = state;
|
||||
}
|
||||
|
||||
private AnimationState m_State;
|
||||
|
||||
public bool enabled
|
||||
{
|
||||
get { return m_State.enabled; }
|
||||
set { m_State.enabled = value; }
|
||||
}
|
||||
|
||||
public bool isValid
|
||||
{
|
||||
get { return (bool)m_State; }
|
||||
}
|
||||
|
||||
public float time
|
||||
{
|
||||
get { return m_State.time; }
|
||||
set { m_State.time = value; }
|
||||
}
|
||||
public float normalizedTime
|
||||
{
|
||||
get { return m_State.normalizedTime; }
|
||||
set { m_State.normalizedTime = value; }
|
||||
}
|
||||
public float speed
|
||||
{
|
||||
get { return m_State.speed; }
|
||||
set { m_State.speed = value; }
|
||||
}
|
||||
|
||||
public string name
|
||||
{
|
||||
get { return m_State.name; }
|
||||
set { m_State.name = value; }
|
||||
}
|
||||
public float weight
|
||||
{
|
||||
get { return m_State.weight; }
|
||||
set { m_State.weight = value; }
|
||||
}
|
||||
public float length
|
||||
{
|
||||
get { return m_State.length; }
|
||||
}
|
||||
|
||||
public AnimationClip clip
|
||||
{
|
||||
get { return m_State.clip; }
|
||||
}
|
||||
|
||||
public WrapMode wrapMode
|
||||
{
|
||||
get { return m_State.wrapMode; }
|
||||
set { m_State.wrapMode = value; }
|
||||
}
|
||||
}
|
||||
|
||||
private Animation m_Animation;
|
||||
|
||||
new private Animation animation
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_Animation == null)
|
||||
{
|
||||
m_Animation = GetComponent<Animation>();
|
||||
}
|
||||
return m_Animation;
|
||||
}
|
||||
}
|
||||
|
||||
public bool animatePhysics
|
||||
{
|
||||
get { return animation.animatePhysics; }
|
||||
set { animation.animatePhysics = value; }
|
||||
}
|
||||
|
||||
public AnimatorCullingMode cullingMode
|
||||
{
|
||||
get
|
||||
{
|
||||
AnimatorCullingMode mode;
|
||||
switch (animation.cullingType)
|
||||
{
|
||||
case AnimationCullingType.AlwaysAnimate:
|
||||
mode = AnimatorCullingMode.AlwaysAnimate;
|
||||
break;
|
||||
case AnimationCullingType.BasedOnRenderers:
|
||||
mode = AnimatorCullingMode.CullCompletely;
|
||||
break;
|
||||
default:
|
||||
mode = AnimatorCullingMode.CullUpdateTransforms;
|
||||
break;
|
||||
}
|
||||
return mode;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
AnimationCullingType type;
|
||||
switch(value)
|
||||
{
|
||||
case AnimatorCullingMode.AlwaysAnimate:
|
||||
type = AnimationCullingType.AlwaysAnimate;
|
||||
break;
|
||||
default:
|
||||
type = AnimationCullingType.BasedOnRenderers;
|
||||
break;
|
||||
|
||||
}
|
||||
animation.cullingType = type;
|
||||
}
|
||||
}
|
||||
|
||||
public bool isPlaying
|
||||
{
|
||||
get { return animation.isPlaying; }
|
||||
}
|
||||
|
||||
public bool playAutomatically
|
||||
{
|
||||
get { return animation.playAutomatically; }
|
||||
set { animation.playAutomatically = value; }
|
||||
}
|
||||
|
||||
public WrapMode wrapMode
|
||||
{
|
||||
get { return animation.wrapMode; }
|
||||
set { animation.wrapMode = value; }
|
||||
}
|
||||
|
||||
public AnimationClip clip
|
||||
{
|
||||
get { return animation.clip; }
|
||||
set { animation.clip = value; }
|
||||
}
|
||||
|
||||
public bool usesLegacy
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
new public GameObject gameObject
|
||||
{
|
||||
get { return animation.gameObject; }
|
||||
}
|
||||
|
||||
public void AddClip(AnimationClip clip, string newName)
|
||||
{
|
||||
animation.AddClip(clip, newName);
|
||||
}
|
||||
|
||||
public void Blend(string state, float targetWeight, float fadeLength)
|
||||
{
|
||||
animation.Blend(state, targetWeight, fadeLength);
|
||||
}
|
||||
|
||||
public void CrossFade(string state, float fadeLength)
|
||||
{
|
||||
animation.CrossFade(state, fadeLength);
|
||||
}
|
||||
|
||||
public void CrossFadeQueued(string state, float fadeLength, QueueMode queueMode)
|
||||
{
|
||||
animation.CrossFadeQueued(state, fadeLength, queueMode);
|
||||
}
|
||||
|
||||
public int GetClipCount()
|
||||
{
|
||||
return animation.GetClipCount();
|
||||
}
|
||||
|
||||
public bool IsPlaying(string stateName)
|
||||
{
|
||||
return animation.IsPlaying(stateName);
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
animation.Stop();
|
||||
}
|
||||
|
||||
public void Stop(string stateName)
|
||||
{
|
||||
animation.Stop(stateName);
|
||||
}
|
||||
|
||||
public void Sample()
|
||||
{
|
||||
animation.Sample();
|
||||
}
|
||||
|
||||
public bool Play()
|
||||
{
|
||||
return animation.Play();
|
||||
}
|
||||
|
||||
public bool Play(string stateName)
|
||||
{
|
||||
return animation.Play(stateName);
|
||||
}
|
||||
|
||||
public void PlayQueued(string stateName, QueueMode queueMode)
|
||||
{
|
||||
animation.PlayQueued(stateName, queueMode);
|
||||
}
|
||||
|
||||
public void RemoveClip(AnimationClip clip)
|
||||
{
|
||||
animation.RemoveClip(clip);
|
||||
}
|
||||
|
||||
public void RemoveClip(string stateName)
|
||||
{
|
||||
animation.RemoveClip(stateName);
|
||||
}
|
||||
|
||||
public void Rewind()
|
||||
{
|
||||
animation.Rewind();
|
||||
}
|
||||
|
||||
public void Rewind(string stateName)
|
||||
{
|
||||
animation.Rewind(stateName);
|
||||
}
|
||||
|
||||
public IAnimationState GetState(string stateName)
|
||||
{
|
||||
AnimationState state = animation[stateName];
|
||||
if (state != null)
|
||||
return new AnimationStateProxy(state);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public IAnimationState this[string name]
|
||||
{
|
||||
get { return GetState(name); }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64de6b5accadb98478255b5777dbb960
|
||||
timeCreated: 1494556789
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
89
Assets/Scripts/SimpleAnimationComponent/Tests/IAnimation.cs
Normal file
89
Assets/Scripts/SimpleAnimationComponent/Tests/IAnimation.cs
Normal file
@@ -0,0 +1,89 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
public interface IAnimationState
|
||||
{
|
||||
bool enabled { get; set; }
|
||||
bool isValid { get; }
|
||||
float time { get; set; }
|
||||
float normalizedTime { get; set; }
|
||||
float speed { get; set; }
|
||||
string name { get; set; }
|
||||
float weight { get; set; }
|
||||
float length { get; }
|
||||
AnimationClip clip { get; }
|
||||
WrapMode wrapMode { get; set; }
|
||||
|
||||
}
|
||||
public interface IAnimation
|
||||
{
|
||||
//Should animations apply velocities to physics objects
|
||||
bool animatePhysics { get; set; }
|
||||
//How should animations mode updated based on renderer visibility
|
||||
AnimatorCullingMode cullingMode { get; set; }
|
||||
//Are we currently playing animations
|
||||
bool isPlaying { get;}
|
||||
//Should we start playing the default state
|
||||
bool playAutomatically { get; set; }
|
||||
//For clips where wrap mode is default, how should clips behave after they are done
|
||||
WrapMode wrapMode { get; set; }
|
||||
bool usesLegacy { get; }
|
||||
GameObject gameObject { get; }
|
||||
AnimationClip clip { get; set; }
|
||||
|
||||
//Adds a new state named newName, which uses the AnimationClip clip
|
||||
void AddClip(AnimationClip clip, string newName);
|
||||
|
||||
//Starts blending the state animation, towards weight targetWeight, fading over fadeLength seconds
|
||||
void Blend(string animation, float targetWeight, float fadeLength);
|
||||
|
||||
//Over the next fadeLength seconds, start fading in state animation, fading out all other states
|
||||
void CrossFade(string animation, float fadeLength);
|
||||
|
||||
//Queue a crossfade after the currently playing states are done playing.
|
||||
void CrossFadeQueued(string animation, float fadeLength, QueueMode queueMode);
|
||||
|
||||
//Gets the number of AnimationClips attached to the component
|
||||
int GetClipCount();
|
||||
|
||||
//Returns true if state stateName is playing
|
||||
bool IsPlaying(string stateName);
|
||||
|
||||
//Stops all playing animations on this component
|
||||
void Stop();
|
||||
|
||||
//Stops state named stateName
|
||||
void Stop(string stateName);
|
||||
|
||||
//Evaluates the animations at the current time
|
||||
void Sample();
|
||||
|
||||
//Plays the default clip. Returns false if there is no clip attached
|
||||
bool Play();
|
||||
|
||||
//Plays the specified clip. Returns false if the state does not exist
|
||||
bool Play(string stateName);
|
||||
|
||||
//Queue a Play after the current states are done playing
|
||||
void PlayQueued(string stateName, QueueMode queueMode);
|
||||
|
||||
//Removes the specified clip, and any states using it
|
||||
void RemoveClip(AnimationClip clip);
|
||||
|
||||
//Removes the specified state from the list of states,
|
||||
void RemoveClip(string stateName);
|
||||
|
||||
//Rewinds all states
|
||||
void Rewind();
|
||||
|
||||
//Rewinds state named stateName
|
||||
void Rewind(string stateName);
|
||||
|
||||
//Returns a handle on a state. Returns null if the state doesn't exist
|
||||
IAnimationState GetState(string stateName);
|
||||
|
||||
IAnimationState this[string name] { get; }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7c1b1cfcce5efef469b2b2392f34f6f8
|
||||
timeCreated: 1494550643
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: baf2d9b4464e59b4ab9cb1ecdc5dcb95
|
||||
folderAsset: yes
|
||||
timeCreated: 1499702943
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0a1e5b1b5fa32b94498a6f27e9d63496
|
||||
folderAsset: yes
|
||||
timeCreated: 1502215731
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,316 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 8
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_TemporalCoherenceThreshold: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 9
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_TextureWidth: 1024
|
||||
m_TextureHeight: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 0
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_UseShadowmask: 1
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &727728709
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 727728711}
|
||||
- component: {fileID: 727728710}
|
||||
m_Layer: 0
|
||||
m_Name: TestUI
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &727728710
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 727728709}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a9da7454dab41842ad0833069495d6c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Categories:
|
||||
- {fileID: 1526536085140382, guid: 876559ea1de191c4680a3ecd965eb5a6, type: 2}
|
||||
- {fileID: 1738818353288128, guid: 704824adecc7a1b439f4c34e90651320, type: 2}
|
||||
- {fileID: 1847196155820566, guid: 65148c2646c356b48b45a674d32f7085, type: 2}
|
||||
fps: 0
|
||||
fpssamples: 0
|
||||
numInstances: 10
|
||||
--- !u!4 &727728711
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 727728709}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1161389416
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 1161389418}
|
||||
- component: {fileID: 1161389417}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &1161389417
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1161389416}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 8
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Lightmapping: 4
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &1161389418
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1161389416}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &1578799488
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 1578799493}
|
||||
- component: {fileID: 1578799492}
|
||||
- component: {fileID: 1578799491}
|
||||
- component: {fileID: 1578799490}
|
||||
- component: {fileID: 1578799489}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &1578799489
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1578799488}
|
||||
m_Enabled: 1
|
||||
m_ExtensionPropertyValues: []
|
||||
--- !u!124 &1578799490
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1578799488}
|
||||
m_Enabled: 1
|
||||
--- !u!92 &1578799491
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1578799488}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1578799492
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1578799488}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
m_StereoMirrorMode: 0
|
||||
--- !u!4 &1578799493
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1578799488}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c25e0f0d6f1a4c9458fc5b1a381b764b
|
||||
timeCreated: 1499702978
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 65148c2646c356b48b45a674d32f7085
|
||||
timeCreated: 1502220683
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,69 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: AndroidGenericAnim
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters: []
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: 1107549521193886108}
|
||||
m_Mask: {fileID: 0}
|
||||
m_Motions: []
|
||||
m_Behaviours: []
|
||||
m_BlendingMode: 0
|
||||
m_SyncedLayerIndex: -1
|
||||
m_DefaultWeight: 0
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1102 &1102935785621315878
|
||||
AnimatorState:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Take 001
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 7eb8b94e211f70f44877f2fbe52f2e78, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1107 &1107549521193886108
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 1102935785621315878}
|
||||
m_Position: {x: 200, y: 0, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 1102935785621315878}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92f729d0e503a0b479c3413fba6138c6
|
||||
timeCreated: 1502220628
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,433 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7eb8b94e211f70f44877f2fbe52f2e78
|
||||
timeCreated: 1502215789
|
||||
licenseType: Pro
|
||||
ModelImporter:
|
||||
serializedVersion: 22
|
||||
fileIDToRecycleName:
|
||||
100000: //RootNode
|
||||
100002: Body
|
||||
100004: Control_Dwn_Mouth
|
||||
100006: Control_DwnL_Mouth
|
||||
100008: Control_DwnR_Mouth
|
||||
100010: Control_Head
|
||||
100012: Control_Jaw
|
||||
100014: Control_L_Clavice
|
||||
100016: Control_L_Elbow
|
||||
100018: Control_L_Eyebrow_1
|
||||
100020: Control_L_Eyebrow_2
|
||||
100022: Control_L_Eyebrow_3
|
||||
100024: Control_L_EyeRot
|
||||
100026: Control_L_Face
|
||||
100028: Control_L_Finger_0
|
||||
100030: Control_L_Finger_0 1
|
||||
100032: Control_L_Finger_01
|
||||
100034: Control_L_Finger_01 1
|
||||
100036: Control_L_Finger_0_Master
|
||||
100038: Control_L_Finger_0_Master 1
|
||||
100040: Control_L_Finger_1
|
||||
100042: Control_L_Finger_1 1
|
||||
100044: Control_L_Finger_11
|
||||
100046: Control_L_Finger_11 1
|
||||
100048: Control_L_Finger_12
|
||||
100050: Control_L_Finger_12 1
|
||||
100052: Control_L_Finger_2
|
||||
100054: Control_L_Finger_2 1
|
||||
100056: Control_L_Finger_21
|
||||
100058: Control_L_Finger_21 1
|
||||
100060: Control_L_Finger_22
|
||||
100062: Control_L_Finger_22 1
|
||||
100064: Control_L_Finger_3
|
||||
100066: Control_L_Finger_3 1
|
||||
100068: Control_L_Finger_31
|
||||
100070: Control_L_Finger_31 1
|
||||
100072: Control_L_Finger_32
|
||||
100074: Control_L_Finger_32 1
|
||||
100076: Control_L_Finger_4
|
||||
100078: Control_L_Finger_4 1
|
||||
100080: Control_L_Finger_41
|
||||
100082: Control_L_Finger_41 1
|
||||
100084: Control_L_Finger_42
|
||||
100086: Control_L_Finger_42 1
|
||||
100088: Control_L_Foot
|
||||
100090: Control_L_FootRot
|
||||
100092: Control_L_Hand
|
||||
100094: Control_L_Mouth
|
||||
100096: Control_Neck
|
||||
100098: Control_R_Clavice
|
||||
100100: Control_R_Elbow
|
||||
100102: Control_R_Eyebrow_1
|
||||
100104: Control_R_Eyebrow_2
|
||||
100106: Control_R_Eyebrow_3
|
||||
100108: Control_R_EyeRot
|
||||
100110: Control_R_Face
|
||||
100112: Control_R_Foot
|
||||
100114: Control_R_FootRot
|
||||
100116: Control_R_Hand
|
||||
100118: Control_R_Mouth
|
||||
100120: Control_Root
|
||||
100122: Control_Spine_1
|
||||
100124: Control_Spine_2
|
||||
100126: Control_Spine_3
|
||||
100128: Control_Up_Mouth
|
||||
100130: Control_UpL_Mouth
|
||||
100132: Control_UpR_Mouth
|
||||
100134: Controls
|
||||
100136: Head1
|
||||
100138: Head2
|
||||
100140: Hips
|
||||
100142: IK_L_Foot
|
||||
100144: Ik_L_Hand
|
||||
100146: IK_L_Leg
|
||||
100148: IK_L_Toe
|
||||
100150: Ik_R_Foot
|
||||
100152: IK_R_Hand
|
||||
100154: Ik_R_Leg
|
||||
100156: Ik_R_Toe
|
||||
100158: Jaw1
|
||||
100160: Jaw2
|
||||
100162: L_Ankle_Pivot
|
||||
100164: L_HeelPeel
|
||||
100166: L_Swivel_Pivot
|
||||
100168: L_Toetap_Pivot
|
||||
100170: L_ToeTip_Pivot
|
||||
100172: LeftArm
|
||||
100174: LeftBrow1
|
||||
100176: LeftBrow2
|
||||
100178: LeftBrow3
|
||||
100180: LeftCheek
|
||||
100182: LeftEye
|
||||
100184: LeftFoot
|
||||
100186: LeftForeArm
|
||||
100188: LeftHand
|
||||
100190: LeftHandIndex1
|
||||
100192: LeftHandIndex2
|
||||
100194: LeftHandIndex3
|
||||
100196: LeftHandIndex4
|
||||
100198: LeftHandMiddle1
|
||||
100200: LeftHandMiddle2
|
||||
100202: LeftHandMiddle3
|
||||
100204: LeftHandMiddle4
|
||||
100206: LeftHandPinky1
|
||||
100208: LeftHandPinky2
|
||||
100210: LeftHandPinky3
|
||||
100212: LeftHandPinky4
|
||||
100214: LeftHandRing1
|
||||
100216: LeftHandRing2
|
||||
100218: LeftHandRing3
|
||||
100220: LeftHandRing4
|
||||
100222: LeftHandThumb1
|
||||
100224: LeftHandThumb2
|
||||
100226: LeftHandThumb3
|
||||
100228: LeftLeg
|
||||
100230: LeftMouth
|
||||
100232: LeftMouthLower
|
||||
100234: LeftMouthUpper
|
||||
100236: LeftShoulder
|
||||
100238: LeftToe1
|
||||
100240: LeftToe2
|
||||
100242: LeftUpLeg
|
||||
100244: Mesh
|
||||
100246: MouthLower
|
||||
100248: MouthUpper
|
||||
100250: Neck
|
||||
100252: R_Ankle_Pivot
|
||||
100254: R_HeelPeel_Pivot
|
||||
100256: R_Swivel_Pivot
|
||||
100258: R_ToeTap_Pivot
|
||||
100260: R_ToeTip_Pivot
|
||||
100262: RightArm
|
||||
100264: RightBrow1
|
||||
100266: RightBrow2
|
||||
100268: RightBrow3
|
||||
100270: RightCheek
|
||||
100272: RightEye
|
||||
100274: RightFoot
|
||||
100276: RightForeArm
|
||||
100278: RightHand
|
||||
100280: RightHandIndex1
|
||||
100282: RightHandIndex2
|
||||
100284: RightHandIndex3
|
||||
100286: RightHandIndex4
|
||||
100288: RightHandMiddle1
|
||||
100290: RightHandMiddle2
|
||||
100292: RightHandMiddle3
|
||||
100294: RightHandMiddle4
|
||||
100296: RightHandPinky1
|
||||
100298: RightHandPinky2
|
||||
100300: RightHandPinky3
|
||||
100302: RightHandPinky4
|
||||
100304: RightHandRing1
|
||||
100306: RightHandRing2
|
||||
100308: RightHandRing3
|
||||
100310: RightHandRing4
|
||||
100312: RightHandThumb1
|
||||
100314: RightHandThumb2
|
||||
100316: RightHandThumb3
|
||||
100318: RightLeg
|
||||
100320: RightMouth
|
||||
100322: RightMouthLower
|
||||
100324: RightMouthUpper
|
||||
100326: RightShoulder
|
||||
100328: RightToe1
|
||||
100330: RightToe2
|
||||
100332: RightUpLeg
|
||||
100334: Skeleton
|
||||
100336: Spine1
|
||||
100338: Spine2
|
||||
100340: Spine3
|
||||
400000: //RootNode
|
||||
400002: Body
|
||||
400004: Control_Dwn_Mouth
|
||||
400006: Control_DwnL_Mouth
|
||||
400008: Control_DwnR_Mouth
|
||||
400010: Control_Head
|
||||
400012: Control_Jaw
|
||||
400014: Control_L_Clavice
|
||||
400016: Control_L_Elbow
|
||||
400018: Control_L_Eyebrow_1
|
||||
400020: Control_L_Eyebrow_2
|
||||
400022: Control_L_Eyebrow_3
|
||||
400024: Control_L_EyeRot
|
||||
400026: Control_L_Face
|
||||
400028: Control_L_Finger_0
|
||||
400030: Control_L_Finger_0 1
|
||||
400032: Control_L_Finger_01
|
||||
400034: Control_L_Finger_01 1
|
||||
400036: Control_L_Finger_0_Master
|
||||
400038: Control_L_Finger_0_Master 1
|
||||
400040: Control_L_Finger_1
|
||||
400042: Control_L_Finger_1 1
|
||||
400044: Control_L_Finger_11
|
||||
400046: Control_L_Finger_11 1
|
||||
400048: Control_L_Finger_12
|
||||
400050: Control_L_Finger_12 1
|
||||
400052: Control_L_Finger_2
|
||||
400054: Control_L_Finger_2 1
|
||||
400056: Control_L_Finger_21
|
||||
400058: Control_L_Finger_21 1
|
||||
400060: Control_L_Finger_22
|
||||
400062: Control_L_Finger_22 1
|
||||
400064: Control_L_Finger_3
|
||||
400066: Control_L_Finger_3 1
|
||||
400068: Control_L_Finger_31
|
||||
400070: Control_L_Finger_31 1
|
||||
400072: Control_L_Finger_32
|
||||
400074: Control_L_Finger_32 1
|
||||
400076: Control_L_Finger_4
|
||||
400078: Control_L_Finger_4 1
|
||||
400080: Control_L_Finger_41
|
||||
400082: Control_L_Finger_41 1
|
||||
400084: Control_L_Finger_42
|
||||
400086: Control_L_Finger_42 1
|
||||
400088: Control_L_Foot
|
||||
400090: Control_L_FootRot
|
||||
400092: Control_L_Hand
|
||||
400094: Control_L_Mouth
|
||||
400096: Control_Neck
|
||||
400098: Control_R_Clavice
|
||||
400100: Control_R_Elbow
|
||||
400102: Control_R_Eyebrow_1
|
||||
400104: Control_R_Eyebrow_2
|
||||
400106: Control_R_Eyebrow_3
|
||||
400108: Control_R_EyeRot
|
||||
400110: Control_R_Face
|
||||
400112: Control_R_Foot
|
||||
400114: Control_R_FootRot
|
||||
400116: Control_R_Hand
|
||||
400118: Control_R_Mouth
|
||||
400120: Control_Root
|
||||
400122: Control_Spine_1
|
||||
400124: Control_Spine_2
|
||||
400126: Control_Spine_3
|
||||
400128: Control_Up_Mouth
|
||||
400130: Control_UpL_Mouth
|
||||
400132: Control_UpR_Mouth
|
||||
400134: Controls
|
||||
400136: Head1
|
||||
400138: Head2
|
||||
400140: Hips
|
||||
400142: IK_L_Foot
|
||||
400144: Ik_L_Hand
|
||||
400146: IK_L_Leg
|
||||
400148: IK_L_Toe
|
||||
400150: Ik_R_Foot
|
||||
400152: IK_R_Hand
|
||||
400154: Ik_R_Leg
|
||||
400156: Ik_R_Toe
|
||||
400158: Jaw1
|
||||
400160: Jaw2
|
||||
400162: L_Ankle_Pivot
|
||||
400164: L_HeelPeel
|
||||
400166: L_Swivel_Pivot
|
||||
400168: L_Toetap_Pivot
|
||||
400170: L_ToeTip_Pivot
|
||||
400172: LeftArm
|
||||
400174: LeftBrow1
|
||||
400176: LeftBrow2
|
||||
400178: LeftBrow3
|
||||
400180: LeftCheek
|
||||
400182: LeftEye
|
||||
400184: LeftFoot
|
||||
400186: LeftForeArm
|
||||
400188: LeftHand
|
||||
400190: LeftHandIndex1
|
||||
400192: LeftHandIndex2
|
||||
400194: LeftHandIndex3
|
||||
400196: LeftHandIndex4
|
||||
400198: LeftHandMiddle1
|
||||
400200: LeftHandMiddle2
|
||||
400202: LeftHandMiddle3
|
||||
400204: LeftHandMiddle4
|
||||
400206: LeftHandPinky1
|
||||
400208: LeftHandPinky2
|
||||
400210: LeftHandPinky3
|
||||
400212: LeftHandPinky4
|
||||
400214: LeftHandRing1
|
||||
400216: LeftHandRing2
|
||||
400218: LeftHandRing3
|
||||
400220: LeftHandRing4
|
||||
400222: LeftHandThumb1
|
||||
400224: LeftHandThumb2
|
||||
400226: LeftHandThumb3
|
||||
400228: LeftLeg
|
||||
400230: LeftMouth
|
||||
400232: LeftMouthLower
|
||||
400234: LeftMouthUpper
|
||||
400236: LeftShoulder
|
||||
400238: LeftToe1
|
||||
400240: LeftToe2
|
||||
400242: LeftUpLeg
|
||||
400244: Mesh
|
||||
400246: MouthLower
|
||||
400248: MouthUpper
|
||||
400250: Neck
|
||||
400252: R_Ankle_Pivot
|
||||
400254: R_HeelPeel_Pivot
|
||||
400256: R_Swivel_Pivot
|
||||
400258: R_ToeTap_Pivot
|
||||
400260: R_ToeTip_Pivot
|
||||
400262: RightArm
|
||||
400264: RightBrow1
|
||||
400266: RightBrow2
|
||||
400268: RightBrow3
|
||||
400270: RightCheek
|
||||
400272: RightEye
|
||||
400274: RightFoot
|
||||
400276: RightForeArm
|
||||
400278: RightHand
|
||||
400280: RightHandIndex1
|
||||
400282: RightHandIndex2
|
||||
400284: RightHandIndex3
|
||||
400286: RightHandIndex4
|
||||
400288: RightHandMiddle1
|
||||
400290: RightHandMiddle2
|
||||
400292: RightHandMiddle3
|
||||
400294: RightHandMiddle4
|
||||
400296: RightHandPinky1
|
||||
400298: RightHandPinky2
|
||||
400300: RightHandPinky3
|
||||
400302: RightHandPinky4
|
||||
400304: RightHandRing1
|
||||
400306: RightHandRing2
|
||||
400308: RightHandRing3
|
||||
400310: RightHandRing4
|
||||
400312: RightHandThumb1
|
||||
400314: RightHandThumb2
|
||||
400316: RightHandThumb3
|
||||
400318: RightLeg
|
||||
400320: RightMouth
|
||||
400322: RightMouthLower
|
||||
400324: RightMouthUpper
|
||||
400326: RightShoulder
|
||||
400328: RightToe1
|
||||
400330: RightToe2
|
||||
400332: RightUpLeg
|
||||
400334: Skeleton
|
||||
400336: Spine1
|
||||
400338: Spine2
|
||||
400340: Spine3
|
||||
2100000: Android_Walking_Android
|
||||
4300000: Body
|
||||
7400000: Take 001
|
||||
9500000: //RootNode
|
||||
13700000: Body
|
||||
externalObjects: {}
|
||||
materials:
|
||||
importMaterials: 1
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 1
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
optimizeMeshForGPU: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
preserveHierarchy: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
importAnimation: 1
|
||||
copyAvatar: 0
|
||||
humanDescription:
|
||||
serializedVersion: 2
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
rootMotionBoneName:
|
||||
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 876559ea1de191c4680a3ecd965eb5a6
|
||||
timeCreated: 1502220764
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,434 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 832c6aadeccb8324cb11d96f77cf9b74
|
||||
timeCreated: 1502215789
|
||||
licenseType: Pro
|
||||
ModelImporter:
|
||||
serializedVersion: 22
|
||||
fileIDToRecycleName:
|
||||
100000: //RootNode
|
||||
100002: Body
|
||||
100004: Control_Dwn_Mouth
|
||||
100006: Control_DwnL_Mouth
|
||||
100008: Control_DwnR_Mouth
|
||||
100010: Control_Head
|
||||
100012: Control_Jaw
|
||||
100014: Control_L_Clavice
|
||||
100016: Control_L_Elbow
|
||||
100018: Control_L_Eyebrow_1
|
||||
100020: Control_L_Eyebrow_2
|
||||
100022: Control_L_Eyebrow_3
|
||||
100024: Control_L_EyeRot
|
||||
100026: Control_L_Face
|
||||
100028: Control_L_Finger_0
|
||||
100030: Control_L_Finger_0 1
|
||||
100032: Control_L_Finger_01
|
||||
100034: Control_L_Finger_01 1
|
||||
100036: Control_L_Finger_0_Master
|
||||
100038: Control_L_Finger_0_Master 1
|
||||
100040: Control_L_Finger_1
|
||||
100042: Control_L_Finger_1 1
|
||||
100044: Control_L_Finger_11
|
||||
100046: Control_L_Finger_11 1
|
||||
100048: Control_L_Finger_12
|
||||
100050: Control_L_Finger_12 1
|
||||
100052: Control_L_Finger_2
|
||||
100054: Control_L_Finger_2 1
|
||||
100056: Control_L_Finger_21
|
||||
100058: Control_L_Finger_21 1
|
||||
100060: Control_L_Finger_22
|
||||
100062: Control_L_Finger_22 1
|
||||
100064: Control_L_Finger_3
|
||||
100066: Control_L_Finger_3 1
|
||||
100068: Control_L_Finger_31
|
||||
100070: Control_L_Finger_31 1
|
||||
100072: Control_L_Finger_32
|
||||
100074: Control_L_Finger_32 1
|
||||
100076: Control_L_Finger_4
|
||||
100078: Control_L_Finger_4 1
|
||||
100080: Control_L_Finger_41
|
||||
100082: Control_L_Finger_41 1
|
||||
100084: Control_L_Finger_42
|
||||
100086: Control_L_Finger_42 1
|
||||
100088: Control_L_Foot
|
||||
100090: Control_L_FootRot
|
||||
100092: Control_L_Hand
|
||||
100094: Control_L_Mouth
|
||||
100096: Control_Neck
|
||||
100098: Control_R_Clavice
|
||||
100100: Control_R_Elbow
|
||||
100102: Control_R_Eyebrow_1
|
||||
100104: Control_R_Eyebrow_2
|
||||
100106: Control_R_Eyebrow_3
|
||||
100108: Control_R_EyeRot
|
||||
100110: Control_R_Face
|
||||
100112: Control_R_Foot
|
||||
100114: Control_R_FootRot
|
||||
100116: Control_R_Hand
|
||||
100118: Control_R_Mouth
|
||||
100120: Control_Root
|
||||
100122: Control_Spine_1
|
||||
100124: Control_Spine_2
|
||||
100126: Control_Spine_3
|
||||
100128: Control_Up_Mouth
|
||||
100130: Control_UpL_Mouth
|
||||
100132: Control_UpR_Mouth
|
||||
100134: Controls
|
||||
100136: Head1
|
||||
100138: Head2
|
||||
100140: Hips
|
||||
100142: IK_L_Foot
|
||||
100144: Ik_L_Hand
|
||||
100146: IK_L_Leg
|
||||
100148: IK_L_Toe
|
||||
100150: Ik_R_Foot
|
||||
100152: IK_R_Hand
|
||||
100154: Ik_R_Leg
|
||||
100156: Ik_R_Toe
|
||||
100158: Jaw1
|
||||
100160: Jaw2
|
||||
100162: L_Ankle_Pivot
|
||||
100164: L_HeelPeel
|
||||
100166: L_Swivel_Pivot
|
||||
100168: L_Toetap_Pivot
|
||||
100170: L_ToeTip_Pivot
|
||||
100172: LeftArm
|
||||
100174: LeftBrow1
|
||||
100176: LeftBrow2
|
||||
100178: LeftBrow3
|
||||
100180: LeftCheek
|
||||
100182: LeftEye
|
||||
100184: LeftFoot
|
||||
100186: LeftForeArm
|
||||
100188: LeftHand
|
||||
100190: LeftHandIndex1
|
||||
100192: LeftHandIndex2
|
||||
100194: LeftHandIndex3
|
||||
100196: LeftHandIndex4
|
||||
100198: LeftHandMiddle1
|
||||
100200: LeftHandMiddle2
|
||||
100202: LeftHandMiddle3
|
||||
100204: LeftHandMiddle4
|
||||
100206: LeftHandPinky1
|
||||
100208: LeftHandPinky2
|
||||
100210: LeftHandPinky3
|
||||
100212: LeftHandPinky4
|
||||
100214: LeftHandRing1
|
||||
100216: LeftHandRing2
|
||||
100218: LeftHandRing3
|
||||
100220: LeftHandRing4
|
||||
100222: LeftHandThumb1
|
||||
100224: LeftHandThumb2
|
||||
100226: LeftHandThumb3
|
||||
100228: LeftLeg
|
||||
100230: LeftMouth
|
||||
100232: LeftMouthLower
|
||||
100234: LeftMouthUpper
|
||||
100236: LeftShoulder
|
||||
100238: LeftToe1
|
||||
100240: LeftToe2
|
||||
100242: LeftUpLeg
|
||||
100244: Mesh
|
||||
100246: MouthLower
|
||||
100248: MouthUpper
|
||||
100250: Neck
|
||||
100252: R_Ankle_Pivot
|
||||
100254: R_HeelPeel_Pivot
|
||||
100256: R_Swivel_Pivot
|
||||
100258: R_ToeTap_Pivot
|
||||
100260: R_ToeTip_Pivot
|
||||
100262: RightArm
|
||||
100264: RightBrow1
|
||||
100266: RightBrow2
|
||||
100268: RightBrow3
|
||||
100270: RightCheek
|
||||
100272: RightEye
|
||||
100274: RightFoot
|
||||
100276: RightForeArm
|
||||
100278: RightHand
|
||||
100280: RightHandIndex1
|
||||
100282: RightHandIndex2
|
||||
100284: RightHandIndex3
|
||||
100286: RightHandIndex4
|
||||
100288: RightHandMiddle1
|
||||
100290: RightHandMiddle2
|
||||
100292: RightHandMiddle3
|
||||
100294: RightHandMiddle4
|
||||
100296: RightHandPinky1
|
||||
100298: RightHandPinky2
|
||||
100300: RightHandPinky3
|
||||
100302: RightHandPinky4
|
||||
100304: RightHandRing1
|
||||
100306: RightHandRing2
|
||||
100308: RightHandRing3
|
||||
100310: RightHandRing4
|
||||
100312: RightHandThumb1
|
||||
100314: RightHandThumb2
|
||||
100316: RightHandThumb3
|
||||
100318: RightLeg
|
||||
100320: RightMouth
|
||||
100322: RightMouthLower
|
||||
100324: RightMouthUpper
|
||||
100326: RightShoulder
|
||||
100328: RightToe1
|
||||
100330: RightToe2
|
||||
100332: RightUpLeg
|
||||
100334: Skeleton
|
||||
100336: Spine1
|
||||
100338: Spine2
|
||||
100340: Spine3
|
||||
400000: //RootNode
|
||||
400002: Body
|
||||
400004: Control_Dwn_Mouth
|
||||
400006: Control_DwnL_Mouth
|
||||
400008: Control_DwnR_Mouth
|
||||
400010: Control_Head
|
||||
400012: Control_Jaw
|
||||
400014: Control_L_Clavice
|
||||
400016: Control_L_Elbow
|
||||
400018: Control_L_Eyebrow_1
|
||||
400020: Control_L_Eyebrow_2
|
||||
400022: Control_L_Eyebrow_3
|
||||
400024: Control_L_EyeRot
|
||||
400026: Control_L_Face
|
||||
400028: Control_L_Finger_0
|
||||
400030: Control_L_Finger_0 1
|
||||
400032: Control_L_Finger_01
|
||||
400034: Control_L_Finger_01 1
|
||||
400036: Control_L_Finger_0_Master
|
||||
400038: Control_L_Finger_0_Master 1
|
||||
400040: Control_L_Finger_1
|
||||
400042: Control_L_Finger_1 1
|
||||
400044: Control_L_Finger_11
|
||||
400046: Control_L_Finger_11 1
|
||||
400048: Control_L_Finger_12
|
||||
400050: Control_L_Finger_12 1
|
||||
400052: Control_L_Finger_2
|
||||
400054: Control_L_Finger_2 1
|
||||
400056: Control_L_Finger_21
|
||||
400058: Control_L_Finger_21 1
|
||||
400060: Control_L_Finger_22
|
||||
400062: Control_L_Finger_22 1
|
||||
400064: Control_L_Finger_3
|
||||
400066: Control_L_Finger_3 1
|
||||
400068: Control_L_Finger_31
|
||||
400070: Control_L_Finger_31 1
|
||||
400072: Control_L_Finger_32
|
||||
400074: Control_L_Finger_32 1
|
||||
400076: Control_L_Finger_4
|
||||
400078: Control_L_Finger_4 1
|
||||
400080: Control_L_Finger_41
|
||||
400082: Control_L_Finger_41 1
|
||||
400084: Control_L_Finger_42
|
||||
400086: Control_L_Finger_42 1
|
||||
400088: Control_L_Foot
|
||||
400090: Control_L_FootRot
|
||||
400092: Control_L_Hand
|
||||
400094: Control_L_Mouth
|
||||
400096: Control_Neck
|
||||
400098: Control_R_Clavice
|
||||
400100: Control_R_Elbow
|
||||
400102: Control_R_Eyebrow_1
|
||||
400104: Control_R_Eyebrow_2
|
||||
400106: Control_R_Eyebrow_3
|
||||
400108: Control_R_EyeRot
|
||||
400110: Control_R_Face
|
||||
400112: Control_R_Foot
|
||||
400114: Control_R_FootRot
|
||||
400116: Control_R_Hand
|
||||
400118: Control_R_Mouth
|
||||
400120: Control_Root
|
||||
400122: Control_Spine_1
|
||||
400124: Control_Spine_2
|
||||
400126: Control_Spine_3
|
||||
400128: Control_Up_Mouth
|
||||
400130: Control_UpL_Mouth
|
||||
400132: Control_UpR_Mouth
|
||||
400134: Controls
|
||||
400136: Head1
|
||||
400138: Head2
|
||||
400140: Hips
|
||||
400142: IK_L_Foot
|
||||
400144: Ik_L_Hand
|
||||
400146: IK_L_Leg
|
||||
400148: IK_L_Toe
|
||||
400150: Ik_R_Foot
|
||||
400152: IK_R_Hand
|
||||
400154: Ik_R_Leg
|
||||
400156: Ik_R_Toe
|
||||
400158: Jaw1
|
||||
400160: Jaw2
|
||||
400162: L_Ankle_Pivot
|
||||
400164: L_HeelPeel
|
||||
400166: L_Swivel_Pivot
|
||||
400168: L_Toetap_Pivot
|
||||
400170: L_ToeTip_Pivot
|
||||
400172: LeftArm
|
||||
400174: LeftBrow1
|
||||
400176: LeftBrow2
|
||||
400178: LeftBrow3
|
||||
400180: LeftCheek
|
||||
400182: LeftEye
|
||||
400184: LeftFoot
|
||||
400186: LeftForeArm
|
||||
400188: LeftHand
|
||||
400190: LeftHandIndex1
|
||||
400192: LeftHandIndex2
|
||||
400194: LeftHandIndex3
|
||||
400196: LeftHandIndex4
|
||||
400198: LeftHandMiddle1
|
||||
400200: LeftHandMiddle2
|
||||
400202: LeftHandMiddle3
|
||||
400204: LeftHandMiddle4
|
||||
400206: LeftHandPinky1
|
||||
400208: LeftHandPinky2
|
||||
400210: LeftHandPinky3
|
||||
400212: LeftHandPinky4
|
||||
400214: LeftHandRing1
|
||||
400216: LeftHandRing2
|
||||
400218: LeftHandRing3
|
||||
400220: LeftHandRing4
|
||||
400222: LeftHandThumb1
|
||||
400224: LeftHandThumb2
|
||||
400226: LeftHandThumb3
|
||||
400228: LeftLeg
|
||||
400230: LeftMouth
|
||||
400232: LeftMouthLower
|
||||
400234: LeftMouthUpper
|
||||
400236: LeftShoulder
|
||||
400238: LeftToe1
|
||||
400240: LeftToe2
|
||||
400242: LeftUpLeg
|
||||
400244: Mesh
|
||||
400246: MouthLower
|
||||
400248: MouthUpper
|
||||
400250: Neck
|
||||
400252: R_Ankle_Pivot
|
||||
400254: R_HeelPeel_Pivot
|
||||
400256: R_Swivel_Pivot
|
||||
400258: R_ToeTap_Pivot
|
||||
400260: R_ToeTip_Pivot
|
||||
400262: RightArm
|
||||
400264: RightBrow1
|
||||
400266: RightBrow2
|
||||
400268: RightBrow3
|
||||
400270: RightCheek
|
||||
400272: RightEye
|
||||
400274: RightFoot
|
||||
400276: RightForeArm
|
||||
400278: RightHand
|
||||
400280: RightHandIndex1
|
||||
400282: RightHandIndex2
|
||||
400284: RightHandIndex3
|
||||
400286: RightHandIndex4
|
||||
400288: RightHandMiddle1
|
||||
400290: RightHandMiddle2
|
||||
400292: RightHandMiddle3
|
||||
400294: RightHandMiddle4
|
||||
400296: RightHandPinky1
|
||||
400298: RightHandPinky2
|
||||
400300: RightHandPinky3
|
||||
400302: RightHandPinky4
|
||||
400304: RightHandRing1
|
||||
400306: RightHandRing2
|
||||
400308: RightHandRing3
|
||||
400310: RightHandRing4
|
||||
400312: RightHandThumb1
|
||||
400314: RightHandThumb2
|
||||
400316: RightHandThumb3
|
||||
400318: RightLeg
|
||||
400320: RightMouth
|
||||
400322: RightMouthLower
|
||||
400324: RightMouthUpper
|
||||
400326: RightShoulder
|
||||
400328: RightToe1
|
||||
400330: RightToe2
|
||||
400332: RightUpLeg
|
||||
400334: Skeleton
|
||||
400336: Spine1
|
||||
400338: Spine2
|
||||
400340: Spine3
|
||||
2100000: Android_Walking_Android
|
||||
4300000: Body
|
||||
7400000: Take 001
|
||||
9500000: //RootNode
|
||||
11100000: //RootNode
|
||||
13700000: Body
|
||||
externalObjects: {}
|
||||
materials:
|
||||
importMaterials: 1
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 1
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
optimizeMeshForGPU: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
preserveHierarchy: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
importAnimation: 1
|
||||
copyAvatar: 0
|
||||
humanDescription:
|
||||
serializedVersion: 2
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
rootMotionBoneName:
|
||||
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 1
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
animationType: 1
|
||||
humanoidOversampling: 1
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 704824adecc7a1b439f4c34e90651320
|
||||
timeCreated: 1502220731
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e44854009789604f9315bbdb97b6923
|
||||
folderAsset: yes
|
||||
timeCreated: 1502215731
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b957f0ccd368efa4eaa54c5b97bd139d
|
||||
timeCreated: 1502220683
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,97 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: AndroidGenericAnimWithTransitions
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters: []
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: 1107549521193886108}
|
||||
m_Mask: {fileID: 0}
|
||||
m_Motions: []
|
||||
m_Behaviours: []
|
||||
m_BlendingMode: 0
|
||||
m_SyncedLayerIndex: -1
|
||||
m_DefaultWeight: 0
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1102 &1102335610593448972
|
||||
AnimatorState:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 3
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: B
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 7eb8b94e211f70f44877f2fbe52f2e78, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &1102935785621315878
|
||||
AnimatorState:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: A
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 7eb8b94e211f70f44877f2fbe52f2e78, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1107 &1107549521193886108
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 1102935785621315878}
|
||||
m_Position: {x: 264, y: 24, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 1102335610593448972}
|
||||
m_Position: {x: 564, y: 24, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 1102935785621315878}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 53f5d4ad902e961429b0cb91f1634d17
|
||||
timeCreated: 1502220628
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b6d39a8362ca1b649a555d76ee5858e4
|
||||
timeCreated: 1502220764
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a860fdcd8b5e1184c9f7a85a5324277a
|
||||
timeCreated: 1502220731
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,83 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class SimpleAnimationTransitions : MonoBehaviour {
|
||||
enum AnimationType
|
||||
{
|
||||
Legacy,
|
||||
SimplePlayable,
|
||||
StateMachine
|
||||
}
|
||||
AnimationType animationType;
|
||||
SimpleAnimation simpleAnimation;
|
||||
public AnimationClip clip;
|
||||
// Use this for initialization
|
||||
IEnumerator Start ()
|
||||
{
|
||||
var animationComponent = GetComponent<Animation>();
|
||||
var animatorComponent = GetComponent<Animator>();
|
||||
var simpleAnimationComponent = GetComponent<SimpleAnimation>();
|
||||
if (animationComponent)
|
||||
animationType = AnimationType.Legacy;
|
||||
else if (simpleAnimationComponent)
|
||||
animationType = AnimationType.SimplePlayable;
|
||||
else
|
||||
animationType = AnimationType.StateMachine;
|
||||
|
||||
|
||||
switch (animationType)
|
||||
{
|
||||
case AnimationType.Legacy:
|
||||
animationComponent.AddClip(clip, "A");
|
||||
animationComponent.AddClip(clip, "B");
|
||||
break;
|
||||
case AnimationType.SimplePlayable:
|
||||
simpleAnimationComponent.AddClip(clip, "A");
|
||||
simpleAnimationComponent.AddClip(clip, "B");
|
||||
break;
|
||||
case AnimationType.StateMachine:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
while(true)
|
||||
{
|
||||
switch (animationType)
|
||||
{
|
||||
case AnimationType.Legacy:
|
||||
animationComponent.Play("A");
|
||||
break;
|
||||
case AnimationType.SimplePlayable:
|
||||
simpleAnimationComponent.Play("A");
|
||||
break;
|
||||
case AnimationType.StateMachine:
|
||||
animatorComponent.Play("A");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
|
||||
switch (animationType)
|
||||
{
|
||||
case AnimationType.Legacy:
|
||||
animationComponent.Play("B");
|
||||
break;
|
||||
case AnimationType.SimplePlayable:
|
||||
simpleAnimationComponent.Play("B");
|
||||
break;
|
||||
case AnimationType.StateMachine:
|
||||
animatorComponent.Play("B");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98e0400eb48644f44bbbae58412a4dda
|
||||
timeCreated: 1502302146
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,316 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 8
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_TemporalCoherenceThreshold: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 9
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_TextureWidth: 1024
|
||||
m_TextureHeight: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 0
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_UseShadowmask: 1
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &727728709
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 727728711}
|
||||
- component: {fileID: 727728710}
|
||||
m_Layer: 0
|
||||
m_Name: TestUI
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &727728710
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 727728709}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a9da7454dab41842ad0833069495d6c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Categories:
|
||||
- {fileID: 1526536085140382, guid: b6d39a8362ca1b649a555d76ee5858e4, type: 2}
|
||||
- {fileID: 1738818353288128, guid: a860fdcd8b5e1184c9f7a85a5324277a, type: 2}
|
||||
- {fileID: 1847196155820566, guid: b957f0ccd368efa4eaa54c5b97bd139d, type: 2}
|
||||
fps: 0
|
||||
fpssamples: 0
|
||||
numInstances: 100
|
||||
--- !u!4 &727728711
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 727728709}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1161389416
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 1161389418}
|
||||
- component: {fileID: 1161389417}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &1161389417
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1161389416}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 8
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Lightmapping: 4
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &1161389418
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1161389416}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &1578799488
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 1578799493}
|
||||
- component: {fileID: 1578799492}
|
||||
- component: {fileID: 1578799491}
|
||||
- component: {fileID: 1578799490}
|
||||
- component: {fileID: 1578799489}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &1578799489
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1578799488}
|
||||
m_Enabled: 1
|
||||
m_ExtensionPropertyValues: []
|
||||
--- !u!124 &1578799490
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1578799488}
|
||||
m_Enabled: 1
|
||||
--- !u!92 &1578799491
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1578799488}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1578799492
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1578799488}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
m_StereoMirrorMode: 0
|
||||
--- !u!4 &1578799493
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1578799488}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3575b024195d20d4f844ec417f241fb7
|
||||
timeCreated: 1499702978
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0ddcd3ba40b3ab54a9fdf434e653ab74
|
||||
folderAsset: yes
|
||||
timeCreated: 1499724042
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,316 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 8
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_TemporalCoherenceThreshold: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 9
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_TextureWidth: 1024
|
||||
m_TextureHeight: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 0
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_UseShadowmask: 1
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &727728709
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 727728711}
|
||||
- component: {fileID: 727728710}
|
||||
m_Layer: 0
|
||||
m_Name: TestUI
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &727728710
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 727728709}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a9da7454dab41842ad0833069495d6c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Categories:
|
||||
- {fileID: 1538064715297094, guid: e1ffdb48f32e88844b033116595a2e73, type: 2}
|
||||
- {fileID: 1364076715903534, guid: 35404a7e2d31d61408685b01188d5d5d, type: 2}
|
||||
- {fileID: 1341967805661704, guid: d7d944dacc227454f9f7b182c0f79331, type: 2}
|
||||
fps: 0
|
||||
fpssamples: 0
|
||||
numInstances: 1000
|
||||
--- !u!4 &727728711
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 727728709}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1161389416
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 1161389418}
|
||||
- component: {fileID: 1161389417}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &1161389417
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1161389416}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 8
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Lightmapping: 4
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &1161389418
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1161389416}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &1578799488
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 1578799493}
|
||||
- component: {fileID: 1578799492}
|
||||
- component: {fileID: 1578799491}
|
||||
- component: {fileID: 1578799490}
|
||||
- component: {fileID: 1578799489}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &1578799489
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1578799488}
|
||||
m_Enabled: 1
|
||||
m_ExtensionPropertyValues: []
|
||||
--- !u!124 &1578799490
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1578799488}
|
||||
m_Enabled: 1
|
||||
--- !u!92 &1578799491
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1578799488}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1578799492
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1578799488}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
m_StereoMirrorMode: 0
|
||||
--- !u!4 &1578799493
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1578799488}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a2d20e4a0303bb419e4c6b258bb5399
|
||||
timeCreated: 1499702978
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b471140328b267744b550b21bbdfa42b
|
||||
timeCreated: 1499719813
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,69 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: RotateAnimatorOnce
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters: []
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: 1107379810546856550}
|
||||
m_Mask: {fileID: 0}
|
||||
m_Motions: []
|
||||
m_Behaviours: []
|
||||
m_BlendingMode: 0
|
||||
m_SyncedLayerIndex: -1
|
||||
m_DefaultWeight: 0
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1102 &1102895856690584682
|
||||
AnimatorState:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: RotateAnimatorOnce
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: b471140328b267744b550b21bbdfa42b, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1107 &1107379810546856550
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 1102895856690584682}
|
||||
m_Position: {x: 318, y: 11, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 1102895856690584682}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f266c6e5fbe362445b5be495aa420638
|
||||
timeCreated: 1499716723
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,115 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 1341967805661704}
|
||||
m_IsPrefabParent: 1
|
||||
--- !u!1 &1341967805661704
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4645385144936590}
|
||||
- component: {fileID: 33230436311820440}
|
||||
- component: {fileID: 65023472968491936}
|
||||
- component: {fileID: 23015787009599532}
|
||||
- component: {fileID: 95272312736588580}
|
||||
m_Layer: 0
|
||||
m_Name: RotateAnimatorOnce
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4645385144936590
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1341967805661704}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &23015787009599532
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1341967805661704}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 1
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchSeams: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!33 &33230436311820440
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1341967805661704}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!65 &65023472968491936
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1341967805661704}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!95 &95272312736588580
|
||||
Animator:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1341967805661704}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000, guid: f266c6e5fbe362445b5be495aa420638, type: 2}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d7d944dacc227454f9f7b182c0f79331
|
||||
timeCreated: 1499724134
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 842d8f6b74f9b0d4daaed5496f9d5bc2
|
||||
timeCreated: 1499719813
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,113 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 1538064715297094}
|
||||
m_IsPrefabParent: 1
|
||||
--- !u!1 &1538064715297094
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4116082255304898}
|
||||
- component: {fileID: 33160734106104084}
|
||||
- component: {fileID: 65449479563447892}
|
||||
- component: {fileID: 23484575331995812}
|
||||
- component: {fileID: 111682082938616202}
|
||||
m_Layer: 0
|
||||
m_Name: RotateLegacyOnce
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4116082255304898
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1538064715297094}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &23484575331995812
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1538064715297094}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 1
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchSeams: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!33 &33160734106104084
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1538064715297094}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!65 &65449479563447892
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1538064715297094}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!111 &111682082938616202
|
||||
Animation:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1538064715297094}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Animation: {fileID: 7400000, guid: 842d8f6b74f9b0d4daaed5496f9d5bc2, type: 2}
|
||||
m_Animations:
|
||||
- {fileID: 7400000, guid: 842d8f6b74f9b0d4daaed5496f9d5bc2, type: 2}
|
||||
m_WrapMode: 0
|
||||
m_PlayAutomatically: 1
|
||||
m_AnimatePhysics: 0
|
||||
m_CullingType: 0
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1ffdb48f32e88844b033116595a2e73
|
||||
timeCreated: 1499724088
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,129 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 1364076715903534}
|
||||
m_IsPrefabParent: 1
|
||||
--- !u!1 &1364076715903534
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4571146370560290}
|
||||
- component: {fileID: 33812149907794824}
|
||||
- component: {fileID: 65689843090748916}
|
||||
- component: {fileID: 23817231451851486}
|
||||
- component: {fileID: 95548609735069730}
|
||||
- component: {fileID: 114409330083510338}
|
||||
m_Layer: 0
|
||||
m_Name: RotateSimpleAnimationOnce
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4571146370560290
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1364076715903534}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &23817231451851486
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1364076715903534}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 1
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchSeams: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!33 &33812149907794824
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1364076715903534}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!65 &65689843090748916
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1364076715903534}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!95 &95548609735069730
|
||||
Animator:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1364076715903534}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 0}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
--- !u!114 &114409330083510338
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1364076715903534}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3759e2aae0f7b9a47bb98fc64bf3c543, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
clips: []
|
||||
m_Clip: {fileID: 7400000, guid: b471140328b267744b550b21bbdfa42b, type: 2}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35404a7e2d31d61408685b01188d5d5d
|
||||
timeCreated: 1499724112
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b0868571ae84d814da290ff650e4ecb5
|
||||
folderAsset: yes
|
||||
timeCreated: 1499724018
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e9b50f078b62d8e449242b537084fdd2
|
||||
timeCreated: 1499703149
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d2eec5327fcbca549b19a79fcc523aa2
|
||||
timeCreated: 1499703092
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c83eadf2c665b664a8a216632ee3047c
|
||||
timeCreated: 1499702978
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,53 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class TestUI : MonoBehaviour {
|
||||
|
||||
public GameObject[] Categories;
|
||||
public float fps;
|
||||
public int fpssamples;
|
||||
public int numInstances;
|
||||
private List<GameObject> m_Instances;
|
||||
// Use this for initialization
|
||||
void Start ()
|
||||
{
|
||||
m_Instances = new List<GameObject>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if (Categories == null)
|
||||
return;
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
foreach(var category in Categories)
|
||||
{
|
||||
if (GUILayout.Button(category.name))
|
||||
{
|
||||
fpssamples = 0;
|
||||
foreach (var instance in m_Instances)
|
||||
{
|
||||
Destroy(instance);
|
||||
}
|
||||
|
||||
for (int i = 0; i < numInstances; i++)
|
||||
{
|
||||
m_Instances.Add(Instantiate(category) as GameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
var fpsCounter = new Rect(new Vector2(0.9F * Screen.width, 0.1f * Screen.height), new Vector2(0.1F * Screen.width, 0.1f * Screen.height));
|
||||
float framerate = 1 / Time.deltaTime;
|
||||
fps = (1 * framerate + fpssamples * fps) / (1 + fpssamples);
|
||||
GUI.Label(fpsCounter, fps.ToString());
|
||||
fpssamples = Mathf.Min(1000, fpssamples + 1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a9da7454dab41842ad0833069495d6c
|
||||
timeCreated: 1499716825
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2fd0b473e331a1149aeb7ba3a764f984
|
||||
folderAsset: yes
|
||||
timeCreated: 1494560075
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88f6a47f25f3cdf43a488a86696898aa
|
||||
folderAsset: yes
|
||||
timeCreated: 1502400582
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,288 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using System.Collections;
|
||||
|
||||
public class BaseConditionsTests
|
||||
{
|
||||
[UnityTest]
|
||||
public IEnumerator AnimatePhysics_False_DoesntApplyVelocity([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.InstantiateCube(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
var rb = animation.gameObject.AddComponent<Rigidbody>();
|
||||
rb.useGravity = false;
|
||||
animation.gameObject.GetComponent<BoxCollider>().enabled = false;
|
||||
animation.animatePhysics = false;
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.Play("test");
|
||||
|
||||
yield return null;
|
||||
yield return null;
|
||||
Assert.AreEqual(0f, rb.velocity.x);
|
||||
Assert.AreEqual(0f, rb.velocity.z);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator CullingMode_AlwaysAnimate_Animates_InvisibleObject([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.InstantiateCube(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.cullingMode = AnimatorCullingMode.AlwaysAnimate;
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.gameObject.GetComponent<MeshRenderer>().enabled = false;
|
||||
animation.Play("test");
|
||||
|
||||
yield return null;
|
||||
yield return null;
|
||||
Assert.AreNotEqual(Vector3.zero, animation.gameObject.transform.localPosition);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator CullingMode_CullCompletely_Doesnt_Animate_InvisibleObject([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.InstantiateCube(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.cullingMode = AnimatorCullingMode.CullCompletely;
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.gameObject.GetComponent<MeshRenderer>().enabled = false;
|
||||
animation.Play("test");
|
||||
|
||||
yield return null;
|
||||
yield return null;
|
||||
Assert.AreEqual(Vector3.zero, animation.gameObject.transform.localPosition);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IsPlaying_BeforePlay_ReturnsFalse([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "test");
|
||||
Assert.AreEqual(false, animation.isPlaying);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IsPlaying_AfterPlay_ReturnsTrue([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.Play("test");
|
||||
Assert.AreEqual(true, animation.isPlaying);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator IsPlaying_AfterStop_ReturnsFalse([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.Play("test");
|
||||
yield return null;
|
||||
animation.Stop();
|
||||
Assert.AreEqual(false, animation.isPlaying);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator IsPlaying_AfterClipDone_ReturnsFalse([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
clipInstance.wrapMode = WrapMode.Once;
|
||||
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.Play("test");
|
||||
yield return new WaitForSeconds(2f);
|
||||
Assert.AreEqual(false, animation.isPlaying);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator IsPlaying_AfterCrossfadeDone_ReturnsFalse([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
clipInstance.wrapMode = WrapMode.Once;
|
||||
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.AddClip(clipInstance, "test2");
|
||||
animation.Play("test");
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
animation.CrossFade("test2", 1.5f);
|
||||
yield return new WaitForSeconds(2.0f);
|
||||
Assert.AreEqual(false, animation.isPlaying);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DefaultClip_DoesntPlay_When_IsPlayingAutomatically_IsFalse([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
animation.clip = clipInstance;
|
||||
animation.playAutomatically = false;
|
||||
|
||||
Assert.AreEqual(false, animation.isPlaying);
|
||||
Assert.AreEqual(false, animation.IsPlaying(animation.clip.name));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DefaultClip_Plays_When_IsPlayingAutomatically_IsTrue([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
animation.clip = clipInstance;
|
||||
animation.playAutomatically = true;
|
||||
|
||||
var newGO = Object.Instantiate<GameObject>(animation.gameObject);
|
||||
animation = newGO.GetComponent<IAnimation>();
|
||||
|
||||
Assert.AreEqual(true, animation.isPlaying);
|
||||
var defaultName = animation.usesLegacy ? animation.clip.name : "Default";
|
||||
Assert.AreEqual(true, animation.IsPlaying(defaultName));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PlayAutomatically_HasNoEffect_WhenThereIsNo_DefaultClip([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
animation.playAutomatically = true;
|
||||
|
||||
var newGO = Object.Instantiate<GameObject>(animation.gameObject);
|
||||
animation = newGO.GetComponent<IAnimation>();
|
||||
|
||||
Assert.AreEqual(false, animation.isPlaying);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PlayAutomatically_WithNo_DefaultClip_HasNoEffect_OnOtherClips([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
animation.playAutomatically = true;
|
||||
animation.AddClip(clipInstance, clipInstance.name);
|
||||
|
||||
var newGO = Object.Instantiate<GameObject>(animation.gameObject);
|
||||
animation = newGO.GetComponent<IAnimation>();
|
||||
|
||||
Assert.AreEqual(false, animation.isPlaying);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PlayAutomatically_With_DefaultClip_HasNoEffect_OnOtherClips([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
animation.clip = clipInstance;
|
||||
animation.playAutomatically = true;
|
||||
animation.AddClip(clipInstance, "OtherClip");
|
||||
|
||||
Assert.AreEqual(false, animation.IsPlaying("OtherClip"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PlayAutomatically_BeforeSet_ReturnsTrue([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
Assert.AreEqual(true, animation.playAutomatically);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PlayAutomatically_AfterSet_True_ReturnsTrue([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
animation.playAutomatically = true;
|
||||
Assert.AreEqual(true, animation.playAutomatically);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PlayAutomatically_AfterSet_False_ReturnsFalse([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
animation.playAutomatically = false;
|
||||
Assert.AreEqual(false, animation.playAutomatically);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator WrapMode_Default_UsesClipSetting([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
clipInstance.wrapMode = WrapMode.Loop;
|
||||
|
||||
animation.wrapMode = WrapMode.Default;
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.Play("test");
|
||||
|
||||
yield return new WaitForSeconds(1.2f);
|
||||
Assert.AreEqual(true, animation.isPlaying);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator WrapMode_OverridesClipsWithDefaultSetting([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
clipInstance.wrapMode = WrapMode.Default;
|
||||
|
||||
animation.wrapMode = WrapMode.Loop;
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.Play("test");
|
||||
|
||||
yield return new WaitForSeconds(1.2f);
|
||||
Assert.AreEqual(true, animation.isPlaying);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator WrapMode_DoesntOverrideClipsSetting([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
clipInstance.wrapMode = WrapMode.Once;
|
||||
|
||||
animation.wrapMode = WrapMode.Loop;
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.Play("test");
|
||||
|
||||
yield return new WaitForSeconds(1.2f);
|
||||
Assert.AreEqual(false, animation.isPlaying);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 94d35051e65be294187c9630c79078d1
|
||||
timeCreated: 1494560140
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,202 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using System.Collections;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
public class ClipManagementTests
|
||||
{
|
||||
public class GetClipCount
|
||||
{
|
||||
[Test]
|
||||
public void GetClipCount_BeforeAdd_ReturnsZero([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
Assert.AreEqual(0, animation.GetClipCount(), "Component should have no clips connected at this point");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetClipCount_AfterAddOne_ReturnsOne([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
animation.AddClip(clipInstance, "test");
|
||||
|
||||
Assert.AreEqual(1, animation.GetClipCount(), "Component should have 1 clip connected after add");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetClipCount_AfterRemoveSingleClip_ReturnsZero([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.RemoveClip("test");
|
||||
|
||||
Assert.AreEqual(0, animation.GetClipCount(), "Component should have no clips after remove");
|
||||
}
|
||||
}
|
||||
|
||||
public class AddClip
|
||||
{
|
||||
[Test]
|
||||
public void AddClip_WithNullClip_Throws_NullReferenceException([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
Assert.Throws<System.NullReferenceException> (() => { animation.AddClip(null, "test"); });
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AddClip_TwiceWithSameName_GetClipCount_ReturnsOne([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "test");
|
||||
LogAssert.ignoreFailingMessages = true; //The error message here is irrelevant
|
||||
animation.AddClip(clipInstance, "test");
|
||||
LogAssert.ignoreFailingMessages = false;
|
||||
|
||||
Assert.AreEqual(1, animation.GetClipCount(), "Component should have no clips after remove");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AddClip_TwiceDifferentName_GetClipCount_ReturnsTwo([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.AddClip(clipInstance, "test2");
|
||||
Assert.AreEqual(2, animation.GetClipCount(), "Component should have no clips after remove");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AddClip_WithSameName_AsClip_DoenstCreateNewClip([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, clipInstance.name);
|
||||
IAnimationState state = animation.GetState(clipInstance.name);
|
||||
Assert.AreEqual(clipInstance, state.clip, "Component should have no clips after remove");
|
||||
}
|
||||
}
|
||||
|
||||
public class RemoveClip_ByAnimationClip
|
||||
{
|
||||
[Test]
|
||||
public void RemoveClip_AnimationClip_WithNullClip_Throws_NullReferenceException([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
AnimationClip clip = null;
|
||||
Assert.Throws<System.NullReferenceException> (() => { animation.RemoveClip(clip); });
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Description("AddClip always duplicates clips in the Animation Component, making it very hard to remove clips")]
|
||||
public void RemoveClip_AnimationClip_RemovesClip([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, clipInstance.name);
|
||||
animation.RemoveClip(clipInstance);
|
||||
Assert.AreEqual(0, animation.GetClipCount(), "Component should have no clips after remove");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RemoveClip_AnimationClip_DoesntRemoveUnrelatedClips([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clip2 = Resources.Load<AnimationClip>("LinearY");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
var clipInstance2 = Object.Instantiate<AnimationClip>(clip2);
|
||||
clipInstance2.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, clipInstance.name);
|
||||
animation.AddClip(clipInstance2, clipInstance2.name);
|
||||
animation.RemoveClip(clipInstance);
|
||||
Assert.AreEqual(1, animation.GetClipCount(), "Component should still have 1 connected clip after remove");
|
||||
Assert.NotNull(animation.GetState(clipInstance2.name));
|
||||
}
|
||||
}
|
||||
|
||||
public class RemoveClip_ByName
|
||||
{
|
||||
[Test]
|
||||
public void RemoveClip_ByName_WithEmptyName_Works([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "");
|
||||
animation.RemoveClip("");
|
||||
Assert.AreEqual(0, animation.GetClipCount(), "Component should still have 1 connected clip after remove");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RemoveClip_ByName_DoesntRemoveOtherClips([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
var legacyClip2 = Object.Instantiate<AnimationClip>(clipInstance);
|
||||
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.AddClip(legacyClip2, "test2");
|
||||
animation.RemoveClip("test");
|
||||
Assert.AreEqual(1, animation.GetClipCount(), "Component should still have 1 connected clip after remove");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RemoveClip_ByName_RemovesClip([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.RemoveClip("test");
|
||||
Assert.AreEqual(0, animation.GetClipCount(), "Component should still have 1 connected clip after remove");
|
||||
}
|
||||
}
|
||||
|
||||
public class RemoveClip
|
||||
{
|
||||
[Test]
|
||||
public void RemoveClip_Invalidates_ExistingState([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, clipInstance.name);
|
||||
IAnimationState state = animation.GetState(clipInstance.name);
|
||||
animation.RemoveClip(clipInstance);
|
||||
Assert.IsFalse(state.isValid);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0b00cae6d5f62bb41a1a48f5c48069fe
|
||||
timeCreated: 1494560140
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
class ComparativeTestFixture
|
||||
{
|
||||
private static System.Type[] Sources()
|
||||
{
|
||||
return new Type [] { typeof(AnimationProxy), typeof(SimpleAnimationProxy) };
|
||||
}
|
||||
|
||||
public static IAnimation Instantiate(System.Type type)
|
||||
{
|
||||
var go = new GameObject();
|
||||
var component = go.AddComponent(type);
|
||||
return component as IAnimation;
|
||||
}
|
||||
|
||||
public static IAnimation InstantiateCube(System.Type type)
|
||||
{
|
||||
var go = GameObject.CreatePrimitive(PrimitiveType.Cube);
|
||||
var component = go.AddComponent(type);
|
||||
return component as IAnimation;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98de67babe968c640aa589d5b3a449c2
|
||||
timeCreated: 1496940236
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,189 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using System.Collections;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
public class DifferencesTests
|
||||
{
|
||||
[Test]
|
||||
[Ignore("The Animation Component creates a new internal clip instance when a state has a different name than the name of the clip. This was deemed an undesirable behavior")]
|
||||
public void AddClip_WithNewName_CreatesNewClip([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "NewName");
|
||||
IAnimationState state = animation.GetState("NewName");
|
||||
Assert.AreNotEqual(clipInstance, state.clip, "AddClip should have created a new clip instance");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore("This is where the new component differs. Animation won't let you remove multiple states with the same clip, because it's not possible to have the same clip twice")]
|
||||
public void RemoveClip_AnimationClip_RemovesAllInstances([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.AddClip(clipInstance, "test2");
|
||||
animation.RemoveClip(clipInstance);
|
||||
Assert.AreEqual(0, animation.GetClipCount(), "Component should have no clips after remove");
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
[Ignore("Time does not advance on the frame on which Rewind is called on SimpleAnimation")]
|
||||
public IEnumerator Rewind_PlaysFrameZero([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstanceX = Object.Instantiate<AnimationClip>(clipX);
|
||||
clipInstanceX.legacy = animation.usesLegacy;
|
||||
animation.AddClip(clipInstanceX, "ValidName");
|
||||
animation.Play("ValidName");
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
Assert.AreNotEqual(0f, animation.gameObject.transform.localPosition.x);
|
||||
animation.Rewind("ValidName");
|
||||
yield return null;
|
||||
Assert.AreEqual(0f, animation.gameObject.transform.localPosition.x);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore("Check were added to SimpleAnimation to prevent using invalid names")]
|
||||
public void Rewind_WithInvalidName_FailsOnCall([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
LogAssert.Expect(LogType.Error, new Regex(""));
|
||||
animation.Rewind("InvalidName");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore("Check were added to SimpleAnimation to prevent using invalid names")]
|
||||
public void Stop_WithInvalidName_FailsOnCall([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
LogAssert.Expect(LogType.Error, new Regex(""));
|
||||
animation.Stop("InvalidName");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore("The Animation Component accepts null as a valid name")]
|
||||
public void State_Name_NullString_Throws_ArgumentNullException([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
Assert.Throws<System.ArgumentNullException>(() => { state.name = null; });
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
[Ignore("Setting time guarantees you that the next automatic evaluation will use the time you supplied with Playables, whereas Animation Component will update the frame time")]
|
||||
public IEnumerator State_Time_SetTime_PreventsUpdatingTimeAutomatically([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
animation.Play(state.name);
|
||||
float time = Time.time;
|
||||
state.time = 0.1f; //empty run for the Animation component, probably a side effect of reenabling the component
|
||||
yield return null;
|
||||
|
||||
state.time = 0.1f;
|
||||
yield return null;
|
||||
|
||||
Assert.AreEqual(0.1f, state.time);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
[Ignore("The Animation Component doesn't advance on the first frame")]
|
||||
public IEnumerator State_Time_IsSynchronizedWith_GameTime([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
animation.Play(state.name);
|
||||
float previousTime = Time.time;
|
||||
yield return null;
|
||||
yield return null;
|
||||
yield return null;
|
||||
float elapsedTime = Time.time - previousTime;
|
||||
Assert.AreEqual(elapsedTime, state.time, 0.001f, "State time should be equal to elapsed time");
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
[Ignore("In the Animation Component, RemoveClip doesn't remove queued instances of the removed clip, whereas Stop stops both the queued instances and the playing instances. This inconsistency was deemed undesirable")]
|
||||
public IEnumerator Queue_RemoveClip_StopsQueuedClips([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "PlayAndQueue");
|
||||
animation.Play("PlayAndQueue");
|
||||
animation.PlayQueued("PlayAndQueue", QueueMode.CompleteOthers);
|
||||
yield return null;
|
||||
animation.RemoveClip("PlayAndQueue");
|
||||
Assert.IsFalse(animation.isPlaying);
|
||||
yield return null;
|
||||
Assert.IsFalse(animation.isPlaying);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
[Ignore("States that play backwards should still be Queue-compatible, which is not the case in the Animation Component")]
|
||||
public IEnumerator NegativeSpeed_Does_Trigger_Crossfade([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "PlayBackwards");
|
||||
animation.AddClip(clipInstance, "Crossfade");
|
||||
IAnimationState state = animation.GetState("PlayBackwards");
|
||||
state.enabled = true;
|
||||
state.time = 0.5f;
|
||||
state.speed = -1f;
|
||||
animation.PlayQueued("Crossfade", QueueMode.CompleteOthers);
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
|
||||
Assert.IsTrue(state.enabled);
|
||||
Assert.IsTrue(animation.IsPlaying("Crossfade"));
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
[Ignore("The Animation Component doesn't apply velocities to rigidbodies with AnimatePhysics on")]
|
||||
public IEnumerator AnimatePhysics_True_AppliesVelocity([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.InstantiateCube(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
var rb = animation.gameObject.AddComponent<Rigidbody>();
|
||||
rb.useGravity = false;
|
||||
animation.animatePhysics = true;
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.Play("test");
|
||||
|
||||
yield return null;
|
||||
yield return new WaitForSeconds(0.3f);
|
||||
Assert.AreNotEqual(rb.velocity, Vector3.zero);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0b19f00406c66144ab1f66fe9c78fabb
|
||||
timeCreated: 1499370755
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,57 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using System.Collections;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
public class MiscTests
|
||||
{
|
||||
[UnityTest]
|
||||
public IEnumerator StateSpeed_Affects_WhenCrossfadeHappens([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "PlaySlowly");
|
||||
animation.AddClip(clipInstance, "Queued");
|
||||
IAnimationState state = animation.GetState("PlaySlowly");
|
||||
state.enabled = true;
|
||||
state.speed = 0.1f;
|
||||
animation.PlayQueued("Queued", QueueMode.CompleteOthers);
|
||||
|
||||
//Wait for the original length of PlaySlowly
|
||||
yield return new WaitForSeconds(1.1f);
|
||||
Assert.IsFalse(animation.IsPlaying("Queued"), "Clip 'Queued' should not be playing yet. Speed is probably applied wrong.");
|
||||
state.speed = 1000.0f;
|
||||
yield return null;
|
||||
yield return null;
|
||||
Assert.IsTrue(animation.IsPlaying("Queued"), "Clip 'PlaySlowly' should now be done, and clip 'Queued' should have started playing.");
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator PlayQueue_WithLoopedAnimation_Prevents_StateAccess_OfOriginalState_FromWorking_Correctly([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
var loopedClipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
loopedClipInstance.legacy = animation.usesLegacy;
|
||||
loopedClipInstance.wrapMode = WrapMode.Loop;
|
||||
|
||||
animation.AddClip(clipInstance, "FirstClip");
|
||||
animation.AddClip(loopedClipInstance, "LoopedClip");
|
||||
animation.Play("FirstClip");
|
||||
animation.PlayQueued("LoopedClip", QueueMode.CompleteOthers);
|
||||
yield return new WaitForSeconds(1.1f);
|
||||
Assert.IsTrue(animation.IsPlaying("LoopedClip"), "Clip 'LoopedClip' should be playing");
|
||||
IAnimationState state = animation.GetState("LoopedClip");
|
||||
|
||||
Assert.IsFalse(state.enabled, "We should be playing a copy of LoopedClip, not the LoopedClip State");
|
||||
yield return new WaitForSeconds(1.1f);
|
||||
state = animation.GetState("LoopedClip");
|
||||
Assert.IsFalse(state.enabled, "We should still be playing a copy of LoopedClip, not the LoopedClip State");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d6e209b2d0c68024ebd0ce0df3d50480
|
||||
timeCreated: 1499452822
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,806 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using System.Collections;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
public class PlaybackTests
|
||||
{
|
||||
public class Play
|
||||
{
|
||||
[Test]
|
||||
public void Play_WithInvalidName_FailsOnCall([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
LogAssert.Expect(LogType.Error, new Regex(""));
|
||||
animation.Play("WrongState");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Play_ValidName_IsPlaying_ReturnsTrue([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "RightName");
|
||||
animation.Play("RightName");
|
||||
Assert.IsTrue(animation.isPlaying, "The clip RightName should be playing");
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator Play_ValidName_MovesObject([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
animation.Play("ValidName");
|
||||
|
||||
//TODO: replace by Seek(time)
|
||||
yield return null;
|
||||
yield return null;
|
||||
yield return null;
|
||||
|
||||
Assert.AreNotEqual(0f, animation.gameObject.transform.localPosition.x, "LocalPosition.x should have been moved by the clip");
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator Play_OtherClip_IsPlaying_ReturnsFalse([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
var clipInstance2 = Object.Instantiate<AnimationClip>(clipInstance);
|
||||
clipInstance2.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ClipToPlayOver");
|
||||
animation.AddClip(clipInstance2, "ClipThatPlaysOver");
|
||||
animation.Play("ClipToPlayOver");
|
||||
yield return null;
|
||||
animation.Play("ClipThatPlaysOver");
|
||||
|
||||
Assert.IsFalse(animation.IsPlaying("ClipToPlayOver"), "ClipToPlayOver should be stopped by playing ClipThatPlaysOver");
|
||||
Assert.IsTrue(animation.IsPlaying("ClipThatPlaysOver"), "ClipThatPlaysOver should now be the only playing clip");
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator Play_SameClip_StateTime_DoesntChange([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.Play("test");
|
||||
|
||||
yield return null;
|
||||
|
||||
float time = animation.GetState("test").time;
|
||||
animation.Play("test");
|
||||
Assert.AreEqual(time, animation.GetState("test").time);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator Play_SameClip_Done_StateTime_Resets([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "test");
|
||||
animation.Play("test");
|
||||
|
||||
yield return new WaitForSeconds(1.1f);
|
||||
|
||||
float time = animation.GetState("test").time;
|
||||
animation.Play("test");
|
||||
Assert.AreEqual(0f, animation.GetState("test").time);
|
||||
}
|
||||
}
|
||||
|
||||
public class PlayQueue_CompleteOthers
|
||||
{
|
||||
[Test]
|
||||
public void PlayQueue_WithInvalidName_FailsOnCall([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
LogAssert.Expect(LogType.Error, new Regex(""));
|
||||
animation.PlayQueued("InvalidName", QueueMode.CompleteOthers);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator PlayQueue_WithNoClipPlaying_IsStatePlaying_ReturnsTrue([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ToPlayQueue");
|
||||
animation.PlayQueued("ToPlayQueue", QueueMode.CompleteOthers);
|
||||
|
||||
yield return null;
|
||||
Assert.IsTrue(animation.IsPlaying("ToPlayQueue"));
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator PlayQueue_WithClipPlaying_IsStatePlaying_ReturnsFalse([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ToPlay");
|
||||
animation.AddClip(clipInstance, "ToPlayQueue");
|
||||
animation.Play("ToPlay");
|
||||
animation.PlayQueued("ToPlayQueue", QueueMode.CompleteOthers);
|
||||
|
||||
Assert.IsFalse(animation.IsPlaying("ToPlayQueue"));
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator PlayQueue_WithClipPlaying_IsStatePlaying_AfterOriginalClipDone_ReturnsTrue([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ToPlay");
|
||||
animation.AddClip(clipInstance, "ToPlayQueue");
|
||||
animation.Play("ToPlay");
|
||||
animation.PlayQueued("ToPlayQueue", QueueMode.CompleteOthers);
|
||||
yield return new WaitForSeconds(1.1f);
|
||||
|
||||
Assert.IsTrue(animation.IsPlaying("ToPlayQueue"));
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator PlayQueue_Queueing_SameClip_AfterFirstClipIsDone_IsPlaying_ReturnsTrue([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ToPlayAndPlayQueue");
|
||||
animation.Play("ToPlayAndPlayQueue");
|
||||
animation.PlayQueued("ToPlayAndPlayQueue", QueueMode.CompleteOthers);
|
||||
yield return new WaitForSeconds(1.1f);
|
||||
|
||||
Assert.IsTrue(animation.IsPlaying("ToPlayAndPlayQueue"));
|
||||
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
|
||||
public class PlayQueue_PlayNow
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class Crossfade
|
||||
{
|
||||
|
||||
[Test]
|
||||
public void Crossfade_WithInvalidName_FailsOnCall([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
LogAssert.Expect(LogType.Error, new Regex(""));
|
||||
animation.CrossFade("InvalidName", 0);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Crossfade_WithValidName_IsPlaying_ReturnsTrue([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ToCrossfade");
|
||||
animation.CrossFade("ToCrossfade", 0f);
|
||||
|
||||
Assert.IsTrue(animation.IsPlaying("ToCrossfade"));
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator Crossfade_WithValidName_MovesObject([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ToCrossfade");
|
||||
animation.CrossFade("ToCrossfade", 0f);
|
||||
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
Assert.AreNotEqual(0f, animation.gameObject.transform.localPosition.x);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Crossfade_LengthZero_StopsOtherClips([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ToPlay");
|
||||
animation.AddClip(clipInstance, "ToCrossfade");
|
||||
animation.CrossFade("ToPlay", 0f);
|
||||
animation.CrossFade("ToCrossfade", 0.0f);
|
||||
|
||||
Assert.IsFalse(animation.IsPlaying("ToPlay"));
|
||||
}
|
||||
[Test]
|
||||
public void Crossfade_DoesntStopOtherClips([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ToPlay");
|
||||
animation.AddClip(clipInstance, "ToCrossfade");
|
||||
animation.CrossFade("ToPlay", 0f);
|
||||
animation.CrossFade("ToCrossfade", 0.2f);
|
||||
|
||||
Assert.IsTrue(animation.IsPlaying("ToPlay"));
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator CrossfadedOut_Clips_AreStopped([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ToPlay");
|
||||
animation.AddClip(clipInstance, "ToCrossfade");
|
||||
animation.Play("ToPlay");
|
||||
animation.CrossFade("ToCrossfade", 0.1f);
|
||||
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
|
||||
Assert.IsFalse(animation.IsPlaying("ToPlay"));
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator CrossfadedOut_Clips_AreTimeReset([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ToPlay");
|
||||
animation.AddClip(clipInstance, "ToCrossfade");
|
||||
animation.Play("ToPlay");
|
||||
animation.CrossFade("ToCrossfade", 0.1f);
|
||||
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
|
||||
Assert.AreEqual(0.0f, animation.GetState("ToPlay").normalizedTime);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator Crossfade_MultipleTimes_DoesntReset_Crossfade_Duration([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clip2 = Resources.Load<AnimationClip>("LinearY");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
var clipInstance2 = Object.Instantiate<AnimationClip>(clip2);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
clipInstance2.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ToPlay");
|
||||
animation.AddClip(clipInstance2, "ToCrossfade");
|
||||
animation.Play("ToPlay");
|
||||
animation.CrossFade("ToCrossfade", 0.2f);
|
||||
yield return new WaitForSeconds(0.1f);
|
||||
animation.CrossFade("ToCrossfade", 0.2f);
|
||||
yield return new WaitForSeconds(0.11f);
|
||||
Assert.AreEqual(0.0f, animation.GetState("ToPlay").weight);
|
||||
Assert.AreEqual(1.0f, animation.GetState("ToCrossfade").weight);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
[Ignore("Wrong Assumption; clips don't get kept alive by crossfade")]
|
||||
public IEnumerator Crossfade_FromFinishingClip_KeepsClipAlive_UntilCrossfadeDone([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipY = Resources.Load<AnimationClip>("LinearY");
|
||||
var xClip = Object.Instantiate<AnimationClip>(clipX);
|
||||
var yClip = Object.Instantiate<AnimationClip>(clipY);
|
||||
xClip.legacy = animation.usesLegacy;
|
||||
yClip.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(xClip, "ToPlay");
|
||||
animation.AddClip(yClip, "ToCrossfade");
|
||||
animation.Play("ToPlay");
|
||||
|
||||
yield return new WaitForSeconds(0.9f);
|
||||
|
||||
Assert.IsTrue(animation.IsPlaying("ToPlay"));
|
||||
Assert.AreNotEqual(0f, animation.gameObject.transform.localPosition.y);
|
||||
animation.CrossFade("ToCrossfade", 0.5f);
|
||||
yield return new WaitForSeconds(0.3f);
|
||||
|
||||
Assert.AreNotEqual(0f, animation.gameObject.transform.localPosition.y);
|
||||
Assert.IsTrue(animation.IsPlaying("ToCrossfade"));
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
[Ignore("Wrong Assumption; clips don't get kept alive by crossfade")]
|
||||
public IEnumerator Crossfade_LongerThanClip_KeepsClipAlive_UntilCrossfadeDone([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipY = Resources.Load<AnimationClip>("LinearY");
|
||||
var xClip = Object.Instantiate<AnimationClip>(clipX);
|
||||
var yClip = Object.Instantiate<AnimationClip>(clipY);
|
||||
xClip.legacy = animation.usesLegacy;
|
||||
yClip.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(yClip, "ToPlay");
|
||||
animation.AddClip(xClip, "ToCrossfade");
|
||||
animation.Play("ToPlay");
|
||||
|
||||
yield return new WaitForSeconds(0.9f);
|
||||
|
||||
Assert.IsTrue(animation.IsPlaying("ToPlay"));
|
||||
Assert.AreNotEqual(0f, animation.gameObject.transform.localPosition.y);
|
||||
animation.CrossFade("ToCrossfade", 1.2f);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
|
||||
Assert.AreNotEqual(0f, animation.gameObject.transform.localPosition.y);
|
||||
Assert.IsTrue(animation.IsPlaying("ToCrossfade"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class CrossfadeQueue
|
||||
{
|
||||
[Test]
|
||||
public void CrossfadeQueue_WithNoClipAttached_FailsOnCall([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
LogAssert.Expect(LogType.Error, new Regex(""));
|
||||
animation.CrossFadeQueued("UnknownState", 0f, QueueMode.CompleteOthers);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator CrossfadeQueue_WithInvalidName_FailsOnCall([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ToPlay");
|
||||
LogAssert.Expect(LogType.Error, new Regex(""));
|
||||
animation.CrossFadeQueued("invalidName", 0f, QueueMode.CompleteOthers);
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator CrossfadeQueue_WithNoClipPlaying_IsStatePlaying_ReturnsTrue([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ToPlay");
|
||||
animation.CrossFadeQueued("ToPlay", 0f, QueueMode.CompleteOthers);
|
||||
|
||||
yield return null;
|
||||
Assert.IsTrue(animation.IsPlaying("ToPlay"));
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator CrossfadeQueue_WithClipPlaying_IsStatePlaying_ReturnsFalse([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipY = Resources.Load<AnimationClip>("LinearY");
|
||||
var clipInstanceX = Object.Instantiate<AnimationClip>(clipX);
|
||||
var clipInstanceY = Object.Instantiate<AnimationClip>(clipY);
|
||||
clipInstanceX.legacy = animation.usesLegacy;
|
||||
clipInstanceY.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstanceY, "ToPlay");
|
||||
animation.AddClip(clipInstanceX, "ToCrossfade");
|
||||
animation.Play("ToPlay");
|
||||
animation.CrossFadeQueued("ToCrossfade", 0.5f, QueueMode.CompleteOthers);
|
||||
yield return null;
|
||||
|
||||
Assert.IsFalse(animation.IsPlaying("ToCrossfade"));
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator CrossfadeQueue_WithClipPlaying_IsStatePlaying_AfterOriginalClipDone_ReturnsTrue([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipY = Resources.Load<AnimationClip>("LinearY");
|
||||
var clipInstanceX = Object.Instantiate<AnimationClip>(clipX);
|
||||
var clipInstanceY = Object.Instantiate<AnimationClip>(clipY);
|
||||
clipInstanceX.legacy = animation.usesLegacy;
|
||||
clipInstanceY.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstanceY, "ToPlay");
|
||||
animation.AddClip(clipInstanceX, "ToCrossfade");
|
||||
animation.Play("ToPlay");
|
||||
animation.CrossFadeQueued("ToCrossfade", 0.0f, QueueMode.CompleteOthers);
|
||||
yield return new WaitForSeconds(1.1f);
|
||||
|
||||
Assert.IsTrue(animation.IsPlaying("ToCrossfade"));
|
||||
}
|
||||
}
|
||||
|
||||
public class Stop
|
||||
{
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator Stop_ValidName_NotPlaying_IsPlaying_ReturnsFalse([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstanceX = Object.Instantiate<AnimationClip>(clipX);
|
||||
clipInstanceX.legacy = animation.usesLegacy;
|
||||
animation.AddClip(clipInstanceX, "ValidName");
|
||||
|
||||
yield return null;
|
||||
|
||||
animation.Stop("ValidName");
|
||||
Assert.IsFalse(animation.IsPlaying("ValidName"));
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator Stop_ValidName_Playing_IsPlaying_ReturnsFalse([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstanceX = Object.Instantiate<AnimationClip>(clipX);
|
||||
clipInstanceX.legacy = animation.usesLegacy;
|
||||
animation.AddClip(clipInstanceX, "ValidName");
|
||||
animation.Play("ValidName");
|
||||
|
||||
yield return null;
|
||||
|
||||
animation.Stop("ValidName");
|
||||
Assert.IsFalse(animation.IsPlaying("ValidName"));
|
||||
}
|
||||
[UnityTest]
|
||||
public IEnumerator Stop_ValidName_DoesntMoveObject([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstanceX = Object.Instantiate<AnimationClip>(clipX);
|
||||
clipInstanceX.legacy = animation.usesLegacy;
|
||||
animation.AddClip(clipInstanceX, "ValidName");
|
||||
animation.Play("ValidName");
|
||||
|
||||
yield return null;
|
||||
|
||||
Vector3 localPos = animation.gameObject.transform.localPosition;
|
||||
animation.Stop("ValidName");
|
||||
Assert.AreEqual(localPos, animation.gameObject.transform.localPosition);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator Stop_WithName_OtherClip_IsPlaying_DoesntChange([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipY = Resources.Load<AnimationClip>("LinearY");
|
||||
var clipInstanceX = Object.Instantiate<AnimationClip>(clipX);
|
||||
var clipInstanceY = Object.Instantiate<AnimationClip>(clipY);
|
||||
clipInstanceX.legacy = animation.usesLegacy;
|
||||
clipInstanceY.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstanceY, "ClipToStop");
|
||||
animation.AddClip(clipInstanceX, "OtherClip");
|
||||
var stateToStop = animation.GetState("ClipToStop");
|
||||
var otherState = animation.GetState("OtherClip");
|
||||
|
||||
stateToStop.weight = 1f;
|
||||
stateToStop.enabled = true;
|
||||
otherState.weight = 1f;
|
||||
otherState.enabled = true;
|
||||
|
||||
yield return null;
|
||||
|
||||
animation.Stop("ClipToStop");
|
||||
Assert.IsFalse(animation.IsPlaying("ClipToStop"));
|
||||
Assert.IsTrue(animation.IsPlaying("OtherClip"));
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator Stop_WithoutName_IsPlaying_ReturnsFalse([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipY = Resources.Load<AnimationClip>("LinearY");
|
||||
var clipInstanceX = Object.Instantiate<AnimationClip>(clipX);
|
||||
var clipInstanceY = Object.Instantiate<AnimationClip>(clipY);
|
||||
clipInstanceX.legacy = animation.usesLegacy;
|
||||
clipInstanceY.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstanceY, "clip1");
|
||||
animation.AddClip(clipInstanceX, "clip2");
|
||||
|
||||
animation.GetState("clip1").enabled = true;
|
||||
animation.GetState("clip1").weight = 0.5f;
|
||||
|
||||
animation.GetState("clip2").enabled = true;
|
||||
animation.GetState("clip2").weight = 0.5f;
|
||||
|
||||
Assert.IsTrue(animation.IsPlaying("clip1"));
|
||||
Assert.IsTrue(animation.IsPlaying("clip2"));
|
||||
yield return null;
|
||||
|
||||
animation.Stop();
|
||||
Assert.IsFalse(animation.IsPlaying("clip1"));
|
||||
Assert.IsFalse(animation.IsPlaying("clip2"));
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator Stop_Playing_StoppedState_DoesntFire_AnyEvents([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var eventReceiver = animation.gameObject.AddComponent<SimpleAnimationTests.ReceivesEvent>();
|
||||
var clip = Resources.Load<AnimationClip>("FiresEvent");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "FiresEvent");
|
||||
animation.Play("FiresEvent");
|
||||
yield return new WaitForSeconds(0.6f);
|
||||
|
||||
Assert.AreEqual(1, eventReceiver.eventCount, "Event at 0.5 should have fired");
|
||||
animation.Stop("FiresEvent");
|
||||
animation.Play("FiresEvent");
|
||||
Assert.AreEqual(0.0f, animation.GetState("FiresEvent").time, "Time should have reset to 0");
|
||||
Assert.AreEqual(1, eventReceiver.eventCount, "No new event should have fired");
|
||||
yield return null;
|
||||
Assert.AreEqual(1, eventReceiver.eventCount, "No new event should have fired after update");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class Rewind
|
||||
{
|
||||
[Test]
|
||||
public void Rewind_ValidName_NotPlaying_StateTime_IsZero([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstanceX = Object.Instantiate<AnimationClip>(clipX);
|
||||
clipInstanceX.legacy = animation.usesLegacy;
|
||||
animation.AddClip(clipInstanceX, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.time = 0.5f;
|
||||
animation.Rewind("ValidName");
|
||||
Assert.AreEqual(0f, state.time);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator Rewind_ValidName_Playing_StateTime_IsZero([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstanceX = Object.Instantiate<AnimationClip>(clipX);
|
||||
clipInstanceX.legacy = animation.usesLegacy;
|
||||
animation.AddClip(clipInstanceX, "ValidName");
|
||||
animation.Play("ValidName");
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
|
||||
animation.Rewind("ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
Assert.AreEqual(0f, state.time);
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void Rewind_WithName_OtherClip_Time_DoesntChange([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ToRewind");
|
||||
animation.AddClip(clipInstance, "ToLeaveAlone");
|
||||
IAnimationState toRewind = animation.GetState("ToRewind");
|
||||
toRewind.time = 0.5f;
|
||||
IAnimationState toLeaveAlone = animation.GetState("ToLeaveAlone");
|
||||
toLeaveAlone.time = 0.5f;
|
||||
|
||||
animation.Rewind("ToRewind");
|
||||
Assert.AreNotEqual(0f, toLeaveAlone.time);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Rewind_WithoutName_AllStateTimes_AreZero([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ToRewind");
|
||||
animation.AddClip(clipInstance, "ToRewindToo");
|
||||
IAnimationState toRewind = animation.GetState("ToRewind");
|
||||
toRewind.time = 0.5f;
|
||||
IAnimationState toRewindToo = animation.GetState("ToRewindToo");
|
||||
toRewindToo.time = 0.5f;
|
||||
|
||||
animation.Rewind();
|
||||
Assert.AreEqual(0f, toRewind.time);
|
||||
Assert.AreEqual(0f, toRewindToo.time);
|
||||
}
|
||||
}
|
||||
|
||||
public class Sample
|
||||
{
|
||||
[Test]
|
||||
public void Sample_DoesntChange_StateTime([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstanceX = Object.Instantiate<AnimationClip>(clipX);
|
||||
clipInstanceX.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstanceX, "clip1");
|
||||
|
||||
animation.GetState("clip1").enabled = true;
|
||||
animation.GetState("clip1").weight = 1f;
|
||||
animation.GetState("clip1").time = 0.5f;
|
||||
animation.Sample();
|
||||
|
||||
Assert.AreEqual(0.5f, animation.gameObject.transform.localPosition.x);
|
||||
Assert.IsTrue(Mathf.Approximately(0.5f, animation.GetState("clip1").time));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Sample_EvaluatesAt_StateTime([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstanceX = Object.Instantiate<AnimationClip>(clipX);
|
||||
clipInstanceX.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstanceX, "ToSample");
|
||||
IAnimationState state = animation.GetState("ToSample");
|
||||
|
||||
state.enabled = true;
|
||||
state.weight = 1f;
|
||||
state.time = 0.5f;
|
||||
animation.Sample();
|
||||
|
||||
Assert.AreEqual(0.5f, animation.gameObject.transform.localPosition.x);
|
||||
}
|
||||
}
|
||||
|
||||
public class Blend
|
||||
{
|
||||
[Test]
|
||||
public void Blend_AfterBlend_Instant_State_IsPlaying([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstanceX = Object.Instantiate<AnimationClip>(clipX);
|
||||
clipInstanceX.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstanceX, "ToBlend");
|
||||
animation.Blend("ToBlend", 1, 0);
|
||||
|
||||
Assert.IsTrue(animation.IsPlaying("ToBlend"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Blend_AfterBlend_NonInstant_State_IsPlaying([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstanceX = Object.Instantiate<AnimationClip>(clipX);
|
||||
clipInstanceX.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstanceX, "ToBlend");
|
||||
animation.Blend("ToBlend", 1, 0.5f);
|
||||
|
||||
Assert.IsTrue(animation.IsPlaying("ToBlend"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Blend_DoesntChange_OtherState_Weight([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance1 = Object.Instantiate<AnimationClip>(clipX);
|
||||
var clipInstance2 = Object.Instantiate<AnimationClip>(clipX);
|
||||
clipInstance1.legacy = animation.usesLegacy;
|
||||
clipInstance2.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance1, "ToBlend");
|
||||
animation.AddClip(clipInstance2, "ToLeaveAlone");
|
||||
animation.Play("ToLeaveAlone");
|
||||
animation.Blend("ToBlend", 1f, 0f);
|
||||
|
||||
Assert.AreEqual(1f, animation.GetState("ToLeaveAlone").weight);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator Blend_Instant_WithWeightZero_State_DoesntStop_State([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstanceX = Object.Instantiate<AnimationClip>(clipX);
|
||||
clipInstanceX.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstanceX, "ToBlend");
|
||||
animation.Blend("ToBlend", 0, 0);
|
||||
yield return null;
|
||||
Assert.IsTrue(animation.IsPlaying("ToBlend"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class PlayQueued
|
||||
{
|
||||
[UnityTest]
|
||||
public IEnumerator PlayQueued_Only_Plays_QueuedAnimations_Once([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clipX = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstanceX = Object.Instantiate<AnimationClip>(clipX);
|
||||
clipInstanceX.legacy = animation.usesLegacy;
|
||||
var clipInstanceXOnce = Object.Instantiate<AnimationClip>(clipX);
|
||||
clipInstanceXOnce.legacy = animation.usesLegacy;
|
||||
clipInstanceXOnce.wrapMode = WrapMode.Once;
|
||||
|
||||
animation.AddClip(clipInstanceX, "A");
|
||||
animation.AddClip(clipInstanceX, "B");
|
||||
animation.AddClip(clipInstanceX, "C");
|
||||
|
||||
animation.Play("A");
|
||||
animation.PlayQueued("B", QueueMode.CompleteOthers);
|
||||
animation.PlayQueued("C", QueueMode.CompleteOthers);
|
||||
yield return new WaitForSeconds(2.8f);
|
||||
Assert.IsTrue(animation.IsPlaying("C"));
|
||||
yield return new WaitForSeconds(0.3f);
|
||||
Assert.IsFalse(animation.isPlaying);
|
||||
}
|
||||
//TODO: Crossfade and Play clears queued animations
|
||||
//TODO: Stop clears queued animations
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2fd08db4a0ee3ce47b1e4f8a0913f89d
|
||||
timeCreated: 1494560140
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,61 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using System.Collections;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
public class QueueTests
|
||||
{
|
||||
[UnityTest]
|
||||
public IEnumerator Queue_Stop_Clip_StopsQueuedClip([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "PlayAndQueue");
|
||||
animation.Play("PlayAndQueue");
|
||||
animation.PlayQueued("PlayAndQueue", QueueMode.CompleteOthers);
|
||||
yield return null;
|
||||
animation.Stop("PlayAndQueue");
|
||||
Assert.IsFalse(animation.isPlaying);
|
||||
yield return null;
|
||||
//Queued animation would have started if it was going to.
|
||||
Assert.IsFalse(animation.isPlaying);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator State_Enabled_DoesntCover_QueuedState([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "PlayAndQueue");
|
||||
animation.Play("PlayAndQueue");
|
||||
animation.PlayQueued("PlayAndQueue", QueueMode.CompleteOthers);
|
||||
IAnimationState state = animation.GetState("PlayAndQueue");
|
||||
Assert.IsTrue(state.enabled);
|
||||
yield return new WaitForSeconds(1.1f);
|
||||
Assert.IsFalse(state.enabled);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator Queue_Looped_Clips_Block_QueuedAnimations([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
clipInstance.wrapMode = WrapMode.Loop;
|
||||
|
||||
animation.AddClip(clipInstance, "Play");
|
||||
animation.AddClip(clipInstance, "Queued");
|
||||
animation.Play("Play");
|
||||
animation.PlayQueued("Queued", QueueMode.CompleteOthers);
|
||||
yield return new WaitForSeconds(1.1f);
|
||||
Assert.IsFalse(animation.IsPlaying("Queued"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92ce3265af6ad694c9d214d1b4fd6adc
|
||||
timeCreated: 1499439871
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,693 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using NUnit.Framework;
|
||||
using System.Collections;
|
||||
|
||||
public class StateAccessTests
|
||||
{
|
||||
public class BaseTests
|
||||
{
|
||||
[Test]
|
||||
public void GetState_WithNoState_ReturnsNull([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
|
||||
IAnimationState state = animation.GetState("InvalidName");
|
||||
Assert.AreEqual(null, state);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetState_WithState_ReturnsState([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
Assert.AreNotEqual(null, state);
|
||||
Assert.AreEqual("ValidName", state.name);
|
||||
}
|
||||
}
|
||||
|
||||
public class TimeTests
|
||||
{
|
||||
[Test]
|
||||
public void State_Time_Equals_Zero_BeforePlay([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
Assert.AreEqual(0f, state.time);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Time_Equals_Zero_AfterPlay([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
animation.Play(state.name);
|
||||
Assert.AreEqual(0f, state.time);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Time_Affects_ClipPlayback([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.enabled = true;
|
||||
state.weight = 1f;
|
||||
state.time = 0.5f;
|
||||
animation.Sample();
|
||||
Assert.AreEqual(animation.gameObject.transform.localPosition.x, state.time, "Sampling should have updated the position of the object at time 0.5");
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator State_Time_ChangesWith_GameTime([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
animation.Play(state.name);
|
||||
float previousTime = Time.time;
|
||||
yield return null;
|
||||
yield return null; //Since the Animation Component doesn't update the time on the first frame, we must wait two frames to see an effect
|
||||
float elapsedTime = Time.time - previousTime;
|
||||
Assert.AreNotEqual(elapsedTime, state.time, "State time should have changed");
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator State_Time_SetPast_ClipEnd_StopsState_AfterOneFrame([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
animation.Play(state.name);
|
||||
state.time = 2.0f;
|
||||
yield return null;
|
||||
Assert.IsFalse(state.enabled, "State should be disabled");
|
||||
Assert.IsFalse(animation.IsPlaying(state.name), "State should be disabled");
|
||||
Assert.IsFalse(animation.isPlaying, "State should be disabled");
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator State_Time_SetPast_ClipEnd_ThenBack_DoesntStopState([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
animation.Play(state.name);
|
||||
state.time = 2.0f;
|
||||
state.time = 0.2f;
|
||||
yield return null;
|
||||
Assert.IsTrue(state.enabled, "State should be enabled");
|
||||
Assert.IsTrue(animation.IsPlaying(state.name), "State should be playing");
|
||||
Assert.IsTrue(animation.isPlaying, "Component should be playing");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Time_SetPast_ClipEnd_Doesnt_Immediately_StopState([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
animation.Play(state.name);
|
||||
state.time = 2.0f;
|
||||
Assert.IsTrue(state.enabled, "State should be enabled");
|
||||
Assert.IsTrue(animation.IsPlaying(state.name), "State should be playing");
|
||||
Assert.IsTrue(animation.isPlaying, "Component should be playing");
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator State_Time_SetTime_DoesntStartState([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
animation.Play(state.name);
|
||||
state.time = 2.0f;
|
||||
state.time = 0.2f;
|
||||
yield return null;
|
||||
Assert.IsTrue(state.enabled, "State should be disabled");
|
||||
Assert.IsTrue(animation.IsPlaying(state.name), "State should be disabled");
|
||||
Assert.IsTrue(animation.isPlaying, "State should be disabled");
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator State_Time_SetTime_DoesntPlayEvents([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("FiresEvent");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
var eventReceiver = animation.gameObject.AddComponent<SimpleAnimationTests.ReceivesEvent>();
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
animation.Play(state.name);
|
||||
state.time = 0.1f;
|
||||
yield return null;
|
||||
Assert.AreEqual(0, eventReceiver.eventCount, "Event should not have been received");
|
||||
state.time = 0.6f;
|
||||
yield return null;
|
||||
Assert.AreEqual(0, eventReceiver.eventCount, "Event should have been received after setting the time on the state");
|
||||
}
|
||||
}
|
||||
|
||||
public class NormalizedTime
|
||||
{
|
||||
[Test]
|
||||
public void State_NormalizedTime_AffectsTime([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
//Create event to extend clip
|
||||
var evt = new AnimationEvent();
|
||||
evt.time = 2.0f;
|
||||
clipInstance.AddEvent(evt);
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.normalizedTime = 0.5f;
|
||||
Assert.AreEqual(state.normalizedTime*state.length, state.time);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Time_AffectsNormalizedTime([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
//Create event to extend clip
|
||||
var evt = new AnimationEvent();
|
||||
evt.time = 2.0f;
|
||||
clipInstance.AddEvent(evt);
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.time = 0.5f;
|
||||
Assert.AreEqual(state.time / state.length, state.normalizedTime);
|
||||
}
|
||||
}
|
||||
|
||||
public class Enabled
|
||||
{
|
||||
[Test]
|
||||
public void State_Enabled_InitialValue_False([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
Assert.IsFalse(state.enabled);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Enabled_SetTrue_ReturnsTrue([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.enabled = true;
|
||||
Assert.IsTrue(state.enabled);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Enabled_AfterPlay_ReturnsTrue([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
animation.Play(state.name);
|
||||
Assert.IsTrue(state.enabled);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Enabled_AfterStop_ReturnsFalse([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.enabled = true;
|
||||
animation.Stop(state.name);
|
||||
Assert.IsFalse(state.enabled);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator State_Enabled_AfterStateEnd_ReturnsFalse([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.enabled = true;
|
||||
yield return new WaitForSeconds(1.1f);
|
||||
|
||||
Assert.IsFalse(state.enabled);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator State_Enabled_AfterSetTime_ToStateEnd_ReturnsFalse([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.enabled = true;
|
||||
state.time = 2f;
|
||||
yield return null;
|
||||
Assert.IsFalse(state.enabled);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Enabled_False_IsPlaying_ReturnsFalse([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
animation.Play(state.name);
|
||||
state.enabled = false;
|
||||
Assert.IsFalse(animation.isPlaying);
|
||||
Assert.IsFalse(animation.IsPlaying(state.name));
|
||||
}
|
||||
}
|
||||
|
||||
public class Speed
|
||||
{
|
||||
[UnityTest]
|
||||
public IEnumerator State_Speed_SetTo_Zero_Time_DoesntAdvance([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.speed = 0f;
|
||||
state.enabled = true;
|
||||
yield return null;
|
||||
yield return null; //Second frame to allow Animation Component to advance time
|
||||
Assert.AreEqual(0f, state.time);
|
||||
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator State_Speed_Negative_StopsState_WhenTime_Reaches_Negative([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.speed = -1f;
|
||||
state.enabled = true;
|
||||
yield return null;
|
||||
yield return null; //Second frame to allow Animation Component to advance time
|
||||
Assert.IsFalse(state.enabled);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator State_Speed_Negative_DoesntStopsState_WhenTime_Reaches_Negative_OnLoopedClip([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
clipInstance.wrapMode = WrapMode.Loop;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.speed = -1f;
|
||||
state.enabled = true;
|
||||
yield return null;
|
||||
yield return null; //Second frame to allow Animation Component to advance time
|
||||
Assert.IsTrue(state.enabled);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Speed_DoesntAffect_NormalizedTime([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
clipInstance.wrapMode = WrapMode.Loop;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.time = 0.5f;
|
||||
float normalizedTime = state.normalizedTime;
|
||||
state.speed = 10.0f;
|
||||
Assert.AreEqual(normalizedTime, state.normalizedTime);
|
||||
}
|
||||
}
|
||||
|
||||
public class Name
|
||||
{
|
||||
[Test]
|
||||
public void State_Name_Equals_AddClip_Name([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
Assert.AreEqual("ValidName", state.name);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Name_ChangingName_Name_Equals_NewName([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.name = "NewName";
|
||||
Assert.AreEqual("NewName", state.name);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Name_ChangingName_DoesntInvalidate_State([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.name = "NewName";
|
||||
Assert.IsTrue(state.isValid);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Name_RenamedState_CantBeFound_ByOldName([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.name = "NewName";
|
||||
state = animation.GetState("ValidName");
|
||||
Assert.IsNull(state);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Name_RenamedState_CanBeFound_ByNewName([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.name = "NewName";
|
||||
state = animation.GetState("NewName");
|
||||
Assert.IsNotNull(state);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Name_EmptyString_CanBeFound([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.name = "";
|
||||
state = animation.GetState("");
|
||||
Assert.IsNotNull(state);
|
||||
}
|
||||
}
|
||||
|
||||
public class Weight
|
||||
{
|
||||
[UnityTest]
|
||||
public IEnumerator State_Weight_EqualZero_DoesntWrite([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.enabled = true;
|
||||
state.weight = 0f;
|
||||
state.time = 0.5f; //Seek the clip so that values should be written;
|
||||
yield return null;
|
||||
Assert.AreEqual(0f, animation.gameObject.transform.localPosition.x);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator State_Weight_FlipFlopTest([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.enabled = true;
|
||||
state.weight = 0f;
|
||||
state.time = 0.5f; //Seek the clip so that values should be written;
|
||||
yield return null;
|
||||
Assert.AreEqual(0f, animation.gameObject.transform.localPosition.x);
|
||||
state.weight = 1f;
|
||||
yield return null;
|
||||
Assert.AreNotEqual(0f, animation.gameObject.transform.localPosition.x);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator State_Weight_Normalizes([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clip2 = Resources.Load<AnimationClip>("LinearY");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
var clipInstance2 = Object.Instantiate<AnimationClip>(clip2);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
clipInstance2.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "State1");
|
||||
animation.AddClip(clipInstance2, "State2");
|
||||
IAnimationState state1 = animation.GetState("State1");
|
||||
IAnimationState state2 = animation.GetState("State2");
|
||||
state1.enabled = true;
|
||||
state2.enabled = true;
|
||||
state1.weight = 1f;
|
||||
state2.weight = 1f;
|
||||
state1.time = 0.5f; //Seek the clip so that values should be written;
|
||||
state2.time = 0.5f; //Seek the clip so that values should be written;
|
||||
yield return null;
|
||||
Assert.AreEqual(0.25f, animation.gameObject.transform.localPosition.x);
|
||||
Assert.AreEqual(0.25f, animation.gameObject.transform.localPosition.y);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator State_Weight_NonZero_Writes([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.enabled = true;
|
||||
state.weight = 1f;
|
||||
state.time = 0.5f; //Seek the clip so that values should be written;
|
||||
yield return null;
|
||||
Assert.AreNotEqual(0f, animation.gameObject.transform.localPosition.x);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Weight_SetWeight_Equals_GetWeight([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.weight = 1f;
|
||||
Assert.AreEqual(1f, state.weight);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Weight_InitialValue_IsZero([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
Assert.AreEqual(0f, state.weight);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Weight_SetEnable_DoesntChange_Weight([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.enabled = true;
|
||||
Assert.AreEqual(0f, state.weight);
|
||||
state.weight = 1f;
|
||||
state.enabled = false;
|
||||
Assert.AreEqual(1f, state.weight);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void State_Weight_SetWeight_DoesntChange_Enable([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
state.weight = 1f;
|
||||
Assert.IsFalse(state.enabled);
|
||||
state.enabled = true;
|
||||
state.weight = 0f;
|
||||
Assert.IsTrue(state.enabled);
|
||||
}
|
||||
}
|
||||
|
||||
public class Length
|
||||
{
|
||||
[Test]
|
||||
public void State_Length_Equals_ClipLength([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, "ValidName");
|
||||
IAnimationState state = animation.GetState("ValidName");
|
||||
Assert.AreEqual(clipInstance.length, state.length);
|
||||
}
|
||||
}
|
||||
|
||||
public class Clip
|
||||
{
|
||||
[Test]
|
||||
public void State_Clip_Equals_SetClip([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, clipInstance.name);
|
||||
IAnimationState state = animation.GetState(clipInstance.name);
|
||||
Assert.AreEqual(clipInstance, state.clip);
|
||||
}
|
||||
}
|
||||
|
||||
public class WrapModeTests
|
||||
{
|
||||
[Test]
|
||||
public void WrapMode_Equals_Clip_WrapMode([ValueSource(typeof(ComparativeTestFixture), "Sources")]System.Type type)
|
||||
{
|
||||
IAnimation animation = ComparativeTestFixture.Instantiate(type);
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
clipInstance.legacy = animation.usesLegacy;
|
||||
|
||||
animation.AddClip(clipInstance, clipInstance.name);
|
||||
IAnimationState state = animation.GetState(clipInstance.name);
|
||||
Assert.AreEqual(clipInstance.wrapMode, state.wrapMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8cb3c934bf3f0534a8b954abe8c4984d
|
||||
timeCreated: 1498676303
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e443d0a02c421de4381e52acca42b6b8
|
||||
folderAsset: yes
|
||||
timeCreated: 1494560892
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,67 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: FiresEvent
|
||||
serializedVersion: 6
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings: []
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 1
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 0
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves: []
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_Events:
|
||||
- time: 0.4
|
||||
functionName: Event
|
||||
data:
|
||||
objectReferenceParameter: {fileID: 0}
|
||||
floatParameter: 0
|
||||
intParameter: 0
|
||||
messageOptions: 0
|
||||
- time: 1
|
||||
functionName: Event
|
||||
data:
|
||||
objectReferenceParameter: {fileID: 0}
|
||||
floatParameter: 0
|
||||
intParameter: 0
|
||||
messageOptions: 0
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6daa07941d12d35499204edaf3412a35
|
||||
timeCreated: 1519669948
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,145 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: LinearX
|
||||
serializedVersion: 6
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
inSlope: {x: Infinity, y: Infinity, z: Infinity}
|
||||
outSlope: {x: 1, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: {x: 1, y: 0, z: 0}
|
||||
inSlope: {x: 1, y: -0, z: -0}
|
||||
outSlope: {x: Infinity, y: Infinity, z: Infinity}
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
path:
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 1
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 1
|
||||
script: {fileID: 0}
|
||||
typeID: 4
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 1
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 1
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: Infinity
|
||||
outSlope: 1
|
||||
tangentMode: 69
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 1
|
||||
outSlope: Infinity
|
||||
tangentMode: 69
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.x
|
||||
path:
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: Infinity
|
||||
outSlope: 0
|
||||
tangentMode: 69
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: -0
|
||||
outSlope: Infinity
|
||||
tangentMode: 69
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.y
|
||||
path:
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: Infinity
|
||||
outSlope: 0
|
||||
tangentMode: 69
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: -0
|
||||
outSlope: Infinity
|
||||
tangentMode: 69
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.z
|
||||
path:
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 1
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_Events: []
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cfc925af54b7a044bbc0364b9157fc0d
|
||||
timeCreated: 1492542614
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,138 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: LinearXLegacy
|
||||
serializedVersion: 6
|
||||
m_Legacy: 1
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
inSlope: {x: Infinity, y: Infinity, z: Infinity}
|
||||
outSlope: {x: 1, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: {x: 1, y: 0, z: 0}
|
||||
inSlope: {x: 1, y: -0, z: -0}
|
||||
outSlope: {x: Infinity, y: Infinity, z: Infinity}
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
path:
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 1
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings: []
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 1
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 1
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: Infinity
|
||||
outSlope: 1
|
||||
tangentMode: 69
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 1
|
||||
outSlope: Infinity
|
||||
tangentMode: 69
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.x
|
||||
path:
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: Infinity
|
||||
outSlope: 0
|
||||
tangentMode: 69
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: -0
|
||||
outSlope: Infinity
|
||||
tangentMode: 69
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.y
|
||||
path:
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: Infinity
|
||||
outSlope: 0
|
||||
tangentMode: 69
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: -0
|
||||
outSlope: Infinity
|
||||
tangentMode: 69
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.z
|
||||
path:
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 1
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_Events: []
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e7cf6bd5ccd3f74e827f886ea59f0b1
|
||||
timeCreated: 1507816446
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,145 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: LinearY
|
||||
serializedVersion: 6
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 1, z: 0}
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: {x: 0, y: 1, z: 0}
|
||||
inSlope: {x: -0, y: 1, z: -0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
path:
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 1
|
||||
script: {fileID: 0}
|
||||
typeID: 4
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 1
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 1
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 69
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: -0
|
||||
outSlope: 0
|
||||
tangentMode: 69
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.x
|
||||
path:
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 1
|
||||
tangentMode: 69
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 1
|
||||
outSlope: 0
|
||||
tangentMode: 69
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.y
|
||||
path:
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 69
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: -0
|
||||
outSlope: 0
|
||||
tangentMode: 69
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.z
|
||||
path:
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 1
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_Events: []
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d6ad4075bbce8ce4d8f9a0d44b3328f4
|
||||
timeCreated: 1492542687
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,145 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: LinearZ
|
||||
serializedVersion: 6
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: {x: 0, y: 0, z: 1}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
path:
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 1
|
||||
script: {fileID: 0}
|
||||
typeID: 4
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 1
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 1
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.x
|
||||
path:
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.y
|
||||
path:
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.z
|
||||
path:
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 1
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_Events: []
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b6ab153d3e5b6441b29261e07fbc9c4
|
||||
timeCreated: 1492542878
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,135 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &8787524063794857361
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8787524063794857368}
|
||||
- component: {fileID: 8787524063794857371}
|
||||
- component: {fileID: 8787524063794857370}
|
||||
- component: {fileID: 8787524063794857365}
|
||||
- component: {fileID: 8787524063794857367}
|
||||
- component: {fileID: 8787524063794857366}
|
||||
m_Layer: 0
|
||||
m_Name: WithSimpleAnimation
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8787524063794857368
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8787524063794857361}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &8787524063794857371
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8787524063794857361}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &8787524063794857370
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8787524063794857361}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!65 &8787524063794857365
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8787524063794857361}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!95 &8787524063794857367
|
||||
Animator:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8787524063794857361}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 0}
|
||||
m_CullingMode: 1
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorControllerStateOnDisable: 0
|
||||
--- !u!114 &8787524063794857366
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8787524063794857361}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3759e2aae0f7b9a47bb98fc64bf3c543, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_PlayAutomatically: 1
|
||||
m_AnimatePhysics: 0
|
||||
m_CullingMode: 1
|
||||
m_WrapMode: 0
|
||||
m_Clip: {fileID: 0}
|
||||
m_States:
|
||||
- clip: {fileID: 0}
|
||||
name: Default
|
||||
defaultState: 1
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e932bd603cbef5540ad872fdcd320722
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,135 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using Object = UnityEngine.Object;
|
||||
using NUnit.Framework;
|
||||
using System.Collections;
|
||||
|
||||
public class SimpleAnimationTests
|
||||
{
|
||||
static SimpleAnimation Instantiate()
|
||||
{
|
||||
var go = new GameObject();
|
||||
return go.AddComponent<SimpleAnimation>();
|
||||
}
|
||||
public class GetStates
|
||||
{
|
||||
[Test]
|
||||
public void GetStates_WithNoStates_IEnumerator_MoveNext_ReturnsFalse()
|
||||
{
|
||||
SimpleAnimation animation = Instantiate();
|
||||
IEnumerable<SimpleAnimation.State> states = animation.GetStates();
|
||||
var it = states.GetEnumerator();
|
||||
Assert.IsFalse(it.MoveNext());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetStates_WithNoStates_IEnumerator_Current_Throws()
|
||||
{
|
||||
SimpleAnimation animation = Instantiate();
|
||||
IEnumerable<SimpleAnimation.State> states = animation.GetStates();
|
||||
var it = states.GetEnumerator();
|
||||
Assert.Throws<InvalidOperationException>(() => { SimpleAnimation.State state = it.Current; });
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetStates_WithSingleState_IEnumerator_Returns_ValidState()
|
||||
{
|
||||
SimpleAnimation animation = Instantiate();
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
|
||||
animation.AddClip(clipInstance, "SingleClip");
|
||||
IEnumerable<SimpleAnimation.State> states = animation.GetStates();
|
||||
var it = states.GetEnumerator();
|
||||
it.MoveNext();
|
||||
SimpleAnimation.State state = it.Current;
|
||||
Assert.AreEqual("SingleClip", state.name);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetStates_ModifyStates_IEnumerator_MoveNext_Throws()
|
||||
{
|
||||
SimpleAnimation animation = Instantiate();
|
||||
var clip = Resources.Load<AnimationClip>("LinearX");
|
||||
var clipInstance = Object.Instantiate<AnimationClip>(clip);
|
||||
|
||||
animation.AddClip(clipInstance, "SingleClip");
|
||||
IEnumerable<SimpleAnimation.State> states = animation.GetStates();
|
||||
var it = states.GetEnumerator();
|
||||
animation.RemoveState("SingleClip");
|
||||
Assert.Throws<InvalidOperationException>(() => { it.MoveNext(); });
|
||||
}
|
||||
}
|
||||
|
||||
public class PrefabBased
|
||||
{
|
||||
[UnityTest]
|
||||
public IEnumerator PlayAutomatically_False_DoesNotMoveObject()
|
||||
{
|
||||
var prefab = Resources.Load<GameObject>("WithSimpleAnimation");
|
||||
var simpleAnim = prefab.GetComponent<SimpleAnimation>();
|
||||
simpleAnim.playAutomatically = false;
|
||||
var instance = GameObject.Instantiate<GameObject>(prefab);
|
||||
yield return new WaitForSeconds(0.1f);
|
||||
Assert.Zero(instance.transform.position.magnitude);
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator PlayAutomatically_True_DoesMoveObject()
|
||||
{
|
||||
var prefab = Resources.Load<GameObject>("WithSimpleAnimation");
|
||||
prefab.GetComponent<SimpleAnimation>().playAutomatically = true;
|
||||
var instance = GameObject.Instantiate<GameObject>(prefab);
|
||||
yield return new WaitForSeconds(0.1f);
|
||||
Assert.Zero(instance.transform.position.magnitude);
|
||||
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
|
||||
public class LegacyClips
|
||||
{
|
||||
[Test]
|
||||
public void SetClip_WithLegacyClip_Throws_ArgumentException()
|
||||
{
|
||||
SimpleAnimation animation = Instantiate();
|
||||
var clip = new AnimationClip();
|
||||
clip.legacy = true;
|
||||
Assert.Throws<ArgumentException>(() => { animation.clip = clip; });
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AddClip_WithLegacyClip_Throws_ArgumentException()
|
||||
{
|
||||
SimpleAnimation animation = Instantiate();
|
||||
var clip = new AnimationClip();
|
||||
clip.legacy = true;
|
||||
Assert.Throws<ArgumentException>(() => { animation.AddClip(clip, "DefaultName");});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AddState_WithLegacyClip_Throws_ArgumentException()
|
||||
{
|
||||
SimpleAnimation animation = Instantiate();
|
||||
var clip = new AnimationClip();
|
||||
clip.legacy = true;
|
||||
Assert.Throws<ArgumentException>(() => { animation.AddState(clip, "DefaultName"); });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Event Receiver for FiresEvent AnimationClip
|
||||
public class ReceivesEvent : MonoBehaviour
|
||||
{
|
||||
public int eventCount;
|
||||
|
||||
void Event()
|
||||
{
|
||||
eventCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c4dfe8c4d18124458dbd9a5c201a9f2
|
||||
timeCreated: 1502400329
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "SimpleAnimation-Tests",
|
||||
"references": [
|
||||
"SimpleAnimationComponent"
|
||||
],
|
||||
"optionalUnityReferences": [
|
||||
"TestAssemblies"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": []
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c66b2379592b6f342ab84dff25cdc77d
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,231 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[RequireComponent(typeof(SimpleAnimation))]
|
||||
public class SimpleAnimationProxy : MonoBehaviour, IAnimation
|
||||
{
|
||||
private class SimpleAnimationStateProxy: IAnimationState
|
||||
{
|
||||
public SimpleAnimationStateProxy(SimpleAnimation.State state)
|
||||
{
|
||||
m_State = state;
|
||||
}
|
||||
|
||||
private SimpleAnimation.State m_State;
|
||||
|
||||
public bool enabled
|
||||
{
|
||||
get { return m_State.enabled; }
|
||||
set { m_State.enabled = value; }
|
||||
}
|
||||
|
||||
public bool isValid
|
||||
{
|
||||
get { return m_State.isValid; }
|
||||
}
|
||||
|
||||
public float time
|
||||
{
|
||||
get { return m_State.time; }
|
||||
set { m_State.time = value; }
|
||||
}
|
||||
public float normalizedTime
|
||||
{
|
||||
get { return m_State.normalizedTime; }
|
||||
set { m_State.normalizedTime = value; }
|
||||
}
|
||||
public float speed
|
||||
{
|
||||
get { return m_State.speed; }
|
||||
set { m_State.speed = value; }
|
||||
}
|
||||
|
||||
public string name
|
||||
{
|
||||
get { return m_State.name; }
|
||||
set { m_State.name = value; }
|
||||
}
|
||||
public float weight
|
||||
{
|
||||
get { return m_State.weight; }
|
||||
set { m_State.weight = value; }
|
||||
}
|
||||
public float length
|
||||
{
|
||||
get { return m_State.length; }
|
||||
}
|
||||
|
||||
public AnimationClip clip
|
||||
{
|
||||
get { return m_State.clip; }
|
||||
}
|
||||
|
||||
public WrapMode wrapMode
|
||||
{
|
||||
get { return m_State.wrapMode; }
|
||||
set { m_State.wrapMode = value; }
|
||||
}
|
||||
}
|
||||
|
||||
private SimpleAnimation m_SimpleAnimation;
|
||||
|
||||
private SimpleAnimation impl
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_SimpleAnimation == null)
|
||||
{
|
||||
m_SimpleAnimation = GetComponent<SimpleAnimation>();
|
||||
}
|
||||
return m_SimpleAnimation;
|
||||
}
|
||||
}
|
||||
|
||||
public bool animatePhysics
|
||||
{
|
||||
get { return impl.animatePhysics; }
|
||||
set { impl.animatePhysics = value; }
|
||||
}
|
||||
|
||||
public AnimatorCullingMode cullingMode
|
||||
{
|
||||
get
|
||||
{
|
||||
return impl.cullingMode;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
impl.cullingMode = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool isPlaying
|
||||
{
|
||||
get { return impl.isPlaying; }
|
||||
}
|
||||
|
||||
public bool playAutomatically
|
||||
{
|
||||
get { return impl.playAutomatically; }
|
||||
set { impl.playAutomatically = value; }
|
||||
}
|
||||
|
||||
public WrapMode wrapMode
|
||||
{
|
||||
get { return impl.wrapMode; }
|
||||
set { impl.wrapMode = value; }
|
||||
}
|
||||
|
||||
public AnimationClip clip
|
||||
{
|
||||
get { return impl.clip; }
|
||||
set { impl.clip = value; }
|
||||
}
|
||||
|
||||
public bool usesLegacy
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
new public GameObject gameObject
|
||||
{
|
||||
get { return impl.gameObject; }
|
||||
}
|
||||
|
||||
public void AddClip(AnimationClip clip, string newName)
|
||||
{
|
||||
impl.AddClip(clip, newName);
|
||||
}
|
||||
|
||||
public void Blend(string state, float targetWeight, float fadeLength)
|
||||
{
|
||||
impl.Blend(state, targetWeight, fadeLength);
|
||||
}
|
||||
|
||||
public void CrossFade(string state, float fadeLength)
|
||||
{
|
||||
impl.CrossFade(state, fadeLength);
|
||||
}
|
||||
|
||||
public void CrossFadeQueued(string state, float fadeLength, QueueMode queueMode)
|
||||
{
|
||||
impl.CrossFadeQueued(state, fadeLength, queueMode);
|
||||
}
|
||||
|
||||
public int GetClipCount()
|
||||
{
|
||||
return impl.GetClipCount();
|
||||
}
|
||||
|
||||
public bool IsPlaying(string stateName)
|
||||
{
|
||||
return impl.IsPlaying(stateName);
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
impl.Stop();
|
||||
}
|
||||
|
||||
public void Stop(string stateName)
|
||||
{
|
||||
impl.Stop(stateName);
|
||||
}
|
||||
|
||||
public void Sample()
|
||||
{
|
||||
impl.Sample();
|
||||
}
|
||||
|
||||
public bool Play()
|
||||
{
|
||||
return impl.Play();
|
||||
}
|
||||
|
||||
public bool Play(string stateName)
|
||||
{
|
||||
return impl.Play(stateName);
|
||||
}
|
||||
|
||||
public void PlayQueued(string stateName, QueueMode queueMode)
|
||||
{
|
||||
impl.PlayQueued(stateName, queueMode);
|
||||
}
|
||||
|
||||
public void RemoveClip(AnimationClip clip)
|
||||
{
|
||||
impl.RemoveClip(clip);
|
||||
}
|
||||
|
||||
public void RemoveClip(string stateName)
|
||||
{
|
||||
impl.RemoveState(stateName);
|
||||
}
|
||||
|
||||
public void Rewind()
|
||||
{
|
||||
impl.Rewind();
|
||||
}
|
||||
|
||||
public void Rewind(string stateName)
|
||||
{
|
||||
impl.Rewind(stateName);
|
||||
}
|
||||
|
||||
public IAnimationState GetState(string stateName)
|
||||
{
|
||||
SimpleAnimation.State state = impl[stateName];
|
||||
if (state != null)
|
||||
return new SimpleAnimationStateProxy(state);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public IAnimationState this[string name]
|
||||
{
|
||||
get { return GetState(name); }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a3879189febbd4043b9dd6392d965c15
|
||||
timeCreated: 1499690070
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user